diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-02-01 21:33:45 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-02-01 21:33:45 -0500 |
commit | 9d3f1881abeae0494a27716b08fcf2d3264bb0fa (patch) | |
tree | f457dd2d35af29bc831b93865efa47229d0b9bee /drivers/mfd/tc6393xb.c | |
parent | b6c58b1d987a5795086c5c2babd8c7367d2fdb8c (diff) | |
parent | bc10e875d4aeaa93a0d418d8b4346b72f5067ea0 (diff) |
Merge branch 'sh/stable-updates'
Diffstat (limited to 'drivers/mfd/tc6393xb.c')
-rw-r--r-- | drivers/mfd/tc6393xb.c | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c index 1429a7341a9a..4bc5a08a2b09 100644 --- a/drivers/mfd/tc6393xb.c +++ b/drivers/mfd/tc6393xb.c | |||
@@ -136,10 +136,6 @@ static int tc6393xb_nand_enable(struct platform_device *nand) | |||
136 | return 0; | 136 | return 0; |
137 | } | 137 | } |
138 | 138 | ||
139 | static struct tmio_mmc_data tc6393xb_mmc_data = { | ||
140 | .hclk = 24000000, | ||
141 | }; | ||
142 | |||
143 | static struct resource __devinitdata tc6393xb_nand_resources[] = { | 139 | static struct resource __devinitdata tc6393xb_nand_resources[] = { |
144 | { | 140 | { |
145 | .start = 0x1000, | 141 | .start = 0x1000, |
@@ -165,11 +161,6 @@ static struct resource __devinitdata tc6393xb_mmc_resources[] = { | |||
165 | .flags = IORESOURCE_MEM, | 161 | .flags = IORESOURCE_MEM, |
166 | }, | 162 | }, |
167 | { | 163 | { |
168 | .start = 0x200, | ||
169 | .end = 0x2ff, | ||
170 | .flags = IORESOURCE_MEM, | ||
171 | }, | ||
172 | { | ||
173 | .start = IRQ_TC6393_MMC, | 164 | .start = IRQ_TC6393_MMC, |
174 | .end = IRQ_TC6393_MMC, | 165 | .end = IRQ_TC6393_MMC, |
175 | .flags = IORESOURCE_IRQ, | 166 | .flags = IORESOURCE_IRQ, |
@@ -346,6 +337,50 @@ int tc6393xb_lcd_mode(struct platform_device *fb, | |||
346 | } | 337 | } |
347 | EXPORT_SYMBOL(tc6393xb_lcd_mode); | 338 | EXPORT_SYMBOL(tc6393xb_lcd_mode); |
348 | 339 | ||
340 | static int tc6393xb_mmc_enable(struct platform_device *mmc) | ||
341 | { | ||
342 | struct platform_device *dev = to_platform_device(mmc->dev.parent); | ||
343 | struct tc6393xb *tc6393xb = platform_get_drvdata(dev); | ||
344 | |||
345 | tmio_core_mmc_enable(tc6393xb->scr + 0x200, 0, | ||
346 | tc6393xb_mmc_resources[0].start & 0xfffe); | ||
347 | |||
348 | return 0; | ||
349 | } | ||
350 | |||
351 | static int tc6393xb_mmc_resume(struct platform_device *mmc) | ||
352 | { | ||
353 | struct platform_device *dev = to_platform_device(mmc->dev.parent); | ||
354 | struct tc6393xb *tc6393xb = platform_get_drvdata(dev); | ||
355 | |||
356 | tmio_core_mmc_resume(tc6393xb->scr + 0x200, 0, | ||
357 | tc6393xb_mmc_resources[0].start & 0xfffe); | ||
358 | |||
359 | return 0; | ||
360 | } | ||
361 | |||
362 | static void tc6393xb_mmc_pwr(struct platform_device *mmc, int state) | ||
363 | { | ||
364 | struct platform_device *dev = to_platform_device(mmc->dev.parent); | ||
365 | struct tc6393xb *tc6393xb = platform_get_drvdata(dev); | ||
366 | |||
367 | tmio_core_mmc_pwr(tc6393xb->scr + 0x200, 0, state); | ||
368 | } | ||
369 | |||
370 | static void tc6393xb_mmc_clk_div(struct platform_device *mmc, int state) | ||
371 | { | ||
372 | struct platform_device *dev = to_platform_device(mmc->dev.parent); | ||
373 | struct tc6393xb *tc6393xb = platform_get_drvdata(dev); | ||
374 | |||
375 | tmio_core_mmc_clk_div(tc6393xb->scr + 0x200, 0, state); | ||
376 | } | ||
377 | |||
378 | static struct tmio_mmc_data tc6393xb_mmc_data = { | ||
379 | .hclk = 24000000, | ||
380 | .set_pwr = tc6393xb_mmc_pwr, | ||
381 | .set_clk_div = tc6393xb_mmc_clk_div, | ||
382 | }; | ||
383 | |||
349 | static struct mfd_cell __devinitdata tc6393xb_cells[] = { | 384 | static struct mfd_cell __devinitdata tc6393xb_cells[] = { |
350 | [TC6393XB_CELL_NAND] = { | 385 | [TC6393XB_CELL_NAND] = { |
351 | .name = "tmio-nand", | 386 | .name = "tmio-nand", |
@@ -355,6 +390,8 @@ static struct mfd_cell __devinitdata tc6393xb_cells[] = { | |||
355 | }, | 390 | }, |
356 | [TC6393XB_CELL_MMC] = { | 391 | [TC6393XB_CELL_MMC] = { |
357 | .name = "tmio-mmc", | 392 | .name = "tmio-mmc", |
393 | .enable = tc6393xb_mmc_enable, | ||
394 | .resume = tc6393xb_mmc_resume, | ||
358 | .driver_data = &tc6393xb_mmc_data, | 395 | .driver_data = &tc6393xb_mmc_data, |
359 | .num_resources = ARRAY_SIZE(tc6393xb_mmc_resources), | 396 | .num_resources = ARRAY_SIZE(tc6393xb_mmc_resources), |
360 | .resources = tc6393xb_mmc_resources, | 397 | .resources = tc6393xb_mmc_resources, |
@@ -836,3 +873,4 @@ MODULE_LICENSE("GPL v2"); | |||
836 | MODULE_AUTHOR("Ian Molton, Dmitry Baryshkov and Dirk Opfer"); | 873 | MODULE_AUTHOR("Ian Molton, Dmitry Baryshkov and Dirk Opfer"); |
837 | MODULE_DESCRIPTION("tc6393xb Toshiba Mobile IO Controller"); | 874 | MODULE_DESCRIPTION("tc6393xb Toshiba Mobile IO Controller"); |
838 | MODULE_ALIAS("platform:tc6393xb"); | 875 | MODULE_ALIAS("platform:tc6393xb"); |
876 | |||