diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-ape6evm.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-bockw-reference.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-lager-reference.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-lager.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-marzen.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-r7s72100.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-r8a7790.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh7372.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh73a0.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7779.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7779.c | 57 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7790.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh73a0.c | 16 |
13 files changed, 59 insertions, 93 deletions
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index 0fa068e30a30..fe071a9130b7 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c | |||
@@ -168,7 +168,7 @@ static const struct sh_mmcif_plat_data mmcif0_pdata __initconst = { | |||
168 | }; | 168 | }; |
169 | 169 | ||
170 | static const struct resource mmcif0_resources[] __initconst = { | 170 | static const struct resource mmcif0_resources[] __initconst = { |
171 | DEFINE_RES_MEM_NAMED(0xee200000, 0x100, "MMCIF0"), | 171 | DEFINE_RES_MEM(0xee200000, 0x100), |
172 | DEFINE_RES_IRQ(gic_spi(169)), | 172 | DEFINE_RES_IRQ(gic_spi(169)), |
173 | }; | 173 | }; |
174 | 174 | ||
@@ -179,7 +179,7 @@ static const struct sh_mobile_sdhi_info sdhi0_pdata __initconst = { | |||
179 | }; | 179 | }; |
180 | 180 | ||
181 | static const struct resource sdhi0_resources[] __initconst = { | 181 | static const struct resource sdhi0_resources[] __initconst = { |
182 | DEFINE_RES_MEM_NAMED(0xee100000, 0x100, "SDHI0"), | 182 | DEFINE_RES_MEM(0xee100000, 0x100), |
183 | DEFINE_RES_IRQ(gic_spi(165)), | 183 | DEFINE_RES_IRQ(gic_spi(165)), |
184 | }; | 184 | }; |
185 | 185 | ||
@@ -191,7 +191,7 @@ static const struct sh_mobile_sdhi_info sdhi1_pdata __initconst = { | |||
191 | }; | 191 | }; |
192 | 192 | ||
193 | static const struct resource sdhi1_resources[] __initconst = { | 193 | static const struct resource sdhi1_resources[] __initconst = { |
194 | DEFINE_RES_MEM_NAMED(0xee120000, 0x100, "SDHI1"), | 194 | DEFINE_RES_MEM(0xee120000, 0x100), |
195 | DEFINE_RES_IRQ(gic_spi(166)), | 195 | DEFINE_RES_IRQ(gic_spi(166)), |
196 | }; | 196 | }; |
197 | 197 | ||
diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c index ae88fdad4b3a..1687df9b267f 100644 --- a/arch/arm/mach-shmobile/board-bockw-reference.c +++ b/arch/arm/mach-shmobile/board-bockw-reference.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
22 | #include <linux/pinctrl/machine.h> | ||
23 | #include <mach/common.h> | 22 | #include <mach/common.h> |
24 | #include <mach/r8a7778.h> | 23 | #include <mach/r8a7778.h> |
25 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index 1a1a4a888632..7df9ea0839db 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c | |||
@@ -20,16 +20,15 @@ | |||
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
23 | #include <mach/rcar-gen2.h> | ||
23 | #include <mach/r8a7790.h> | 24 | #include <mach/r8a7790.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
25 | 26 | ||
26 | static void __init lager_add_standard_devices(void) | 27 | static void __init lager_add_standard_devices(void) |
27 | { | 28 | { |
28 | /* clocks are setup late during boot in the case of DT */ | ||
29 | r8a7790_clock_init(); | 29 | r8a7790_clock_init(); |
30 | |||
31 | r8a7790_add_dt_devices(); | 30 | r8a7790_add_dt_devices(); |
32 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 31 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
33 | } | 32 | } |
34 | 33 | ||
35 | static const char *lager_boards_compat_dt[] __initdata = { | 34 | static const char *lager_boards_compat_dt[] __initdata = { |
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index a8d3ce646fb9..78a31b667988 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -148,7 +148,7 @@ static const struct sh_mmcif_plat_data mmcif1_pdata __initconst = { | |||
148 | }; | 148 | }; |
149 | 149 | ||
150 | static const struct resource mmcif1_resources[] __initconst = { | 150 | static const struct resource mmcif1_resources[] __initconst = { |
151 | DEFINE_RES_MEM_NAMED(0xee220000, 0x80, "MMCIF1"), | 151 | DEFINE_RES_MEM(0xee220000, 0x80), |
152 | DEFINE_RES_IRQ(gic_spi(170)), | 152 | DEFINE_RES_IRQ(gic_spi(170)), |
153 | }; | 153 | }; |
154 | 154 | ||
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index da1352f5f71b..4f9e3ec42ddc 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/leds.h> | 29 | #include <linux/leds.h> |
30 | #include <linux/dma-mapping.h> | 30 | #include <linux/dma-mapping.h> |
31 | #include <linux/pinctrl/machine.h> | 31 | #include <linux/pinctrl/machine.h> |
32 | #include <linux/platform_data/camera-rcar.h> | ||
32 | #include <linux/platform_data/gpio-rcar.h> | 33 | #include <linux/platform_data/gpio-rcar.h> |
33 | #include <linux/platform_data/rcar-du.h> | 34 | #include <linux/platform_data/rcar-du.h> |
34 | #include <linux/platform_data/usb-rcar-phy.h> | 35 | #include <linux/platform_data/usb-rcar-phy.h> |
@@ -259,10 +260,30 @@ static struct platform_device leds_device = { | |||
259 | }, | 260 | }, |
260 | }; | 261 | }; |
261 | 262 | ||
263 | /* VIN */ | ||
262 | static struct rcar_vin_platform_data vin_platform_data __initdata = { | 264 | static struct rcar_vin_platform_data vin_platform_data __initdata = { |
263 | .flags = RCAR_VIN_BT656, | 265 | .flags = RCAR_VIN_BT656, |
264 | }; | 266 | }; |
265 | 267 | ||
268 | #define MARZEN_VIN(idx) \ | ||
269 | static struct resource vin##idx##_resources[] __initdata = { \ | ||
270 | DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \ | ||
271 | DEFINE_RES_IRQ(gic_iid(0x5f + (idx))), \ | ||
272 | }; \ | ||
273 | \ | ||
274 | static struct platform_device_info vin##idx##_info __initdata = { \ | ||
275 | .parent = &platform_bus, \ | ||
276 | .name = "r8a7779-vin", \ | ||
277 | .id = idx, \ | ||
278 | .res = vin##idx##_resources, \ | ||
279 | .num_res = ARRAY_SIZE(vin##idx##_resources), \ | ||
280 | .dma_mask = DMA_BIT_MASK(32), \ | ||
281 | .data = &vin_platform_data, \ | ||
282 | .size_data = sizeof(vin_platform_data), \ | ||
283 | } | ||
284 | MARZEN_VIN(1); | ||
285 | MARZEN_VIN(3); | ||
286 | |||
266 | #define MARZEN_CAMERA(idx) \ | 287 | #define MARZEN_CAMERA(idx) \ |
267 | static struct i2c_board_info camera##idx##_info = { \ | 288 | static struct i2c_board_info camera##idx##_info = { \ |
268 | I2C_BOARD_INFO("adv7180", 0x20 + (idx)), \ | 289 | I2C_BOARD_INFO("adv7180", 0x20 + (idx)), \ |
@@ -367,8 +388,8 @@ static void __init marzen_init(void) | |||
367 | r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */ | 388 | r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */ |
368 | 389 | ||
369 | r8a7779_add_standard_devices(); | 390 | r8a7779_add_standard_devices(); |
370 | r8a7779_add_vin_device(1, &vin_platform_data); | 391 | platform_device_register_full(&vin1_info); |
371 | r8a7779_add_vin_device(3, &vin_platform_data); | 392 | platform_device_register_full(&vin3_info); |
372 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); | 393 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |
373 | marzen_add_du_device(); | 394 | marzen_add_du_device(); |
374 | } | 395 | } |
diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c index 4aba20ca127e..0814a508fd61 100644 --- a/arch/arm/mach-shmobile/clock-r7s72100.c +++ b/arch/arm/mach-shmobile/clock-r7s72100.c | |||
@@ -170,6 +170,9 @@ static struct clk_lookup lookups[] = { | |||
170 | CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]), | 170 | CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]), |
171 | 171 | ||
172 | /* MSTP clocks */ | 172 | /* MSTP clocks */ |
173 | CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]), | ||
174 | |||
175 | /* ICK */ | ||
173 | CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]), | 176 | CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]), |
174 | CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]), | 177 | CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]), |
175 | CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]), | 178 | CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]), |
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index a64f965c7da1..fa1b4773677a 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c | |||
@@ -77,7 +77,7 @@ static struct sh_clk_ops followparent_clk_ops = { | |||
77 | }; | 77 | }; |
78 | 78 | ||
79 | static struct clk main_clk = { | 79 | static struct clk main_clk = { |
80 | /* .parent will be set r8a73a4_clock_init */ | 80 | /* .parent will be set r8a7790_clock_init */ |
81 | .ops = &followparent_clk_ops, | 81 | .ops = &followparent_clk_ops, |
82 | }; | 82 | }; |
83 | 83 | ||
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 5390c6bbbc02..28489978b09c 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -504,10 +504,6 @@ static struct clk_lookup lookups[] = { | |||
504 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), | 504 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), |
505 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), | 505 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), |
506 | CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), | 506 | CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), |
507 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
508 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
509 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
510 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
511 | 507 | ||
512 | /* MSTP32 clocks */ | 508 | /* MSTP32 clocks */ |
513 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ | 509 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ |
@@ -574,6 +570,11 @@ static struct clk_lookup lookups[] = { | |||
574 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 570 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
575 | CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */ | 571 | CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */ |
576 | 572 | ||
573 | /* ICK */ | ||
574 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
575 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
576 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
577 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
577 | CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", | 578 | CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", |
578 | &div6_reparent_clks[DIV6_HDMI]), | 579 | &div6_reparent_clks[DIV6_HDMI]), |
579 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), | 580 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index c92c023f0d27..2aeec468cf7c 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -625,12 +625,6 @@ static struct clk_lookup lookups[] = { | |||
625 | CLKDEV_CON_ID("sdhi0_clk", &div6_clks[DIV6_SDHI0]), | 625 | CLKDEV_CON_ID("sdhi0_clk", &div6_clks[DIV6_SDHI0]), |
626 | CLKDEV_CON_ID("sdhi1_clk", &div6_clks[DIV6_SDHI1]), | 626 | CLKDEV_CON_ID("sdhi1_clk", &div6_clks[DIV6_SDHI1]), |
627 | CLKDEV_CON_ID("sdhi2_clk", &div6_clks[DIV6_SDHI2]), | 627 | CLKDEV_CON_ID("sdhi2_clk", &div6_clks[DIV6_SDHI2]), |
628 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
629 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
630 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
631 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
632 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk), | ||
633 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk), | ||
634 | 628 | ||
635 | /* MSTP32 clocks */ | 629 | /* MSTP32 clocks */ |
636 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ | 630 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ |
@@ -680,6 +674,14 @@ static struct clk_lookup lookups[] = { | |||
680 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */ | 674 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */ |
681 | CLKDEV_DEV_ID("e6828000.i2c", &mstp_clks[MSTP410]), /* I2C4 */ | 675 | CLKDEV_DEV_ID("e6828000.i2c", &mstp_clks[MSTP410]), /* I2C4 */ |
682 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 676 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
677 | |||
678 | /* ICK */ | ||
679 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
680 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
681 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
682 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
683 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk), | ||
684 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk), | ||
683 | }; | 685 | }; |
684 | 686 | ||
685 | void __init sh73a0_clock_init(void) | 687 | void __init sh73a0_clock_init(void) |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h index 17af34ed89c8..5014145f272e 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/sh_clk.h> | 4 | #include <linux/sh_clk.h> |
5 | #include <linux/pm_domain.h> | 5 | #include <linux/pm_domain.h> |
6 | #include <linux/sh_eth.h> | ||
7 | #include <linux/platform_data/camera-rcar.h> | ||
8 | 6 | ||
9 | /* HPB-DMA slave IDs */ | 7 | /* HPB-DMA slave IDs */ |
10 | enum { | 8 | enum { |
@@ -40,9 +38,6 @@ extern void r8a7779_earlytimer_init(void); | |||
40 | extern void r8a7779_add_early_devices(void); | 38 | extern void r8a7779_add_early_devices(void); |
41 | extern void r8a7779_add_standard_devices(void); | 39 | extern void r8a7779_add_standard_devices(void); |
42 | extern void r8a7779_add_standard_devices_dt(void); | 40 | extern void r8a7779_add_standard_devices_dt(void); |
43 | extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata); | ||
44 | extern void r8a7779_add_vin_device(int idx, | ||
45 | struct rcar_vin_platform_data *pdata); | ||
46 | extern void r8a7779_init_late(void); | 41 | extern void r8a7779_init_late(void); |
47 | extern void r8a7779_clock_init(void); | 42 | extern void r8a7779_clock_init(void); |
48 | extern void r8a7779_pinmux_init(void); | 43 | extern void r8a7779_pinmux_init(void); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 13049e9d691c..8f9453152fb9 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -598,45 +598,6 @@ static struct platform_device ohci1_device = { | |||
598 | .resource = ohci1_resources, | 598 | .resource = ohci1_resources, |
599 | }; | 599 | }; |
600 | 600 | ||
601 | /* Ether */ | ||
602 | static struct resource ether_resources[] __initdata = { | ||
603 | { | ||
604 | .start = 0xfde00000, | ||
605 | .end = 0xfde003ff, | ||
606 | .flags = IORESOURCE_MEM, | ||
607 | }, { | ||
608 | .start = gic_iid(0xb4), | ||
609 | .flags = IORESOURCE_IRQ, | ||
610 | }, | ||
611 | }; | ||
612 | |||
613 | #define R8A7779_VIN(idx) \ | ||
614 | static struct resource vin##idx##_resources[] __initdata = { \ | ||
615 | DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \ | ||
616 | DEFINE_RES_IRQ(gic_iid(0x5f + (idx))), \ | ||
617 | }; \ | ||
618 | \ | ||
619 | static struct platform_device_info vin##idx##_info __initdata = { \ | ||
620 | .parent = &platform_bus, \ | ||
621 | .name = "r8a7779-vin", \ | ||
622 | .id = idx, \ | ||
623 | .res = vin##idx##_resources, \ | ||
624 | .num_res = ARRAY_SIZE(vin##idx##_resources), \ | ||
625 | .dma_mask = DMA_BIT_MASK(32), \ | ||
626 | } | ||
627 | |||
628 | R8A7779_VIN(0); | ||
629 | R8A7779_VIN(1); | ||
630 | R8A7779_VIN(2); | ||
631 | R8A7779_VIN(3); | ||
632 | |||
633 | static struct platform_device_info *vin_info_table[] __initdata = { | ||
634 | &vin0_info, | ||
635 | &vin1_info, | ||
636 | &vin2_info, | ||
637 | &vin3_info, | ||
638 | }; | ||
639 | |||
640 | /* HPB-DMA */ | 601 | /* HPB-DMA */ |
641 | 602 | ||
642 | /* Asynchronous mode register bits */ | 603 | /* Asynchronous mode register bits */ |
@@ -825,24 +786,6 @@ void __init r8a7779_add_standard_devices(void) | |||
825 | r8a7779_register_hpb_dmae(); | 786 | r8a7779_register_hpb_dmae(); |
826 | } | 787 | } |
827 | 788 | ||
828 | void __init r8a7779_add_ether_device(struct sh_eth_plat_data *pdata) | ||
829 | { | ||
830 | platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1, | ||
831 | ether_resources, | ||
832 | ARRAY_SIZE(ether_resources), | ||
833 | pdata, sizeof(*pdata)); | ||
834 | } | ||
835 | |||
836 | void __init r8a7779_add_vin_device(int id, struct rcar_vin_platform_data *pdata) | ||
837 | { | ||
838 | BUG_ON(id < 0 || id > 3); | ||
839 | |||
840 | vin_info_table[id]->data = pdata; | ||
841 | vin_info_table[id]->size_data = sizeof(*pdata); | ||
842 | |||
843 | platform_device_register_full(vin_info_table[id]); | ||
844 | } | ||
845 | |||
846 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | 789 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ |
847 | void __init __weak r8a7779_register_twd(void) { } | 790 | void __init __weak r8a7779_register_twd(void) { } |
848 | 791 | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index c47bcebbcb00..3543c3bacb75 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -34,6 +34,10 @@ static const struct resource pfc_resources[] __initconst = { | |||
34 | DEFINE_RES_MEM(0xe6060000, 0x250), | 34 | DEFINE_RES_MEM(0xe6060000, 0x250), |
35 | }; | 35 | }; |
36 | 36 | ||
37 | #define r8a7790_register_pfc() \ | ||
38 | platform_device_register_simple("pfc-r8a7790", -1, pfc_resources, \ | ||
39 | ARRAY_SIZE(pfc_resources)) | ||
40 | |||
37 | #define R8A7790_GPIO(idx) \ | 41 | #define R8A7790_GPIO(idx) \ |
38 | static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \ | 42 | static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \ |
39 | DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \ | 43 | DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \ |
@@ -65,8 +69,7 @@ R8A7790_GPIO(5); | |||
65 | 69 | ||
66 | void __init r8a7790_pinmux_init(void) | 70 | void __init r8a7790_pinmux_init(void) |
67 | { | 71 | { |
68 | platform_device_register_simple("pfc-r8a7790", -1, pfc_resources, | 72 | r8a7790_register_pfc(); |
69 | ARRAY_SIZE(pfc_resources)); | ||
70 | r8a7790_register_gpio(0); | 73 | r8a7790_register_gpio(0); |
71 | r8a7790_register_gpio(1); | 74 | r8a7790_register_gpio(1); |
72 | r8a7790_register_gpio(2); | 75 | r8a7790_register_gpio(2); |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 22de17417fd7..65151c48cbd4 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -273,7 +273,7 @@ static struct sh_timer_config tmu00_platform_data = { | |||
273 | }; | 273 | }; |
274 | 274 | ||
275 | static struct resource tmu00_resources[] = { | 275 | static struct resource tmu00_resources[] = { |
276 | [0] = DEFINE_RES_MEM_NAMED(0xfff60008, 0xc, "TMU00"), | 276 | [0] = DEFINE_RES_MEM(0xfff60008, 0xc), |
277 | [1] = { | 277 | [1] = { |
278 | .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ | 278 | .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ |
279 | .flags = IORESOURCE_IRQ, | 279 | .flags = IORESOURCE_IRQ, |
@@ -298,7 +298,7 @@ static struct sh_timer_config tmu01_platform_data = { | |||
298 | }; | 298 | }; |
299 | 299 | ||
300 | static struct resource tmu01_resources[] = { | 300 | static struct resource tmu01_resources[] = { |
301 | [0] = DEFINE_RES_MEM_NAMED(0xfff60014, 0xc, "TMU00"), | 301 | [0] = DEFINE_RES_MEM(0xfff60014, 0xc), |
302 | [1] = { | 302 | [1] = { |
303 | .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */ | 303 | .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */ |
304 | .flags = IORESOURCE_IRQ, | 304 | .flags = IORESOURCE_IRQ, |
@@ -316,7 +316,7 @@ static struct platform_device tmu01_device = { | |||
316 | }; | 316 | }; |
317 | 317 | ||
318 | static struct resource i2c0_resources[] = { | 318 | static struct resource i2c0_resources[] = { |
319 | [0] = DEFINE_RES_MEM_NAMED(0xe6820000, 0x426, "IIC0"), | 319 | [0] = DEFINE_RES_MEM(0xe6820000, 0x426), |
320 | [1] = { | 320 | [1] = { |
321 | .start = gic_spi(167), | 321 | .start = gic_spi(167), |
322 | .end = gic_spi(170), | 322 | .end = gic_spi(170), |
@@ -325,7 +325,7 @@ static struct resource i2c0_resources[] = { | |||
325 | }; | 325 | }; |
326 | 326 | ||
327 | static struct resource i2c1_resources[] = { | 327 | static struct resource i2c1_resources[] = { |
328 | [0] = DEFINE_RES_MEM_NAMED(0xe6822000, 0x426, "IIC1"), | 328 | [0] = DEFINE_RES_MEM(0xe6822000, 0x426), |
329 | [1] = { | 329 | [1] = { |
330 | .start = gic_spi(51), | 330 | .start = gic_spi(51), |
331 | .end = gic_spi(54), | 331 | .end = gic_spi(54), |
@@ -334,7 +334,7 @@ static struct resource i2c1_resources[] = { | |||
334 | }; | 334 | }; |
335 | 335 | ||
336 | static struct resource i2c2_resources[] = { | 336 | static struct resource i2c2_resources[] = { |
337 | [0] = DEFINE_RES_MEM_NAMED(0xe6824000, 0x426, "IIC2"), | 337 | [0] = DEFINE_RES_MEM(0xe6824000, 0x426), |
338 | [1] = { | 338 | [1] = { |
339 | .start = gic_spi(171), | 339 | .start = gic_spi(171), |
340 | .end = gic_spi(174), | 340 | .end = gic_spi(174), |
@@ -343,7 +343,7 @@ static struct resource i2c2_resources[] = { | |||
343 | }; | 343 | }; |
344 | 344 | ||
345 | static struct resource i2c3_resources[] = { | 345 | static struct resource i2c3_resources[] = { |
346 | [0] = DEFINE_RES_MEM_NAMED(0xe6826000, 0x426, "IIC3"), | 346 | [0] = DEFINE_RES_MEM(0xe6826000, 0x426), |
347 | [1] = { | 347 | [1] = { |
348 | .start = gic_spi(183), | 348 | .start = gic_spi(183), |
349 | .end = gic_spi(186), | 349 | .end = gic_spi(186), |
@@ -352,7 +352,7 @@ static struct resource i2c3_resources[] = { | |||
352 | }; | 352 | }; |
353 | 353 | ||
354 | static struct resource i2c4_resources[] = { | 354 | static struct resource i2c4_resources[] = { |
355 | [0] = DEFINE_RES_MEM_NAMED(0xe6828000, 0x426, "IIC4"), | 355 | [0] = DEFINE_RES_MEM(0xe6828000, 0x426), |
356 | [1] = { | 356 | [1] = { |
357 | .start = gic_spi(187), | 357 | .start = gic_spi(187), |
358 | .end = gic_spi(190), | 358 | .end = gic_spi(190), |
@@ -722,7 +722,7 @@ static struct platform_device pmu_device = { | |||
722 | 722 | ||
723 | /* an IPMMU module for ICB */ | 723 | /* an IPMMU module for ICB */ |
724 | static struct resource ipmmu_resources[] = { | 724 | static struct resource ipmmu_resources[] = { |
725 | DEFINE_RES_MEM_NAMED(0xfe951000, 0x100, "IPMMU"), | 725 | DEFINE_RES_MEM(0xfe951000, 0x100), |
726 | }; | 726 | }; |
727 | 727 | ||
728 | static const char * const ipmmu_dev_names[] = { | 728 | static const char * const ipmmu_dev_names[] = { |