* [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support
@ 2013-04-17 5:17 Kuninori Morimoto
2013-04-18 12:10 ` Simon Horman
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Kuninori Morimoto @ 2013-04-17 5:17 UTC (permalink / raw)
To: linux-sh
This patch is directly accessing to PUPR4 register which can
control SDHI0 CD/WP pin pull-up setting.
It should be replaced in the future.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/board-bockw.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index 4d65715..2b6103e 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <linux/mfd/tmio.h>
+#include <linux/mmc/host.h>
#include <linux/pinctrl/machine.h>
#include <linux/platform_device.h>
#include <linux/regulator/fixed.h>
@@ -54,16 +56,28 @@ static struct resource smsc911x_resources[] = {
DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */
};
+/* SDHI */
+static struct sh_mobile_sdhi_info sdhi0_info = {
+ .tmio_caps = MMC_CAP_SD_HIGHSPEED,
+ .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
+ .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
+};
+
static const struct pinctrl_map bockw_pinctrl_map[] = {
/* SCIF0 */
PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
"scif0_data_a", "scif0"),
PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
"scif0_ctrl", "scif0"),
+ /* SDHI0 */
+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
+ "sdhi0", "sdhi0"),
};
#define FPGA 0x18200000
#define IRQ0MR 0x30
+#define PFC 0xfffc0000
+#define PUPR4 0x110
static void __init bockw_init(void)
{
void __iomem *base;
@@ -76,6 +90,7 @@ static void __init bockw_init(void)
ARRAY_SIZE(bockw_pinctrl_map));
r8a7778_pinmux_init();
+ /* for SMSC */
base = ioremap_nocache(FPGA, SZ_1M);
if (base) {
/*
@@ -98,6 +113,20 @@ static void __init bockw_init(void)
smsc911x_resources, ARRAY_SIZE(smsc911x_resources),
&smsc911x_data, sizeof(smsc911x_data));
}
+
+ /* for SDHI */
+ base = ioremap_nocache(PFC, 0x200);
+ if (base) {
+ /*
+ * FIXME
+ *
+ * SDHI CD/WP pin needs pull-up
+ */
+ iowrite32(ioread32(base + PUPR4) | (3 << 26), base + PUPR4);
+ iounmap(base);
+
+ r8a7778_sdhi_init(0, &sdhi0_info);
+ }
}
static const char *bockw_boards_compat_dt[] __initdata = {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support
2013-04-17 5:17 [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support Kuninori Morimoto
@ 2013-04-18 12:10 ` Simon Horman
2013-07-26 22:38 ` Sergei Shtylyov
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2013-04-18 12:10 UTC (permalink / raw)
To: linux-sh
On Tue, Apr 16, 2013 at 10:17:56PM -0700, Kuninori Morimoto wrote:
> This patch is directly accessing to PUPR4 register which can
> control SDHI0 CD/WP pin pull-up setting.
> It should be replaced in the future.
I am hold off on this one until Laurent is
happy with 1/6 as this patch seems to have
a run-time dependency on that one.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/mach-shmobile/board-bockw.c | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
> index 4d65715..2b6103e 100644
> --- a/arch/arm/mach-shmobile/board-bockw.c
> +++ b/arch/arm/mach-shmobile/board-bockw.c
> @@ -18,6 +18,8 @@
> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
> */
>
> +#include <linux/mfd/tmio.h>
> +#include <linux/mmc/host.h>
> #include <linux/pinctrl/machine.h>
> #include <linux/platform_device.h>
> #include <linux/regulator/fixed.h>
> @@ -54,16 +56,28 @@ static struct resource smsc911x_resources[] = {
> DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */
> };
>
> +/* SDHI */
> +static struct sh_mobile_sdhi_info sdhi0_info = {
> + .tmio_caps = MMC_CAP_SD_HIGHSPEED,
> + .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
> + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
> +};
> +
> static const struct pinctrl_map bockw_pinctrl_map[] = {
> /* SCIF0 */
> PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> "scif0_data_a", "scif0"),
> PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> "scif0_ctrl", "scif0"),
> + /* SDHI0 */
> + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
> + "sdhi0", "sdhi0"),
> };
>
> #define FPGA 0x18200000
> #define IRQ0MR 0x30
> +#define PFC 0xfffc0000
> +#define PUPR4 0x110
> static void __init bockw_init(void)
> {
> void __iomem *base;
> @@ -76,6 +90,7 @@ static void __init bockw_init(void)
> ARRAY_SIZE(bockw_pinctrl_map));
> r8a7778_pinmux_init();
>
> + /* for SMSC */
> base = ioremap_nocache(FPGA, SZ_1M);
> if (base) {
> /*
> @@ -98,6 +113,20 @@ static void __init bockw_init(void)
> smsc911x_resources, ARRAY_SIZE(smsc911x_resources),
> &smsc911x_data, sizeof(smsc911x_data));
> }
> +
> + /* for SDHI */
> + base = ioremap_nocache(PFC, 0x200);
> + if (base) {
> + /*
> + * FIXME
> + *
> + * SDHI CD/WP pin needs pull-up
> + */
> + iowrite32(ioread32(base + PUPR4) | (3 << 26), base + PUPR4);
> + iounmap(base);
> +
> + r8a7778_sdhi_init(0, &sdhi0_info);
> + }
> }
>
> static const char *bockw_boards_compat_dt[] __initdata = {
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support
2013-04-17 5:17 [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support Kuninori Morimoto
2013-04-18 12:10 ` Simon Horman
@ 2013-07-26 22:38 ` Sergei Shtylyov
2013-07-31 0:22 ` Simon Horman
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Sergei Shtylyov @ 2013-07-26 22:38 UTC (permalink / raw)
To: linux-sh
Hello.
On 04/17/2013 09:17 AM, Kuninori Morimoto wrote:
> This patch is directly accessing to PUPR4 register which can
> control SDHI0 CD/WP pin pull-up setting.
> It should be replaced in the future.
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/mach-shmobile/board-bockw.c | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
> diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
> index 4d65715..2b6103e 100644
> --- a/arch/arm/mach-shmobile/board-bockw.c
> +++ b/arch/arm/mach-shmobile/board-bockw.c
[...]
> static const struct pinctrl_map bockw_pinctrl_map[] = {
> /* SCIF0 */
> PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> "scif0_data_a", "scif0"),
> PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> "scif0_ctrl", "scif0"),
> + /* SDHI0 */
> + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
> + "sdhi0", "sdhi0"),
> };
These SDHI0 data above don't match drivers/pinctrl/sh-pfc/pfc-r8a7778.c
and cause this message:
sh-pfc pfc-r8a7778: invalid group "sdhi0" for function "sdhi0"
I'm not sure but maybe because of this SD card can't be detected.
WBR, Sergei
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support
2013-04-17 5:17 [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support Kuninori Morimoto
2013-04-18 12:10 ` Simon Horman
2013-07-26 22:38 ` Sergei Shtylyov
@ 2013-07-31 0:22 ` Simon Horman
2013-07-31 6:14 ` Kuninori Morimoto
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2013-07-31 0:22 UTC (permalink / raw)
To: linux-sh
On Sat, Jul 27, 2013 at 02:38:58AM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 04/17/2013 09:17 AM, Kuninori Morimoto wrote:
>
> >This patch is directly accessing to PUPR4 register which can
> >control SDHI0 CD/WP pin pull-up setting.
> >It should be replaced in the future.
>
> >Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >---
> > arch/arm/mach-shmobile/board-bockw.c | 29 +++++++++++++++++++++++++++++
> > 1 file changed, 29 insertions(+)
>
> >diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
> >index 4d65715..2b6103e 100644
> >--- a/arch/arm/mach-shmobile/board-bockw.c
> >+++ b/arch/arm/mach-shmobile/board-bockw.c
> [...]
> > static const struct pinctrl_map bockw_pinctrl_map[] = {
> > /* SCIF0 */
> > PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> > "scif0_data_a", "scif0"),
> > PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> > "scif0_ctrl", "scif0"),
> >+ /* SDHI0 */
> >+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
> >+ "sdhi0", "sdhi0"),
> > };
>
> These SDHI0 data above don't match
> drivers/pinctrl/sh-pfc/pfc-r8a7778.c and cause this message:
>
> sh-pfc pfc-r8a7778: invalid group "sdhi0" for function "sdhi0"
>
> I'm not sure but maybe because of this SD card can't be detected.
Hi,
is there a resolution for this problem?
I believe that this patch was included in v3.11-rc1.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support
2013-04-17 5:17 [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support Kuninori Morimoto
` (2 preceding siblings ...)
2013-07-31 0:22 ` Simon Horman
@ 2013-07-31 6:14 ` Kuninori Morimoto
2013-07-31 6:39 ` Simon Horman
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Kuninori Morimoto @ 2013-07-31 6:14 UTC (permalink / raw)
To: linux-sh
Hi Simon
> > >diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
> > >index 4d65715..2b6103e 100644
> > >--- a/arch/arm/mach-shmobile/board-bockw.c
> > >+++ b/arch/arm/mach-shmobile/board-bockw.c
> > [...]
> > > static const struct pinctrl_map bockw_pinctrl_map[] = {
> > > /* SCIF0 */
> > > PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> > > "scif0_data_a", "scif0"),
> > > PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> > > "scif0_ctrl", "scif0"),
> > >+ /* SDHI0 */
> > >+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
> > >+ "sdhi0", "sdhi0"),
> > > };
> >
> > These SDHI0 data above don't match
> > drivers/pinctrl/sh-pfc/pfc-r8a7778.c and cause this message:
> >
> > sh-pfc pfc-r8a7778: invalid group "sdhi0" for function "sdhi0"
> >
> > I'm not sure but maybe because of this SD card can't be detected.
>
> Hi,
>
> is there a resolution for this problem?
> I believe that this patch was included in v3.11-rc1.
I'm using renesas-devel-20130731 now, and it seems above error was solved
Thank you
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support
2013-04-17 5:17 [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support Kuninori Morimoto
` (3 preceding siblings ...)
2013-07-31 6:14 ` Kuninori Morimoto
@ 2013-07-31 6:39 ` Simon Horman
2013-07-31 12:09 ` Sergei Shtylyov
2013-08-01 7:58 ` Simon Horman
6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2013-07-31 6:39 UTC (permalink / raw)
To: linux-sh
On Tue, Jul 30, 2013 at 11:14:29PM -0700, Kuninori Morimoto wrote:
> Hi Simon
>
> > > >diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
> > > >index 4d65715..2b6103e 100644
> > > >--- a/arch/arm/mach-shmobile/board-bockw.c
> > > >+++ b/arch/arm/mach-shmobile/board-bockw.c
> > > [...]
> > > > static const struct pinctrl_map bockw_pinctrl_map[] = {
> > > > /* SCIF0 */
> > > > PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> > > > "scif0_data_a", "scif0"),
> > > > PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> > > > "scif0_ctrl", "scif0"),
> > > >+ /* SDHI0 */
> > > >+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
> > > >+ "sdhi0", "sdhi0"),
> > > > };
> > >
> > > These SDHI0 data above don't match
> > > drivers/pinctrl/sh-pfc/pfc-r8a7778.c and cause this message:
> > >
> > > sh-pfc pfc-r8a7778: invalid group "sdhi0" for function "sdhi0"
> > >
> > > I'm not sure but maybe because of this SD card can't be detected.
> >
> > Hi,
> >
> > is there a resolution for this problem?
> > I believe that this patch was included in v3.11-rc1.
>
> I'm using renesas-devel-20130731 now, and it seems above error was solved
> Thank you
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support
2013-04-17 5:17 [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support Kuninori Morimoto
` (4 preceding siblings ...)
2013-07-31 6:39 ` Simon Horman
@ 2013-07-31 12:09 ` Sergei Shtylyov
2013-08-01 7:58 ` Simon Horman
6 siblings, 0 replies; 8+ messages in thread
From: Sergei Shtylyov @ 2013-07-31 12:09 UTC (permalink / raw)
To: linux-sh
Hello.
On 31-07-2013 4:22, Simon Horman wrote:
>>> This patch is directly accessing to PUPR4 register which can
>>> control SDHI0 CD/WP pin pull-up setting.
>>> It should be replaced in the future.
>>> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>>> ---
>>> arch/arm/mach-shmobile/board-bockw.c | 29 +++++++++++++++++++++++++++++
>>> 1 file changed, 29 insertions(+)
>>> diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
>>> index 4d65715..2b6103e 100644
>>> --- a/arch/arm/mach-shmobile/board-bockw.c
>>> +++ b/arch/arm/mach-shmobile/board-bockw.c
>> [...]
>>> static const struct pinctrl_map bockw_pinctrl_map[] = {
>>> /* SCIF0 */
>>> PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
>>> "scif0_data_a", "scif0"),
>>> PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
>>> "scif0_ctrl", "scif0"),
>>> + /* SDHI0 */
>>> + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
>>> + "sdhi0", "sdhi0"),
>>> };
>> These SDHI0 data above don't match
>> drivers/pinctrl/sh-pfc/pfc-r8a7778.c and cause this message:
>> sh-pfc pfc-r8a7778: invalid group "sdhi0" for function "sdhi0"
>> I'm not sure but maybe because of this SD card can't be detected.
> Hi,
> is there a resolution for this problem?
> I believe that this patch was included in v3.11-rc1.
I posted the patch about an hour after this message:
http://marc.info/?l=linux-sh&m\x137488241212082
WBR, Sergei
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support
2013-04-17 5:17 [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support Kuninori Morimoto
` (5 preceding siblings ...)
2013-07-31 12:09 ` Sergei Shtylyov
@ 2013-08-01 7:58 ` Simon Horman
6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2013-08-01 7:58 UTC (permalink / raw)
To: linux-sh
On Wed, Jul 31, 2013 at 04:09:13PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 31-07-2013 4:22, Simon Horman wrote:
>
> >>>This patch is directly accessing to PUPR4 register which can
> >>>control SDHI0 CD/WP pin pull-up setting.
> >>>It should be replaced in the future.
>
> >>>Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >>>---
> >>> arch/arm/mach-shmobile/board-bockw.c | 29 +++++++++++++++++++++++++++++
> >>> 1 file changed, 29 insertions(+)
>
> >>>diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
> >>>index 4d65715..2b6103e 100644
> >>>--- a/arch/arm/mach-shmobile/board-bockw.c
> >>>+++ b/arch/arm/mach-shmobile/board-bockw.c
> >>[...]
> >>> static const struct pinctrl_map bockw_pinctrl_map[] = {
> >>> /* SCIF0 */
> >>> PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> >>> "scif0_data_a", "scif0"),
> >>> PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
> >>> "scif0_ctrl", "scif0"),
> >>>+ /* SDHI0 */
> >>>+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
> >>>+ "sdhi0", "sdhi0"),
> >>> };
>
> >> These SDHI0 data above don't match
> >>drivers/pinctrl/sh-pfc/pfc-r8a7778.c and cause this message:
>
> >>sh-pfc pfc-r8a7778: invalid group "sdhi0" for function "sdhi0"
>
> >> I'm not sure but maybe because of this SD card can't be detected.
>
> >Hi,
>
> >is there a resolution for this problem?
> >I believe that this patch was included in v3.11-rc1.
>
> I posted the patch about an hour after this message:
>
> http://marc.info/?l=linux-sh&m\x137488241212082
Thanks for the clarification.
That patch is currently sitting in the
fixes-for-v3.11 branch which I tagged as renesas-fixes2-for-v3.11
and send a pull request for recently.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-08-01 7:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17 5:17 [PATCH 5/6] ARM: shmobile: bockw: add SDHI0 support Kuninori Morimoto
2013-04-18 12:10 ` Simon Horman
2013-07-26 22:38 ` Sergei Shtylyov
2013-07-31 0:22 ` Simon Horman
2013-07-31 6:14 ` Kuninori Morimoto
2013-07-31 6:39 ` Simon Horman
2013-07-31 12:09 ` Sergei Shtylyov
2013-08-01 7:58 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).