aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/tmio_mmc.c1
-rw-r--r--drivers/mmc/host/tmio_mmc_pio.c14
2 files changed, 5 insertions, 10 deletions
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index 6cfb2d5317b0..8a781e2ac4c3 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -91,6 +91,7 @@ static int tmio_mmc_probe(struct platform_device *pdev)
91 91
92 /* SD control register space size is 0x200, 0x400 for bus_shift=1 */ 92 /* SD control register space size is 0x200, 0x400 for bus_shift=1 */
93 pdata->bus_shift = resource_size(res_ctl) >> 10; 93 pdata->bus_shift = resource_size(res_ctl) >> 10;
94 pdata->flags |= TMIO_MMC_HAVE_HIGH_REG;
94 95
95 ret = tmio_mmc_host_probe(&host, pdev, pdata); 96 ret = tmio_mmc_host_probe(&host, pdev, pdata);
96 if (ret) 97 if (ret)
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 6836a8008c02..8d8abf23a611 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -161,10 +161,8 @@ static void tmio_mmc_set_clock(struct tmio_mmc_host *host, int new_clock)
161 161
162static void tmio_mmc_clk_stop(struct tmio_mmc_host *host) 162static void tmio_mmc_clk_stop(struct tmio_mmc_host *host)
163{ 163{
164 struct resource *res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0);
165
166 /* implicit BUG_ON(!res) */ 164 /* implicit BUG_ON(!res) */
167 if (resource_size(res) > 0x100) { 165 if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) {
168 sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0000); 166 sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0000);
169 msleep(10); 167 msleep(10);
170 } 168 }
@@ -176,14 +174,12 @@ static void tmio_mmc_clk_stop(struct tmio_mmc_host *host)
176 174
177static void tmio_mmc_clk_start(struct tmio_mmc_host *host) 175static void tmio_mmc_clk_start(struct tmio_mmc_host *host)
178{ 176{
179 struct resource *res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0);
180
181 sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0100 | 177 sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0100 |
182 sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL)); 178 sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
183 msleep(10); 179 msleep(10);
184 180
185 /* implicit BUG_ON(!res) */ 181 /* implicit BUG_ON(!res) */
186 if (resource_size(res) > 0x100) { 182 if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) {
187 sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0100); 183 sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0100);
188 msleep(10); 184 msleep(10);
189 } 185 }
@@ -191,16 +187,14 @@ static void tmio_mmc_clk_start(struct tmio_mmc_host *host)
191 187
192static void tmio_mmc_reset(struct tmio_mmc_host *host) 188static void tmio_mmc_reset(struct tmio_mmc_host *host)
193{ 189{
194 struct resource *res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0);
195
196 /* FIXME - should we set stop clock reg here */ 190 /* FIXME - should we set stop clock reg here */
197 sd_ctrl_write16(host, CTL_RESET_SD, 0x0000); 191 sd_ctrl_write16(host, CTL_RESET_SD, 0x0000);
198 /* implicit BUG_ON(!res) */ 192 /* implicit BUG_ON(!res) */
199 if (resource_size(res) > 0x100) 193 if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG)
200 sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0000); 194 sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0000);
201 msleep(10); 195 msleep(10);
202 sd_ctrl_write16(host, CTL_RESET_SD, 0x0001); 196 sd_ctrl_write16(host, CTL_RESET_SD, 0x0001);
203 if (resource_size(res) > 0x100) 197 if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG)
204 sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0001); 198 sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0001);
205 msleep(10); 199 msleep(10);
206} 200}