#include <linux/clk.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/math64.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/jz4780-nemc.h>
#define NEMC_SMCRn(n) …
#define NEMC_NFCSR …
#define NEMC_REG_LEN …
#define NEMC_SMCR_SMT …
#define NEMC_SMCR_BW_SHIFT …
#define NEMC_SMCR_BW_MASK …
#define NEMC_SMCR_BW_8 …
#define NEMC_SMCR_TAS_SHIFT …
#define NEMC_SMCR_TAS_MASK …
#define NEMC_SMCR_TAH_SHIFT …
#define NEMC_SMCR_TAH_MASK …
#define NEMC_SMCR_TBP_SHIFT …
#define NEMC_SMCR_TBP_MASK …
#define NEMC_SMCR_TAW_SHIFT …
#define NEMC_SMCR_TAW_MASK …
#define NEMC_SMCR_TSTRV_SHIFT …
#define NEMC_SMCR_TSTRV_MASK …
#define NEMC_NFCSR_NFEn(n) …
#define NEMC_NFCSR_NFCEn(n) …
#define NEMC_NFCSR_TNFEn(n) …
struct jz_soc_info { … };
struct jz4780_nemc { … };
unsigned int jz4780_nemc_num_banks(struct device *dev)
{ … }
EXPORT_SYMBOL(…);
void jz4780_nemc_set_type(struct device *dev, unsigned int bank,
enum jz4780_nemc_bank_type type)
{ … }
EXPORT_SYMBOL(…);
void jz4780_nemc_assert(struct device *dev, unsigned int bank, bool assert)
{ … }
EXPORT_SYMBOL(…);
static uint32_t jz4780_nemc_clk_period(struct jz4780_nemc *nemc)
{ … }
static uint32_t jz4780_nemc_ns_to_cycles(struct jz4780_nemc *nemc, uint32_t ns)
{ … }
static bool jz4780_nemc_configure_bank(struct jz4780_nemc *nemc,
unsigned int bank,
struct device_node *node)
{ … }
static int jz4780_nemc_probe(struct platform_device *pdev)
{ … }
static void jz4780_nemc_remove(struct platform_device *pdev)
{ … }
static const struct jz_soc_info jz4740_soc_info = …;
static const struct jz_soc_info jz4780_soc_info = …;
static const struct of_device_id jz4780_nemc_dt_match[] = …;
static struct platform_driver jz4780_nemc_driver = …;
static int __init jz4780_nemc_init(void)
{ … }
subsys_initcall(jz4780_nemc_init);