linux/drivers/memstick/host/tifm_ms.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  TI FlashMedia driver
 *
 *  Copyright (C) 2007 Alex Dubov <[email protected]>
 *
 * Special thanks to Carlos Corbacho for providing various MemoryStick cards
 * that made this driver possible.
 */

#include <linux/tifm.h>
#include <linux/memstick.h>
#include <linux/highmem.h>
#include <linux/scatterlist.h>
#include <linux/log2.h>
#include <linux/module.h>
#include <asm/io.h>

#define DRIVER_NAME

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

/*
 * Some control bits of TIFM appear to conform to Sony's reference design,
 * so I'm just assuming they all are.
 */

#define TIFM_MS_STAT_DRQ
#define TIFM_MS_STAT_MSINT
#define TIFM_MS_STAT_RDY
#define TIFM_MS_STAT_CRC
#define TIFM_MS_STAT_TOE
#define TIFM_MS_STAT_EMP
#define TIFM_MS_STAT_FUL
#define TIFM_MS_STAT_CED
#define TIFM_MS_STAT_ERR
#define TIFM_MS_STAT_BRQ
#define TIFM_MS_STAT_CNK

#define TIFM_MS_SYS_DMA
#define TIFM_MS_SYS_RESET
#define TIFM_MS_SYS_SRAC
#define TIFM_MS_SYS_INTEN
#define TIFM_MS_SYS_NOCRC
#define TIFM_MS_SYS_INTCLR
#define TIFM_MS_SYS_MSIEN
#define TIFM_MS_SYS_FCLR
#define TIFM_MS_SYS_FDIR
#define TIFM_MS_SYS_DAM
#define TIFM_MS_SYS_DRM
#define TIFM_MS_SYS_DRQSL
#define TIFM_MS_SYS_REI
#define TIFM_MS_SYS_REO
#define TIFM_MS_SYS_BSY_MASK

#define TIFM_MS_SYS_FIFO

/* Hardware flags */
enum {};

struct tifm_ms {};

static unsigned int tifm_ms_read_data(struct tifm_ms *host,
				      unsigned char *buf, unsigned int length)
{}

static unsigned int tifm_ms_write_data(struct tifm_ms *host,
				       unsigned char *buf, unsigned int length)
{}

static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
{}

static int tifm_ms_issue_cmd(struct tifm_ms *host)
{}

static void tifm_ms_complete_cmd(struct tifm_ms *host)
{}

static int tifm_ms_check_status(struct tifm_ms *host)
{}

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


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

static void tifm_ms_req_tasklet(unsigned long data)
{}

static void tifm_ms_dummy_submit(struct memstick_host *msh)
{}

static void tifm_ms_submit_req(struct memstick_host *msh)
{}

static int tifm_ms_set_param(struct memstick_host *msh,
			     enum memstick_param param,
			     int value)
{}

static void tifm_ms_abort(struct timer_list *t)
{}

static int tifm_ms_probe(struct tifm_dev *sock)
{}

static void tifm_ms_remove(struct tifm_dev *sock)
{}

#ifdef CONFIG_PM

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

static int tifm_ms_resume(struct tifm_dev *sock)
{}

#else

#define tifm_ms_suspend
#define tifm_ms_resume

#endif /* CONFIG_PM */

static struct tifm_device_id tifm_ms_id_tbl[] =;

static struct tifm_driver tifm_ms_driver =;

static int __init tifm_ms_init(void)
{}

static void __exit tifm_ms_exit(void)
{}

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_DEVICE_TABLE(tifm, tifm_ms_id_tbl);

module_init();
module_exit(tifm_ms_exit);