#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/kmod.h>
#include <linux/hdreg.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nftl.h>
#include <linux/mtd/inftl.h>
#include <linux/mtd/rawnand.h>
#include <linux/uaccess.h>
#include <asm/errno.h>
#include <asm/io.h>
#define MAX_LOOPS …
static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
{ … }
static void inftl_remove_dev(struct mtd_blktrans_dev *dev)
{ … }
int inftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len,
size_t *retlen, uint8_t *buf)
{ … }
int inftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len,
size_t *retlen, uint8_t *buf)
{ … }
static int inftl_write(struct mtd_info *mtd, loff_t offs, size_t len,
size_t *retlen, uint8_t *buf, uint8_t *oob)
{ … }
static u16 INFTL_findfreeblock(struct INFTLrecord *inftl, int desperate)
{ … }
static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned pendingblock)
{ … }
static u16 INFTL_makefreeblock(struct INFTLrecord *inftl, unsigned pendingblock)
{ … }
static int nrbits(unsigned int val, int bitcount)
{ … }
static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block)
{ … }
static void INFTL_trydeletechain(struct INFTLrecord *inftl, unsigned thisVUC)
{ … }
static int INFTL_deleteblock(struct INFTLrecord *inftl, unsigned block)
{ … }
static int inftl_writeblock(struct mtd_blktrans_dev *mbd, unsigned long block,
char *buffer)
{ … }
static int inftl_readblock(struct mtd_blktrans_dev *mbd, unsigned long block,
char *buffer)
{ … }
static int inftl_getgeo(struct mtd_blktrans_dev *dev, struct hd_geometry *geo)
{ … }
static struct mtd_blktrans_ops inftl_tr = …;
module_mtd_blktrans(…);
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;