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

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  Copyright (C) 2004 Richard Purdie
 *  Copyright (C) 2008 Dmitry Baryshkov
 *
 *  Based on Sharp's NAND driver sharp_sl.c
 */

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

/* register offset */
#define ECCLPLB
#define ECCLPUB
#define ECCCP
#define ECCCNTR
#define ECCCLRR
#define FLASHIO
#define FLASHCTL

/* Flash control bit */
#define FLRYBY
#define FLCE1
#define FLWP
#define FLALE
#define FLCLE
#define FLCE0

/*
 *	hardware specific access to control-lines
 *	ctrl:
 *	NAND_CNE: bit 0 -> ! bit 0 & 4
 *	NAND_CLE: bit 1 -> bit 1
 *	NAND_ALE: bit 2 -> bit 2
 *
 */
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 =;

/*
 * Main initialization routine
 */
static int sharpsl_nand_probe(struct platform_device *pdev)
{}

/*
 * Clean up routine
 */
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();