linux/drivers/memstick/host/jmb38x_ms.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  jmb38x_ms.c - JMicron jmb38x MemoryStick card reader
 *
 *  Copyright (C) 2008 Alex Dubov <[email protected]>
 */

#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/highmem.h>
#include <linux/memstick.h>
#include <linux/slab.h>
#include <linux/module.h>

#define DRIVER_NAME

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

enum {};

struct jmb38x_ms_host {};

struct jmb38x_ms {};

#define BLOCK_COUNT_MASK
#define BLOCK_SIZE_MASK

#define DMA_CONTROL_ENABLE

#define TPC_DATA_SEL
#define TPC_DIR
#define TPC_WAIT_INT
#define TPC_GET_INT
#define TPC_CODE_SZ_MASK
#define TPC_DATA_SZ_MASK

#define HOST_CONTROL_TDELAY_EN
#define HOST_CONTROL_HW_OC_P
#define HOST_CONTROL_RESET_REQ
#define HOST_CONTROL_REI
#define HOST_CONTROL_LED
#define HOST_CONTROL_FAST_CLK
#define HOST_CONTROL_RESET
#define HOST_CONTROL_POWER_EN
#define HOST_CONTROL_CLOCK_EN
#define HOST_CONTROL_REO
#define HOST_CONTROL_IF_SHIFT

#define HOST_CONTROL_IF_SERIAL
#define HOST_CONTROL_IF_PAR4
#define HOST_CONTROL_IF_PAR8

#define STATUS_BUSY
#define STATUS_MS_DAT7
#define STATUS_MS_DAT6
#define STATUS_MS_DAT5
#define STATUS_MS_DAT4
#define STATUS_MS_DAT3
#define STATUS_MS_DAT2
#define STATUS_MS_DAT1
#define STATUS_MS_DAT0
#define STATUS_HAS_MEDIA
#define STATUS_FIFO_EMPTY
#define STATUS_FIFO_FULL
#define STATUS_MS_CED
#define STATUS_MS_ERR
#define STATUS_MS_BRQ
#define STATUS_MS_CNK

#define INT_STATUS_TPC_ERR
#define INT_STATUS_CRC_ERR
#define INT_STATUS_TIMER_TO
#define INT_STATUS_HSK_TO
#define INT_STATUS_ANY_ERR
#define INT_STATUS_FIFO_WRDY
#define INT_STATUS_FIFO_RRDY
#define INT_STATUS_MEDIA_OUT
#define INT_STATUS_MEDIA_IN
#define INT_STATUS_DMA_BOUNDARY
#define INT_STATUS_EOTRAN
#define INT_STATUS_EOTPC

#define INT_STATUS_ALL

#define PAD_OUTPUT_ENABLE_MS

#define PAD_PU_PD_OFF
#define PAD_PU_PD_ON_MS_SOCK0
#define PAD_PU_PD_ON_MS_SOCK1

#define CLOCK_CONTROL_BY_MMIO
#define CLOCK_CONTROL_40MHZ
#define CLOCK_CONTROL_50MHZ
#define CLOCK_CONTROL_60MHZ
#define CLOCK_CONTROL_62_5MHZ
#define CLOCK_CONTROL_OFF

#define PCI_CTL_CLOCK_DLY_ADDR

enum {};

static unsigned int jmb38x_ms_read_data(struct jmb38x_ms_host *host,
					unsigned char *buf, unsigned int length)
{}

static unsigned int jmb38x_ms_read_reg_data(struct jmb38x_ms_host *host,
					    unsigned char *buf,
					    unsigned int length)
{}

static unsigned int jmb38x_ms_write_data(struct jmb38x_ms_host *host,
					 unsigned char *buf,
					 unsigned int length)
{}

static unsigned int jmb38x_ms_write_reg_data(struct jmb38x_ms_host *host,
					     unsigned char *buf,
					     unsigned int length)
{}

static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
{}

static int jmb38x_ms_issue_cmd(struct memstick_host *msh)
{}

static void jmb38x_ms_complete_cmd(struct memstick_host *msh, int last)
{}

static irqreturn_t jmb38x_ms_isr(int irq, void *dev_id)
{}

static void jmb38x_ms_abort(struct timer_list *t)
{}

static void jmb38x_ms_req_tasklet(unsigned long data)
{}

static void jmb38x_ms_dummy_submit(struct memstick_host *msh)
{}

static void jmb38x_ms_submit_req(struct memstick_host *msh)
{}

static int jmb38x_ms_reset(struct jmb38x_ms_host *host)
{}

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

#define PCI_PMOS0_CONTROL
#define PMOS0_ENABLE
#define PMOS0_OVERCURRENT_LEVEL_2_4V
#define PMOS0_EN_OVERCURRENT_DEBOUNCE
#define PMOS0_SW_LED_POLARITY_ENABLE
#define PMOS0_ACTIVE_BITS
#define PCI_PMOS1_CONTROL
#define PMOS1_ACTIVE_BITS
#define PCI_CLOCK_CTL

static int jmb38x_ms_pmos(struct pci_dev *pdev, int flag)
{}

static int __maybe_unused jmb38x_ms_suspend(struct device *dev)
{}

static int __maybe_unused jmb38x_ms_resume(struct device *dev)
{}

static int jmb38x_ms_count_slots(struct pci_dev *pdev)
{}

static struct memstick_host *jmb38x_ms_alloc_host(struct jmb38x_ms *jm, int cnt)
{}

static void jmb38x_ms_free_host(struct memstick_host *msh)
{}

static int jmb38x_ms_probe(struct pci_dev *pdev,
			   const struct pci_device_id *dev_id)
{}

static void jmb38x_ms_remove(struct pci_dev *dev)
{}

static struct pci_device_id jmb38x_ms_id_tbl [] =;

static SIMPLE_DEV_PM_OPS(jmb38x_ms_pm_ops, jmb38x_ms_suspend, jmb38x_ms_resume);

static struct pci_driver jmb38x_ms_driver =;

module_pci_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_DEVICE_TABLE(pci, jmb38x_ms_id_tbl);