Thomas Kleffel | be51801 | 2008-06-30 22:40:24 +0100 | [diff] [blame] | 1 | /* |
| 2 | * linux/drivers/mmc/s3cmci.h - Samsung S3C MCI driver |
| 3 | * |
| 4 | * Copyright (C) 2004-2006 Thomas Kleffel, All Rights Reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | |
Thomas Kleffel | be51801 | 2008-06-30 22:40:24 +0100 | [diff] [blame] | 11 | enum s3cmci_waitfor { |
| 12 | COMPLETION_NONE, |
| 13 | COMPLETION_FINALIZE, |
| 14 | COMPLETION_CMDSENT, |
| 15 | COMPLETION_RSPFIN, |
| 16 | COMPLETION_XFERFINISH, |
| 17 | COMPLETION_XFERFINISH_RSPFIN, |
| 18 | }; |
| 19 | |
| 20 | struct s3cmci_host { |
| 21 | struct platform_device *pdev; |
Ben Dooks | edb5a98 | 2008-06-30 22:40:29 +0100 | [diff] [blame] | 22 | struct s3c24xx_mci_pdata *pdata; |
Thomas Kleffel | be51801 | 2008-06-30 22:40:24 +0100 | [diff] [blame] | 23 | struct mmc_host *mmc; |
| 24 | struct resource *mem; |
| 25 | struct clk *clk; |
| 26 | void __iomem *base; |
| 27 | int irq; |
| 28 | int irq_cd; |
Vasily Khoruzhick | b45e4b5 | 2014-06-01 20:22:09 +0300 | [diff] [blame] | 29 | struct dma_chan *dma; |
Thomas Kleffel | be51801 | 2008-06-30 22:40:24 +0100 | [diff] [blame] | 30 | |
| 31 | unsigned long clk_rate; |
| 32 | unsigned long clk_div; |
| 33 | unsigned long real_rate; |
| 34 | u8 prescaler; |
| 35 | |
| 36 | int is2440; |
| 37 | unsigned sdiimsk; |
| 38 | unsigned sdidata; |
Thomas Kleffel | be51801 | 2008-06-30 22:40:24 +0100 | [diff] [blame] | 39 | |
Ben Dooks | c225889 | 2009-10-01 15:44:18 -0700 | [diff] [blame] | 40 | bool irq_disabled; |
| 41 | bool irq_enabled; |
| 42 | bool irq_state; |
| 43 | int sdio_irqen; |
| 44 | |
Thomas Kleffel | be51801 | 2008-06-30 22:40:24 +0100 | [diff] [blame] | 45 | struct mmc_request *mrq; |
| 46 | int cmd_is_stop; |
| 47 | |
| 48 | spinlock_t complete_lock; |
| 49 | enum s3cmci_waitfor complete_what; |
| 50 | |
| 51 | int dma_complete; |
| 52 | |
| 53 | u32 pio_sgptr; |
Christer Weinigel | 088a78a | 2008-10-15 00:17:17 +0100 | [diff] [blame] | 54 | u32 pio_bytes; |
Thomas Kleffel | be51801 | 2008-06-30 22:40:24 +0100 | [diff] [blame] | 55 | u32 pio_count; |
| 56 | u32 *pio_ptr; |
| 57 | #define XFER_NONE 0 |
| 58 | #define XFER_READ 1 |
| 59 | #define XFER_WRITE 2 |
| 60 | u32 pio_active; |
| 61 | |
| 62 | int bus_width; |
| 63 | |
| 64 | char dbgmsg_cmd[301]; |
| 65 | char dbgmsg_dat[301]; |
| 66 | char *status; |
| 67 | |
| 68 | unsigned int ccnt, dcnt; |
| 69 | struct tasklet_struct pio_tasklet; |
ben@fluff.org.uk | f87e6d0 | 2008-10-15 00:17:16 +0100 | [diff] [blame] | 70 | |
Ben Dooks | 9bdd203 | 2009-10-01 15:44:17 -0700 | [diff] [blame] | 71 | #ifdef CONFIG_DEBUG_FS |
| 72 | struct dentry *debug_root; |
| 73 | struct dentry *debug_state; |
| 74 | struct dentry *debug_regs; |
| 75 | #endif |
| 76 | |
ben@fluff.org.uk | f87e6d0 | 2008-10-15 00:17:16 +0100 | [diff] [blame] | 77 | #ifdef CONFIG_CPU_FREQ |
| 78 | struct notifier_block freq_transition; |
| 79 | #endif |
Thomas Kleffel | be51801 | 2008-06-30 22:40:24 +0100 | [diff] [blame] | 80 | }; |