diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-bockw.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7778.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7778.c | 34 |
3 files changed, 26 insertions, 42 deletions
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 6b9faf3908f7..4b696ce0bae6 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c | |||
@@ -162,10 +162,6 @@ static struct sh_mmcif_plat_data sh_mmcif_plat __initdata = { | |||
162 | MMC_CAP_NEEDS_POLL, | 162 | MMC_CAP_NEEDS_POLL, |
163 | }; | 163 | }; |
164 | 164 | ||
165 | static struct rcar_vin_platform_data vin_platform_data __initdata = { | ||
166 | .flags = RCAR_VIN_BT656, | ||
167 | }; | ||
168 | |||
169 | /* In the default configuration both decoders reside on I2C bus 0 */ | 165 | /* In the default configuration both decoders reside on I2C bus 0 */ |
170 | #define BOCKW_CAMERA(idx) \ | 166 | #define BOCKW_CAMERA(idx) \ |
171 | static struct i2c_board_info camera##idx##_info = { \ | 167 | static struct i2c_board_info camera##idx##_info = { \ |
@@ -181,6 +177,30 @@ static struct soc_camera_link iclink##idx##_ml86v7667 __initdata = { \ | |||
181 | BOCKW_CAMERA(0); | 177 | BOCKW_CAMERA(0); |
182 | BOCKW_CAMERA(1); | 178 | BOCKW_CAMERA(1); |
183 | 179 | ||
180 | /* VIN */ | ||
181 | static struct rcar_vin_platform_data vin_platform_data __initdata = { | ||
182 | .flags = RCAR_VIN_BT656, | ||
183 | }; | ||
184 | |||
185 | #define R8A7778_VIN(idx) \ | ||
186 | static struct resource vin##idx##_resources[] __initdata = { \ | ||
187 | DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \ | ||
188 | DEFINE_RES_IRQ(gic_iid(0x5a)), \ | ||
189 | }; \ | ||
190 | \ | ||
191 | static struct platform_device_info vin##idx##_info __initdata = { \ | ||
192 | .parent = &platform_bus, \ | ||
193 | .name = "r8a7778-vin", \ | ||
194 | .id = idx, \ | ||
195 | .res = vin##idx##_resources, \ | ||
196 | .num_res = ARRAY_SIZE(vin##idx##_resources), \ | ||
197 | .dma_mask = DMA_BIT_MASK(32), \ | ||
198 | .data = &vin_platform_data, \ | ||
199 | .size_data = sizeof(vin_platform_data), \ | ||
200 | } | ||
201 | R8A7778_VIN(0); | ||
202 | R8A7778_VIN(1); | ||
203 | |||
184 | static const struct pinctrl_map bockw_pinctrl_map[] = { | 204 | static const struct pinctrl_map bockw_pinctrl_map[] = { |
185 | /* Ether */ | 205 | /* Ether */ |
186 | PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778", | 206 | PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778", |
@@ -236,10 +256,10 @@ static void __init bockw_init(void) | |||
236 | r8a7778_init_irq_extpin(1); | 256 | r8a7778_init_irq_extpin(1); |
237 | r8a7778_add_standard_devices(); | 257 | r8a7778_add_standard_devices(); |
238 | r8a7778_add_ether_device(ðer_platform_data); | 258 | r8a7778_add_ether_device(ðer_platform_data); |
239 | r8a7778_add_vin_device(0, &vin_platform_data); | 259 | platform_device_register_full(&vin0_info); |
240 | /* VIN1 has a pin conflict with Ether */ | 260 | /* VIN1 has a pin conflict with Ether */ |
241 | if (!IS_ENABLED(CONFIG_SH_ETH)) | 261 | if (!IS_ENABLED(CONFIG_SH_ETH)) |
242 | r8a7778_add_vin_device(1, &vin_platform_data); | 262 | platform_device_register_full(&vin1_info); |
243 | platform_device_register_data(&platform_bus, "soc-camera-pdrv", 0, | 263 | platform_device_register_data(&platform_bus, "soc-camera-pdrv", 0, |
244 | &iclink0_ml86v7667, | 264 | &iclink0_ml86v7667, |
245 | sizeof(iclink0_ml86v7667)); | 265 | sizeof(iclink0_ml86v7667)); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index adfcf51b163d..9838608363c2 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h | |||
@@ -24,8 +24,6 @@ | |||
24 | extern void r8a7778_add_standard_devices(void); | 24 | extern void r8a7778_add_standard_devices(void); |
25 | extern void r8a7778_add_standard_devices_dt(void); | 25 | extern void r8a7778_add_standard_devices_dt(void); |
26 | extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata); | 26 | extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata); |
27 | extern void r8a7778_add_vin_device(int id, | ||
28 | struct rcar_vin_platform_data *pdata); | ||
29 | extern void r8a7778_add_dt_devices(void); | 27 | extern void r8a7778_add_dt_devices(void); |
30 | 28 | ||
31 | extern void r8a7778_init_late(void); | 29 | extern void r8a7778_init_late(void); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 6a2657ebd197..604cf36b5616 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
@@ -281,40 +281,6 @@ void __init r8a7778_register_hspi(int id) | |||
281 | hspi_resources + (2 * id), 2); | 281 | hspi_resources + (2 * id), 2); |
282 | } | 282 | } |
283 | 283 | ||
284 | /* VIN */ | ||
285 | #define R8A7778_VIN(idx) \ | ||
286 | static struct resource vin##idx##_resources[] __initdata = { \ | ||
287 | DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \ | ||
288 | DEFINE_RES_IRQ(gic_iid(0x5a)), \ | ||
289 | }; \ | ||
290 | \ | ||
291 | static struct platform_device_info vin##idx##_info __initdata = { \ | ||
292 | .parent = &platform_bus, \ | ||
293 | .name = "r8a7778-vin", \ | ||
294 | .id = idx, \ | ||
295 | .res = vin##idx##_resources, \ | ||
296 | .num_res = ARRAY_SIZE(vin##idx##_resources), \ | ||
297 | .dma_mask = DMA_BIT_MASK(32), \ | ||
298 | } | ||
299 | |||
300 | R8A7778_VIN(0); | ||
301 | R8A7778_VIN(1); | ||
302 | |||
303 | static struct platform_device_info *vin_info_table[] __initdata = { | ||
304 | &vin0_info, | ||
305 | &vin1_info, | ||
306 | }; | ||
307 | |||
308 | void __init r8a7778_add_vin_device(int id, struct rcar_vin_platform_data *pdata) | ||
309 | { | ||
310 | BUG_ON(id < 0 || id > 1); | ||
311 | |||
312 | vin_info_table[id]->data = pdata; | ||
313 | vin_info_table[id]->size_data = sizeof(*pdata); | ||
314 | |||
315 | platform_device_register_full(vin_info_table[id]); | ||
316 | } | ||
317 | |||
318 | void __init r8a7778_add_dt_devices(void) | 284 | void __init r8a7778_add_dt_devices(void) |
319 | { | 285 | { |
320 | int i; | 286 | int i; |