diff options
Diffstat (limited to 'arch/sh/boards/board-ap325rxa.c')
| -rw-r--r-- | arch/sh/boards/board-ap325rxa.c | 64 | 
1 files changed, 45 insertions, 19 deletions
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index f2a29641b6a..7ffd1b4315b 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)  	return 0;  } -static struct ov772x_camera_info ov7725_info = { -	.buswidth  = SOCAM_DATAWIDTH_8, -	.flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, -	.edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), -	.link = { -		.power  = ov7725_power, -	}, -}; -  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,  }; @@ -402,25 +393,48 @@ static struct platform_device sdcard_cn3_device = {  	},  }; -static struct platform_device *ap325rxa_devices[] __initdata = { -	&smsc9118_device, -	&ap325rxa_nor_flash_device, -	&lcdc_device, -	&ceu_device, -	&nand_flash_device, -	&sdcard_cn3_device, -}; -  static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {  	{  		I2C_BOARD_INFO("pcf8563", 0x51),  	}, +}; + +static struct i2c_board_info ap325rxa_i2c_camera[] = {  	{  		I2C_BOARD_INFO("ov772x", 0x21), -		.platform_data = &ov7725_info,  	},  }; +static struct ov772x_camera_info ov7725_info = { +	.buswidth	= SOCAM_DATAWIDTH_8, +	.flags		= OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, +	.edgectrl	= OV772X_AUTO_EDGECTRL(0xf, 0), +	.link = { +		.power		= ov7725_power, +		.board_info	= &ap325rxa_i2c_camera[0], +		.i2c_adapter_id	= 0, +		.module_name	= "ov772x", +	}, +}; + +static struct platform_device ap325rxa_camera = { +	.name	= "soc-camera-pdrv", +	.id	= 0, +	.dev	= { +		.platform_data = &ov7725_info.link, +	}, +}; + +static struct platform_device *ap325rxa_devices[] __initdata = { +	&smsc9118_device, +	&ap325rxa_nor_flash_device, +	&lcdc_device, +	&ceu_device, +	&nand_flash_device, +	&sdcard_cn3_device, +	&ap325rxa_camera, +}; +  static struct spi_board_info ap325rxa_spi_devices[] = {  	{  		.modalias = "mmc_spi", @@ -535,6 +549,18 @@ static int __init ap325rxa_devices_setup(void)  }  device_initcall(ap325rxa_devices_setup); +/* Return the board specific boot mode pin configuration */ +static int ap325rxa_mode_pins(void) +{ +	/* MD0=0, MD1=0, MD2=0: Clock Mode 0 +	 * MD3=0: 16-bit Area0 Bus Width +	 * MD5=1: Little Endian +	 * TSTMD=1, MD8=1: Test Mode Disabled +	 */ +	return MODE_PIN5 | MODE_PIN8; +} +  static struct sh_machine_vector mv_ap325rxa __initmv = {  	.mv_name = "AP-325RXA", +	.mv_mode_pins = ap325rxa_mode_pins,  };  |