aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-08-08 06:38:36 -0400
committerChris Ball <cjb@laptop.org>2013-08-24 23:45:39 -0400
commitf0af3689e7d68af35363a3b8d31851561832a914 (patch)
tree1a68bbee6ce35075b01169550413c703004af9fc /arch
parentd3e9a8d00f62ff80fe9d97d4087d77bdabc37959 (diff)
sh: ecovec24: Remove MMCIF and SDHI .set_pwr() callbacks
The MMCIF and SHDI platform data .set_pwr() callbacks are used to control the vmmc/vqmmc power supplies. As the power supplies already register control GPIOs there's no need to perform the operation manually. Remove the callback functions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 5af40f5e0ba4..0332d2557303 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -598,29 +598,9 @@ static struct platform_device sdhi0_power = {
598 }, 598 },
599}; 599};
600 600
601static void sdhi0_set_pwr(struct platform_device *pdev, int state)
602{
603 static int power_gpio = -EINVAL;
604
605 if (power_gpio < 0) {
606 int ret = gpio_request(GPIO_PTB6, NULL);
607 if (!ret) {
608 power_gpio = GPIO_PTB6;
609 gpio_direction_output(power_gpio, 0);
610 }
611 }
612
613 /*
614 * Toggle the GPIO regardless, whether we managed to grab it above or
615 * the fixed regulator driver did.
616 */
617 gpio_set_value(GPIO_PTB6, state);
618}
619
620static struct sh_mobile_sdhi_info sdhi0_info = { 601static struct sh_mobile_sdhi_info sdhi0_info = {
621 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, 602 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
622 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, 603 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
623 .set_pwr = sdhi0_set_pwr,
624 .tmio_caps = MMC_CAP_SDIO_IRQ | MMC_CAP_POWER_OFF_CARD | 604 .tmio_caps = MMC_CAP_SDIO_IRQ | MMC_CAP_POWER_OFF_CARD |
625 MMC_CAP_NEEDS_POLL, 605 MMC_CAP_NEEDS_POLL,
626 .tmio_flags = TMIO_MMC_USE_GPIO_CD, 606 .tmio_flags = TMIO_MMC_USE_GPIO_CD,
@@ -650,25 +630,6 @@ static struct platform_device sdhi0_device = {
650 }, 630 },
651}; 631};
652 632
653static void cn12_set_pwr(struct platform_device *pdev, int state)
654{
655 static int power_gpio = -EINVAL;
656
657 if (power_gpio < 0) {
658 int ret = gpio_request(GPIO_PTB7, NULL);
659 if (!ret) {
660 power_gpio = GPIO_PTB7;
661 gpio_direction_output(power_gpio, 0);
662 }
663 }
664
665 /*
666 * Toggle the GPIO regardless, whether we managed to grab it above or
667 * the fixed regulator driver did.
668 */
669 gpio_set_value(GPIO_PTB7, state);
670}
671
672#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) 633#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
673/* SDHI1 */ 634/* SDHI1 */
674static struct sh_mobile_sdhi_info sdhi1_info = { 635static struct sh_mobile_sdhi_info sdhi1_info = {
@@ -678,7 +639,6 @@ static struct sh_mobile_sdhi_info sdhi1_info = {
678 MMC_CAP_NEEDS_POLL, 639 MMC_CAP_NEEDS_POLL,
679 .tmio_flags = TMIO_MMC_USE_GPIO_CD, 640 .tmio_flags = TMIO_MMC_USE_GPIO_CD,
680 .cd_gpio = GPIO_PTW7, 641 .cd_gpio = GPIO_PTW7,
681 .set_pwr = cn12_set_pwr,
682}; 642};
683 643
684static struct resource sdhi1_resources[] = { 644static struct resource sdhi1_resources[] = {
@@ -1000,7 +960,6 @@ static struct resource sh_mmcif_resources[] = {
1000}; 960};
1001 961
1002static struct sh_mmcif_plat_data sh_mmcif_plat = { 962static struct sh_mmcif_plat_data sh_mmcif_plat = {
1003 .set_pwr = cn12_set_pwr,
1004 .sup_pclk = 0, /* SH7724: Max Pclk/2 */ 963 .sup_pclk = 0, /* SH7724: Max Pclk/2 */
1005 .caps = MMC_CAP_4_BIT_DATA | 964 .caps = MMC_CAP_4_BIT_DATA |
1006 MMC_CAP_8_BIT_DATA | 965 MMC_CAP_8_BIT_DATA |