linux/drivers/memory/jz4780-nemc.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * JZ4780 NAND/external memory controller (NEMC)
 *
 * Copyright (c) 2015 Imagination Technologies
 * Author: Alex Smith <[email protected]>
 */

#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 {};

/**
 * jz4780_nemc_num_banks() - count the number of banks referenced by a device
 * @dev: device to count banks for, must be a child of the NEMC.
 *
 * Return: The number of unique NEMC banks referred to by the specified NEMC
 * child device. Unique here means that a device that references the same bank
 * multiple times in its "reg" property will only count once.
 */
unsigned int jz4780_nemc_num_banks(struct device *dev)
{}
EXPORT_SYMBOL();

/**
 * jz4780_nemc_set_type() - set the type of device connected to a bank
 * @dev: child device of the NEMC.
 * @bank: bank number to configure.
 * @type: type of device connected to the bank.
 */
void jz4780_nemc_set_type(struct device *dev, unsigned int bank,
			  enum jz4780_nemc_bank_type type)
{}
EXPORT_SYMBOL();

/**
 * jz4780_nemc_assert() - (de-)assert a NAND device's chip enable pin
 * @dev: child device of the NEMC.
 * @bank: bank number of device.
 * @assert: whether the chip enable pin should be asserted.
 *
 * (De-)asserts the chip enable pin for the NAND device connected to the
 * specified bank.
 */
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);