linux/drivers/mtd/nand/raw/txx9ndfmc.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * TXx9 NAND flash memory controller driver
 * Based on RBTX49xx patch from CELF patch archive.
 *
 * (C) Copyright TOSHIBA CORPORATION 2004-2007
 * All Rights Reserved.
 */
#include <linux/err.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/rawnand.h>
#include <linux/mtd/partitions.h>
#include <linux/io.h>
#include <linux/platform_data/txx9/ndfmc.h>

/* TXX9 NDFMC Registers */
#define TXX9_NDFDTR
#define TXX9_NDFMCR
#define TXX9_NDFSR
#define TXX9_NDFISR
#define TXX9_NDFIMR
#define TXX9_NDFSPR
#define TXX9_NDFRSTR

/* NDFMCR : NDFMC Mode Control */
#define TXX9_NDFMCR_WE
#define TXX9_NDFMCR_ECC_ALL
#define TXX9_NDFMCR_ECC_RESET
#define TXX9_NDFMCR_ECC_READ
#define TXX9_NDFMCR_ECC_ON
#define TXX9_NDFMCR_ECC_OFF
#define TXX9_NDFMCR_CE
#define TXX9_NDFMCR_BSPRT
#define TXX9_NDFMCR_ALE
#define TXX9_NDFMCR_CLE
/* TX4939 only */
#define TXX9_NDFMCR_X16
#define TXX9_NDFMCR_DMAREQ_MASK
#define TXX9_NDFMCR_DMAREQ_NODMA
#define TXX9_NDFMCR_DMAREQ_128
#define TXX9_NDFMCR_DMAREQ_256
#define TXX9_NDFMCR_DMAREQ_512
#define TXX9_NDFMCR_CS_MASK
#define TXX9_NDFMCR_CS(ch)

/* NDFMCR : NDFMC Status */
#define TXX9_NDFSR_BUSY
/* TX4939 only */
#define TXX9_NDFSR_DMARUN

/* NDFMCR : NDFMC Reset */
#define TXX9_NDFRSTR_RST

struct txx9ndfmc_priv {};

#define MAX_TXX9NDFMC_DEV
struct txx9ndfmc_drvdata {};

static struct platform_device *mtd_to_platdev(struct mtd_info *mtd)
{}

static void __iomem *ndregaddr(struct platform_device *dev, unsigned int reg)
{}

static u32 txx9ndfmc_read(struct platform_device *dev, unsigned int reg)
{}

static void txx9ndfmc_write(struct platform_device *dev,
			    u32 val, unsigned int reg)
{}

static uint8_t txx9ndfmc_read_byte(struct nand_chip *chip)
{}

static void txx9ndfmc_write_buf(struct nand_chip *chip, const uint8_t *buf,
				int len)
{}

static void txx9ndfmc_read_buf(struct nand_chip *chip, uint8_t *buf, int len)
{}

static void txx9ndfmc_cmd_ctrl(struct nand_chip *chip, int cmd,
			       unsigned int ctrl)
{}

static int txx9ndfmc_dev_ready(struct nand_chip *chip)
{}

static int txx9ndfmc_calculate_ecc(struct nand_chip *chip, const uint8_t *dat,
				   uint8_t *ecc_code)
{}

static int txx9ndfmc_correct_data(struct nand_chip *chip, unsigned char *buf,
				  unsigned char *read_ecc,
				  unsigned char *calc_ecc)
{}

static void txx9ndfmc_enable_hwecc(struct nand_chip *chip, int mode)
{}

static void txx9ndfmc_initialize(struct platform_device *dev)
{}

#define TXX9NDFMC_NS_TO_CYC(gbusclk, ns)

static int txx9ndfmc_attach_chip(struct nand_chip *chip)
{}

static const struct nand_controller_ops txx9ndfmc_controller_ops =;

static int txx9ndfmc_probe(struct platform_device *dev)
{}

static void txx9ndfmc_remove(struct platform_device *dev)
{}

#ifdef CONFIG_PM
static int txx9ndfmc_resume(struct platform_device *dev)
{}
#else
#define txx9ndfmc_resume
#endif

static struct platform_driver txx9ndfmc_driver =;
module_platform_driver();

MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_ALIAS();