diff options
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/board-kzm9g.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-r8a7779.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-emev2.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh73a0.c | 21 |
4 files changed, 60 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index 53b7ea92c32c..fd21fb6f9953 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c | |||
@@ -763,6 +763,13 @@ static void __init kzm_init(void) | |||
763 | platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices)); | 763 | platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices)); |
764 | } | 764 | } |
765 | 765 | ||
766 | static void kzm9g_restart(char mode, const char *cmd) | ||
767 | { | ||
768 | #define RESCNT2 0xe6188020 | ||
769 | /* Do soft power on reset */ | ||
770 | writel((1 << 31), RESCNT2); | ||
771 | } | ||
772 | |||
766 | static const char *kzm9g_boards_compat_dt[] __initdata = { | 773 | static const char *kzm9g_boards_compat_dt[] __initdata = { |
767 | "renesas,kzm9g", | 774 | "renesas,kzm9g", |
768 | NULL, | 775 | NULL, |
@@ -777,5 +784,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g") | |||
777 | .init_machine = kzm_init, | 784 | .init_machine = kzm_init, |
778 | .init_late = shmobile_init_late, | 785 | .init_late = shmobile_init_late, |
779 | .timer = &shmobile_timer, | 786 | .timer = &shmobile_timer, |
787 | .restart = kzm9g_restart, | ||
780 | .dt_compat = kzm9g_boards_compat_dt, | 788 | .dt_compat = kzm9g_boards_compat_dt, |
781 | MACHINE_END | 789 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index 339c62c824d5..3cafb6ab5e9a 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c | |||
@@ -86,11 +86,16 @@ static struct clk div4_clks[DIV4_NR] = { | |||
86 | 0x0300, CLK_ENABLE_ON_INIT), | 86 | 0x0300, CLK_ENABLE_ON_INIT), |
87 | }; | 87 | }; |
88 | 88 | ||
89 | enum { MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, | 89 | enum { MSTP323, MSTP322, MSTP321, MSTP320, |
90 | MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, | ||
90 | MSTP016, MSTP015, MSTP014, | 91 | MSTP016, MSTP015, MSTP014, |
91 | MSTP_NR }; | 92 | MSTP_NR }; |
92 | 93 | ||
93 | static struct clk mstp_clks[MSTP_NR] = { | 94 | static struct clk mstp_clks[MSTP_NR] = { |
95 | [MSTP323] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 23, 0), /* SDHI0 */ | ||
96 | [MSTP322] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 22, 0), /* SDHI1 */ | ||
97 | [MSTP321] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 21, 0), /* SDHI2 */ | ||
98 | [MSTP320] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 20, 0), /* SDHI3 */ | ||
94 | [MSTP026] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 26, 0), /* SCIF0 */ | 99 | [MSTP026] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 26, 0), /* SCIF0 */ |
95 | [MSTP025] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 25, 0), /* SCIF1 */ | 100 | [MSTP025] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 25, 0), /* SCIF1 */ |
96 | [MSTP024] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 24, 0), /* SCIF2 */ | 101 | [MSTP024] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 24, 0), /* SCIF2 */ |
@@ -149,6 +154,10 @@ static struct clk_lookup lookups[] = { | |||
149 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */ | 154 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */ |
150 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ | 155 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ |
151 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ | 156 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ |
157 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ | ||
158 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ | ||
159 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ | ||
160 | CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */ | ||
152 | }; | 161 | }; |
153 | 162 | ||
154 | void __init r8a7779_clock_init(void) | 163 | void __init r8a7779_clock_init(void) |
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c index dae9aa68bb09..61446f30e397 100644 --- a/arch/arm/mach-shmobile/setup-emev2.c +++ b/arch/arm/mach-shmobile/setup-emev2.c | |||
@@ -356,6 +356,26 @@ static struct platform_device gio4_device = { | |||
356 | }, | 356 | }, |
357 | }; | 357 | }; |
358 | 358 | ||
359 | static struct resource pmu_resources[] = { | ||
360 | [0] = { | ||
361 | .start = 152, | ||
362 | .end = 152, | ||
363 | .flags = IORESOURCE_IRQ, | ||
364 | }, | ||
365 | [1] = { | ||
366 | .start = 153, | ||
367 | .end = 153, | ||
368 | .flags = IORESOURCE_IRQ, | ||
369 | }, | ||
370 | }; | ||
371 | |||
372 | static struct platform_device pmu_device = { | ||
373 | .name = "arm-pmu", | ||
374 | .id = -1, | ||
375 | .num_resources = ARRAY_SIZE(pmu_resources), | ||
376 | .resource = pmu_resources, | ||
377 | }; | ||
378 | |||
359 | static struct platform_device *emev2_early_devices[] __initdata = { | 379 | static struct platform_device *emev2_early_devices[] __initdata = { |
360 | &uart0_device, | 380 | &uart0_device, |
361 | &uart1_device, | 381 | &uart1_device, |
@@ -370,6 +390,7 @@ static struct platform_device *emev2_late_devices[] __initdata = { | |||
370 | &gio2_device, | 390 | &gio2_device, |
371 | &gio3_device, | 391 | &gio3_device, |
372 | &gio4_device, | 392 | &gio4_device, |
393 | &pmu_device, | ||
373 | }; | 394 | }; |
374 | 395 | ||
375 | void __init emev2_add_standard_devices(void) | 396 | void __init emev2_add_standard_devices(void) |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index d230af656fc9..38ed2ddd3265 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -734,6 +734,26 @@ static struct platform_device mpdma0_device = { | |||
734 | }, | 734 | }, |
735 | }; | 735 | }; |
736 | 736 | ||
737 | static struct resource pmu_resources[] = { | ||
738 | [0] = { | ||
739 | .start = gic_spi(55), | ||
740 | .end = gic_spi(55), | ||
741 | .flags = IORESOURCE_IRQ, | ||
742 | }, | ||
743 | [1] = { | ||
744 | .start = gic_spi(56), | ||
745 | .end = gic_spi(56), | ||
746 | .flags = IORESOURCE_IRQ, | ||
747 | }, | ||
748 | }; | ||
749 | |||
750 | static struct platform_device pmu_device = { | ||
751 | .name = "arm-pmu", | ||
752 | .id = -1, | ||
753 | .num_resources = ARRAY_SIZE(pmu_resources), | ||
754 | .resource = pmu_resources, | ||
755 | }; | ||
756 | |||
737 | static struct platform_device *sh73a0_early_devices[] __initdata = { | 757 | static struct platform_device *sh73a0_early_devices[] __initdata = { |
738 | &scif0_device, | 758 | &scif0_device, |
739 | &scif1_device, | 759 | &scif1_device, |
@@ -757,6 +777,7 @@ static struct platform_device *sh73a0_late_devices[] __initdata = { | |||
757 | &i2c4_device, | 777 | &i2c4_device, |
758 | &dma0_device, | 778 | &dma0_device, |
759 | &mpdma0_device, | 779 | &mpdma0_device, |
780 | &pmu_device, | ||
760 | }; | 781 | }; |
761 | 782 | ||
762 | #define SRCR2 0xe61580b0 | 783 | #define SRCR2 0xe61580b0 |