#include <linux/ata.h>
#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/dmaengine.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/libata.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pata_arasan_cf_data.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include <trace/events/libata.h>
#define DRIVER_NAME …
#define TIMEOUT …
#define CFI_STS …
#define STS_CHG …
#define BIN_AUDIO_OUT …
#define CARD_DETECT1 …
#define CARD_DETECT2 …
#define INP_ACK …
#define CARD_READY …
#define IO_READY …
#define B16_IO_PORT_SEL …
#define IRQ_STS …
#define IRQ_EN …
#define CARD_DETECT_IRQ …
#define STATUS_CHNG_IRQ …
#define MEM_MODE_IRQ …
#define IO_MODE_IRQ …
#define TRUE_IDE_MODE_IRQ …
#define PIO_XFER_ERR_IRQ …
#define BUF_AVAIL_IRQ …
#define XFER_DONE_IRQ …
#define IGNORED_IRQS …
#define TRUE_IDE_IRQS …
#define OP_MODE …
#define CARD_MODE_MASK …
#define MEM_MODE …
#define IO_MODE …
#define TRUE_IDE_MODE …
#define CARD_TYPE_MASK …
#define CF_CARD …
#define CF_PLUS_CARD …
#define CARD_RESET …
#define CFHOST_ENB …
#define OUTPUTS_TRISTATE …
#define ULTRA_DMA_ENB …
#define MULTI_WORD_DMA_ENB …
#define DRQ_BLOCK_SIZE_MASK …
#define DRQ_BLOCK_SIZE_512 …
#define DRQ_BLOCK_SIZE_1024 …
#define DRQ_BLOCK_SIZE_2048 …
#define DRQ_BLOCK_SIZE_4096 …
#define CLK_CFG …
#define CF_IF_CLK_MASK …
#define TM_CFG …
#define MEM_MODE_TIMING_MASK …
#define MEM_MODE_TIMING_250NS …
#define MEM_MODE_TIMING_120NS …
#define MEM_MODE_TIMING_100NS …
#define MEM_MODE_TIMING_80NS …
#define IO_MODE_TIMING_MASK …
#define IO_MODE_TIMING_250NS …
#define IO_MODE_TIMING_120NS …
#define IO_MODE_TIMING_100NS …
#define IO_MODE_TIMING_80NS …
#define TRUEIDE_PIO_TIMING_MASK …
#define TRUEIDE_PIO_TIMING_SHIFT …
#define TRUEIDE_MWORD_DMA_TIMING_MASK …
#define TRUEIDE_MWORD_DMA_TIMING_SHIFT …
#define ULTRA_DMA_TIMING_MASK …
#define ULTRA_DMA_TIMING_SHIFT …
#define XFER_ADDR …
#define XFER_ADDR_MASK …
#define MAX_XFER_COUNT …
#define XFER_CTR …
#define XFER_COUNT_MASK …
#define ADDR_INC_DISABLE …
#define XFER_WIDTH_MASK …
#define XFER_WIDTH_8B …
#define XFER_WIDTH_16B …
#define MEM_TYPE_MASK …
#define MEM_TYPE_COMMON …
#define MEM_TYPE_ATTRIBUTE …
#define MEM_IO_XFER_MASK …
#define MEM_XFER …
#define IO_XFER …
#define DMA_XFER_MODE …
#define AHB_BUS_NORMAL_PIO_OPRTN …
#define XFER_DIR_MASK …
#define XFER_READ …
#define XFER_WRITE …
#define XFER_START …
#define WRITE_PORT …
#define READ_PORT …
#define ATA_DATA_PORT …
#define ATA_DATA_PORT_MASK …
#define ATA_ERR_FTR …
#define ATA_SC …
#define ATA_SN …
#define ATA_CL …
#define ATA_CH …
#define ATA_SH …
#define ATA_STS_CMD …
#define ATA_ASTS_DCTR …
#define EXT_WRITE_PORT …
#define EXT_READ_PORT …
#define FIFO_SIZE …
#define GIRQ_STS …
#define GIRQ_STS_EN …
#define GIRQ_SGN_EN …
#define GIRQ_CF …
#define GIRQ_XD …
struct arasan_cf_dev { … };
static const struct scsi_host_template arasan_cf_sht = …;
static void cf_dumpregs(struct arasan_cf_dev *acdev)
{ … }
static void cf_ginterrupt_enable(struct arasan_cf_dev *acdev, bool enable)
{ … }
static inline void
cf_interrupt_enable(struct arasan_cf_dev *acdev, u32 mask, bool enable)
{ … }
static inline void cf_card_reset(struct arasan_cf_dev *acdev)
{ … }
static inline void cf_ctrl_reset(struct arasan_cf_dev *acdev)
{ … }
static void cf_card_detect(struct arasan_cf_dev *acdev, bool hotplugged)
{ … }
static int cf_init(struct arasan_cf_dev *acdev)
{ … }
static void cf_exit(struct arasan_cf_dev *acdev)
{ … }
static void dma_callback(void *dev)
{ … }
static inline void dma_complete(struct arasan_cf_dev *acdev)
{ … }
static inline int wait4buf(struct arasan_cf_dev *acdev)
{ … }
static int
dma_xfer(struct arasan_cf_dev *acdev, dma_addr_t src, dma_addr_t dest, u32 len)
{ … }
static int sg_xfer(struct arasan_cf_dev *acdev, struct scatterlist *sg)
{ … }
static void data_xfer(struct work_struct *work)
{ … }
static void delayed_finish(struct work_struct *work)
{ … }
static irqreturn_t arasan_cf_interrupt(int irq, void *dev)
{ … }
static void arasan_cf_freeze(struct ata_port *ap)
{ … }
static void arasan_cf_error_handler(struct ata_port *ap)
{ … }
static void arasan_cf_dma_start(struct arasan_cf_dev *acdev)
{ … }
static unsigned int arasan_cf_qc_issue(struct ata_queued_cmd *qc)
{ … }
static void arasan_cf_set_piomode(struct ata_port *ap, struct ata_device *adev)
{ … }
static void arasan_cf_set_dmamode(struct ata_port *ap, struct ata_device *adev)
{ … }
static struct ata_port_operations arasan_cf_ops = …;
static int arasan_cf_probe(struct platform_device *pdev)
{ … }
static void arasan_cf_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int arasan_cf_suspend(struct device *dev)
{ … }
static int arasan_cf_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(arasan_cf_pm_ops, arasan_cf_suspend, arasan_cf_resume);
#ifdef CONFIG_OF
static const struct of_device_id arasan_cf_id_table[] = …;
MODULE_DEVICE_TABLE(of, arasan_cf_id_table);
#endif
static struct platform_driver arasan_cf_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;