linux/drivers/mmc/host/tifm_sd.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  tifm_sd.c - TI FlashMedia driver
 *
 *  Copyright (C) 2006 Alex Dubov <[email protected]>
 *
 * Special thanks to Brad Campbell for extensive testing of this driver.
 */


#include <linux/tifm.h>
#include <linux/mmc/host.h>
#include <linux/highmem.h>
#include <linux/scatterlist.h>
#include <linux/module.h>
#include <linux/workqueue.h>
#include <asm/io.h>

#define DRIVER_NAME
#define DRIVER_VERSION

static bool no_dma =;
static bool fixed_timeout =;
module_param(no_dma, bool, 0644);
module_param(fixed_timeout, bool, 0644);

/* Constants here are mostly from OMAP5912 datasheet */
#define TIFM_MMCSD_RESET
#define TIFM_MMCSD_CLKMASK
#define TIFM_MMCSD_POWER
#define TIFM_MMCSD_4BBUS
#define TIFM_MMCSD_RXDE
#define TIFM_MMCSD_TXDE
#define TIFM_MMCSD_BUFINT
#define TIFM_MMCSD_DPE
#define TIFM_MMCSD_INAB
#define TIFM_MMCSD_READ

#define TIFM_MMCSD_ERRMASK
#define TIFM_MMCSD_EOC
#define TIFM_MMCSD_CD
#define TIFM_MMCSD_CB
#define TIFM_MMCSD_BRS
#define TIFM_MMCSD_EOFB
#define TIFM_MMCSD_DTO
#define TIFM_MMCSD_DCRC
#define TIFM_MMCSD_CTO
#define TIFM_MMCSD_CCRC
#define TIFM_MMCSD_AF
#define TIFM_MMCSD_AE
#define TIFM_MMCSD_OCRB
#define TIFM_MMCSD_CIRQ
#define TIFM_MMCSD_CERR

#define TIFM_MMCSD_ODTO
#define TIFM_MMCSD_CARD_RO

#define TIFM_MMCSD_FIFO_SIZE

#define TIFM_MMCSD_RSP_R0
#define TIFM_MMCSD_RSP_R1
#define TIFM_MMCSD_RSP_R2
#define TIFM_MMCSD_RSP_R3
#define TIFM_MMCSD_RSP_R4
#define TIFM_MMCSD_RSP_R5
#define TIFM_MMCSD_RSP_R6

#define TIFM_MMCSD_RSP_BUSY

#define TIFM_MMCSD_CMD_BC
#define TIFM_MMCSD_CMD_BCR
#define TIFM_MMCSD_CMD_AC
#define TIFM_MMCSD_CMD_ADTC

#define TIFM_MMCSD_MAX_BLOCK_SIZE

#define TIFM_MMCSD_REQ_TIMEOUT_MS

enum {};

struct tifm_sd {};

/* for some reason, host won't respond correctly to readw/writew */
static void tifm_sd_read_fifo(struct tifm_sd *host, struct page *pg,
			      unsigned int off, unsigned int cnt)
{}

static void tifm_sd_write_fifo(struct tifm_sd *host, struct page *pg,
			       unsigned int off, unsigned int cnt)
{}

static void tifm_sd_transfer_data(struct tifm_sd *host)
{}

static void tifm_sd_copy_page(struct page *dst, unsigned int dst_off,
			      struct page *src, unsigned int src_off,
			      unsigned int count)
{}

static void tifm_sd_bounce_block(struct tifm_sd *host, struct mmc_data *r_data)
{}

static int tifm_sd_set_dma_data(struct tifm_sd *host, struct mmc_data *r_data)
{}

static unsigned int tifm_sd_op_flags(struct mmc_command *cmd)
{}

static void tifm_sd_exec(struct tifm_sd *host, struct mmc_command *cmd)
{}

static void tifm_sd_fetch_resp(struct mmc_command *cmd, struct tifm_dev *sock)
{}

static void tifm_sd_check_status(struct tifm_sd *host)
{}

/* Called from interrupt handler */
static void tifm_sd_data_event(struct tifm_dev *sock)
{}

/* Called from interrupt handler */
static void tifm_sd_card_event(struct tifm_dev *sock)
{}

static void tifm_sd_set_data_timeout(struct tifm_sd *host,
				     struct mmc_data *data)
{}

static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq)
{}

static void tifm_sd_end_cmd(struct work_struct *t)
{}

static void tifm_sd_abort(struct timer_list *t)
{}

static void tifm_sd_ios(struct mmc_host *mmc, struct mmc_ios *ios)
{}

static int tifm_sd_ro(struct mmc_host *mmc)
{}

static const struct mmc_host_ops tifm_sd_ops =;

static int tifm_sd_initialize_host(struct tifm_sd *host)
{}

static int tifm_sd_probe(struct tifm_dev *sock)
{}

static void tifm_sd_remove(struct tifm_dev *sock)
{}

#ifdef CONFIG_PM

static int tifm_sd_suspend(struct tifm_dev *sock, pm_message_t state)
{}

static int tifm_sd_resume(struct tifm_dev *sock)
{}

#else

#define tifm_sd_suspend
#define tifm_sd_resume

#endif /* CONFIG_PM */

static struct tifm_device_id tifm_sd_id_tbl[] =;

static struct tifm_driver tifm_sd_driver =;

static int __init tifm_sd_init(void)
{}

static void __exit tifm_sd_exit(void)
{}

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_DEVICE_TABLE(tifm, tifm_sd_id_tbl);
MODULE_VERSION();

module_init();
module_exit(tifm_sd_exit);