#include <linux/slab.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/rawnand.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/sharpsl.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/io.h>
struct sharpsl_nand { … };
static inline struct sharpsl_nand *mtd_to_sharpsl(struct mtd_info *mtd)
{ … }
#define ECCLPLB …
#define ECCLPUB …
#define ECCCP …
#define ECCCNTR …
#define ECCCLRR …
#define FLASHIO …
#define FLASHCTL …
#define FLRYBY …
#define FLCE1 …
#define FLWP …
#define FLALE …
#define FLCLE …
#define FLCE0 …
static void sharpsl_nand_hwcontrol(struct nand_chip *chip, int cmd,
unsigned int ctrl)
{ … }
static int sharpsl_nand_dev_ready(struct nand_chip *chip)
{ … }
static void sharpsl_nand_enable_hwecc(struct nand_chip *chip, int mode)
{ … }
static int sharpsl_nand_calculate_ecc(struct nand_chip *chip,
const u_char * dat, u_char * ecc_code)
{ … }
static int sharpsl_attach_chip(struct nand_chip *chip)
{ … }
static const struct nand_controller_ops sharpsl_ops = …;
static int sharpsl_nand_probe(struct platform_device *pdev)
{ … }
static void sharpsl_nand_remove(struct platform_device *pdev)
{ … }
static struct platform_driver sharpsl_nand_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;