* [PATCH 3/6] ARM: shmobile: r8a7778: Register SDHI device
@ 2013-04-17 5:17 Kuninori Morimoto
2013-04-18 12:07 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2013-04-17 5:17 UTC (permalink / raw)
To: linux-sh
This patch adds SDHI register function which needs id number (= 0/1/2)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/include/mach/r8a7778.h | 2 ++
arch/arm/mach-shmobile/setup-r8a7778.c | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h
index 68053fc..ae65b45 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7778.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h
@@ -18,6 +18,7 @@
#ifndef __ASM_R8A7778_H__
#define __ASM_R8A7778_H__
+#include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/sh_eth.h>
extern void r8a7778_add_standard_devices(void);
@@ -29,5 +30,6 @@ extern void r8a7778_init_irq_dt(void);
extern void r8a7778_clock_init(void);
extern void r8a7778_init_irq_extpin(int irlm);
extern void r8a7778_pinmux_init(void);
+extern void r8a7778_sdhi_init(int id, struct sh_mobile_sdhi_info *info);
#endif /* __ASM_R8A7778_H__ */
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index d82954b..4c32784 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -115,6 +115,30 @@ void __init r8a7778_pinmux_init(void)
ARRAY_SIZE(pfc_resources));
}
+/* SDHI */
+static struct resource sdhi_resources[] = {
+ /* SDHI0 */
+ DEFINE_RES_MEM(0xFFE4C000, 0x100),
+ DEFINE_RES_IRQ(gic_iid(0x77)),
+ /* SDHI1 */
+ DEFINE_RES_MEM(0xFFE4D000, 0x100),
+ DEFINE_RES_IRQ(gic_iid(0x78)),
+ /* SDHI2 */
+ DEFINE_RES_MEM(0xFFE4F000, 0x100),
+ DEFINE_RES_IRQ(gic_iid(0x76)),
+};
+
+void __init r8a7778_sdhi_init(int id,
+ struct sh_mobile_sdhi_info *info)
+{
+ BUG_ON(id < 0 || id > 2);
+
+ platform_device_register_resndata(
+ &platform_bus, "sh_mobile_sdhi", id,
+ sdhi_resources + (2 * id), 2,
+ info, sizeof(*info));
+}
+
void __init r8a7778_add_standard_devices(void)
{
int i;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 3/6] ARM: shmobile: r8a7778: Register SDHI device
2013-04-17 5:17 [PATCH 3/6] ARM: shmobile: r8a7778: Register SDHI device Kuninori Morimoto
@ 2013-04-18 12:07 ` Simon Horman
2013-04-19 18:27 ` Sergei Shtylyov
2013-04-22 0:48 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2013-04-18 12:07 UTC (permalink / raw)
To: linux-sh
On Tue, Apr 16, 2013 at 10:17:25PM -0700, Kuninori Morimoto wrote:
> This patch adds SDHI register function which needs id number (= 0/1/2)
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thanks, queued-up for v3.11 in the soc-r8a7778 branch.
> ---
> arch/arm/mach-shmobile/include/mach/r8a7778.h | 2 ++
> arch/arm/mach-shmobile/setup-r8a7778.c | 24 ++++++++++++++++++++++++
> 2 files changed, 26 insertions(+)
>
> diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h
> index 68053fc..ae65b45 100644
> --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h
> +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h
> @@ -18,6 +18,7 @@
> #ifndef __ASM_R8A7778_H__
> #define __ASM_R8A7778_H__
>
> +#include <linux/mmc/sh_mobile_sdhi.h>
> #include <linux/sh_eth.h>
>
> extern void r8a7778_add_standard_devices(void);
> @@ -29,5 +30,6 @@ extern void r8a7778_init_irq_dt(void);
> extern void r8a7778_clock_init(void);
> extern void r8a7778_init_irq_extpin(int irlm);
> extern void r8a7778_pinmux_init(void);
> +extern void r8a7778_sdhi_init(int id, struct sh_mobile_sdhi_info *info);
>
> #endif /* __ASM_R8A7778_H__ */
> diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
> index d82954b..4c32784 100644
> --- a/arch/arm/mach-shmobile/setup-r8a7778.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7778.c
> @@ -115,6 +115,30 @@ void __init r8a7778_pinmux_init(void)
> ARRAY_SIZE(pfc_resources));
> }
>
> +/* SDHI */
> +static struct resource sdhi_resources[] = {
> + /* SDHI0 */
> + DEFINE_RES_MEM(0xFFE4C000, 0x100),
> + DEFINE_RES_IRQ(gic_iid(0x77)),
> + /* SDHI1 */
> + DEFINE_RES_MEM(0xFFE4D000, 0x100),
> + DEFINE_RES_IRQ(gic_iid(0x78)),
> + /* SDHI2 */
> + DEFINE_RES_MEM(0xFFE4F000, 0x100),
> + DEFINE_RES_IRQ(gic_iid(0x76)),
> +};
> +
> +void __init r8a7778_sdhi_init(int id,
> + struct sh_mobile_sdhi_info *info)
> +{
> + BUG_ON(id < 0 || id > 2);
> +
> + platform_device_register_resndata(
> + &platform_bus, "sh_mobile_sdhi", id,
> + sdhi_resources + (2 * id), 2,
> + info, sizeof(*info));
> +}
> +
> void __init r8a7778_add_standard_devices(void)
> {
> int i;
> --
> 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] 4+ messages in thread* Re: [PATCH 3/6] ARM: shmobile: r8a7778: Register SDHI device
2013-04-17 5:17 [PATCH 3/6] ARM: shmobile: r8a7778: Register SDHI device Kuninori Morimoto
2013-04-18 12:07 ` Simon Horman
@ 2013-04-19 18:27 ` Sergei Shtylyov
2013-04-22 0:48 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2013-04-19 18:27 UTC (permalink / raw)
To: linux-sh
Hello.
On 04/17/2013 09:17 AM, Kuninori Morimoto wrote:
> This patch adds SDHI register function which needs id number (= 0/1/2)
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/mach-shmobile/include/mach/r8a7778.h | 2 ++
> arch/arm/mach-shmobile/setup-r8a7778.c | 24 ++++++++++++++++++++++++
> 2 files changed, 26 insertions(+)
>
> diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h
> index 68053fc..ae65b45 100644
> --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h
> +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h
> @@ -18,6 +18,7 @@
> #ifndef __ASM_R8A7778_H__
> #define __ASM_R8A7778_H__
>
> +#include <linux/mmc/sh_mobile_sdhi.h>
> #include <linux/sh_eth.h>
>
> extern void r8a7778_add_standard_devices(void);
> @@ -29,5 +30,6 @@ extern void r8a7778_init_irq_dt(void);
> extern void r8a7778_clock_init(void);
> extern void r8a7778_init_irq_extpin(int irlm);
> extern void r8a7778_pinmux_init(void);
> +extern void r8a7778_sdhi_init(int id, struct sh_mobile_sdhi_info *info);
You should have called the function r8a7778_add_sdhi_device() to be in
the same vein with already added registration functions. I'll prepare a
renaming patch if you don't beat me to it.
WBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 3/6] ARM: shmobile: r8a7778: Register SDHI device
2013-04-17 5:17 [PATCH 3/6] ARM: shmobile: r8a7778: Register SDHI device Kuninori Morimoto
2013-04-18 12:07 ` Simon Horman
2013-04-19 18:27 ` Sergei Shtylyov
@ 2013-04-22 0:48 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2013-04-22 0:48 UTC (permalink / raw)
To: linux-sh
Hi Sergei
> > extern void r8a7778_add_standard_devices(void);
> > @@ -29,5 +30,6 @@ extern void r8a7778_init_irq_dt(void);
> > extern void r8a7778_clock_init(void);
> > extern void r8a7778_init_irq_extpin(int irlm);
> > extern void r8a7778_pinmux_init(void);
> > +extern void r8a7778_sdhi_init(int id, struct sh_mobile_sdhi_info *info);
>
> You should have called the function r8a7778_add_sdhi_device() to be in
> the same vein with already added registration functions. I'll prepare a
> renaming patch if you don't beat me to it.
Indeed...
Thank you for your help !
Please rename it.
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-22 0:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17 5:17 [PATCH 3/6] ARM: shmobile: r8a7778: Register SDHI device Kuninori Morimoto
2013-04-18 12:07 ` Simon Horman
2013-04-19 18:27 ` Sergei Shtylyov
2013-04-22 0:48 ` Kuninori Morimoto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.