diff options
author | Simon Horman <horms+renesas@verge.net.au> | 2013-06-11 01:58:57 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-06-11 01:58:57 -0400 |
commit | ae8b378faea7f04d4517b22f5d70d824adcbc4dc (patch) | |
tree | 54f50bcbd0baa55be24ac7ffbf547b4b55d046a4 /arch/arm/mach-shmobile/setup-r8a7778.c | |
parent | 5fcf4a3c3a5bc08bf72a50ef1332501a3c1b96bb (diff) | |
parent | 413bfd0e67894c930242482cd15ac09a800e2ab8 (diff) |
Merge branches 'heads/pinmux' and 'heads/soc' into phy-rcar-usb-base
This branch acts as a base for adding USB support to
r8A7778/BOCK-W and r8A7779/Marzen.
It includes the soc branch to provide dependencies in
the r8A7778 clock code.
It includes pinmux to provide pinmux initialisation for Bock-W
which is a dependency.
Conflicts:
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/include/mach/r8a7778.h
arch/arm/mach-shmobile/setup-r8a7778.c
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7778.c')
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7778.c | 52 |
1 files changed, 38 insertions, 14 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 1f36ecc322a3..1b9b7f2a5016 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
@@ -81,12 +81,6 @@ static struct sh_timer_config sh_tmu1_platform_data = { | |||
81 | .clocksource_rating = 200, | 81 | .clocksource_rating = 200, |
82 | }; | 82 | }; |
83 | 83 | ||
84 | /* Ether */ | ||
85 | static struct resource ether_resources[] = { | ||
86 | DEFINE_RES_MEM(0xfde00000, 0x400), | ||
87 | DEFINE_RES_IRQ(gic_iid(0x89)), | ||
88 | }; | ||
89 | |||
90 | #define r8a7778_register_tmu(idx) \ | 84 | #define r8a7778_register_tmu(idx) \ |
91 | platform_device_register_resndata( \ | 85 | platform_device_register_resndata( \ |
92 | &platform_bus, "sh_tmu", idx, \ | 86 | &platform_bus, "sh_tmu", idx, \ |
@@ -95,6 +89,20 @@ static struct resource ether_resources[] = { | |||
95 | &sh_tmu##idx##_platform_data, \ | 89 | &sh_tmu##idx##_platform_data, \ |
96 | sizeof(sh_tmu##idx##_platform_data)) | 90 | sizeof(sh_tmu##idx##_platform_data)) |
97 | 91 | ||
92 | /* Ether */ | ||
93 | static struct resource ether_resources[] = { | ||
94 | DEFINE_RES_MEM(0xfde00000, 0x400), | ||
95 | DEFINE_RES_IRQ(gic_iid(0x89)), | ||
96 | }; | ||
97 | |||
98 | void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata) | ||
99 | { | ||
100 | platform_device_register_resndata(&platform_bus, "sh_eth", -1, | ||
101 | ether_resources, | ||
102 | ARRAY_SIZE(ether_resources), | ||
103 | pdata, sizeof(*pdata)); | ||
104 | } | ||
105 | |||
98 | /* PFC/GPIO */ | 106 | /* PFC/GPIO */ |
99 | static struct resource pfc_resources[] = { | 107 | static struct resource pfc_resources[] = { |
100 | DEFINE_RES_MEM(0xfffc0000, 0x118), | 108 | DEFINE_RES_MEM(0xfffc0000, 0x118), |
@@ -139,6 +147,30 @@ void __init r8a7778_pinmux_init(void) | |||
139 | r8a7778_register_gpio(2); | 147 | r8a7778_register_gpio(2); |
140 | r8a7778_register_gpio(3); | 148 | r8a7778_register_gpio(3); |
141 | r8a7778_register_gpio(4); | 149 | r8a7778_register_gpio(4); |
150 | }; | ||
151 | |||
152 | /* SDHI */ | ||
153 | static struct resource sdhi_resources[] = { | ||
154 | /* SDHI0 */ | ||
155 | DEFINE_RES_MEM(0xFFE4C000, 0x100), | ||
156 | DEFINE_RES_IRQ(gic_iid(0x77)), | ||
157 | /* SDHI1 */ | ||
158 | DEFINE_RES_MEM(0xFFE4D000, 0x100), | ||
159 | DEFINE_RES_IRQ(gic_iid(0x78)), | ||
160 | /* SDHI2 */ | ||
161 | DEFINE_RES_MEM(0xFFE4F000, 0x100), | ||
162 | DEFINE_RES_IRQ(gic_iid(0x76)), | ||
163 | }; | ||
164 | |||
165 | void __init r8a7778_sdhi_init(int id, | ||
166 | struct sh_mobile_sdhi_info *info) | ||
167 | { | ||
168 | BUG_ON(id < 0 || id > 2); | ||
169 | |||
170 | platform_device_register_resndata( | ||
171 | &platform_bus, "sh_mobile_sdhi", id, | ||
172 | sdhi_resources + (2 * id), 2, | ||
173 | info, sizeof(*info)); | ||
142 | } | 174 | } |
143 | 175 | ||
144 | void __init r8a7778_add_standard_devices(void) | 176 | void __init r8a7778_add_standard_devices(void) |
@@ -165,14 +197,6 @@ void __init r8a7778_add_standard_devices(void) | |||
165 | r8a7778_register_tmu(1); | 197 | r8a7778_register_tmu(1); |
166 | } | 198 | } |
167 | 199 | ||
168 | void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata) | ||
169 | { | ||
170 | platform_device_register_resndata(&platform_bus, "sh_eth", -1, | ||
171 | ether_resources, | ||
172 | ARRAY_SIZE(ether_resources), | ||
173 | pdata, sizeof(*pdata)); | ||
174 | } | ||
175 | |||
176 | static struct renesas_intc_irqpin_config irqpin_platform_data = { | 200 | static struct renesas_intc_irqpin_config irqpin_platform_data = { |
177 | .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ | 201 | .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ |
178 | .sense_bitfield_width = 2, | 202 | .sense_bitfield_width = 2, |