aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-ams-delta.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 16:46:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 16:46:56 -0400
commit7b6181e06841f5ad15c4ff708b967b4db65a64de (patch)
treebdfcf5b74b692f76581156e452d268b64c795200 /arch/arm/mach-omap1/board-ams-delta.c
parent72e58063d63c5f0a7bf65312f1e3a5ed9bb5c2ff (diff)
parentbc487fb341af05120bccb9f59ce76302391dcc77 (diff)
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (163 commits) omap: complete removal of machine_desc.io_pg_offst and .phys_io omap: UART: fix wakeup registers for OMAP24xx UART2 omap: Fix spotty MMC voltages ASoC: OMAP4: MCPDM: Remove unnecessary include of plat/control.h serial: omap-serial: fix signess error OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish omap: dma: Fix buffering disable bit setting for omap24xx omap: serial: Fix the boot-up crash/reboot without CONFIG_PM OMAP3: PM: fix scratchpad memory accesses for off-mode omap4: pandaboard: enable the ehci port on pandaboard omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set omap4: pandaboard: remove unused hsmmc definition OMAP: McBSP: Remove null omap44xx ops comment OMAP: McBSP: Swap CLKS source definition OMAP: McBSP: Fix CLKR and FSR signal muxing OMAP2+: clock: reduce the amount of standard debugging while disabling unused clocks OMAP: control: move plat-omap/control.h to mach-omap2/control.h OMAP: split plat-omap/common.c OMAP: McBSP: implement functional clock switching via clock framework OMAP: McBSP: implement McBSP CLKR and FSR signal muxing via mach-omap2/mcbsp.c ... Fixed up trivial conflicts in arch/arm/mach-omap2/ {board-zoom-peripherals.c,devices.c} as per Tony
Diffstat (limited to 'arch/arm/mach-omap1/board-ams-delta.c')
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 73c86392fcd3..1d4163b9f0b7 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -16,9 +16,12 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/input.h> 17#include <linux/input.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/leds.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
20#include <linux/serial_8250.h> 21#include <linux/serial_8250.h>
21 22
23#include <media/soc_camera.h>
24
22#include <asm/serial.h> 25#include <asm/serial.h>
23#include <mach/hardware.h> 26#include <mach/hardware.h>
24#include <asm/mach-types.h> 27#include <asm/mach-types.h>
@@ -32,6 +35,7 @@
32#include <plat/usb.h> 35#include <plat/usb.h>
33#include <plat/board.h> 36#include <plat/board.h>
34#include <plat/common.h> 37#include <plat/common.h>
38#include <mach/camera.h>
35 39
36#include <mach/ams-delta-fiq.h> 40#include <mach/ams-delta-fiq.h>
37 41
@@ -213,10 +217,56 @@ static struct platform_device ams_delta_led_device = {
213 .id = -1 217 .id = -1
214}; 218};
215 219
220static struct i2c_board_info ams_delta_camera_board_info[] = {
221 {
222 I2C_BOARD_INFO("ov6650", 0x60),
223 },
224};
225
226#ifdef CONFIG_LEDS_TRIGGERS
227DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger);
228
229static int ams_delta_camera_power(struct device *dev, int power)
230{
231 /*
232 * turn on camera LED
233 */
234 if (power)
235 led_trigger_event(ams_delta_camera_led_trigger, LED_FULL);
236 else
237 led_trigger_event(ams_delta_camera_led_trigger, LED_OFF);
238 return 0;
239}
240#else
241#define ams_delta_camera_power NULL
242#endif
243
244static struct soc_camera_link __initdata ams_delta_iclink = {
245 .bus_id = 0, /* OMAP1 SoC camera bus */
246 .i2c_adapter_id = 1,
247 .board_info = &ams_delta_camera_board_info[0],
248 .module_name = "ov6650",
249 .power = ams_delta_camera_power,
250};
251
252static struct platform_device ams_delta_camera_device = {
253 .name = "soc-camera-pdrv",
254 .id = 0,
255 .dev = {
256 .platform_data = &ams_delta_iclink,
257 },
258};
259
260static struct omap1_cam_platform_data ams_delta_camera_platform_data = {
261 .camexclk_khz = 12000, /* default 12MHz clock, no extra DPLL */
262 .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */
263};
264
216static struct platform_device *ams_delta_devices[] __initdata = { 265static struct platform_device *ams_delta_devices[] __initdata = {
217 &ams_delta_kp_device, 266 &ams_delta_kp_device,
218 &ams_delta_lcd_device, 267 &ams_delta_lcd_device,
219 &ams_delta_led_device, 268 &ams_delta_led_device,
269 &ams_delta_camera_device,
220}; 270};
221 271
222static void __init ams_delta_init(void) 272static void __init ams_delta_init(void)
@@ -225,6 +275,20 @@ static void __init ams_delta_init(void)
225 omap_cfg_reg(UART1_TX); 275 omap_cfg_reg(UART1_TX);
226 omap_cfg_reg(UART1_RTS); 276 omap_cfg_reg(UART1_RTS);
227 277
278 /* parallel camera interface */
279 omap_cfg_reg(H19_1610_CAM_EXCLK);
280 omap_cfg_reg(J15_1610_CAM_LCLK);
281 omap_cfg_reg(L18_1610_CAM_VS);
282 omap_cfg_reg(L15_1610_CAM_HS);
283 omap_cfg_reg(L19_1610_CAM_D0);
284 omap_cfg_reg(K14_1610_CAM_D1);
285 omap_cfg_reg(K15_1610_CAM_D2);
286 omap_cfg_reg(K19_1610_CAM_D3);
287 omap_cfg_reg(K18_1610_CAM_D4);
288 omap_cfg_reg(J14_1610_CAM_D5);
289 omap_cfg_reg(J19_1610_CAM_D6);
290 omap_cfg_reg(J18_1610_CAM_D7);
291
228 iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); 292 iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc));
229 293
230 omap_board_config = ams_delta_config; 294 omap_board_config = ams_delta_config;
@@ -236,6 +300,11 @@ static void __init ams_delta_init(void)
236 ams_delta_latch2_write(~0, 0); 300 ams_delta_latch2_write(~0, 0);
237 301
238 omap1_usb_init(&ams_delta_usb_config); 302 omap1_usb_init(&ams_delta_usb_config);
303 omap1_set_camera_info(&ams_delta_camera_platform_data);
304#ifdef CONFIG_LEDS_TRIGGERS
305 led_trigger_register_simple("ams_delta_camera",
306 &ams_delta_camera_led_trigger);
307#endif
239 platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); 308 platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
240 309
241#ifdef CONFIG_AMS_DELTA_FIQ 310#ifdef CONFIG_AMS_DELTA_FIQ