linux/drivers/mmc/host/sdricoh_cs.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  sdricoh_cs.c - driver for Ricoh Secure Digital Card Readers that can be
 *     found on some Ricoh RL5c476 II cardbus bridge
 *
 *  Copyright (C) 2006 - 2008 Sascha Sommer <[email protected]>
 */

/*
#define DEBUG
#define VERBOSE_DEBUG
*/
#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;

/* i/o region */
#define SDRICOH_PCI_REGION
#define SDRICOH_PCI_REGION_SIZE

/* registers */
#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

/* flags for the R21C_STATUS register */
#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

/* timeouts */
#define SDRICOH_CMD_TIMEOUT_US
#define SDRICOH_DATA_TIMEOUT_US

/* list of supported pcmcia devices */
static const struct pcmcia_device_id pcmcia_ids[] =;

MODULE_DEVICE_TABLE(pcmcia, pcmcia_ids);

/* mmc privdata */
struct sdricoh_host {};

/***************** register i/o helper functions *****************************/

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 =;

/* initialize the control and register it to the mmc framework */
static int sdricoh_init_mmc(struct pci_dev *pci_dev,
			    struct pcmcia_device *pcmcia_dev)
{}

/* search for supported mmc controllers */
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();