aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/setup-sh7372.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-shmobile/setup-sh7372.c')
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c72
1 files changed, 67 insertions, 5 deletions
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index c917882424a7..59c7146bf66f 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -33,6 +33,7 @@
33#include <linux/sh_timer.h> 33#include <linux/sh_timer.h>
34#include <linux/pm_domain.h> 34#include <linux/pm_domain.h>
35#include <linux/dma-mapping.h> 35#include <linux/dma-mapping.h>
36#include <linux/platform_data/sh_ipmmu.h>
36#include <mach/dma-register.h> 37#include <mach/dma-register.h>
37#include <mach/hardware.h> 38#include <mach/hardware.h>
38#include <mach/irqs.h> 39#include <mach/irqs.h>
@@ -60,6 +61,32 @@ void __init sh7372_map_io(void)
60 iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc)); 61 iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc));
61} 62}
62 63
64/* PFC */
65static struct resource sh7372_pfc_resources[] = {
66 [0] = {
67 .start = 0xe6050000,
68 .end = 0xe6057fff,
69 .flags = IORESOURCE_MEM,
70 },
71 [1] = {
72 .start = 0xe605800c,
73 .end = 0xe6058027,
74 .flags = IORESOURCE_MEM,
75 }
76};
77
78static struct platform_device sh7372_pfc_device = {
79 .name = "pfc-sh7372",
80 .id = -1,
81 .resource = sh7372_pfc_resources,
82 .num_resources = ARRAY_SIZE(sh7372_pfc_resources),
83};
84
85void __init sh7372_pinmux_init(void)
86{
87 platform_device_register(&sh7372_pfc_device);
88}
89
63/* SCIFA0 */ 90/* SCIFA0 */
64static struct plat_sci_port scif0_platform_data = { 91static struct plat_sci_port scif0_platform_data = {
65 .mapbase = 0xe6c40000, 92 .mapbase = 0xe6c40000,
@@ -982,6 +1009,43 @@ static struct platform_device spu1_device = {
982 .num_resources = ARRAY_SIZE(spu1_resources), 1009 .num_resources = ARRAY_SIZE(spu1_resources),
983}; 1010};
984 1011
1012/* IPMMUI (an IPMMU module for ICB/LMB) */
1013static struct resource ipmmu_resources[] = {
1014 [0] = {
1015 .name = "IPMMUI",
1016 .start = 0xfe951000,
1017 .end = 0xfe9510ff,
1018 .flags = IORESOURCE_MEM,
1019 },
1020};
1021
1022static const char * const ipmmu_dev_names[] = {
1023 "sh_mobile_lcdc_fb.0",
1024 "sh_mobile_lcdc_fb.1",
1025 "sh_mobile_ceu.0",
1026 "uio_pdrv_genirq.0",
1027 "uio_pdrv_genirq.1",
1028 "uio_pdrv_genirq.2",
1029 "uio_pdrv_genirq.3",
1030 "uio_pdrv_genirq.4",
1031 "uio_pdrv_genirq.5",
1032};
1033
1034static struct shmobile_ipmmu_platform_data ipmmu_platform_data = {
1035 .dev_names = ipmmu_dev_names,
1036 .num_dev_names = ARRAY_SIZE(ipmmu_dev_names),
1037};
1038
1039static struct platform_device ipmmu_device = {
1040 .name = "ipmmu",
1041 .id = -1,
1042 .dev = {
1043 .platform_data = &ipmmu_platform_data,
1044 },
1045 .resource = ipmmu_resources,
1046 .num_resources = ARRAY_SIZE(ipmmu_resources),
1047};
1048
985static struct platform_device *sh7372_early_devices[] __initdata = { 1049static struct platform_device *sh7372_early_devices[] __initdata = {
986 &scif0_device, 1050 &scif0_device,
987 &scif1_device, 1051 &scif1_device,
@@ -993,6 +1057,7 @@ static struct platform_device *sh7372_early_devices[] __initdata = {
993 &cmt2_device, 1057 &cmt2_device,
994 &tmu00_device, 1058 &tmu00_device,
995 &tmu01_device, 1059 &tmu01_device,
1060 &ipmmu_device,
996}; 1061};
997 1062
998static struct platform_device *sh7372_late_devices[] __initdata = { 1063static struct platform_device *sh7372_late_devices[] __initdata = {
@@ -1054,7 +1119,7 @@ void __init sh7372_add_standard_devices(void)
1054 ARRAY_SIZE(domain_devices)); 1119 ARRAY_SIZE(domain_devices));
1055} 1120}
1056 1121
1057static void __init sh7372_earlytimer_init(void) 1122void __init sh7372_earlytimer_init(void)
1058{ 1123{
1059 sh7372_clock_init(); 1124 sh7372_clock_init();
1060 shmobile_earlytimer_init(); 1125 shmobile_earlytimer_init();
@@ -1067,9 +1132,6 @@ void __init sh7372_add_early_devices(void)
1067 1132
1068 /* setup early console here as well */ 1133 /* setup early console here as well */
1069 shmobile_setup_console(); 1134 shmobile_setup_console();
1070
1071 /* override timer setup with soc-specific code */
1072 shmobile_timer.init = sh7372_earlytimer_init;
1073} 1135}
1074 1136
1075#ifdef CONFIG_USE_OF 1137#ifdef CONFIG_USE_OF
@@ -1113,7 +1175,7 @@ DT_MACHINE_START(SH7372_DT, "Generic SH7372 (Flattened Device Tree)")
1113 .init_irq = sh7372_init_irq, 1175 .init_irq = sh7372_init_irq,
1114 .handle_irq = shmobile_handle_irq_intc, 1176 .handle_irq = shmobile_handle_irq_intc,
1115 .init_machine = sh7372_add_standard_devices_dt, 1177 .init_machine = sh7372_add_standard_devices_dt,
1116 .timer = &shmobile_timer, 1178 .init_time = shmobile_timer_init,
1117 .dt_compat = sh7372_boards_compat_dt, 1179 .dt_compat = sh7372_boards_compat_dt,
1118MACHINE_END 1180MACHINE_END
1119 1181