#include <linux/slab.h>
#include "internals.h"
#define NAND_ECC_STATUS_WRITE_RECOMMENDED …
#define NAND_ECC_STATUS_MASK …
#define NAND_ECC_STATUS_UNCORRECTABLE …
#define NAND_ECC_STATUS_4_6_CORRECTED …
#define NAND_ECC_STATUS_1_3_CORRECTED …
#define NAND_ECC_STATUS_7_8_CORRECTED …
struct nand_onfi_vendor_micron { … } __packed;
struct micron_on_die_ecc { … };
struct micron_nand { … };
static int micron_nand_setup_read_retry(struct nand_chip *chip, int retry_mode)
{ … }
static int micron_nand_onfi_init(struct nand_chip *chip)
{ … }
static int micron_nand_on_die_4_ooblayout_ecc(struct mtd_info *mtd,
int section,
struct mtd_oob_region *oobregion)
{ … }
static int micron_nand_on_die_4_ooblayout_free(struct mtd_info *mtd,
int section,
struct mtd_oob_region *oobregion)
{ … }
static const struct mtd_ooblayout_ops micron_nand_on_die_4_ooblayout_ops = …;
static int micron_nand_on_die_8_ooblayout_ecc(struct mtd_info *mtd,
int section,
struct mtd_oob_region *oobregion)
{ … }
static int micron_nand_on_die_8_ooblayout_free(struct mtd_info *mtd,
int section,
struct mtd_oob_region *oobregion)
{ … }
static const struct mtd_ooblayout_ops micron_nand_on_die_8_ooblayout_ops = …;
static int micron_nand_on_die_ecc_setup(struct nand_chip *chip, bool enable)
{ … }
static int micron_nand_on_die_ecc_status_4(struct nand_chip *chip, u8 status,
void *buf, int page,
int oob_required)
{ … }
static int micron_nand_on_die_ecc_status_8(struct nand_chip *chip, u8 status)
{ … }
static int
micron_nand_read_page_on_die_ecc(struct nand_chip *chip, uint8_t *buf,
int oob_required, int page)
{ … }
static int
micron_nand_write_page_on_die_ecc(struct nand_chip *chip, const uint8_t *buf,
int oob_required, int page)
{ … }
enum { … };
#define MICRON_ID_INTERNAL_ECC_MASK …
#define MICRON_ID_ECC_ENABLED …
static int micron_supports_on_die_ecc(struct nand_chip *chip)
{ … }
static int micron_nand_init(struct nand_chip *chip)
{ … }
static void micron_nand_cleanup(struct nand_chip *chip)
{ … }
static void micron_fixup_onfi_param_page(struct nand_chip *chip,
struct nand_onfi_params *p)
{ … }
const struct nand_manufacturer_ops micron_nand_manuf_ops = …;