diff options
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.h')
| -rw-r--r-- | drivers/mmc/host/tmio_mmc.h | 46 |
1 files changed, 6 insertions, 40 deletions
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index 9fa998594974..692dc23363b9 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h | |||
| @@ -11,26 +11,6 @@ | |||
| 11 | 11 | ||
| 12 | #include <linux/highmem.h> | 12 | #include <linux/highmem.h> |
| 13 | 13 | ||
| 14 | #define CNF_CMD 0x04 | ||
| 15 | #define CNF_CTL_BASE 0x10 | ||
| 16 | #define CNF_INT_PIN 0x3d | ||
| 17 | #define CNF_STOP_CLK_CTL 0x40 | ||
| 18 | #define CNF_GCLK_CTL 0x41 | ||
| 19 | #define CNF_SD_CLK_MODE 0x42 | ||
| 20 | #define CNF_PIN_STATUS 0x44 | ||
| 21 | #define CNF_PWR_CTL_1 0x48 | ||
| 22 | #define CNF_PWR_CTL_2 0x49 | ||
| 23 | #define CNF_PWR_CTL_3 0x4a | ||
| 24 | #define CNF_CARD_DETECT_MODE 0x4c | ||
| 25 | #define CNF_SD_SLOT 0x50 | ||
| 26 | #define CNF_EXT_GCLK_CTL_1 0xf0 | ||
| 27 | #define CNF_EXT_GCLK_CTL_2 0xf1 | ||
| 28 | #define CNF_EXT_GCLK_CTL_3 0xf9 | ||
| 29 | #define CNF_SD_LED_EN_1 0xfa | ||
| 30 | #define CNF_SD_LED_EN_2 0xfe | ||
| 31 | |||
| 32 | #define SDCREN 0x2 /* Enable access to MMC CTL regs. (flag in COMMAND_REG)*/ | ||
| 33 | |||
| 34 | #define CTL_SD_CMD 0x00 | 14 | #define CTL_SD_CMD 0x00 |
| 35 | #define CTL_ARG_REG 0x04 | 15 | #define CTL_ARG_REG 0x04 |
| 36 | #define CTL_STOP_INTERNAL_ACTION 0x08 | 16 | #define CTL_STOP_INTERNAL_ACTION 0x08 |
| @@ -110,7 +90,6 @@ | |||
| 110 | 90 | ||
| 111 | 91 | ||
| 112 | struct tmio_mmc_host { | 92 | struct tmio_mmc_host { |
| 113 | void __iomem *cnf; | ||
| 114 | void __iomem *ctl; | 93 | void __iomem *ctl; |
| 115 | unsigned long bus_shift; | 94 | unsigned long bus_shift; |
| 116 | struct mmc_command *cmd; | 95 | struct mmc_command *cmd; |
| @@ -119,10 +98,16 @@ struct tmio_mmc_host { | |||
| 119 | struct mmc_host *mmc; | 98 | struct mmc_host *mmc; |
| 120 | int irq; | 99 | int irq; |
| 121 | 100 | ||
| 101 | /* Callbacks for clock / power control */ | ||
| 102 | void (*set_pwr)(struct platform_device *host, int state); | ||
| 103 | void (*set_clk_div)(struct platform_device *host, int state); | ||
| 104 | |||
| 122 | /* pio related stuff */ | 105 | /* pio related stuff */ |
| 123 | struct scatterlist *sg_ptr; | 106 | struct scatterlist *sg_ptr; |
| 124 | unsigned int sg_len; | 107 | unsigned int sg_len; |
| 125 | unsigned int sg_off; | 108 | unsigned int sg_off; |
| 109 | |||
| 110 | struct platform_device *pdev; | ||
| 126 | }; | 111 | }; |
| 127 | 112 | ||
| 128 | #include <linux/io.h> | 113 | #include <linux/io.h> |
| @@ -163,25 +148,6 @@ static inline void sd_ctrl_write32(struct tmio_mmc_host *host, int addr, | |||
| 163 | writew(val >> 16, host->ctl + ((addr + 2) << host->bus_shift)); | 148 | writew(val >> 16, host->ctl + ((addr + 2) << host->bus_shift)); |
| 164 | } | 149 | } |
| 165 | 150 | ||
| 166 | static inline void sd_config_write8(struct tmio_mmc_host *host, int addr, | ||
| 167 | u8 val) | ||
| 168 | { | ||
| 169 | writeb(val, host->cnf + (addr << host->bus_shift)); | ||
| 170 | } | ||
| 171 | |||
| 172 | static inline void sd_config_write16(struct tmio_mmc_host *host, int addr, | ||
| 173 | u16 val) | ||
| 174 | { | ||
| 175 | writew(val, host->cnf + (addr << host->bus_shift)); | ||
| 176 | } | ||
| 177 | |||
| 178 | static inline void sd_config_write32(struct tmio_mmc_host *host, int addr, | ||
| 179 | u32 val) | ||
| 180 | { | ||
| 181 | writew(val, host->cnf + (addr << host->bus_shift)); | ||
| 182 | writew(val >> 16, host->cnf + ((addr + 2) << host->bus_shift)); | ||
| 183 | } | ||
| 184 | |||
| 185 | #include <linux/scatterlist.h> | 151 | #include <linux/scatterlist.h> |
| 186 | #include <linux/blkdev.h> | 152 | #include <linux/blkdev.h> |
| 187 | 153 | ||
