* [PATCH 08/17 v2] ARM: shmobile: r8a7778: add MMCIF support
@ 2013-05-23 3:19 Kuninori Morimoto
2013-05-23 12:53 ` Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Kuninori Morimoto @ 2013-05-23 3:19 UTC (permalink / raw)
To: linux-sh
Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2
- no change
arch/arm/mach-shmobile/clock-r8a7778.c | 3 +++
arch/arm/mach-shmobile/include/mach/r8a7778.h | 2 ++
arch/arm/mach-shmobile/setup-r8a7778.c | 13 +++++++++++++
3 files changed, 18 insertions(+)
diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
index c2c1895..842aed7 100644
--- a/arch/arm/mach-shmobile/clock-r8a7778.c
+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
@@ -103,6 +103,7 @@ static struct clk *main_clks[] = {
};
enum {
+ MSTP331,
MSTP323, MSTP322, MSTP321,
MSTP114,
MSTP030,
@@ -112,6 +113,7 @@ enum {
MSTP_NR };
static struct clk mstp_clks[MSTP_NR] = {
+ [MSTP331] = SH_CLK_MSTP32(&s4_clk, MSTPCR3, 31, 0), /* MMC */
[MSTP323] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 23, 0), /* SDHI0 */
[MSTP322] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 22, 0), /* SDHI1 */
[MSTP321] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 21, 0), /* SDHI2 */
@@ -137,6 +139,7 @@ static struct clk_lookup lookups[] = {
CLKDEV_CON_ID("peripheral_clk", &p_clk),
/* MSTP32 clocks */
+ CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP331]), /* MMC */
CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */
CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */
CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h
index ca8bc14..fcf3c90 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_mmcif.h>
#include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/sh_eth.h>
@@ -26,6 +27,7 @@ extern void r8a7778_add_standard_devices_dt(void);
extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
extern void r8a7778_add_i2c_device(int id);
extern void r8a7778_add_hspi_device(int id);
+extern void r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info);
extern void r8a7778_init_delay(void);
extern void r8a7778_init_irq(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 8f011cb..b0cc4ba 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -220,6 +220,19 @@ void __init r8a7778_add_hspi_device(int id)
hspi_resources + (2 * id), 2);
}
+/* MMC */
+static struct resource mmc_resources[] = {
+ DEFINE_RES_MEM(0xffe4e000, 0x100),
+ DEFINE_RES_IRQ(gic_iid(0x5d)),
+};
+
+void __init r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info)
+{
+ platform_device_register_resndata(
+ &platform_bus, "sh_mmcif", -1,
+ mmc_resources, ARRAY_SIZE(mmc_resources),
+ info, sizeof(*info));
+}
void __init r8a7778_add_standard_devices(void)
{
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 08/17 v2] ARM: shmobile: r8a7778: add MMCIF support
2013-05-23 3:19 [PATCH 08/17 v2] ARM: shmobile: r8a7778: add MMCIF support Kuninori Morimoto
@ 2013-05-23 12:53 ` Sergei Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2013-05-23 12:53 UTC (permalink / raw)
To: linux-sh
On 23-05-2013 7:19, Kuninori Morimoto wrote:
I would like a proper changelog here.
> Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[...]
> diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
> index c2c1895..842aed7 100644
> --- a/arch/arm/mach-shmobile/clock-r8a7778.c
> +++ b/arch/arm/mach-shmobile/clock-r8a7778.c
[...]
> @@ -137,6 +139,7 @@ static struct clk_lookup lookups[] = {
> CLKDEV_CON_ID("peripheral_clk", &p_clk),
>
> /* MSTP32 clocks */
> + CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP331]), /* MMC */
Either actually align with others, or use single space after comma.
> CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */
> CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */
> CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */
[...]
> diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
> index 8f011cb..b0cc4ba 100644
> --- a/arch/arm/mach-shmobile/setup-r8a7778.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7778.c
> @@ -220,6 +220,19 @@ void __init r8a7778_add_hspi_device(int id)
> hspi_resources + (2 * id), 2);
> }
>
> +/* MMC */
> +static struct resource mmc_resources[] = {
You forgot to specify __initdata.
> + DEFINE_RES_MEM(0xffe4e000, 0x100),
> + DEFINE_RES_IRQ(gic_iid(0x5d)),
> +};
WBR, Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-23 12:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23 3:19 [PATCH 08/17 v2] ARM: shmobile: r8a7778: add MMCIF support Kuninori Morimoto
2013-05-23 12:53 ` Sergei Shtylyov
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).