#include <linux/clk.h>
#include <linux/mfd/syscon.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/spi/spi-mem.h>
#define FIU_CFG …
#define FIU_BURST_BFG …
#define FIU_RESP_CFG …
#define FIU_CFBB_PROT …
#define FIU_FWIN1_LOW …
#define FIU_FWIN1_HIGH …
#define FIU_FWIN2_LOW …
#define FIU_FWIN2_HIGH …
#define FIU_FWIN3_LOW …
#define FIU_FWIN3_HIGH …
#define FIU_PROT_LOCK …
#define FIU_PROT_CLEAR …
#define FIU_SPI_FL_CFG …
#define FIU_UMA_CODE …
#define FIU_UMA_AB0 …
#define FIU_UMA_AB1 …
#define FIU_UMA_AB2 …
#define FIU_UMA_DB0 …
#define FIU_UMA_DB1 …
#define FIU_UMA_DB2 …
#define FIU_UMA_DB3 …
#define FIU_UMA_CTS …
#define FIU_UMA_ECTS …
#define FIU_BURST_CFG_R16 …
#define FIU_UMA_CTS_D_SIZE(x) …
#define FIU_UMA_CTS_A_SIZE …
#define FIU_UMA_CTS_WR …
#define FIU_UMA_CTS_CS(x) …
#define FIU_UMA_CTS_EXEC_DONE …
#define SHM_FLASH_SIZE …
#define SHM_FLASH_SIZE_STALL_HOST …
#define UMA_WAIT_ITERATIONS …
#define MAX_MEMORY_SIZE_PER_CS …
#define MAX_MEMORY_SIZE_TOTAL …
struct wpcm_fiu_spi { … };
static void wpcm_fiu_set_opcode(struct wpcm_fiu_spi *fiu, u8 opcode)
{ … }
static void wpcm_fiu_set_addr(struct wpcm_fiu_spi *fiu, u32 addr)
{ … }
static void wpcm_fiu_set_data(struct wpcm_fiu_spi *fiu, const u8 *data, unsigned int nbytes)
{ … }
static void wpcm_fiu_get_data(struct wpcm_fiu_spi *fiu, u8 *data, unsigned int nbytes)
{ … }
static int wpcm_fiu_do_uma(struct wpcm_fiu_spi *fiu, unsigned int cs,
bool use_addr, bool write, int data_bytes)
{ … }
static void wpcm_fiu_ects_assert(struct wpcm_fiu_spi *fiu, unsigned int cs)
{ … }
static void wpcm_fiu_ects_deassert(struct wpcm_fiu_spi *fiu, unsigned int cs)
{ … }
struct wpcm_fiu_op_shape { … };
static bool wpcm_fiu_normal_match(const struct spi_mem_op *op)
{ … }
static int wpcm_fiu_normal_exec(struct spi_mem *mem, const struct spi_mem_op *op)
{ … }
static bool wpcm_fiu_fast_read_match(const struct spi_mem_op *op)
{ … }
static int wpcm_fiu_fast_read_exec(struct spi_mem *mem, const struct spi_mem_op *op)
{ … }
static bool wpcm_fiu_4ba_match(const struct spi_mem_op *op)
{ … }
static int wpcm_fiu_4ba_exec(struct spi_mem *mem, const struct spi_mem_op *op)
{ … }
static bool wpcm_fiu_rdid_match(const struct spi_mem_op *op)
{ … }
static int wpcm_fiu_rdid_exec(struct spi_mem *mem, const struct spi_mem_op *op)
{ … }
static bool wpcm_fiu_dummy_match(const struct spi_mem_op *op)
{ … }
static int wpcm_fiu_dummy_exec(struct spi_mem *mem, const struct spi_mem_op *op)
{ … }
static const struct wpcm_fiu_op_shape wpcm_fiu_op_shapes[] = …;
static const struct wpcm_fiu_op_shape *wpcm_fiu_find_op_shape(const struct spi_mem_op *op)
{ … }
static bool wpcm_fiu_supports_op(struct spi_mem *mem, const struct spi_mem_op *op)
{ … }
static void wpcm_fiu_stall_host(struct wpcm_fiu_spi *fiu, bool stall)
{ … }
static int wpcm_fiu_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
{ … }
static int wpcm_fiu_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op)
{ … }
static int wpcm_fiu_dirmap_create(struct spi_mem_dirmap_desc *desc)
{ … }
static ssize_t wpcm_fiu_direct_read(struct spi_mem_dirmap_desc *desc, u64 offs, size_t len, void *buf)
{ … }
static const struct spi_controller_mem_ops wpcm_fiu_mem_ops = …;
static void wpcm_fiu_hw_init(struct wpcm_fiu_spi *fiu)
{ … }
static int wpcm_fiu_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id wpcm_fiu_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, wpcm_fiu_dt_ids);
static struct platform_driver wpcm_fiu_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;