diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0075-omap3beagle-Add-camera-bootarg.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0075-omap3beagle-Add-camera-bootarg.patch | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0075-omap3beagle-Add-camera-bootarg.patch b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0075-omap3beagle-Add-camera-bootarg.patch new file mode 100644 index 00000000..066bbb48 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0075-omap3beagle-Add-camera-bootarg.patch | |||
@@ -0,0 +1,108 @@ | |||
1 | From d15c09a8ed5441dd843257b6a4396dd058a2e68f Mon Sep 17 00:00:00 2001 | ||
2 | From: Sergio Aguirre <saaguirre@ti.com> | ||
3 | Date: Thu, 22 Jul 2010 15:38:43 -0500 | ||
4 | Subject: [PATCH 75/75] omap3beagle: Add camera bootarg | ||
5 | |||
6 | This adds a new 'camera' bootarg, with (so far) 2 new possible types: | ||
7 | - lbcmvga: Leopard Board Camera Module: MT9V113 VGA | ||
8 | - lbcm3m1: Leopard Board Camera Module: MT9T111 3MP | ||
9 | |||
10 | Also, cleans up a little bit the current i2c2 bus init code. | ||
11 | |||
12 | Signed-off-by: Sergio Aguirre <saaguirre@ti.com> | ||
13 | --- | ||
14 | arch/arm/mach-omap2/board-omap3beagle.c | 42 +++++++++++++++++++++++++------ | ||
15 | 1 files changed, 34 insertions(+), 8 deletions(-) | ||
16 | |||
17 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
18 | index 7c9e40a..1e8b77b 100644 | ||
19 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
20 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
21 | @@ -89,6 +89,7 @@ extern struct mt9t112_platform_data mt9t112_pdata; | ||
22 | #define NAND_BLOCK_SIZE SZ_128K | ||
23 | |||
24 | char expansionboard_name[16]; | ||
25 | +char cameraboard_name[16]; | ||
26 | |||
27 | #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) | ||
28 | |||
29 | @@ -595,13 +596,16 @@ static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = { | ||
30 | static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = {}; | ||
31 | #endif | ||
32 | |||
33 | -static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = { | ||
34 | +static struct i2c_board_info __initdata beagle_lbcmvga_i2c2_boardinfo[] = { | ||
35 | #if defined(CONFIG_VIDEO_MT9V113) || defined(CONFIG_VIDEO_MT9V113_MODULE) | ||
36 | { | ||
37 | I2C_BOARD_INFO("mt9v113", MT9V113_I2C_ADDR), | ||
38 | .platform_data = &mt9v113_pdata, | ||
39 | }, | ||
40 | #endif | ||
41 | +}; | ||
42 | + | ||
43 | +static struct i2c_board_info __initdata beagle_lbcm3m1_i2c2_boardinfo[] = { | ||
44 | #if defined(CONFIG_VIDEO_MT9T112) || defined(CONFIG_VIDEO_MT9T112_MODULE) | ||
45 | { | ||
46 | I2C_BOARD_INFO("mt9t112", MT9T112_I2C_ADDR), | ||
47 | @@ -614,15 +618,27 @@ static int __init omap3_beagle_i2c_init(void) | ||
48 | { | ||
49 | omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, | ||
50 | ARRAY_SIZE(beagle_i2c1_boardinfo)); | ||
51 | - if(!strcmp(expansionboard_name, "zippy") || !strcmp(expansionboard_name, "zippy2")) | ||
52 | - { | ||
53 | - printk(KERN_INFO "Beagle expansionboard: registering i2c2 bus for zippy/zippy2\n"); | ||
54 | + | ||
55 | + if (!strcmp(expansionboard_name, "zippy") || | ||
56 | + !strcmp(expansionboard_name, "zippy2")) { | ||
57 | + printk(KERN_INFO "Beagle expansionboard:" | ||
58 | + " registering i2c2 bus for zippy/zippy2\n"); | ||
59 | omap_register_i2c_bus(2, 400, beagle_zippy_i2c2_boardinfo, | ||
60 | ARRAY_SIZE(beagle_zippy_i2c2_boardinfo)); | ||
61 | - } else | ||
62 | - { | ||
63 | - omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo, | ||
64 | - ARRAY_SIZE(beagle_i2c2_boardinfo)); | ||
65 | + } else { | ||
66 | + if (!strcmp(cameraboard_name, "lbcmvga")) { | ||
67 | + printk(KERN_INFO "Beagle cameraboard:" | ||
68 | + " registering i2c2 bus for lbcmvga\n"); | ||
69 | + omap_register_i2c_bus(2, 400, beagle_lbcmvga_i2c2_boardinfo, | ||
70 | + ARRAY_SIZE(beagle_lbcmvga_i2c2_boardinfo)); | ||
71 | + } else if (!strcmp(cameraboard_name, "lbcm3m1")) { | ||
72 | + printk(KERN_INFO "Beagle cameraboard:" | ||
73 | + " registering i2c2 bus for lbcm3m1\n"); | ||
74 | + omap_register_i2c_bus(2, 400, beagle_lbcm3m1_i2c2_boardinfo, | ||
75 | + ARRAY_SIZE(beagle_lbcm3m1_i2c2_boardinfo)); | ||
76 | + } else { | ||
77 | + omap_register_i2c_bus(2, 400, NULL, 0); | ||
78 | + } | ||
79 | } | ||
80 | /* Bus 3 is attached to the DVI port where devices like the pico DLP | ||
81 | * projector don't work reliably with 400kHz */ | ||
82 | @@ -825,6 +841,15 @@ static int __init expansionboard_setup(char *str) | ||
83 | return 0; | ||
84 | } | ||
85 | |||
86 | +static int __init cameraboard_setup(char *str) | ||
87 | +{ | ||
88 | + if (!str) | ||
89 | + return -EINVAL; | ||
90 | + strncpy(cameraboard_name, str, 16); | ||
91 | + printk(KERN_INFO "Beagle cameraboard: %s\n", cameraboard_name); | ||
92 | + return 0; | ||
93 | +} | ||
94 | + | ||
95 | static void __init omap3_beagle_init(void) | ||
96 | { | ||
97 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
98 | @@ -910,6 +935,7 @@ static void __init omap3_beagle_map_io(void) | ||
99 | } | ||
100 | |||
101 | early_param("buddy", expansionboard_setup); | ||
102 | +early_param("camera", cameraboard_setup); | ||
103 | |||
104 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") | ||
105 | /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ | ||
106 | -- | ||
107 | 1.6.6.1 | ||
108 | |||