linux/drivers/mtd/spi-nor/micron-st.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2005, Intec Automation Inc.
 * Copyright (C) 2014, Freescale Semiconductor, Inc.
 */

#include <linux/mtd/spi-nor.h>

#include "core.h"

/* flash_info mfr_flag. Used to read proprietary FSR register. */
#define USE_FSR

#define SPINOR_OP_MT_DIE_ERASE
#define SPINOR_OP_RDFSR
#define SPINOR_OP_CLFSR
#define SPINOR_OP_MT_DTR_RD
#define SPINOR_OP_MT_RD_ANY_REG
#define SPINOR_OP_MT_WR_ANY_REG
#define SPINOR_REG_MT_CFR0V
#define SPINOR_REG_MT_CFR1V
#define SPINOR_REG_MT_CFR1V_DEF
#define SPINOR_MT_OCT_DTR
#define SPINOR_MT_EXSPI

/* Flag Status Register bits */
#define FSR_READY
#define FSR_E_ERR
#define FSR_P_ERR
#define FSR_PT_ERR

/* Micron ST SPI NOR flash operations. */
#define MICRON_ST_NOR_WR_ANY_REG_OP(naddr, addr, ndata, buf)

#define MICRON_ST_RDFSR_OP(buf)

#define MICRON_ST_CLFSR_OP

static int micron_st_nor_octal_dtr_en(struct spi_nor *nor)
{}

static int micron_st_nor_octal_dtr_dis(struct spi_nor *nor)
{}

static int micron_st_nor_set_octal_dtr(struct spi_nor *nor, bool enable)
{}

static void mt35xu512aba_default_init(struct spi_nor *nor)
{}

static int mt35xu512aba_post_sfdp_fixup(struct spi_nor *nor)
{}

static const struct spi_nor_fixups mt35xu512aba_fixups =;

static const struct flash_info micron_nor_parts[] =;

static int mt25qu512a_post_bfpt_fixup(struct spi_nor *nor,
				      const struct sfdp_parameter_header *bfpt_header,
				      const struct sfdp_bfpt *bfpt)
{}

static struct spi_nor_fixups mt25qu512a_fixups =;

static int st_nor_four_die_late_init(struct spi_nor *nor)
{}

static int st_nor_two_die_late_init(struct spi_nor *nor)
{}

static struct spi_nor_fixups n25q00_fixups =;

static struct spi_nor_fixups mt25q01_fixups =;

static struct spi_nor_fixups mt25q02_fixups =;

static const struct flash_info st_nor_parts[] =;

/**
 * micron_st_nor_read_fsr() - Read the Flag Status Register.
 * @nor:	pointer to 'struct spi_nor'
 * @fsr:	pointer to a DMA-able buffer where the value of the
 *              Flag Status Register will be written. Should be at least 2
 *              bytes.
 *
 * Return: 0 on success, -errno otherwise.
 */
static int micron_st_nor_read_fsr(struct spi_nor *nor, u8 *fsr)
{}

/**
 * micron_st_nor_clear_fsr() - Clear the Flag Status Register.
 * @nor:	pointer to 'struct spi_nor'.
 */
static void micron_st_nor_clear_fsr(struct spi_nor *nor)
{}

/**
 * micron_st_nor_ready() - Query the Status Register as well as the Flag Status
 * Register to see if the flash is ready for new commands. If there are any
 * errors in the FSR clear them.
 * @nor:	pointer to 'struct spi_nor'.
 *
 * Return: 1 if ready, 0 if not ready, -errno on errors.
 */
static int micron_st_nor_ready(struct spi_nor *nor)
{}

static void micron_st_nor_default_init(struct spi_nor *nor)
{}

static int micron_st_nor_late_init(struct spi_nor *nor)
{}

static const struct spi_nor_fixups micron_st_nor_fixups =;

const struct spi_nor_manufacturer spi_nor_micron =;

const struct spi_nor_manufacturer spi_nor_st =;