* [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of SPI
@ 2009-07-28 8:06 Guennadi Liakhovetski
2009-07-29 20:41 ` [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of Andrew Morton
2009-07-29 20:46 ` [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of SPI Paul Mundt
0 siblings, 2 replies; 3+ messages in thread
From: Guennadi Liakhovetski @ 2009-07-28 8:06 UTC (permalink / raw)
To: linux-sh
Allow tmio_mmc driver to be used on SuperH systems and add platform bindngs to
the SH7722 Migo-R platform.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
Depends on my previous two patches for tmio_mmc:
http://marc.info/?l=linux-kernel&m\x124876748530957&w=2
http://marc.info/?l=linux-kernel&m\x124782904228865&w=2
arch/sh/boards/mach-migor/setup.c | 48 ++++++++++++++++++++++++++++++-------
drivers/mmc/host/Kconfig | 4 +-
2 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index f70f464..fafa88e 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -30,6 +30,8 @@
#include <asm/sh_keysc.h>
#include <mach/migor.h>
#include <cpu/sh7722.h>
+#include <linux/mfd/core.h>
+#include <linux/mfd/tmio.h>
/* Address IRQ Size Bus Description
* 0x00000000 64MB 16 NOR Flash (SP29PL256N)
@@ -381,17 +383,35 @@ static struct platform_device migor_ceu_device = {
},
};
-struct spi_gpio_platform_data sdcard_cn9_platform_data = {
- .sck = GPIO_PTD0,
- .mosi = GPIO_PTD1,
- .miso = GPIO_PTD2,
- .num_chipselect = 1,
+static struct resource sdhi_cn9_resources[] = {
+ [0] = {
+ .name = "MMC",
+ .start = 0x04ce0000,
+ .end = 0x04ce01ff,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = 101,
+ .end = 101,
+ .flags = IORESOURCE_IRQ,
+ },
};
-static struct platform_device sdcard_cn9_device = {
- .name = "spi_gpio",
+static struct tmio_mmc_data sdhi_cn9_driver_data = {
+ .hclk = 24000000,
+ .clk_name = "sdhi0",
+};
+
+struct mfd_cell sdhi_cn9_platform_data = {
+ .driver_data = &sdhi_cn9_driver_data,
+};
+
+static struct platform_device sdhi_cn9_device = {
+ .name = "tmio-mmc",
+ .num_resources = ARRAY_SIZE(sdhi_cn9_resources),
+ .resource = sdhi_cn9_resources,
.dev = {
- .platform_data = &sdcard_cn9_platform_data,
+ .platform_data = &sdhi_cn9_platform_data,
},
};
@@ -458,7 +478,7 @@ static struct platform_device *migor_devices[] __initdata = {
&migor_ceu_device,
&migor_nor_flash_device,
&migor_nand_flash_device,
- &sdcard_cn9_device,
+ &sdhi_cn9_device,
&migor_camera[0],
&migor_camera[1],
};
@@ -516,6 +536,16 @@ static int __init migor_devices_setup(void)
gpio_request(GPIO_PTA1, NULL);
gpio_direction_input(GPIO_PTA1);
+ /* SDHI */
+ gpio_request(GPIO_FN_SDHICD, NULL);
+ gpio_request(GPIO_FN_SDHIWP, NULL);
+ gpio_request(GPIO_FN_SDHID3, NULL);
+ gpio_request(GPIO_FN_SDHID2, NULL);
+ gpio_request(GPIO_FN_SDHID1, NULL);
+ gpio_request(GPIO_FN_SDHID0, NULL);
+ gpio_request(GPIO_FN_SDHICMD, NULL);
+ gpio_request(GPIO_FN_SDHICLK, NULL);
+
/* Touch Panel */
gpio_request(GPIO_FN_IRQ6, NULL);
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 891ef18..6d36132 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -273,10 +273,10 @@ config MMC_SDRICOH_CS
config MMC_TMIO
tristate "Toshiba Mobile IO Controller (TMIO) MMC/SD function support"
- depends on MFD_TMIO || MFD_ASIC3
+ depends on MFD_TMIO || MFD_ASIC3 || SUPERH
help
This provides support for the SD/MMC cell found in TC6393XB,
- T7L66XB and also HTC ASIC3
+ T7L66XB, HTC ASIC3 and also SuperH
config MMC_CB710
tristate "ENE CB710 MMC/SD Interface support"
--
1.6.2.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of
2009-07-28 8:06 [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of SPI Guennadi Liakhovetski
@ 2009-07-29 20:41 ` Andrew Morton
2009-07-29 20:46 ` [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of SPI Paul Mundt
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2009-07-29 20:41 UTC (permalink / raw)
To: linux-sh
On Tue, 28 Jul 2009 10:06:49 +0200 (CEST)
Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> Allow tmio_mmc driver to be used on SuperH systems and add platform bindngs to
> the SH7722 Migo-R platform.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>
> Depends on my previous two patches for tmio_mmc:
>
> http://marc.info/?l=linux-kernel&m\x124876748530957&w=2
> http://marc.info/?l=linux-kernel&m\x124782904228865&w=2
I was hoping that the great bunfight over those two patches would
resolve itself, seems not.
The second patch
(tmio_mmc-optionally-support-using-platform-clock.patch) has some
review comments from Phillip Zabel which appear to not have been
responded to.
If you have interdependent patches, please do if at all possible send
them as a single sequence-numbered series rather than as a random patch
sprinkle like this. It simplifies review and reduces the chance of
mistakes.
> arch/sh/boards/mach-migor/setup.c | 48 ++++++++++++++++++++++++++++++-------
> drivers/mmc/host/Kconfig | 4 +-
If we decide to merge these three patches:
mmc-make-the-configuration-memory-resource-optional.patch
tmio_mmc-optionally-support-using-platform-clock.patch
sh-switch-migo-r-to-use-the-tmio-mmc-driver-instead-of-spi.patch
then it would be simplest if
sh-switch-migo-r-to-use-the-tmio-mmc-driver-instead-of-spi.patch were
to me merged at the same time as the other two. Paul, is that OK with you?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of SPI
2009-07-28 8:06 [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of SPI Guennadi Liakhovetski
2009-07-29 20:41 ` [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of Andrew Morton
@ 2009-07-29 20:46 ` Paul Mundt
1 sibling, 0 replies; 3+ messages in thread
From: Paul Mundt @ 2009-07-29 20:46 UTC (permalink / raw)
To: linux-sh
On Wed, Jul 29, 2009 at 01:41:04PM -0700, Andrew Morton wrote:
> On Tue, 28 Jul 2009 10:06:49 +0200 (CEST)
> Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
>
> > Allow tmio_mmc driver to be used on SuperH systems and add platform bindngs to
> > the SH7722 Migo-R platform.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> >
> > Depends on my previous two patches for tmio_mmc:
> >
> > http://marc.info/?l=linux-kernel&m\x124876748530957&w=2
> > http://marc.info/?l=linux-kernel&m\x124782904228865&w=2
>
> I was hoping that the great bunfight over those two patches would
> resolve itself, seems not.
>
> The second patch
> (tmio_mmc-optionally-support-using-platform-clock.patch) has some
> review comments from Phillip Zabel which appear to not have been
> responded to.
>
> If you have interdependent patches, please do if at all possible send
> them as a single sequence-numbered series rather than as a random patch
> sprinkle like this. It simplifies review and reduces the chance of
> mistakes.
>
Yes, Phillip's comments should be addressed in the next version. That at
least addresses the clock framework misuse issue of passing in the clock
string anyways.
> > arch/sh/boards/mach-migor/setup.c | 48 ++++++++++++++++++++++++++++++-------
> > drivers/mmc/host/Kconfig | 4 +-
>
> If we decide to merge these three patches:
>
> mmc-make-the-configuration-memory-resource-optional.patch
> tmio_mmc-optionally-support-using-platform-clock.patch
> sh-switch-migo-r-to-use-the-tmio-mmc-driver-instead-of-spi.patch
>
> then it would be simplest if
> sh-switch-migo-r-to-use-the-tmio-mmc-driver-instead-of-spi.patch were
> to me merged at the same time as the other two. Paul, is that OK with you?
Yes, fine with me.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-29 20:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-28 8:06 [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of SPI Guennadi Liakhovetski
2009-07-29 20:41 ` [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of Andrew Morton
2009-07-29 20:46 ` [PATCH] SH: Switch Migo-R to use the tmio MMC driver instead of SPI Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox