#include <linux/slab.h>
#include "linux/delay.h"
#include "internals.h"
#define MACRONIX_READ_RETRY_BIT …
#define MACRONIX_NUM_READ_RETRY_MODES …
#define ONFI_FEATURE_ADDR_MXIC_PROTECTION …
#define MXIC_BLOCK_PROTECTION_ALL_LOCK …
#define MXIC_BLOCK_PROTECTION_ALL_UNLOCK …
#define ONFI_FEATURE_ADDR_MXIC_RANDOMIZER …
#define MACRONIX_RANDOMIZER_BIT …
#define MACRONIX_RANDOMIZER_ENPGM …
#define MACRONIX_RANDOMIZER_RANDEN …
#define MACRONIX_RANDOMIZER_RANDOPT …
#define MACRONIX_RANDOMIZER_MODE_ENTER …
#define MACRONIX_RANDOMIZER_MODE_EXIT …
#define MXIC_CMD_POWER_DOWN …
#define ONFI_FEATURE_ADDR_30LFXG18AC_OTP …
#define MACRONIX_30LFXG18AC_OTP_START_PAGE …
#define MACRONIX_30LFXG18AC_OTP_PAGES …
#define MACRONIX_30LFXG18AC_OTP_PAGE_SIZE …
#define MACRONIX_30LFXG18AC_OTP_SIZE_BYTES …
#define MACRONIX_30LFXG18AC_OTP_EN …
struct nand_onfi_vendor_macronix { … } __packed;
static int macronix_nand_setup_read_retry(struct nand_chip *chip, int mode)
{ … }
static int macronix_nand_randomizer_check_enable(struct nand_chip *chip)
{ … }
static void macronix_nand_onfi_init(struct nand_chip *chip)
{ … }
static void macronix_nand_fix_broken_get_timings(struct nand_chip *chip)
{ … }
static int mxic_nand_lock(struct nand_chip *chip, loff_t ofs, uint64_t len)
{ … }
static int mxic_nand_unlock(struct nand_chip *chip, loff_t ofs, uint64_t len)
{ … }
static void macronix_nand_block_protection_support(struct nand_chip *chip)
{ … }
static int nand_power_down_op(struct nand_chip *chip)
{ … }
static int mxic_nand_suspend(struct nand_chip *chip)
{ … }
static void mxic_nand_resume(struct nand_chip *chip)
{ … }
static void macronix_nand_deep_power_down_support(struct nand_chip *chip)
{ … }
static int macronix_30lfxg18ac_get_otp_info(struct mtd_info *mtd, size_t len,
size_t *retlen,
struct otp_info *buf)
{ … }
static int macronix_30lfxg18ac_otp_enable(struct nand_chip *nand)
{ … }
static int macronix_30lfxg18ac_otp_disable(struct nand_chip *nand)
{ … }
static int __macronix_30lfxg18ac_rw_otp(struct mtd_info *mtd,
loff_t offs_in_flash,
size_t len, size_t *retlen,
u_char *buf, bool write)
{ … }
static int macronix_30lfxg18ac_write_otp(struct mtd_info *mtd, loff_t to,
size_t len, size_t *rlen,
const u_char *buf)
{ … }
static int macronix_30lfxg18ac_read_otp(struct mtd_info *mtd, loff_t from,
size_t len, size_t *rlen,
u_char *buf)
{ … }
static int macronix_30lfxg18ac_lock_otp(struct mtd_info *mtd, loff_t from,
size_t len)
{ … }
static void macronix_nand_setup_otp(struct nand_chip *chip)
{ … }
static int macronix_nand_init(struct nand_chip *chip)
{ … }
const struct nand_manufacturer_ops macronix_nand_manuf_ops = …;