#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/mtd/spinand.h>
#define SPINAND_MFR_MICRON …
#define MICRON_STATUS_ECC_MASK …
#define MICRON_STATUS_ECC_NO_BITFLIPS …
#define MICRON_STATUS_ECC_1TO3_BITFLIPS …
#define MICRON_STATUS_ECC_4TO6_BITFLIPS …
#define MICRON_STATUS_ECC_7TO8_BITFLIPS …
#define MICRON_CFG_CR …
#define MICRON_DIE_SELECT_REG …
#define MICRON_SELECT_DIE(x) …
static SPINAND_OP_VARIANTS(quadio_read_cache_variants,
SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0),
SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(0, 1, NULL, 0),
SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0),
SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0),
SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0));
static SPINAND_OP_VARIANTS(x4_write_cache_variants,
SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
SPINAND_PROG_LOAD(true, 0, NULL, 0));
static SPINAND_OP_VARIANTS(x4_update_cache_variants,
SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
SPINAND_PROG_LOAD(false, 0, NULL, 0));
static SPINAND_OP_VARIANTS(x4_read_cache_variants,
SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0),
SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0),
SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0));
static SPINAND_OP_VARIANTS(x1_write_cache_variants,
SPINAND_PROG_LOAD(true, 0, NULL, 0));
static SPINAND_OP_VARIANTS(x1_update_cache_variants,
SPINAND_PROG_LOAD(false, 0, NULL, 0));
static int micron_8_ooblayout_ecc(struct mtd_info *mtd, int section,
struct mtd_oob_region *region)
{ … }
static int micron_8_ooblayout_free(struct mtd_info *mtd, int section,
struct mtd_oob_region *region)
{ … }
static const struct mtd_ooblayout_ops micron_8_ooblayout = …;
static int micron_4_ooblayout_ecc(struct mtd_info *mtd, int section,
struct mtd_oob_region *region)
{ … }
static int micron_4_ooblayout_free(struct mtd_info *mtd, int section,
struct mtd_oob_region *region)
{ … }
static const struct mtd_ooblayout_ops micron_4_ooblayout = …;
static int micron_select_target(struct spinand_device *spinand,
unsigned int target)
{ … }
static int micron_8_ecc_get_status(struct spinand_device *spinand,
u8 status)
{ … }
static const struct spinand_info micron_spinand_table[] = …;
static int micron_spinand_init(struct spinand_device *spinand)
{ … }
static const struct spinand_manufacturer_ops micron_spinand_manuf_ops = …;
const struct spinand_manufacturer micron_spinand_manufacturer = …;