aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-bockw.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-09 19:33:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-09 19:33:57 -0400
commitfa91515cbf2375a64c8bd0a033a05b0859dff591 (patch)
tree78d426e740152fa7abd6500b19ca0218190a2729 /arch/arm/mach-shmobile/board-bockw.c
parenta35c6322e52c550b61a04a44df27d22394ee0a2c (diff)
parent25475030ec0e2c4c05f3ecb2c068f6e42944fd04 (diff)
Merge tag 'renesas-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM Renesas SoC cleanup, refactoring and more SMP support from Kevin Hilman: "Lots of cleanup and refactoring and some SMP additions for Renesas platforms. Due to some inter-dependencies with other arm-soc branches, this Renesas stuff was separated out for sending after the other branches were merged. Highlights: - remove unused board support and cleanup of unused headers - refactoring of init and device registration - simplify IRQ initialization" * tag 'renesas-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (68 commits) ARM: shmobile: Per-CPU SMP boot / sleep code for SCU SoCs ARM: shmobile: Introduce per-CPU SMP boot / sleep code ARM: shmobile: Use shared SCU CPU Hotplug code on r8a7779 ARM: shmobile: Use shared SCU CPU Hotplug code on sh73a0 ARM: shmobile: Add shared SCU CPU Hotplug code ARM: shmobile: Use shared SCU SMP boot code on emev2 ARM: shmobile: Use shared SCU SMP boot code on r8a7779 ARM: shmobile: Use shared SCU SMP boot code on sh73a0 ARM: shmobile: Introduce shared SCU SMP boot code ARM: shmobile: sh73a0: Remove global GPIO_NR definition ARM: shmobile: kzm9d: remove nfsroot settings from bootargs ARM: shmobile: armadillo800eva: remove nfsroot settings from bootargs ARM: shmobile: r8a7779: move r8a7779_init_irq_xxx() to setup ARM: shmobile: r8a7740: move r8a7740_init_irq_of() to setup ARM: shmobile: bockw: add missing __initdata ARM: shmobile: r8a7790: add missing __initdata ARM: shmobile: r8a7779: add missing __initdata ARM: shmobile: Remove unused shmobile_init_time() ARM: shmobile: Use clocksource_of_init() on r8a7790 ARM: shmobile: Use default ->init_time() on KZM9G DT ref ...
Diffstat (limited to 'arch/arm/mach-shmobile/board-bockw.c')
-rw-r--r--arch/arm/mach-shmobile/board-bockw.c49
1 files changed, 39 insertions, 10 deletions
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index 35dd7f201a16..6b9faf3908f7 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -21,8 +21,11 @@
21 21
22#include <linux/mfd/tmio.h> 22#include <linux/mfd/tmio.h>
23#include <linux/mmc/host.h> 23#include <linux/mmc/host.h>
24#include <linux/mmc/sh_mobile_sdhi.h>
25#include <linux/mmc/sh_mmcif.h>
24#include <linux/mtd/partitions.h> 26#include <linux/mtd/partitions.h>
25#include <linux/pinctrl/machine.h> 27#include <linux/pinctrl/machine.h>
28#include <linux/platform_data/usb-rcar-phy.h>
26#include <linux/platform_device.h> 29#include <linux/platform_device.h>
27#include <linux/regulator/fixed.h> 30#include <linux/regulator/fixed.h>
28#include <linux/regulator/machine.h> 31#include <linux/regulator/machine.h>
@@ -66,28 +69,38 @@ static struct regulator_consumer_supply dummy_supplies[] = {
66 REGULATOR_SUPPLY("vdd33a", "smsc911x"), 69 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
67}; 70};
68 71
69static struct smsc911x_platform_config smsc911x_data = { 72static struct smsc911x_platform_config smsc911x_data __initdata = {
70 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, 73 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
71 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, 74 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
72 .flags = SMSC911X_USE_32BIT, 75 .flags = SMSC911X_USE_32BIT,
73 .phy_interface = PHY_INTERFACE_MODE_MII, 76 .phy_interface = PHY_INTERFACE_MODE_MII,
74}; 77};
75 78
76static struct resource smsc911x_resources[] = { 79static struct resource smsc911x_resources[] __initdata = {
77 DEFINE_RES_MEM(0x18300000, 0x1000), 80 DEFINE_RES_MEM(0x18300000, 0x1000),
78 DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */ 81 DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */
79}; 82};
80 83
81/* USB */ 84/* USB */
85static struct resource usb_phy_resources[] __initdata = {
86 DEFINE_RES_MEM(0xffe70800, 0x100),
87 DEFINE_RES_MEM(0xffe76000, 0x100),
88};
89
82static struct rcar_phy_platform_data usb_phy_platform_data __initdata; 90static struct rcar_phy_platform_data usb_phy_platform_data __initdata;
83 91
84/* SDHI */ 92/* SDHI */
85static struct sh_mobile_sdhi_info sdhi0_info = { 93static struct sh_mobile_sdhi_info sdhi0_info __initdata = {
86 .tmio_caps = MMC_CAP_SD_HIGHSPEED, 94 .tmio_caps = MMC_CAP_SD_HIGHSPEED,
87 .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, 95 .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
88 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, 96 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
89}; 97};
90 98
99static struct resource sdhi0_resources[] __initdata = {
100 DEFINE_RES_MEM(0xFFE4C000, 0x100),
101 DEFINE_RES_IRQ(gic_iid(0x77)),
102};
103
91static struct sh_eth_plat_data ether_platform_data __initdata = { 104static struct sh_eth_plat_data ether_platform_data __initdata = {
92 .phy = 0x01, 105 .phy = 0x01,
93 .edmac_endian = EDMAC_LITTLE_ENDIAN, 106 .edmac_endian = EDMAC_LITTLE_ENDIAN,
@@ -136,7 +149,12 @@ static struct spi_board_info spi_board_info[] __initdata = {
136}; 149};
137 150
138/* MMC */ 151/* MMC */
139static struct sh_mmcif_plat_data sh_mmcif_plat = { 152static struct resource mmc_resources[] __initdata = {
153 DEFINE_RES_MEM(0xffe4e000, 0x100),
154 DEFINE_RES_IRQ(gic_iid(0x5d)),
155};
156
157static struct sh_mmcif_plat_data sh_mmcif_plat __initdata = {
140 .sup_pclk = 0, 158 .sup_pclk = 0,
141 .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, 159 .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
142 .caps = MMC_CAP_4_BIT_DATA | 160 .caps = MMC_CAP_4_BIT_DATA |
@@ -217,11 +235,7 @@ static void __init bockw_init(void)
217 r8a7778_clock_init(); 235 r8a7778_clock_init();
218 r8a7778_init_irq_extpin(1); 236 r8a7778_init_irq_extpin(1);
219 r8a7778_add_standard_devices(); 237 r8a7778_add_standard_devices();
220 r8a7778_add_usb_phy_device(&usb_phy_platform_data);
221 r8a7778_add_ether_device(&ether_platform_data); 238 r8a7778_add_ether_device(&ether_platform_data);
222 r8a7778_add_i2c_device(0);
223 r8a7778_add_hspi_device(0);
224 r8a7778_add_mmc_device(&sh_mmcif_plat);
225 r8a7778_add_vin_device(0, &vin_platform_data); 239 r8a7778_add_vin_device(0, &vin_platform_data);
226 /* VIN1 has a pin conflict with Ether */ 240 /* VIN1 has a pin conflict with Ether */
227 if (!IS_ENABLED(CONFIG_SH_ETH)) 241 if (!IS_ENABLED(CONFIG_SH_ETH))
@@ -241,6 +255,19 @@ static void __init bockw_init(void)
241 ARRAY_SIZE(bockw_pinctrl_map)); 255 ARRAY_SIZE(bockw_pinctrl_map));
242 r8a7778_pinmux_init(); 256 r8a7778_pinmux_init();
243 257
258 platform_device_register_resndata(
259 &platform_bus, "sh_mmcif", -1,
260 mmc_resources, ARRAY_SIZE(mmc_resources),
261 &sh_mmcif_plat, sizeof(struct sh_mmcif_plat_data));
262
263 platform_device_register_resndata(
264 &platform_bus, "rcar_usb_phy", -1,
265 usb_phy_resources,
266 ARRAY_SIZE(usb_phy_resources),
267 &usb_phy_platform_data,
268 sizeof(struct rcar_phy_platform_data));
269
270
244 /* for SMSC */ 271 /* for SMSC */
245 base = ioremap_nocache(FPGA, SZ_1M); 272 base = ioremap_nocache(FPGA, SZ_1M);
246 if (base) { 273 if (base) {
@@ -276,7 +303,10 @@ static void __init bockw_init(void)
276 iowrite32(ioread32(base + PUPR4) | (3 << 26), base + PUPR4); 303 iowrite32(ioread32(base + PUPR4) | (3 << 26), base + PUPR4);
277 iounmap(base); 304 iounmap(base);
278 305
279 r8a7778_sdhi_init(0, &sdhi0_info); 306 platform_device_register_resndata(
307 &platform_bus, "sh_mobile_sdhi", 0,
308 sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
309 &sdhi0_info, sizeof(struct sh_mobile_sdhi_info));
280 } 310 }
281} 311}
282 312
@@ -289,7 +319,6 @@ DT_MACHINE_START(BOCKW_DT, "bockw")
289 .init_early = r8a7778_init_delay, 319 .init_early = r8a7778_init_delay,
290 .init_irq = r8a7778_init_irq_dt, 320 .init_irq = r8a7778_init_irq_dt,
291 .init_machine = bockw_init, 321 .init_machine = bockw_init,
292 .init_time = shmobile_timer_init,
293 .dt_compat = bockw_boards_compat_dt, 322 .dt_compat = bockw_boards_compat_dt,
294 .init_late = r8a7778_init_late, 323 .init_late = r8a7778_init_late,
295MACHINE_END 324MACHINE_END