#include <linux/delay.h>
#include <linux/highmem.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/iopoll.h>
#include <linux/scatterlist.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include <linux/io.h>
#include <linux/mmc/host.h>
#include <linux/mmc/mmc.h>
#define DRIVER_NAME …
static unsigned int switchlocked;
#define SDRICOH_PCI_REGION …
#define SDRICOH_PCI_REGION_SIZE …
#define R104_VERSION …
#define R200_CMD …
#define R204_CMD_ARG …
#define R208_DATAIO …
#define R20C_RESP …
#define R21C_STATUS …
#define R2E0_INIT …
#define R2E4_STATUS_RESP …
#define R2F0_RESET …
#define R224_MODE …
#define R226_BLOCKSIZE …
#define R228_POWER …
#define R230_DATA …
#define STATUS_CMD_FINISHED …
#define STATUS_TRANSFER_FINISHED …
#define STATUS_CARD_INSERTED …
#define STATUS_CARD_LOCKED …
#define STATUS_CMD_TIMEOUT …
#define STATUS_READY_TO_READ …
#define STATUS_READY_TO_WRITE …
#define STATUS_BUSY …
#define SDRICOH_CMD_TIMEOUT_US …
#define SDRICOH_DATA_TIMEOUT_US …
static const struct pcmcia_device_id pcmcia_ids[] = …;
MODULE_DEVICE_TABLE(pcmcia, pcmcia_ids);
struct sdricoh_host { … };
static inline unsigned int sdricoh_readl(struct sdricoh_host *host,
unsigned int reg)
{ … }
static inline void sdricoh_writel(struct sdricoh_host *host, unsigned int reg,
unsigned int value)
{ … }
static inline void sdricoh_writew(struct sdricoh_host *host, unsigned int reg,
unsigned short value)
{ … }
static inline unsigned int sdricoh_readb(struct sdricoh_host *host,
unsigned int reg)
{ … }
static bool sdricoh_status_ok(struct sdricoh_host *host, unsigned int status,
unsigned int wanted)
{ … }
static int sdricoh_query_status(struct sdricoh_host *host, unsigned int wanted)
{ … }
static int sdricoh_mmc_cmd(struct sdricoh_host *host, struct mmc_command *cmd)
{ … }
static int sdricoh_reset(struct sdricoh_host *host)
{ … }
static int sdricoh_blockio(struct sdricoh_host *host, int read,
u8 *buf, int len)
{ … }
static void sdricoh_request(struct mmc_host *mmc, struct mmc_request *mrq)
{ … }
static void sdricoh_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
{ … }
static int sdricoh_get_ro(struct mmc_host *mmc)
{ … }
static const struct mmc_host_ops sdricoh_ops = …;
static int sdricoh_init_mmc(struct pci_dev *pci_dev,
struct pcmcia_device *pcmcia_dev)
{ … }
static int sdricoh_pcmcia_probe(struct pcmcia_device *pcmcia_dev)
{ … }
static void sdricoh_pcmcia_detach(struct pcmcia_device *link)
{ … }
#ifdef CONFIG_PM
static int sdricoh_pcmcia_suspend(struct pcmcia_device *link)
{ … }
static int sdricoh_pcmcia_resume(struct pcmcia_device *link)
{ … }
#else
#define sdricoh_pcmcia_suspend …
#define sdricoh_pcmcia_resume …
#endif
static struct pcmcia_driver sdricoh_driver = …;
module_pcmcia_driver(…);
module_param(switchlocked, uint, 0444);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_PARM_DESC(…) …;