aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-05-12 11:13:36 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-06-17 03:22:41 -0400
commit194a17305cb0b5e0686261b645d3fd537d2fc58d (patch)
treec1e52edbedf5d4491fe47ae83a04670f462d48dd /arch/sh
parent0a861e9eb76c68b23be1aa4758269c5b412089a9 (diff)
SH: convert ap325rxa to soc-camera as platform-device
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/boards/board-ap325rxa.c50
1 files changed, 32 insertions, 18 deletions
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index 8cc46874ade3..7ffd1b4315bd 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -349,15 +349,6 @@ static int ov7725_power(struct device *dev, int mode)
349 return 0; 349 return 0;
350} 350}
351 351
352static struct ov772x_camera_info ov7725_info = {
353 .buswidth = SOCAM_DATAWIDTH_8,
354 .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
355 .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0),
356 .link = {
357 .power = ov7725_power,
358 },
359};
360
361static struct sh_mobile_ceu_info sh_mobile_ceu_info = { 352static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
362 .flags = SH_CEU_FLAG_USE_8BIT_BUS, 353 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
363}; 354};
@@ -402,25 +393,48 @@ static struct platform_device sdcard_cn3_device = {
402 }, 393 },
403}; 394};
404 395
405static struct platform_device *ap325rxa_devices[] __initdata = {
406 &smsc9118_device,
407 &ap325rxa_nor_flash_device,
408 &lcdc_device,
409 &ceu_device,
410 &nand_flash_device,
411 &sdcard_cn3_device,
412};
413
414static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { 396static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
415 { 397 {
416 I2C_BOARD_INFO("pcf8563", 0x51), 398 I2C_BOARD_INFO("pcf8563", 0x51),
417 }, 399 },
400};
401
402static struct i2c_board_info ap325rxa_i2c_camera[] = {
418 { 403 {
419 I2C_BOARD_INFO("ov772x", 0x21), 404 I2C_BOARD_INFO("ov772x", 0x21),
405 },
406};
407
408static struct ov772x_camera_info ov7725_info = {
409 .buswidth = SOCAM_DATAWIDTH_8,
410 .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
411 .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0),
412 .link = {
413 .power = ov7725_power,
414 .board_info = &ap325rxa_i2c_camera[0],
415 .i2c_adapter_id = 0,
416 .module_name = "ov772x",
417 },
418};
419
420static struct platform_device ap325rxa_camera = {
421 .name = "soc-camera-pdrv",
422 .id = 0,
423 .dev = {
420 .platform_data = &ov7725_info.link, 424 .platform_data = &ov7725_info.link,
421 }, 425 },
422}; 426};
423 427
428static struct platform_device *ap325rxa_devices[] __initdata = {
429 &smsc9118_device,
430 &ap325rxa_nor_flash_device,
431 &lcdc_device,
432 &ceu_device,
433 &nand_flash_device,
434 &sdcard_cn3_device,
435 &ap325rxa_camera,
436};
437
424static struct spi_board_info ap325rxa_spi_devices[] = { 438static struct spi_board_info ap325rxa_spi_devices[] = {
425 { 439 {
426 .modalias = "mmc_spi", 440 .modalias = "mmc_spi",