aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-05-12 11:13:40 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-06-17 03:22:48 -0400
commit2cb582ca0d6bd0274b15c9ee9549fc2251b7b599 (patch)
treec609c87b750f30c7ee90d9237e4d44364dfe6ff0
parent194a17305cb0b5e0686261b645d3fd537d2fc58d (diff)
SH: convert migor to soc-camera as platform-device
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/boards/mach-migor/setup.c79
1 files changed, 52 insertions, 27 deletions
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 95d90213be0c..f70f4644deb4 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -381,21 +381,6 @@ static struct platform_device migor_ceu_device = {
381 }, 381 },
382}; 382};
383 383
384static struct ov772x_camera_info ov7725_info = {
385 .buswidth = SOCAM_DATAWIDTH_8,
386 .link = {
387 .power = ov7725_power,
388 },
389};
390
391static struct tw9910_video_info tw9910_info = {
392 .buswidth = SOCAM_DATAWIDTH_8,
393 .mpout = TW9910_MPO_FIELD,
394 .link = {
395 .power = tw9910_power,
396 }
397};
398
399struct spi_gpio_platform_data sdcard_cn9_platform_data = { 384struct spi_gpio_platform_data sdcard_cn9_platform_data = {
400 .sck = GPIO_PTD0, 385 .sck = GPIO_PTD0,
401 .mosi = GPIO_PTD1, 386 .mosi = GPIO_PTD1,
@@ -410,16 +395,6 @@ static struct platform_device sdcard_cn9_device = {
410 }, 395 },
411}; 396};
412 397
413static struct platform_device *migor_devices[] __initdata = {
414 &smc91x_eth_device,
415 &sh_keysc_device,
416 &migor_lcdc_device,
417 &migor_ceu_device,
418 &migor_nor_flash_device,
419 &migor_nand_flash_device,
420 &sdcard_cn9_device,
421};
422
423static struct i2c_board_info migor_i2c_devices[] = { 398static struct i2c_board_info migor_i2c_devices[] = {
424 { 399 {
425 I2C_BOARD_INFO("rs5c372b", 0x32), 400 I2C_BOARD_INFO("rs5c372b", 0x32),
@@ -428,16 +403,66 @@ static struct i2c_board_info migor_i2c_devices[] = {
428 I2C_BOARD_INFO("migor_ts", 0x51), 403 I2C_BOARD_INFO("migor_ts", 0x51),
429 .irq = 38, /* IRQ6 */ 404 .irq = 38, /* IRQ6 */
430 }, 405 },
406};
407
408static struct i2c_board_info migor_i2c_camera[] = {
431 { 409 {
432 I2C_BOARD_INFO("ov772x", 0x21), 410 I2C_BOARD_INFO("ov772x", 0x21),
433 .platform_data = &ov7725_info.link,
434 }, 411 },
435 { 412 {
436 I2C_BOARD_INFO("tw9910", 0x45), 413 I2C_BOARD_INFO("tw9910", 0x45),
437 .platform_data = &tw9910_info.link,
438 }, 414 },
439}; 415};
440 416
417static struct ov772x_camera_info ov7725_info = {
418 .buswidth = SOCAM_DATAWIDTH_8,
419 .link = {
420 .power = ov7725_power,
421 .board_info = &migor_i2c_camera[0],
422 .i2c_adapter_id = 0,
423 .module_name = "ov772x",
424 },
425};
426
427static struct tw9910_video_info tw9910_info = {
428 .buswidth = SOCAM_DATAWIDTH_8,
429 .mpout = TW9910_MPO_FIELD,
430 .link = {
431 .power = tw9910_power,
432 .board_info = &migor_i2c_camera[1],
433 .i2c_adapter_id = 0,
434 .module_name = "tw9910",
435 }
436};
437
438static struct platform_device migor_camera[] = {
439 {
440 .name = "soc-camera-pdrv",
441 .id = 0,
442 .dev = {
443 .platform_data = &ov7725_info.link,
444 },
445 }, {
446 .name = "soc-camera-pdrv",
447 .id = 1,
448 .dev = {
449 .platform_data = &tw9910_info.link,
450 },
451 },
452};
453
454static struct platform_device *migor_devices[] __initdata = {
455 &smc91x_eth_device,
456 &sh_keysc_device,
457 &migor_lcdc_device,
458 &migor_ceu_device,
459 &migor_nor_flash_device,
460 &migor_nand_flash_device,
461 &sdcard_cn9_device,
462 &migor_camera[0],
463 &migor_camera[1],
464};
465
441static struct spi_board_info migor_spi_devices[] = { 466static struct spi_board_info migor_spi_devices[] = {
442 { 467 {
443 .modalias = "mmc_spi", 468 .modalias = "mmc_spi",