#include <linux/module.h>
#include <linux/slab.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <asm/io.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include <linux/mtd/map.h>
#include <linux/mtd/mtd.h>
#define info(format, arg...) …
#define DRIVER_DESC …
#define MAX_PCMCIA_ADDR …
struct pcmciamtd_dev { … };
static int bankwidth = …;
static int mem_speed;
static int force_size;
static int vpp;
static int setvpp;
static int mem_type;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…);
module_param(bankwidth, int, 0);
MODULE_PARM_DESC(…) …;
module_param(mem_speed, int, 0);
MODULE_PARM_DESC(…) …;
module_param(force_size, int, 0);
MODULE_PARM_DESC(…) …;
module_param(setvpp, int, 0);
MODULE_PARM_DESC(…) …;
module_param(vpp, int, 0);
MODULE_PARM_DESC(…) …;
module_param(mem_type, int, 0);
MODULE_PARM_DESC(…) …;
static void __iomem *remap_window(struct map_info *map, unsigned long to)
{ … }
static map_word pcmcia_read8_remap(struct map_info *map, unsigned long ofs)
{ … }
static map_word pcmcia_read16_remap(struct map_info *map, unsigned long ofs)
{ … }
static void pcmcia_copy_from_remap(struct map_info *map, void *to, unsigned long from, ssize_t len)
{ … }
static void pcmcia_write8_remap(struct map_info *map, map_word d, unsigned long adr)
{ … }
static void pcmcia_write16_remap(struct map_info *map, map_word d, unsigned long adr)
{ … }
static void pcmcia_copy_to_remap(struct map_info *map, unsigned long to, const void *from, ssize_t len)
{ … }
#define DEV_REMOVED(x) …
static map_word pcmcia_read8(struct map_info *map, unsigned long ofs)
{ … }
static map_word pcmcia_read16(struct map_info *map, unsigned long ofs)
{ … }
static void pcmcia_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
{ … }
static void pcmcia_write8(struct map_info *map, map_word d, unsigned long adr)
{ … }
static void pcmcia_write16(struct map_info *map, map_word d, unsigned long adr)
{ … }
static void pcmcia_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
{ … }
static DEFINE_MUTEX(pcmcia_vpp_lock);
static int pcmcia_vpp_refcnt;
static void pcmciamtd_set_vpp(struct map_info *map, int on)
{ … }
static void pcmciamtd_release(struct pcmcia_device *link)
{ … }
static int pcmciamtd_cistpl_format(struct pcmcia_device *p_dev,
tuple_t *tuple,
void *priv_data)
{ … }
static int pcmciamtd_cistpl_jedec(struct pcmcia_device *p_dev,
tuple_t *tuple,
void *priv_data)
{ … }
static int pcmciamtd_cistpl_device(struct pcmcia_device *p_dev,
tuple_t *tuple,
void *priv_data)
{ … }
static int pcmciamtd_cistpl_geo(struct pcmcia_device *p_dev,
tuple_t *tuple,
void *priv_data)
{ … }
static void card_settings(struct pcmciamtd_dev *dev, struct pcmcia_device *p_dev, int *new_name)
{ … }
static int pcmciamtd_config(struct pcmcia_device *link)
{ … }
static int pcmciamtd_suspend(struct pcmcia_device *dev)
{ … }
static int pcmciamtd_resume(struct pcmcia_device *dev)
{ … }
static void pcmciamtd_detach(struct pcmcia_device *link)
{ … }
static int pcmciamtd_probe(struct pcmcia_device *link)
{ … }
static const struct pcmcia_device_id pcmciamtd_ids[] = …;
MODULE_DEVICE_TABLE(pcmcia, pcmciamtd_ids);
static struct pcmcia_driver pcmciamtd_driver = …;
static int __init init_pcmciamtd(void)
{ … }
static void __exit exit_pcmciamtd(void)
{ … }
module_init(…) …;
module_exit(exit_pcmciamtd);