diff options
author | Koen Kooi <k-kooi@ti.com> | 2010-02-25 16:12:56 +0100 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-04-12 19:43:20 +0200 |
commit | b14ca0169babf5bd2a599b19ee156427b822ab00 (patch) | |
tree | b2e13fad6aca56259cded0a3aa3c8805ad2dbd59 /recipes/linux | |
parent | 73efa8afa568d88ebf94563e9200fbcdfb669fbe (diff) |
linux-omap-psp 2.6.32: update to latest PSP git
* refresh patches and make them all git am'able
* Add initial beagleboardXM support
* make it the default for beagleboard
* turn off rtc-ds1307 since it renders beagles without zippy expansion boards unbootable
* PSP git broke multi usb gadget, disable it for now
Diffstat (limited to 'recipes/linux')
43 files changed, 4667 insertions, 647 deletions
diff --git a/recipes/linux/linux-omap-psp-2.6.32/0001-board-omap3touchbook-make-it-build-against-TI-linux.patch b/recipes/linux/linux-omap-psp-2.6.32/0001-board-omap3touchbook-make-it-build-against-TI-linux-.patch index 89c385bbbb..4bdef668a5 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0001-board-omap3touchbook-make-it-build-against-TI-linux.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0001-board-omap3touchbook-make-it-build-against-TI-linux-.patch @@ -1,7 +1,7 @@ -From 51b0bee0036aa6168a2bb7b1df1b5b84bc645840 Mon Sep 17 00:00:00 2001 -From: OpenEmbedded User <oe@OE-builder.(none)> +From 8ba613504c9e73c704c70ffb960affda91c8fadc Mon Sep 17 00:00:00 2001 +From: Koen Kooi <k-kooi@ti.com> Date: Sat, 30 Jan 2010 15:49:15 +0100 -Subject: [PATCH] board-omap3touchbook: make it build against TI linux-omap 2.6.32-PSP +Subject: [PATCH 01/30] board-omap3touchbook: make it build against TI linux-omap 2.6.32-PSP --- arch/arm/mach-omap2/board-omap3touchbook.c | 11 +++++++++-- @@ -57,5 +57,5 @@ index fe3d22c..fc3e03c 100644 #ifdef CONFIG_OMAP_32K_TIMER omap2_gp_clockevent_set_gptimer(12); -- -1.5.4.3 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch b/recipes/linux/linux-omap-psp-2.6.32/0002-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch index 1c51552792..2432c8c7c8 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0002-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch @@ -1,7 +1,7 @@ -From 334eef94045c93957cad3477522086492dd19b06 Mon Sep 17 00:00:00 2001 +From 01f6596202c485e52037518398caa47e7f137dd8 Mon Sep 17 00:00:00 2001 From: Steve Sakoman <sakoman@gmail.com> Date: Tue, 15 Dec 2009 15:34:29 -0800 -Subject: [PATCH 05/16] ARM: OMAP: add support for TCT Zippy to Beagle board file +Subject: [PATCH 02/30] ARM: OMAP: add support for TCT Zippy to Beagle board file Signed-off-by: Steve Sakoman <sakoman@gmail.com> --- @@ -9,7 +9,7 @@ Signed-off-by: Steve Sakoman <sakoman@gmail.com> 1 files changed, 71 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 41480bd..f3df638 100644 +index 330fb25..ddfb9c0 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -21,6 +21,7 @@ @@ -20,7 +20,7 @@ index 41480bd..f3df638 100644 #include <linux/input.h> #include <linux/gpio_keys.h> -@@ -52,6 +53,49 @@ +@@ -56,6 +57,49 @@ #define NAND_BLOCK_SIZE SZ_128K @@ -70,7 +70,7 @@ index 41480bd..f3df638 100644 static struct mtd_partition omap3beagle_nand_partitions[] = { /* All the partition sizes are listed in terms of NAND block size */ { -@@ -114,6 +158,14 @@ static struct twl4030_hsmmc_info mmc[] = { +@@ -118,6 +162,14 @@ static struct twl4030_hsmmc_info mmc[] = { .wires = 8, .gpio_wp = 29, }, @@ -85,7 +85,7 @@ index 41480bd..f3df638 100644 {} /* Terminator */ }; -@@ -277,7 +329,7 @@ static struct twl4030_platform_data beagle_twldata = { +@@ -281,7 +333,7 @@ static struct twl4030_platform_data beagle_twldata = { .vpll2 = &beagle_vpll2, }; @@ -94,7 +94,7 @@ index 41480bd..f3df638 100644 { I2C_BOARD_INFO("twl4030", 0x48), .flags = I2C_CLIENT_WAKE, -@@ -286,10 +338,24 @@ static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { +@@ -290,10 +342,24 @@ static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { }, }; @@ -121,7 +121,7 @@ index 41480bd..f3df638 100644 /* Bus 3 is attached to the DVI port where devices like the pico DLP * projector don't work reliably with 400kHz */ omap_register_i2c_bus(3, 100, NULL, 0); -@@ -434,6 +500,8 @@ static void __init omap3_beagle_init(void) +@@ -448,6 +514,8 @@ static void __init omap3_beagle_init(void) /* REVISIT leave DVI powered down until it's needed ... */ gpio_direction_output(170, true); @@ -131,5 +131,5 @@ index 41480bd..f3df638 100644 usb_ehci_init(&ehci_pdata); omap3beagle_flash_init(); -- -1.6.2.4 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/0002-ARM-OMAP-ehci-omap-use-new-location-for-usb.h-inc.patch b/recipes/linux/linux-omap-psp-2.6.32/0002-ARM-OMAP-ehci-omap-use-new-location-for-usb.h-inc.patch deleted file mode 100644 index 7add534bc7..0000000000 --- a/recipes/linux/linux-omap-psp-2.6.32/0002-ARM-OMAP-ehci-omap-use-new-location-for-usb.h-inc.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 06e97c7ea488e350b7aae5f3864a1bbe0666db87 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman <steve@sakoman.com> -Date: Tue, 15 Dec 2009 15:12:54 -0800 -Subject: [PATCH 02/16] ARM: OMAP: ehci-omap: use new location for usb.h include - ---- - drivers/usb/host/ehci-omap.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c -index 7ba8df3..5cfed78 100644 ---- a/drivers/usb/host/ehci-omap.c -+++ b/drivers/usb/host/ehci-omap.c -@@ -37,7 +37,7 @@ - #include <linux/platform_device.h> - #include <linux/clk.h> - #include <linux/gpio.h> --#include <mach/usb.h> -+#include <plat/usb.h> - - /* - * OMAP USBHOST Register addresses: VIRTUAL ADDRESSES --- -1.6.2.4 - diff --git a/recipes/linux/linux-omap-psp-2.6.32/0006-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch b/recipes/linux/linux-omap-psp-2.6.32/0003-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch index 3ad1853e3f..12eb5f4583 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0006-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0003-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch @@ -1,17 +1,17 @@ -From 2607d201fb202499533aa4a7fc788b4fa5fd1fcf Mon Sep 17 00:00:00 2001 +From 82cf37dd0850ede2122e1723118eb6ec3a4a7945 Mon Sep 17 00:00:00 2001 From: Steve Sakoman <steve@sakoman.com> Date: Thu, 17 Dec 2009 12:40:24 -0800 -Subject: [PATCH 06/16] ARM: OMAP: Make beagle u-boot partition writable +Subject: [PATCH 03/30] ARM: OMAP: Make beagle u-boot partition writable --- arch/arm/mach-omap2/board-omap3beagle.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index f3df638..d00b089 100644 +index ddfb9c0..9f72c7a 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -108,7 +108,6 @@ static struct mtd_partition omap3beagle_nand_partitions[] = { +@@ -112,7 +112,6 @@ static struct mtd_partition omap3beagle_nand_partitions[] = { .name = "U-Boot", .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ .size = 15 * NAND_BLOCK_SIZE, @@ -20,5 +20,5 @@ index f3df638..d00b089 100644 { .name = "U-Boot Env", -- -1.6.2.4 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/dss2/0015-OMAP-DSS-Add-DSS2-support-for-Beagle.patch b/recipes/linux/linux-omap-psp-2.6.32/0004-board-omap3-beagle-add-DSS2-support.patch index ca5cd9fde7..40e1c0f82b 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/dss2/0015-OMAP-DSS-Add-DSS2-support-for-Beagle.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0004-board-omap3-beagle-add-DSS2-support.patch @@ -1,5 +1,16 @@ ---- /tmp/board-omap3beagle.c 2009-12-22 10:47:35.000000000 +0100 -+++ git/arch/arm/mach-omap2/board-omap3beagle.c 2009-12-22 10:59:53.000000000 +0100 +From 98c074253ee9ca49b145b81843cceedbf7aebc55 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Wed, 10 Feb 2010 15:07:36 +0100 +Subject: [PATCH 04/30] board-omap3-beagle: add DSS2 support + +--- + arch/arm/mach-omap2/board-omap3beagle.c | 130 ++++++++++++++++++++++++------- + 1 files changed, 103 insertions(+), 27 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 9f72c7a..3b7f6ec 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -40,6 +40,7 @@ #include <plat/board.h> @@ -8,7 +19,7 @@ #include <plat/gpmc.h> #include <plat/nand.h> #include <plat/usb.h> -@@ -149,6 +150,105 @@ +@@ -153,6 +154,105 @@ static struct platform_device omap3beagle_nand_device = { .resource = &omap3beagle_nand_resource, }; @@ -114,7 +125,7 @@ #include "sdram-micron-mt46h32m32lf-6.h" static struct twl4030_hsmmc_info mmc[] = { -@@ -168,15 +268,6 @@ +@@ -172,15 +272,6 @@ static struct twl4030_hsmmc_info mmc[] = { {} /* Terminator */ }; @@ -130,7 +141,7 @@ static struct regulator_consumer_supply beagle_vmmc1_supply = { .supply = "vmmc", }; -@@ -232,16 +323,6 @@ +@@ -236,16 +327,6 @@ static struct twl4030_gpio_platform_data beagle_gpio_data = { .setup = beagle_twl_gpio_setup, }; @@ -147,7 +158,7 @@ /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ static struct regulator_init_data beagle_vmmc1 = { .constraints = { -@@ -419,14 +500,8 @@ +@@ -418,14 +499,8 @@ static struct platform_device keys_gpio = { }, }; @@ -160,9 +171,9 @@ - omap_board_config = omap3_beagle_config; - omap_board_config_size = ARRAY_SIZE(omap3_beagle_config); omap2_init_common_hw(mt46h32m32lf6_sdrc_params, - mt46h32m32lf6_sdrc_params); - omap_init_irq(); -@@ -437,9 +512,9 @@ + mt46h32m32lf6_sdrc_params, omap3_mpu_rate_table, + omap3_dsp_rate_table, omap3_l3_rate_table); +@@ -437,9 +512,9 @@ static void __init omap3_beagle_init_irq(void) } static struct platform_device *omap3_beagle_devices[] __initdata = { @@ -173,7 +184,7 @@ }; static void __init omap3beagle_flash_init(void) -@@ -522,8 +597,9 @@ +@@ -522,8 +597,9 @@ static void __init omap3_beagle_init(void) /* Ensure SDRC pins are mux'd for self-refresh */ omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); @@ -184,3 +195,6 @@ static void __init omap3_beagle_map_io(void) { omap2_set_globals_343x(); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/0001-beagleboard-omap3_-foo-_rate_table-omap35x_-foo.patch b/recipes/linux/linux-omap-psp-2.6.32/0005-beagleboard-omap3_-foo-_rate_table-omap35x_-foo-_rat.patch index 9079185618..b4636315a1 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/0001-beagleboard-omap3_-foo-_rate_table-omap35x_-foo.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0005-beagleboard-omap3_-foo-_rate_table-omap35x_-foo-_rat.patch @@ -1,7 +1,7 @@ -From 3f0c5ac9e0724a77adc7cd8f9ef058d8d7973ff6 Mon Sep 17 00:00:00 2001 -From: OpenEmbedded User <oe@OE-builder.(none)> +From 04dc08419ca56f03dd01e54a064cb17342165e02 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <k-kooi@ti.com> Date: Wed, 27 Jan 2010 21:57:13 +0100 -Subject: [PATCH] beagleboard: omap3_<foo>_rate_table -> omap35x_<foo>_rate_table +Subject: [PATCH 05/30] beagleboard: omap3_<foo>_rate_table -> omap35x_<foo>_rate_table --- arch/arm/mach-omap2/board-omap3beagle.c | 4 ++-- @@ -23,5 +23,5 @@ index 3b7f6ec..1caaa01 100644 #ifdef CONFIG_OMAP_32K_TIMER omap2_gp_clockevent_set_gptimer(12); -- -1.5.4.3 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/0001-board-omap3beagle-prepare-for-DM3730-based-Beaglebo.patch b/recipes/linux/linux-omap-psp-2.6.32/0006-board-omap3beagle-prepare-for-DM3730-based-Beagleboa.patch index 4d2ca54583..c0af143b14 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/0001-board-omap3beagle-prepare-for-DM3730-based-Beaglebo.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0006-board-omap3beagle-prepare-for-DM3730-based-Beagleboa.patch @@ -1,9 +1,9 @@ -From 99669461e2ddd9947c30bbd5e49561609cee1367 Mon Sep 17 00:00:00 2001 -From: OpenEmbedded User <oe@OE-builder.(none)> +From d9a0bb7553b59a0ecdd2cfdc8f26666492f298a9 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <k-kooi@ti.com> Date: Mon, 8 Feb 2010 16:30:59 +0100 -Subject: [PATCH] board-omap3beagle: prepare for DM3730 based BeagleboardXM +Subject: [PATCH 06/30] board-omap3beagle: prepare for DM3730 based BeagleboardXM - * OPP changes copy/pasted from board-omap3evm.c +* OPP changes copy/pasted from board-omap3evm.c * EHCI changes copy/pasted from Steve Kipisz' 2.6.33rcX work --- arch/arm/mach-omap2/board-omap3beagle.c | 57 ++++++++++++++++++++++++++---- @@ -93,5 +93,5 @@ index 1caaa01..accf80d 100644 #ifdef CONFIG_OMAP_32K_TIMER omap2_gp_clockevent_set_gptimer(12); -- -1.5.4.3 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/0007-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch b/recipes/linux/linux-omap-psp-2.6.32/0007-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch new file mode 100644 index 0000000000..8df955c617 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0007-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch @@ -0,0 +1,2394 @@ +From 0ea3408a0fb0cedddeea2c8f7dc887e559b1da5b Mon Sep 17 00:00:00 2001 +From: Koen Kooi <k-kooi@ti.com> +Date: Tue, 9 Feb 2010 17:16:13 +0100 +Subject: [PATCH 07/30] mt9t111: first stab at merging sensor driver based on a patch by Leopard Imaging + +--- + drivers/media/video/Kconfig | 8 + + drivers/media/video/Makefile | 1 + + drivers/media/video/mt9t111.c | 883 ++++++++++++++++++++++++ + drivers/media/video/mt9t111_reg.h | 1364 +++++++++++++++++++++++++++++++++++++ + include/media/mt9t111.h | 79 +++ + 5 files changed, 2335 insertions(+), 0 deletions(-) + create mode 100644 drivers/media/video/mt9t111.c + create mode 100644 drivers/media/video/mt9t111_reg.h + create mode 100644 include/media/mt9t111.h + +diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig +index 41e39a7..f67ed46 100644 +--- a/drivers/media/video/Kconfig ++++ b/drivers/media/video/Kconfig +@@ -344,6 +344,14 @@ config VIDEO_MT9P012 + MT9P012 camera. It is currently working with the TI OMAP3 + camera controller. + ++config VIDEO_MT9T111 ++ tristate "Micron MT9T111 raw sensor driver (3MP)" ++ depends on I2C && VIDEO_V4L2 ++ ---help--- ++ This is a Video4Linux2 sensor-level driver for the Micron ++ MT9T111 camera. It is currently working with the TI OMAP3 ++ camera controller. ++ + config VIDEO_DW9710 + tristate "Lens driver for DW9710" + depends on I2C && VIDEO_V4L2 +diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile +index 88e8ec1..31688bf 100644 +--- a/drivers/media/video/Makefile ++++ b/drivers/media/video/Makefile +@@ -127,6 +127,7 @@ obj-$(CONFIG_VIDEO_CAFE_CCIC) += cafe_ccic.o + obj-y += isp/ + obj-$(CONFIG_VIDEO_OMAP3) += omap34xxcam.o + obj-$(CONFIG_VIDEO_MT9P012) += mt9p012.o ++obj-$(CONFIG_VIDEO_MT9T111) += mt9t111.o + obj-$(CONFIG_VIDEO_DW9710) += dw9710.o + obj-$(CONFIG_VIDEO_TPS61059) += tps61059.o + obj-$(CONFIG_VIDEO_OV3640) += ov3640.o +diff --git a/drivers/media/video/mt9t111.c b/drivers/media/video/mt9t111.c +new file mode 100644 +index 0000000..ecc5115 +--- /dev/null ++++ b/drivers/media/video/mt9t111.c +@@ -0,0 +1,883 @@ ++/* ++ * drivers/media/video/mt9t111.c ++ * ++ * mt9t111 sensor driver ++ * ++ * Copyright (C) 2009 Leopard Imaging ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#include <linux/i2c.h> ++#include <linux/delay.h> ++#include <media/v4l2-int-device.h> ++ ++#include <media/mt9t111.h> ++#include "mt9t111_reg.h" ++ ++#define USE_RAW // YCbCr mode does not work yet ++//#define COLOR_BAR // Create a Color bar test pattern, Blue, Green, Red, Grey ++ ++#define SENSOR_DETECTED 1 ++#define SENSOR_NOT_DETECTED 0 ++ ++static void mt9t111_loaddefault(struct i2c_client *client); ++ ++/* ++* as a place holder for further development ++*/ ++static void debug_dummy(char *in_msg) ++{ ++ ++} ++ ++/* list of image formats supported by mt9t111 sensor */ ++const static struct v4l2_fmtdesc mt9t111_formats[] = { ++#ifdef USE_RAW ++ { ++ .description = "RAW ", ++ .pixelformat = V4L2_PIX_FMT_SGRBG10, ++ }, ++#else ++ { ++ .description = "YUV 422 ", ++ .pixelformat = V4L2_PIX_FMT_YUYV, ++ }, ++#endif ++}; ++ ++#define NUM_CAPTURE_FORMATS ARRAY_SIZE(mt9t111_formats) ++ ++/* ++ * Array of image sizes supported by MT9T111. These must be ordered from ++ * smallest image size to largest. ++ */ ++const static struct capture_size mt9t111_sizes[] = { ++ { 640, 480 }, ++// { 2048, 1536} ++}; ++ ++#define NUM_CAPTURE_SIZE ARRAY_SIZE(mt9t111_sizes) ++ ++ ++const struct v4l2_fract mt9t111_frameintervals[] = { ++ { .numerator = 1, .denominator = 10 } ++}; ++ ++#define NUM_CAPTURE_FRAMEINTERVALS ARRAY_SIZE(mt9t111_frameintervals) ++ ++/** ++ * struct mt9t111_sensor - main structure for storage of sensor information ++ * @pdata: access functions and data for platform level information ++ * @v4l2_int_device: V4L2 device structure structure ++ * @i2c_client: iic client device structure ++ * @pix: V4L2 pixel format information structure ++ * @timeperframe: time per frame expressed as V4L fraction ++ * @scaler: ++ * @ver: mt9t111 chip version ++ * @fps: frames per second value ++ */ ++struct mt9t111_sensor { ++ const struct mt9t111_platform_data *pdata; ++ struct v4l2_int_device *v4l2_int_device; ++ struct i2c_client *i2c_client; ++ struct v4l2_pix_format pix; ++ struct v4l2_fract timeperframe; ++ int scaler; ++ int ver; ++ int fps; ++ int state; ++}; ++ ++static struct mt9t111_sensor mt9t111 = { ++ .timeperframe = { ++ .numerator = 1, ++ .denominator = 10, ++ }, ++ .state = SENSOR_NOT_DETECTED, ++}; ++ ++/** ++ * mt9t111_read_reg - Read a value from a register in an mt9t111 sensor device ++ * @client: i2c driver client structure ++ * @data_length: length of data to be read ++ * @reg: register address / offset ++ * @val: stores the value that gets read ++ * ++ * Read a value from a register in an mt9t111 sensor device. ++ * The value is returned in 'val'. ++ * Returns zero if successful, or non-zero otherwise. ++ */ ++static int ++mt9t111_read_reg(struct i2c_client *client, u16 reg, u16 *val) ++{ ++ struct i2c_msg msg[1]; ++ u8 data[4]; ++ int err; ++ ++ msg->addr = client->addr; ++ msg->flags = 0; ++ msg->len = 2; ++ msg->buf = data; ++ data[0] = (reg & 0xff00) >> 8; ++ data[1] = (reg & 0x00ff); ++ err = i2c_transfer(client->adapter, msg, 1); ++ if (err >= 0) { ++ msg->flags = I2C_M_RD; ++ msg->len = 2; /* 2 byte read */ ++ err = i2c_transfer(client->adapter, msg, 1); ++ if (err >= 0) { ++ *val = ((data[0] & 0x00ff) << 8) ++ | (data[1] & 0x00ff); ++ return 0; ++ } ++ } ++ return err; ++} ++ ++/** ++ * mt9t111_write_reg - Write a value to a register in an mt9t111 sensor device ++ * @client: i2c driver client structure ++ * @data_length: length of data to be read ++ * @reg: register address / offset ++ * @val: value to be written to specified register ++ * ++ * Write a value to a register in an mt9t111 sensor device. ++ * Returns zero if successful, or non-zero otherwise. ++ */ ++static int ++mt9t111_write_reg(struct i2c_client *client, u16 reg, u16 val) ++{ ++ struct i2c_msg msg[1]; ++ u8 data[20]; ++ int err; ++ ++ msg->addr = client->addr; ++ msg->flags = 0; ++ msg->len = 4; ++ msg->buf = data; ++ data[0] = (u8)((reg & 0xff00) >> 8); ++ data[1] = (u8)(reg & 0x00ff); ++ data[2] = (u8)((val & 0xff00) >> 8); ++ data[3] = (u8)(val & 0x00ff); ++ err = i2c_transfer(client->adapter, msg, 1); ++ ++ return err; ++} ++ ++/** ++ * mt9t111_write_regs - Write registers to an mt9t111 sensor device ++ * @client: i2c driver client structure ++ * @reg_in: pointer to registers to write ++ * @cnt: the number of registers ++ * ++ * Write registers . ++ * Returns zero if successful, or non-zero otherwise. ++ */ ++static int ++mt9t111_write_regs(struct i2c_client *client, mt9t111_regs *reg_in, int cnt) ++{ ++ int err = 0; ++ int i; ++ mt9t111_regs *reg = reg_in; ++ ++ for (i=0;i<cnt;i++) { ++ if (reg->delay_time == 0) { ++ err |= mt9t111_write_reg(client, reg->addr, reg->data); ++ } else if (reg->addr != 0 || reg->data != 0) { ++ err |= mt9t111_write_reg(client, reg->addr, reg->data); ++ mdelay(reg->delay_time); ++ } else ++ mdelay(reg->delay_time); ++ ++ if (err < 0) { ++ dev_warn(&client->dev, "write reg error, addr = 0x%x, data = 0x%x \n", \ ++ reg->addr, reg->data); ++ return err; ++ } ++ reg++; ++ } ++ return err; ++} ++ ++/** ++ * mt9t111_detect - Detect if an mt9t111 is present, and if so which revision ++ * @client: pointer to the i2c client driver structure ++ * ++ * Detect if an mt9t111 is present ++ * Returns a negative error number if no device is detected, or the ++ * non-negative value of the version ID register if a device is detected. ++ */ ++static int ++mt9t111_detect(struct i2c_client *client) ++{ ++ u16 val; ++ ++ /* chip ID is at address 0 */ ++ if (mt9t111_read_reg(client, MT9T111_CHIP_ID, &val) < 0) ++ return -ENODEV; ++ dev_info(&client->dev, "model id detected 0x%x\n", val); ++ ++ if (val != MT9T111_CHIP_ID_VALUE) { ++ dev_warn(&client->dev, "model id mismatch received 0x%x expecting 0x%x\n", ++ val, MT9T111_CHIP_ID_VALUE); ++ ++ return -ENODEV; ++ } ++ ++ return 0; ++ ++} ++ ++/** ++ * mt9t111_configure - Configure the mt9t111 for the specified image mode ++ * @s: pointer to standard V4L2 device structure ++ * ++ * Configure the mt9t111 for a specified image size, pixel format, and frame ++ * period. xclk is the frequency (in Hz) of the xclk input to the mt9t111. ++ * fper is the frame period (in seconds) expressed as a fraction. ++ * Returns zero if successful, or non-zero otherwise. ++ * The actual frame period is returned in fper. ++ */ ++static int mt9t111_configure(struct v4l2_int_device *s) ++{ ++ debug_dummy("debug_dummy -- to set imager mode"); ++ ++ return 0; ++} ++ ++/** ++ * ioctl_enum_framesizes - V4L2 sensor if handler for vidioc_int_enum_framesizes ++ * @s: pointer to standard V4L2 device structure ++ * @frms: pointer to standard V4L2 framesizes enumeration structure ++ * ++ * Returns possible framesizes depending on choosen pixel format ++ **/ ++static int ioctl_enum_framesizes(struct v4l2_int_device *s, ++ struct v4l2_frmsizeenum *frms) ++{ ++ int ifmt; ++ ++ for (ifmt = 0; ifmt < NUM_CAPTURE_FORMATS; ifmt++) { ++ if (frms->pixel_format == mt9t111_formats[ifmt].pixelformat) ++ break; ++ } ++ /* Is requested pixelformat not found on sensor? */ ++ if (ifmt == NUM_CAPTURE_FORMATS) ++ return -EINVAL; ++ ++ /* Do we already reached all discrete framesizes? */ ++ if (frms->index >= NUM_CAPTURE_SIZE) ++ return -EINVAL; ++ ++ frms->type = V4L2_FRMSIZE_TYPE_DISCRETE; ++ frms->discrete.width = mt9t111_sizes[frms->index].width; ++ frms->discrete.height = mt9t111_sizes[frms->index].height; ++ ++ return 0; ++ ++} ++ ++static int ioctl_enum_frameintervals(struct v4l2_int_device *s, ++ struct v4l2_frmivalenum *frmi) ++{ ++ int ifmt; ++ ++printk(KERN_INFO "entering ioctl_enum_frameintervals\n"); ++printk(KERN_INFO "index = %d, pixel_format = 0x%x, width = %d, height = %d\n", ++ frmi->index, frmi->pixel_format, frmi->width, frmi->height); ++printk(KERN_INFO "mt9t111 format = 0x%x\n", mt9t111_formats[0].pixelformat); ++ ++ if (frmi->index >= NUM_CAPTURE_FRAMEINTERVALS) ++ return -EINVAL; ++ ++ for (ifmt = 0; ifmt < NUM_CAPTURE_FORMATS; ifmt++) { ++ if (frmi->pixel_format == mt9t111_formats[ifmt].pixelformat) ++ break; ++ } ++ /* Is requested pixelformat not found on sensor? */ ++ if (ifmt == NUM_CAPTURE_FORMATS) ++ return -EINVAL; ++ ++ frmi->type = V4L2_FRMSIZE_TYPE_DISCRETE; ++ frmi->discrete.numerator = ++ mt9t111_frameintervals[frmi->index].numerator; ++ frmi->discrete.denominator = ++ mt9t111_frameintervals[frmi->index].denominator; ++ return 0; ++} ++ ++/** ++ * ioctl_init - V4L2 sensor interface handler for VIDIOC_INT_INIT ++ * @s: pointer to standard V4L2 device structure ++ * ++ * Initialize the sensor device (call mt9t111_configure()) ++ */ ++static int ioctl_init(struct v4l2_int_device *s) ++{ ++ return 0; ++} ++ ++/** ++ * ioctl_dev_exit - V4L2 sensor interface handler for vidioc_int_dev_exit_num ++ * @s: pointer to standard V4L2 device structure ++ * ++ * Delinitialise the dev. at slave detach. The complement of ioctl_dev_init. ++ */ ++static int ioctl_dev_exit(struct v4l2_int_device *s) ++{ ++ return 0; ++} ++ ++/** ++ * ioctl_dev_init - V4L2 sensor interface handler for vidioc_int_dev_init_num ++ * @s: pointer to standard V4L2 device structure ++ * ++ * Initialise the device when slave attaches to the master. Returns 0 if ++ * mt9t111 device could be found, otherwise returns appropriate error. ++ */ ++static int ioctl_dev_init(struct v4l2_int_device *s) ++{ ++ return 0; ++} ++ ++/** ++ * ioctl_s_power - V4L2 sensor interface handler for vidioc_int_s_power_num ++ * @s: pointer to standard V4L2 device structure ++ * @on: power state to which device is to be set ++ * ++ * Sets devices power state to requrested state, if possible. ++ */ ++static int ioctl_s_power(struct v4l2_int_device *s, enum v4l2_power on) ++{ ++ struct mt9t111_sensor *sensor = s->priv; ++ struct i2c_client *c = sensor->i2c_client; ++ int rval; ++ ++ if ((on == V4L2_POWER_STANDBY) && (sensor->state == SENSOR_DETECTED)) ++ debug_dummy("debug_dummy -- put to standby\n"); ++ ++ if (on != V4L2_POWER_ON) ++ debug_dummy("debug_dummy -- stop master clock\n"); ++ else ++ debug_dummy("debug_dummy -- enable clock\n");; ++ ++ rval = sensor->pdata->power_set(on); ++ if (rval < 0) { ++ dev_err(&c->dev, "Unable to set the power state: " "mt9t111" ++ " sensor\n"); ++ //sensor->pdata->set_xclk(0); ++ return rval; ++ } ++ ++ if ((on == V4L2_POWER_ON) && (sensor->state == SENSOR_DETECTED)) ++ mt9t111_configure(s); ++ ++ if ((on == V4L2_POWER_ON) && (sensor->state == SENSOR_NOT_DETECTED)) { ++ rval = mt9t111_detect(c); ++ if (rval < 0) { ++ dev_err(&c->dev, "Unable to detect " "mt9t111" ++ " sensor\n"); ++ sensor->state = SENSOR_NOT_DETECTED; ++ return rval; ++ } ++ mt9t111_loaddefault(c); ++ sensor->state = SENSOR_DETECTED; ++ sensor->ver = rval; ++ pr_info("mt9t111" " chip version 0x%02x detected\n", ++ sensor->ver); ++ } ++ return 0; ++} ++ ++/** ++ * ioctl_g_priv - V4L2 sensor interface handler for vidioc_int_g_priv_num ++ * @s: pointer to standard V4L2 device structure ++ * @p: void pointer to hold sensor's private data address ++ * ++ * Returns device's (sensor's) private data area address in p parameter ++ */ ++static int ioctl_g_priv(struct v4l2_int_device *s, void *p) ++{ ++ struct mt9t111_sensor *sensor = s->priv; ++ ++ return sensor->pdata->priv_data_set(p); ++} ++ ++/** ++ * ioctl_s_parm - V4L2 sensor interface handler for VIDIOC_S_PARM ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @a: pointer to standard V4L2 VIDIOC_S_PARM ioctl structure ++ * ++ * Configures the sensor to use the input parameters, if possible. If ++ * not possible, reverts to the old parameters and returns the ++ * appropriate error code. ++ */ ++static int ioctl_s_parm(struct v4l2_int_device *s, ++ struct v4l2_streamparm *a) ++{ ++ //TODO: set paramters ++ debug_dummy("debug_dummy -- VIDIOC_S_PARM "); ++ return 0; ++} ++ ++/** ++ * ioctl_g_parm - V4L2 sensor interface handler for VIDIOC_G_PARM ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @a: pointer to standard V4L2 VIDIOC_G_PARM ioctl structure ++ * ++ * Returns the sensor's video CAPTURE parameters. ++ */ ++static int ioctl_g_parm(struct v4l2_int_device *s, ++ struct v4l2_streamparm *a) ++{ ++ struct mt9t111_sensor *sensor = s->priv; ++ struct v4l2_captureparm *cparm = &a->parm.capture; ++ ++ if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ ++ memset(a, 0, sizeof(*a)); ++ a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ++ ++ cparm->capability = V4L2_CAP_TIMEPERFRAME; ++ cparm->timeperframe = sensor->timeperframe; ++ ++ return 0; ++} ++ ++/** ++ * ioctl_g_fmt_cap - V4L2 sensor interface handler for ioctl_g_fmt_cap ++ * @s: pointer to standard V4L2 device structure ++ * @f: pointer to standard V4L2 v4l2_format structure ++ * ++ * Returns the sensor's current pixel format in the v4l2_format ++ * parameter. ++ */ ++static int ioctl_g_fmt_cap(struct v4l2_int_device *s, ++ struct v4l2_format *f) ++{ ++ struct mt9t111_sensor *sensor = s->priv; ++ f->fmt.pix = sensor->pix; ++ ++ return 0; ++} ++ ++/** ++ * ioctl_try_fmt_cap - Implement the CAPTURE buffer VIDIOC_TRY_FMT ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @f: pointer to standard V4L2 VIDIOC_TRY_FMT ioctl structure ++ * ++ * Implement the VIDIOC_TRY_FMT ioctl for the CAPTURE buffer type. This ++ * ioctl is used to negotiate the image capture size and pixel format ++ * without actually making it take effect. ++ */ ++static int ioctl_try_fmt_cap(struct v4l2_int_device *s, ++ struct v4l2_format *f) ++{ ++ struct v4l2_pix_format *pix = &f->fmt.pix; ++ struct mt9t111_sensor *sensor = s->priv; ++ struct v4l2_pix_format *pix2 = &sensor->pix; ++ ++ pix->width = 640; ++ pix->height = 480; ++#ifdef USE_RAW ++ pix->pixelformat = V4L2_PIX_FMT_SGRBG10; ++ pix->bytesperline = pix->width; ++ pix->colorspace = V4L2_COLORSPACE_SRGB; ++#else ++ pix->pixelformat = V4L2_PIX_FMT_YUYV; ++ pix->bytesperline = pix->width * 2; ++ pix->colorspace = V4L2_COLORSPACE_JPEG; ++#endif ++ pix->field = V4L2_FIELD_NONE; ++ ++ pix->sizeimage = pix->bytesperline * pix->height; ++ pix->priv = 0; ++ *pix2 = *pix; ++ return 0; ++} ++ ++/** ++ * ioctl_s_fmt_cap - V4L2 sensor interface handler for VIDIOC_S_FMT ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @f: pointer to standard V4L2 VIDIOC_S_FMT ioctl structure ++ * ++ * If the requested format is supported, configures the HW to use that ++ * format, returns error code if format not supported or HW can't be ++ * correctly configured. ++ */ ++static int ioctl_s_fmt_cap(struct v4l2_int_device *s, ++ struct v4l2_format *f) ++{ ++ struct mt9t111_sensor *sensor = s->priv; ++ struct v4l2_pix_format *pix = &f->fmt.pix; ++ int rval; ++ ++ rval = ioctl_try_fmt_cap(s, f); ++ if (!rval) ++ sensor->pix = *pix; ++ ++ return rval; ++} ++ ++/** ++ * ioctl_enum_fmt_cap - Implement the CAPTURE buffer VIDIOC_ENUM_FMT ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @fmt: standard V4L2 VIDIOC_ENUM_FMT ioctl structure ++ * ++ * Implement the VIDIOC_ENUM_FMT ioctl for the CAPTURE buffer type. ++ */ ++static int ioctl_enum_fmt_cap(struct v4l2_int_device *s, ++ struct v4l2_fmtdesc *fmt) ++{ ++ int index = fmt->index; ++ enum v4l2_buf_type type = fmt->type; ++ ++ memset(fmt, 0, sizeof(*fmt)); ++ fmt->index = index; ++ fmt->type = type; ++ ++ switch (fmt->type) { ++ case V4L2_BUF_TYPE_VIDEO_CAPTURE: ++ if (index >= NUM_CAPTURE_FORMATS) ++ return -EINVAL; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ fmt->flags = mt9t111_formats[index].flags; ++ strlcpy(fmt->description, mt9t111_formats[index].description, ++ sizeof(fmt->description)); ++ fmt->pixelformat = mt9t111_formats[index].pixelformat; ++ ++ return 0; ++} ++ ++/** ++ * ioctl_s_ctrl - V4L2 sensor interface handler for VIDIOC_S_CTRL ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @vc: standard V4L2 VIDIOC_S_CTRL ioctl structure ++ * ++ * If the requested control is supported, sets the control's current ++ * value in HW (and updates the video_control[] array). Otherwise, ++ * returns -EINVAL if the control is not supported. ++ */ ++static int ioctl_s_ctrl(struct v4l2_int_device *s, ++ struct v4l2_control *vc) ++{ ++ debug_dummy("debug_dummy -- s ctrl\n"); ++ return 0; ++} ++ ++/** ++ * ioctl_g_ctrl - V4L2 sensor interface handler for VIDIOC_G_CTRL ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @vc: standard V4L2 VIDIOC_G_CTRL ioctl structure ++ * ++ * If the requested control is supported, returns the control's current ++ * value from the video_control[] array. Otherwise, returns -EINVAL ++ * if the control is not supported. ++ */ ++static int ioctl_g_ctrl(struct v4l2_int_device *s, ++ struct v4l2_control *vc) ++{ ++ debug_dummy("debug_dummy -- g ctrl\n"); ++ return 0; ++} ++ ++/** ++ * ioctl_queryctrl - V4L2 sensor interface handler for VIDIOC_QUERYCTRL ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @qc: standard V4L2 VIDIOC_QUERYCTRL ioctl structure ++ * ++ * If the requested control is supported, returns the control information ++ * from the video_control[] array. Otherwise, returns -EINVAL if the ++ * control is not supported. ++ */ ++static int ioctl_queryctrl(struct v4l2_int_device *s, ++ struct v4l2_queryctrl *qc) ++{ ++ debug_dummy("debug_dummy -- query ctrl\n"); ++ return-EINVAL; ++} ++ ++/** ++ * ioctl_s_routing - V4L2 decoder interface handler for VIDIOC_S_INPUT ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @index: number of the input ++ * ++ * If index is valid, selects the requested input. Otherwise, returns -EINVAL if ++ * the input is not supported or there is no active signal present in the ++ * selected input. ++ */ ++static int ioctl_s_routing(struct v4l2_int_device *s, ++ struct v4l2_routing *route) ++{ ++ return 0; ++} ++ ++/** ++ * ioctl_g_ifparm - V4L2 decoder interface handler for vidioc_int_g_ifparm_num ++ * @s: pointer to standard V4L2 device structure ++ * @p: pointer to standard V4L2 vidioc_int_g_ifparm_num ioctl structure ++ * ++ * Gets slave interface parameters. ++ * Calculates the required xclk value to support the requested ++ * clock parameters in p. This value is returned in the p ++ * parameter. ++ */ ++static int ioctl_g_ifparm(struct v4l2_int_device *s, struct v4l2_ifparm *p) ++{ ++ struct mt9t111_sensor *sensor = s->priv; ++ int rval; ++ ++ if (p == NULL) ++ return -EINVAL; ++ ++ if (NULL == sensor->pdata->ifparm) ++ return -EINVAL; ++ ++ rval = sensor->pdata->ifparm(p); ++ if (rval) { ++ v4l_err(sensor->i2c_client, "g_ifparm.Err[%d]\n", rval); ++ return rval; ++ } ++ ++ p->u.ycbcr.clock_curr = 40*1000000; // temporal value ++ ++ return 0; ++} ++ ++ ++static struct v4l2_int_ioctl_desc mt9t111_ioctl_desc[] = { ++ { .num = vidioc_int_enum_framesizes_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_enum_framesizes }, ++ { .num = vidioc_int_enum_frameintervals_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_enum_frameintervals }, ++ { .num = vidioc_int_dev_init_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_dev_init }, ++ { .num = vidioc_int_dev_exit_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_dev_exit }, ++ { .num = vidioc_int_s_power_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_s_power }, ++ { .num = vidioc_int_g_priv_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_g_priv }, ++ {vidioc_int_g_ifparm_num, ++ .func = (v4l2_int_ioctl_func*) ioctl_g_ifparm}, ++ { .num = vidioc_int_init_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_init }, ++ { .num = vidioc_int_enum_fmt_cap_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_enum_fmt_cap }, ++ { .num = vidioc_int_try_fmt_cap_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_try_fmt_cap }, ++ { .num = vidioc_int_g_fmt_cap_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_g_fmt_cap }, ++ { .num = vidioc_int_s_fmt_cap_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_s_fmt_cap }, ++ { .num = vidioc_int_g_parm_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_g_parm }, ++ { .num = vidioc_int_s_parm_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_s_parm }, ++ { .num = vidioc_int_queryctrl_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_queryctrl }, ++ { .num = vidioc_int_g_ctrl_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_g_ctrl }, ++ { .num = vidioc_int_s_ctrl_num, ++ .func = (v4l2_int_ioctl_func *)ioctl_s_ctrl }, ++ {.num = vidioc_int_s_video_routing_num, ++ .func = (v4l2_int_ioctl_func *) ioctl_s_routing}, ++}; ++ ++static void mt9t111_refresh(struct i2c_client *client){ ++ int i; ++ unsigned short value; ++ // MCU_ADDRESS [SEQ_CMD] -- refresh ++ mt9t111_write_reg(client, 0x098E, 0x8400); ++ mt9t111_write_reg(client, 0x0990, 0x0006); ++ for (i=0;i<100;i++){ ++ mt9t111_write_reg(client, 0x098E, 0x8400); ++ mt9t111_read_reg(client,0x0990,&value); ++ if ( value == 0) ++ break; ++ mdelay(5); ++ } ++} ++ ++#ifdef COLOR_BAR ++static void mt9t111_color_bar(struct i2c_client *client) ++{ ++ mt9t111_write_reg(client, 0x3210, 0x01B0); // disable lens correction ++ ++ mt9t111_write_reg(client, 0x098E, 0x6003); ++ mt9t111_write_reg(client, 0x0990, 0x0100); ++ mt9t111_write_reg(client, 0x098E, 0x6025); ++ mt9t111_write_reg(client, 0x0990, 0x0003); ++} ++#endif ++ ++static void mt9t111_bayer_format(struct i2c_client *client) ++{ ++ mt9t111_write_regs(client, bayer_pattern_regs, sizeof(bayer_pattern_regs)/sizeof(mt9t111_regs)); ++} ++ ++static void mt9t111_enable_pll(struct i2c_client *client) ++{ ++ int i; ++ unsigned short value; ++ ++ mt9t111_write_regs(client, pll_regs1, sizeof(pll_regs1)/sizeof(mt9t111_regs)); ++ for (i=0;i<100;i++){ ++ mt9t111_read_reg(client,0x0014,&value); ++ if (( value & 0x8000) != 0) ++ break; ++ mdelay(2); ++ } ++ mt9t111_write_regs(client, pll_regs2, sizeof(pll_regs2)/sizeof(mt9t111_regs)); ++} ++ ++ ++static void mt9t111_loaddefault(struct i2c_client *client) ++{ ++ mt9t111_write_reg(client, 0x001A, 0x0219); ++ mt9t111_write_reg(client, 0x001A, 0x0218); ++ ++ mt9t111_enable_pll(client); ++ mt9t111_write_regs(client, def_regs1, sizeof(def_regs1)/sizeof(mt9t111_regs)); ++ mt9t111_write_regs(client, patch_rev6, sizeof(patch_rev6)/sizeof(mt9t111_regs)); ++ mt9t111_write_regs(client, def_regs2, sizeof(def_regs2)/sizeof(mt9t111_regs)); ++ ++#ifdef USE_RAW ++ mt9t111_bayer_format(client); ++#endif ++ ++#ifdef COLOR_BAR ++ mt9t111_color_bar(client); ++#endif ++ ++ mt9t111_refresh(client); ++} ++ ++static struct v4l2_int_slave mt9t111_slave = { ++ .ioctls = mt9t111_ioctl_desc, ++ .num_ioctls = ARRAY_SIZE(mt9t111_ioctl_desc), ++}; ++ ++static struct v4l2_int_device mt9t111_int_device = { ++ .module = THIS_MODULE, ++ .name = "mt9t111", ++ .priv = &mt9t111, ++ .type = v4l2_int_type_slave, ++ .u = { ++ .slave = &mt9t111_slave, ++ }, ++}; ++ ++/** ++ * mt9t111_probe - sensor driver i2c probe handler ++ * @client: i2c driver client device structure ++ * ++ * Register sensor as an i2c client device and V4L2 ++ * device. ++ */ ++static int ++mt9t111_probe(struct i2c_client *client, const struct i2c_device_id *id) ++{ ++ struct mt9t111_sensor *sensor = &mt9t111; ++ int err; ++ ++ if (i2c_get_clientdata(client)) ++ return -EBUSY; ++ ++ sensor->pdata = client->dev.platform_data; ++ ++ if (!sensor->pdata) { ++ dev_err(&client->dev, "no platform data?\n"); ++ return -ENODEV; ++ } ++ ++ sensor->v4l2_int_device = &mt9t111_int_device; ++ sensor->i2c_client = client; ++ ++ i2c_set_clientdata(client, sensor); ++ ++ sensor->pix.width = 640; ++ sensor->pix.height = 480; ++#ifdef USE_RAW ++ sensor->pix.pixelformat = V4L2_PIX_FMT_SGRBG10; ++#else ++ sensor->pix.pixelformat = V4L2_PIX_FMT_YUYV; ++#endif ++ err = v4l2_int_device_register(sensor->v4l2_int_device); ++ if (err) ++ i2c_set_clientdata(client, NULL); ++ return err; ++} ++ ++/** ++ * mt9t111_remove - sensor driver i2c remove handler ++ * @client: i2c driver client device structure ++ * ++ * Unregister sensor as an i2c client device and V4L2 ++ * device. Complement of mt9t111_probe(). ++ */ ++static int __exit ++mt9t111_remove(struct i2c_client *client) ++{ ++ struct mt9t111_sensor *sensor = i2c_get_clientdata(client); ++ ++ if (!client->adapter) ++ return -ENODEV; /* our client isn't attached */ ++ ++ v4l2_int_device_unregister(sensor->v4l2_int_device); ++ i2c_set_clientdata(client, NULL); ++ ++ return 0; ++} ++ ++static const struct i2c_device_id mt9t111_id[] = { ++ { "mt9t111", 0 }, ++ { }, ++}; ++MODULE_DEVICE_TABLE(i2c, mt9t111_id); ++ ++static struct i2c_driver mt9t111sensor_i2c_driver = { ++ .driver = { ++ .name = "mt9t111", ++ .owner = THIS_MODULE, ++ }, ++ .probe = mt9t111_probe, ++ .remove = __exit_p(mt9t111_remove), ++ .id_table = mt9t111_id, ++}; ++ ++/** ++ * mt9t111sensor_init - sensor driver module_init handler ++ * ++ * Registers driver as an i2c client driver. Returns 0 on success, ++ * error code otherwise. ++ */ ++static int __init mt9t111sensor_init(void) ++{ ++printk(KERN_INFO "entering mt9t111sensor_init\n"); ++ return i2c_add_driver(&mt9t111sensor_i2c_driver); ++} ++module_init(mt9t111sensor_init); ++ ++/** ++ * mt9t111sensor_cleanup - sensor driver module_exit handler ++ * ++ * Unregisters/deletes driver as an i2c client driver. ++ * Complement of mt9t111sensor_init. ++ */ ++static void __exit mt9t111sensor_cleanup(void) ++{ ++ i2c_del_driver(&mt9t111sensor_i2c_driver); ++} ++module_exit(mt9t111sensor_cleanup); ++ ++MODULE_LICENSE("GPL"); ++MODULE_DESCRIPTION("mt9t111 camera sensor driver"); +diff --git a/drivers/media/video/mt9t111_reg.h b/drivers/media/video/mt9t111_reg.h +new file mode 100644 +index 0000000..e012eeb +--- /dev/null ++++ b/drivers/media/video/mt9t111_reg.h +@@ -0,0 +1,1364 @@ ++/* ++ * drivers/media/video/mt9t111_reg.h ++ * ++ * mt9t111 sensor driver header file ++ * ++ * Copyright (C) 2009 Leopard Imaging ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#ifndef MT9T111_REG_H ++#define MT9T111_REG_H ++ ++/* register addr */ ++#define MT9T111_CHIP_ID (0x0000) ++ ++/* register value */ ++#define MT9T111_CHIP_ID_VALUE (0x2680) ++ ++typedef struct { ++ u16 delay_time; ++ u16 addr; ++ u16 data; ++} mt9t111_regs; ++ ++mt9t111_regs patch_rev6[] ={ ++ {0, 0x0982, 0x0}, ++ {0, 0x098A, 0xCE7}, ++ {0, 0x0990, 0x3C3C}, ++ {0, 0x0992, 0x3C3C}, ++ {0, 0x0994, 0x3C5F}, ++ {0, 0x0996, 0x4F30}, ++ {0, 0x0998, 0xED08}, ++ {0, 0x099a, 0xBD61}, ++ {0, 0x099c, 0xD5CE}, ++ {0, 0x099e, 0x4CD}, ++ {0, 0x098A, 0xCF7}, ++ {0, 0x0990, 0x1F17}, ++ {0, 0x0992, 0x211}, ++ {0, 0x0994, 0xCC33}, ++ {0, 0x0996, 0x2E30}, ++ {0, 0x0998, 0xED02}, ++ {0, 0x099a, 0xCCFF}, ++ {0, 0x099c, 0xFDED}, ++ {0, 0x099e, 0xCC}, ++ {0, 0x098A, 0xD07}, ++ {0, 0x0990, 0x2}, ++ {0, 0x0992, 0xBD70}, ++ {0, 0x0994, 0x6D18}, ++ {0, 0x0996, 0xDE1F}, ++ {0, 0x0998, 0x181F}, ++ {0, 0x099a, 0x8E01}, ++ {0, 0x099c, 0x10CC}, ++ {0, 0x099e, 0x3C52}, ++ {0, 0x098A, 0xD17}, ++ {0, 0x0990, 0x30ED}, ++ {0, 0x0992, 0x18}, ++ {0, 0x0994, 0xECA0}, ++ {0, 0x0996, 0xC4FD}, ++ {0, 0x0998, 0xBD70}, ++ {0, 0x099a, 0x2120}, ++ {0, 0x099c, 0x1ECC}, ++ {0, 0x099e, 0x3C52}, ++ {0, 0x098A, 0xD27}, ++ {0, 0x0990, 0x30ED}, ++ {0, 0x0992, 0xDE}, ++ {0, 0x0994, 0x1FEC}, ++ {0, 0x0996, 0xA0BD}, ++ {0, 0x0998, 0x7021}, ++ {0, 0x099a, 0xCC3C}, ++ {0, 0x099c, 0x5230}, ++ {0, 0x099e, 0xED02}, ++ {0, 0x098A, 0xD37}, ++ {0, 0x0990, 0xCCFF}, ++ {0, 0x0992, 0xFCED}, ++ {0, 0x0994, 0xCC}, ++ {0, 0x0996, 0x2}, ++ {0, 0x0998, 0xBD70}, ++ {0, 0x099a, 0x6DFC}, ++ {0, 0x099c, 0x4E1}, ++ {0, 0x099e, 0x1A83}, ++ {0, 0x098A, 0xD47}, ++ {0, 0x0990, 0x1}, ++ {0, 0x0992, 0x2720}, ++ {0, 0x0994, 0x1A83}, ++ {0, 0x0996, 0x4}, ++ {0, 0x0998, 0x271E}, ++ {0, 0x099a, 0x1A83}, ++ {0, 0x099c, 0x8}, ++ {0, 0x099e, 0x271C}, ++ {0, 0x098A, 0xD57}, ++ {0, 0x0990, 0x1A83}, ++ {0, 0x0992, 0x10}, ++ {0, 0x0994, 0x271A}, ++ {0, 0x0996, 0x1A83}, ++ {0, 0x0998, 0x20}, ++ {0, 0x099a, 0x2718}, ++ {0, 0x099c, 0x1A83}, ++ {0, 0x099e, 0x40}, ++ {0, 0x098A, 0xD67}, ++ {0, 0x0990, 0x2716}, ++ {0, 0x0992, 0x2019}, ++ {0, 0x0994, 0xC61E}, ++ {0, 0x0996, 0x2012}, ++ {0, 0x0998, 0xC622}, ++ {0, 0x099a, 0x200E}, ++ {0, 0x099c, 0xC621}, ++ {0, 0x099e, 0x200A}, ++ {0, 0x098A, 0xD77}, ++ {0, 0x0990, 0xC620}, ++ {0, 0x0992, 0x2006}, ++ {0, 0x0994, 0xC62A}, ++ {0, 0x0996, 0x2002}, ++ {0, 0x0998, 0xC62B}, ++ {0, 0x099a, 0x30ED}, ++ {0, 0x099c, 0x8CC}, ++ {0, 0x099e, 0x3400}, ++ {0, 0x098A, 0xD87}, ++ {0, 0x0990, 0x30ED}, ++ {0, 0x0992, 0x34}, ++ {0, 0x0994, 0xBD6F}, ++ {0, 0x0996, 0xD184}, ++ {0, 0x0998, 0x330}, ++ {0, 0x099a, 0xED07}, ++ {0, 0x099c, 0xA60A}, ++ {0, 0x099e, 0x4848}, ++ {0, 0x098A, 0xD97}, ++ {0, 0x0990, 0x5FED}, ++ {0, 0x0992, 0x5EA}, ++ {0, 0x0994, 0x8AA}, ++ {0, 0x0996, 0x731}, ++ {0, 0x0998, 0xBD70}, ++ {0, 0x099a, 0x2130}, ++ {0, 0x099c, 0xC60A}, ++ {0, 0x099e, 0x3A35}, ++ {0, 0x098A, 0xDA7}, ++ {0, 0x0990, 0x3937}, ++ {0, 0x0992, 0x3C3C}, ++ {0, 0x0994, 0x3C34}, ++ {0, 0x0996, 0xDE2F}, ++ {0, 0x0998, 0xEE0E}, ++ {0, 0x099a, 0xAD00}, ++ {0, 0x099c, 0x7D13}, ++ {0, 0x099e, 0xEF27}, ++ {0, 0x098A, 0xDB7}, ++ {0, 0x0990, 0x7CCE}, ++ {0, 0x0992, 0x13E0}, ++ {0, 0x0994, 0x1E05}, ++ {0, 0x0996, 0x1060}, ++ {0, 0x0998, 0xE60E}, ++ {0, 0x099a, 0x4FC3}, ++ {0, 0x099c, 0x13F0}, ++ {0, 0x099e, 0x8FE6}, ++ {0, 0x098A, 0xDC7}, ++ {0, 0x0990, 0x30}, ++ {0, 0x0992, 0xE107}, ++ {0, 0x0994, 0x2216}, ++ {0, 0x0996, 0xF613}, ++ {0, 0x0998, 0xEE4F}, ++ {0, 0x099a, 0xC313}, ++ {0, 0x099c, 0xF38F}, ++ {0, 0x099e, 0xE600}, ++ {0, 0x098A, 0xDD7}, ++ {0, 0x0990, 0x30E1}, ++ {0, 0x0992, 0x725}, ++ {0, 0x0994, 0x7F6}, ++ {0, 0x0996, 0x13EE}, ++ {0, 0x0998, 0xC103}, ++ {0, 0x099a, 0x253C}, ++ {0, 0x099c, 0x7F13}, ++ {0, 0x099e, 0xEEF6}, ++ {0, 0x098A, 0xDE7}, ++ {0, 0x0990, 0x13EF}, ++ {0, 0x0992, 0xE706}, ++ {0, 0x0994, 0xCC13}, ++ {0, 0x0996, 0xF0ED}, ++ {0, 0x0998, 0x4CC}, ++ {0, 0x099a, 0x13F3}, ++ {0, 0x099c, 0x200F}, ++ {0, 0x099e, 0x7C13}, ++ {0, 0x098A, 0xDF7}, ++ {0, 0x0990, 0xEEEC}, ++ {0, 0x0992, 0x4C3}, ++ {0, 0x0994, 0x1}, ++ {0, 0x0996, 0xED04}, ++ {0, 0x0998, 0xEC02}, ++ {0, 0x099a, 0xC300}, ++ {0, 0x099c, 0x1ED}, ++ {0, 0x099e, 0x2F6}, ++ {0, 0x098A, 0xE07}, ++ {0, 0x0990, 0x13EE}, ++ {0, 0x0992, 0xE106}, ++ {0, 0x0994, 0x2412}, ++ {0, 0x0996, 0xEE04}, ++ {0, 0x0998, 0xE600}, ++ {0, 0x099a, 0x30E1}, ++ {0, 0x099c, 0x722}, ++ {0, 0x099e, 0xDFEE}, ++ {0, 0x098A, 0xE17}, ++ {0, 0x0990, 0x2E6}, ++ {0, 0x0992, 0x30}, ++ {0, 0x0994, 0xE107}, ++ {0, 0x0996, 0x25D6}, ++ {0, 0x0998, 0xDE49}, ++ {0, 0x099a, 0xEE08}, ++ {0, 0x099c, 0xAD00}, ++ {0, 0x099e, 0xCC13}, ++ {0, 0x098A, 0xE27}, ++ {0, 0x0990, 0xF630}, ++ {0, 0x0992, 0xED00}, ++ {0, 0x0994, 0xDE2F}, ++ {0, 0x0996, 0xEE10}, ++ {0, 0x0998, 0xCC13}, ++ {0, 0x099a, 0xFAAD}, ++ {0, 0x099c, 0x38}, ++ {0, 0x099e, 0x3838}, ++ {0, 0x098A, 0xE37}, ++ {0, 0x0990, 0x3839}, ++ {0, 0x098A, 0x1000}, ++ {0, 0x0990, 0xCC10}, ++ {0, 0x0992, 0x9BD}, ++ {0, 0x0994, 0x4224}, ++ {0, 0x0996, 0x7E10}, ++ {0, 0x0998, 0x9C6}, ++ {0, 0x099a, 0x1F7}, ++ {0, 0x099c, 0x18A}, ++ {0, 0x099e, 0xC606}, ++ {0, 0x098A, 0x1010}, ++ {0, 0x0990, 0xF701}, ++ {0, 0x0992, 0x8BDE}, ++ {0, 0x0994, 0x3F18}, ++ {0, 0x0996, 0xCE0B}, ++ {0, 0x0998, 0xF1CC}, ++ {0, 0x099a, 0x11}, ++ {0, 0x099c, 0xBDD7}, ++ {0, 0x099e, 0xCC}, ++ {0, 0x098A, 0x1020}, ++ {0, 0x0990, 0xBF1}, ++ {0, 0x0992, 0xDD3F}, ++ {0, 0x0994, 0xDE35}, ++ {0, 0x0996, 0x18CE}, ++ {0, 0x0998, 0xC03}, ++ {0, 0x099a, 0xCC00}, ++ {0, 0x099c, 0x3FBD}, ++ {0, 0x099e, 0xD700}, ++ {0, 0x098A, 0x1030}, ++ {0, 0x0990, 0xCC0C}, ++ {0, 0x0992, 0x3DD}, ++ {0, 0x0994, 0x35DE}, ++ {0, 0x0996, 0x4718}, ++ {0, 0x0998, 0xCE0C}, ++ {0, 0x099a, 0x43CC}, ++ {0, 0x099c, 0x15}, ++ {0, 0x099e, 0xBDD7}, ++ {0, 0x098A, 0x1040}, ++ {0, 0x0990, 0xCC}, ++ {0, 0x0992, 0xC43}, ++ {0, 0x0994, 0xDD47}, ++ {0, 0x0996, 0xFE00}, ++ {0, 0x0998, 0x3318}, ++ {0, 0x099a, 0xCE0C}, ++ {0, 0x099c, 0x59CC}, ++ {0, 0x099e, 0x9}, ++ {0, 0x098A, 0x1050}, ++ {0, 0x0990, 0xBDD7}, ++ {0, 0x0992, 0xCC}, ++ {0, 0x0994, 0xC59}, ++ {0, 0x0996, 0xFD00}, ++ {0, 0x0998, 0x33DE}, ++ {0, 0x099a, 0x4118}, ++ {0, 0x099c, 0xCE0C}, ++ {0, 0x099e, 0x63CC}, ++ {0, 0x098A, 0x1060}, ++ {0, 0x0990, 0xD}, ++ {0, 0x0992, 0xBDD7}, ++ {0, 0x0994, 0xCC}, ++ {0, 0x0996, 0xC63}, ++ {0, 0x0998, 0xDD41}, ++ {0, 0x099a, 0xFE00}, ++ {0, 0x099c, 0x3118}, ++ {0, 0x099e, 0xCE0C}, ++ {0, 0x098A, 0x1070}, ++ {0, 0x0990, 0x71CC}, ++ {0, 0x0992, 0x29}, ++ {0, 0x0994, 0xBDD7}, ++ {0, 0x0996, 0xCC}, ++ {0, 0x0998, 0xC71}, ++ {0, 0x099a, 0xFD00}, ++ {0, 0x099c, 0x31DE}, ++ {0, 0x099e, 0x3918}, ++ {0, 0x098A, 0x1080}, ++ {0, 0x0990, 0xCE0C}, ++ {0, 0x0992, 0x9BCC}, ++ {0, 0x0994, 0x23}, ++ {0, 0x0996, 0xBDD7}, ++ {0, 0x0998, 0xCC}, ++ {0, 0x099a, 0xC9B}, ++ {0, 0x099c, 0xDD39}, ++ {0, 0x099e, 0xDE49}, ++ {0, 0x098A, 0x1090}, ++ {0, 0x0990, 0x18CE}, ++ {0, 0x0992, 0xCBF}, ++ {0, 0x0994, 0xCC00}, ++ {0, 0x0996, 0xDBD}, ++ {0, 0x0998, 0xD700}, ++ {0, 0x099a, 0xCC0C}, ++ {0, 0x099c, 0xBFDD}, ++ {0, 0x099e, 0x49CC}, ++ {0, 0x098A, 0x10A0}, ++ {0, 0x0990, 0x1162}, ++ {0, 0x0992, 0xFD0B}, ++ {0, 0x0994, 0xFDCC}, ++ {0, 0x0996, 0xCE7}, ++ {0, 0x0998, 0xFD0C}, ++ {0, 0x099a, 0x1FCC}, ++ {0, 0x099c, 0x1245}, ++ {0, 0x099e, 0xFD0C}, ++ {0, 0x098A, 0x10B0}, ++ {0, 0x0990, 0x51CC}, ++ {0, 0x0992, 0x110B}, ++ {0, 0x0994, 0xFD0C}, ++ {0, 0x0996, 0x5BCC}, ++ {0, 0x0998, 0x1108}, ++ {0, 0x099a, 0xFD0C}, ++ {0, 0x099c, 0x65CC}, ++ {0, 0x099e, 0x10D0}, ++ {0, 0x098A, 0x10C0}, ++ {0, 0x0990, 0xFD0C}, ++ {0, 0x0992, 0x7BCC}, ++ {0, 0x0994, 0x12DE}, ++ {0, 0x0996, 0xFD0C}, ++ {0, 0x0998, 0xA7CC}, ++ {0, 0x099a, 0xDA8}, ++ {0, 0x099c, 0xFD0C}, ++ {0, 0x099e, 0xCB39}, ++ {0, 0x098A, 0x10D0}, ++ {0, 0x0990, 0x37DE}, ++ {0, 0x0992, 0x1DEC}, ++ {0, 0x0994, 0xC5F}, ++ {0, 0x0996, 0x8402}, ++ {0, 0x0998, 0x4416}, ++ {0, 0x099a, 0x4FF7}, ++ {0, 0x099c, 0xCCD}, ++ {0, 0x099e, 0xE60B}, ++ {0, 0x098A, 0x10E0}, ++ {0, 0x0990, 0xC407}, ++ {0, 0x0992, 0xF70C}, ++ {0, 0x0994, 0xCE7F}, ++ {0, 0x0996, 0x30C4}, ++ {0, 0x0998, 0xEC25}, ++ {0, 0x099a, 0xFD30}, ++ {0, 0x099c, 0xC5FC}, ++ {0, 0x099e, 0x6D6}, ++ {0, 0x098A, 0x10F0}, ++ {0, 0x0990, 0xFD30}, ++ {0, 0x0992, 0xC701}, ++ {0, 0x0994, 0xFC30}, ++ {0, 0x0996, 0xC0FD}, ++ {0, 0x0998, 0xBED}, ++ {0, 0x099a, 0xFC30}, ++ {0, 0x099c, 0xC2FD}, ++ {0, 0x099e, 0xBEF}, ++ {0, 0x098A, 0x1100}, ++ {0, 0x0990, 0x30E6}, ++ {0, 0x0992, 0xBD}, ++ {0, 0x0994, 0x5203}, ++ {0, 0x0996, 0x3139}, ++ {0, 0x0998, 0x7E9E}, ++ {0, 0x099a, 0x143C}, ++ {0, 0x099c, 0x3C3C}, ++ {0, 0x099e, 0x2101}, ++ {0, 0x098A, 0x1110}, ++ {0, 0x0990, 0xCC00}, ++ {0, 0x0992, 0x18BD}, ++ {0, 0x0994, 0x6FD1}, ++ {0, 0x0996, 0xC504}, ++ {0, 0x0998, 0x26F5}, ++ {0, 0x099a, 0xDC25}, ++ {0, 0x099c, 0x30ED}, ++ {0, 0x099e, 0x420}, ++ {0, 0x098A, 0x1120}, ++ {0, 0x0990, 0x12EE}, ++ {0, 0x0992, 0x43C}, ++ {0, 0x0994, 0x1838}, ++ {0, 0x0996, 0xE621}, ++ {0, 0x0998, 0x18E7}, ++ {0, 0x099a, 0xBE30}, ++ {0, 0x099c, 0xEE04}, ++ {0, 0x099e, 0xEC1D}, ++ {0, 0x098A, 0x1130}, ++ {0, 0x0990, 0x30ED}, ++ {0, 0x0992, 0x4EC}, ++ {0, 0x0994, 0x426}, ++ {0, 0x0996, 0xEACC}, ++ {0, 0x0998, 0x1A}, ++ {0, 0x099a, 0xED02}, ++ {0, 0x099c, 0xCCFB}, ++ {0, 0x099e, 0xFFED}, ++ {0, 0x098A, 0x1140}, ++ {0, 0x0990, 0xCC}, ++ {0, 0x0992, 0x400}, ++ {0, 0x0994, 0xBD70}, ++ {0, 0x0996, 0x6DCC}, ++ {0, 0x0998, 0x1A}, ++ {0, 0x099a, 0x30ED}, ++ {0, 0x099c, 0x2CC}, ++ {0, 0x099e, 0xFBFF}, ++ {0, 0x098A, 0x1150}, ++ {0, 0x0990, 0xED00}, ++ {0, 0x0992, 0x5F4F}, ++ {0, 0x0994, 0xBD70}, ++ {0, 0x0996, 0x6D5F}, ++ {0, 0x0998, 0xBD5B}, ++ {0, 0x099a, 0x17BD}, ++ {0, 0x099c, 0x558B}, ++ {0, 0x099e, 0x3838}, ++ {0, 0x098A, 0x1160}, ++ {0, 0x0990, 0x3839}, ++ {0, 0x0992, 0x3C3C}, ++ {0, 0x0994, 0xC640}, ++ {0, 0x0996, 0xF730}, ++ {0, 0x0998, 0xC4FC}, ++ {0, 0x099a, 0xBED}, ++ {0, 0x099c, 0xFD30}, ++ {0, 0x099e, 0xC0FC}, ++ {0, 0x098A, 0x1170}, ++ {0, 0x0990, 0xBEF}, ++ {0, 0x0992, 0xFD30}, ++ {0, 0x0994, 0xC2DE}, ++ {0, 0x0996, 0x1DEC}, ++ {0, 0x0998, 0x25FD}, ++ {0, 0x099a, 0x30C5}, ++ {0, 0x099c, 0x101}, ++ {0, 0x099e, 0x1FC}, ++ {0, 0x098A, 0x1180}, ++ {0, 0x0990, 0x30C2}, ++ {0, 0x0992, 0xFD06}, ++ {0, 0x0994, 0xD6EC}, ++ {0, 0x0996, 0xC5F}, ++ {0, 0x0998, 0x8402}, ++ {0, 0x099a, 0x4416}, ++ {0, 0x099c, 0x4F30}, ++ {0, 0x099e, 0xE703}, ++ {0, 0x098A, 0x1190}, ++ {0, 0x0990, 0xF10C}, ++ {0, 0x0992, 0xCD27}, ++ {0, 0x0994, 0x15F1}, ++ {0, 0x0996, 0xCCD}, ++ {0, 0x0998, 0x2309}, ++ {0, 0x099a, 0xFC06}, ++ {0, 0x099c, 0xD604}, ++ {0, 0x099e, 0xFD06}, ++ {0, 0x098A, 0x11A0}, ++ {0, 0x0990, 0xD620}, ++ {0, 0x0992, 0x7FC}, ++ {0, 0x0994, 0x6D6}, ++ {0, 0x0996, 0x5FD}, ++ {0, 0x0998, 0x6D6}, ++ {0, 0x099a, 0xDE1D}, ++ {0, 0x099c, 0xE60B}, ++ {0, 0x099e, 0xC407}, ++ {0, 0x098A, 0x11B0}, ++ {0, 0x0990, 0x30E7}, ++ {0, 0x0992, 0x2F1}, ++ {0, 0x0994, 0xCCE}, ++ {0, 0x0996, 0x272C}, ++ {0, 0x0998, 0x7D0C}, ++ {0, 0x099a, 0xCE27}, ++ {0, 0x099c, 0x275D}, ++ {0, 0x099e, 0x2724}, ++ {0, 0x098A, 0x11C0}, ++ {0, 0x0990, 0x7F30}, ++ {0, 0x0992, 0xC4FC}, ++ {0, 0x0994, 0x6D6}, ++ {0, 0x0996, 0xFD30}, ++ {0, 0x0998, 0xC5F6}, ++ {0, 0x099a, 0xCCE}, ++ {0, 0x099c, 0x4FFD}, ++ {0, 0x099e, 0x30C7}, ++ {0, 0x098A, 0x11D0}, ++ {0, 0x0990, 0xC640}, ++ {0, 0x0992, 0xF730}, ++ {0, 0x0994, 0xC4E6}, ++ {0, 0x0996, 0x24F}, ++ {0, 0x0998, 0xFD30}, ++ {0, 0x099a, 0xC501}, ++ {0, 0x099c, 0x101}, ++ {0, 0x099e, 0xFC30}, ++ {0, 0x098A, 0x11E0}, ++ {0, 0x0990, 0xC2FD}, ++ {0, 0x0992, 0x6D6}, ++ {0, 0x0994, 0x7D06}, ++ {0, 0x0996, 0xCB27}, ++ {0, 0x0998, 0x2EC6}, ++ {0, 0x099a, 0x40F7}, ++ {0, 0x099c, 0x30C4}, ++ {0, 0x099e, 0xFC06}, ++ {0, 0x098A, 0x11F0}, ++ {0, 0x0990, 0xC104}, ++ {0, 0x0992, 0xF306}, ++ {0, 0x0994, 0xD6ED}, ++ {0, 0x0996, 0x5F}, ++ {0, 0x0998, 0x6D00}, ++ {0, 0x099a, 0x2A01}, ++ {0, 0x099c, 0x5317}, ++ {0, 0x099e, 0xFD30}, ++ {0, 0x098A, 0x1200}, ++ {0, 0x0990, 0xC0EC}, ++ {0, 0x0992, 0xFD}, ++ {0, 0x0994, 0x30C2}, ++ {0, 0x0996, 0xFC06}, ++ {0, 0x0998, 0xC1FD}, ++ {0, 0x099a, 0x30C5}, ++ {0, 0x099c, 0x101}, ++ {0, 0x099e, 0x1FC}, ++ {0, 0x098A, 0x1210}, ++ {0, 0x0990, 0x30C2}, ++ {0, 0x0992, 0xFD06}, ++ {0, 0x0994, 0xC720}, ++ {0, 0x0996, 0x227F}, ++ {0, 0x0998, 0x30C4}, ++ {0, 0x099a, 0xDE1D}, ++ {0, 0x099c, 0xEC25}, ++ {0, 0x099e, 0xFD30}, ++ {0, 0x098A, 0x1220}, ++ {0, 0x0990, 0xC5FC}, ++ {0, 0x0992, 0x6D6}, ++ {0, 0x0994, 0xFD30}, ++ {0, 0x0996, 0xC701}, ++ {0, 0x0998, 0xFC30}, ++ {0, 0x099a, 0xC0FD}, ++ {0, 0x099c, 0x6D0}, ++ {0, 0x099e, 0xFC30}, ++ {0, 0x098A, 0x1230}, ++ {0, 0x0990, 0xC2FD}, ++ {0, 0x0992, 0x6D2}, ++ {0, 0x0994, 0xEC25}, ++ {0, 0x0996, 0xFD06}, ++ {0, 0x0998, 0xC3BD}, ++ {0, 0x099a, 0x953C}, ++ {0, 0x099c, 0xDE3F}, ++ {0, 0x099e, 0xEE10}, ++ {0, 0x098A, 0x1240}, ++ {0, 0x0990, 0xAD00}, ++ {0, 0x0992, 0x3838}, ++ {0, 0x0994, 0x3930}, ++ {0, 0x0996, 0x8FC3}, ++ {0, 0x0998, 0xFFE9}, ++ {0, 0x099a, 0x8F35}, ++ {0, 0x099c, 0xBDAD}, ++ {0, 0x099e, 0x1530}, ++ {0, 0x098A, 0x1250}, ++ {0, 0x0990, 0x6F16}, ++ {0, 0x0992, 0x18DE}, ++ {0, 0x0994, 0x1918}, ++ {0, 0x0996, 0x8FC3}, ++ {0, 0x0998, 0x14B}, ++ {0, 0x099a, 0x188F}, ++ {0, 0x099c, 0x18EC}, ++ {0, 0x099e, 0xFD}, ++ {0, 0x098A, 0x1260}, ++ {0, 0x0990, 0x50E}, ++ {0, 0x0992, 0x18EC}, ++ {0, 0x0994, 0x2FD}, ++ {0, 0x0996, 0x510}, ++ {0, 0x0998, 0xE616}, ++ {0, 0x099a, 0x4FED}, ++ {0, 0x099c, 0x418}, ++ {0, 0x099e, 0x8FC3}, ++ {0, 0x098A, 0x1270}, ++ {0, 0x0990, 0xFFCB}, ++ {0, 0x0992, 0xE304}, ++ {0, 0x0994, 0x8FE6}, ++ {0, 0x0996, 0xF7}, ++ {0, 0x0998, 0x514}, ++ {0, 0x099a, 0x18DE}, ++ {0, 0x099c, 0x1930}, ++ {0, 0x099e, 0xE616}, ++ {0, 0x098A, 0x1280}, ++ {0, 0x0990, 0x4FED}, ++ {0, 0x0992, 0x418}, ++ {0, 0x0994, 0x8FC3}, ++ {0, 0x0996, 0x119}, ++ {0, 0x0998, 0xE304}, ++ {0, 0x099a, 0x8FE6}, ++ {0, 0x099c, 0xF7}, ++ {0, 0x099e, 0x515}, ++ {0, 0x098A, 0x1290}, ++ {0, 0x0990, 0xFC05}, ++ {0, 0x0992, 0x5BFD}, ++ {0, 0x0994, 0x512}, ++ {0, 0x0996, 0xDE37}, ++ {0, 0x0998, 0xEE08}, ++ {0, 0x099a, 0xAD00}, ++ {0, 0x099c, 0x30E6}, ++ {0, 0x099e, 0x164F}, ++ {0, 0x098A, 0x12A0}, ++ {0, 0x0990, 0x5ED}, ++ {0, 0x0992, 0x48F}, ++ {0, 0x0994, 0xC300}, ++ {0, 0x0996, 0x630}, ++ {0, 0x0998, 0xE304}, ++ {0, 0x099a, 0x8FF6}, ++ {0, 0x099c, 0x516}, ++ {0, 0x099e, 0x4FED}, ++ {0, 0x098A, 0x12B0}, ++ {0, 0x0990, 0x30}, ++ {0, 0x0992, 0x6C16}, ++ {0, 0x0994, 0xE616}, ++ {0, 0x0996, 0xC103}, ++ {0, 0x0998, 0x2598}, ++ {0, 0x099a, 0xCC32}, ++ {0, 0x099c, 0x8EED}, ++ {0, 0x099e, 0xEC}, ++ {0, 0x098A, 0x12C0}, ++ {0, 0x0990, 0x6BD}, ++ {0, 0x0992, 0x7021}, ++ {0, 0x0994, 0xCC32}, ++ {0, 0x0996, 0x6C30}, ++ {0, 0x0998, 0xED02}, ++ {0, 0x099a, 0xCCF8}, ++ {0, 0x099c, 0xED}, ++ {0, 0x099e, 0xA6}, ++ {0, 0x098A, 0x12D0}, ++ {0, 0x0990, 0x9E3}, ++ {0, 0x0992, 0xA84}, ++ {0, 0x0994, 0x7BD}, ++ {0, 0x0996, 0x706D}, ++ {0, 0x0998, 0x30C6}, ++ {0, 0x099a, 0x173A}, ++ {0, 0x099c, 0x3539}, ++ {0, 0x099e, 0x3CBD}, ++ {0, 0x098A, 0x12E0}, ++ {0, 0x0990, 0x776D}, ++ {0, 0x0992, 0xCC32}, ++ {0, 0x0994, 0x5C30}, ++ {0, 0x0996, 0xED00}, ++ {0, 0x0998, 0xFC13}, ++ {0, 0x099a, 0x8683}, ++ {0, 0x099c, 0x1}, ++ {0, 0x099e, 0xBD70}, ++ {0, 0x098A, 0x12F0}, ++ {0, 0x0990, 0x21CC}, ++ {0, 0x0992, 0x325E}, ++ {0, 0x0994, 0x30ED}, ++ {0, 0x0996, 0xFC}, ++ {0, 0x0998, 0x1388}, ++ {0, 0x099a, 0x8300}, ++ {0, 0x099c, 0x1BD}, ++ {0, 0x099e, 0x7021}, ++ {0, 0x098A, 0x1300}, ++ {0, 0x0990, 0x3839}, ++ {0, 0x098E, 0x0010}, ++ {0, 0x0990, 0x1000}, ++ {0, 0x098E, 0x0003}, ++ {100, 0x0990, 0x0004} ++}; ++ ++mt9t111_regs def_regs1[] ={ ++ {0, 0x001A, 0x0218}, ++ {0, 0x001E, 0x0777}, ++ {0, 0x3084, 0x2409}, ++ {0, 0x3092, 0x0A49}, ++ {0, 0x3094, 0x4949}, ++ {0, 0x3096, 0x4950}, ++ {0, 0x0018, 0x402D}, ++ {100, 0x0018, 0x402C}, ++ {0, 0x098E, 0x6800}, ++ {0, 0x0990, 0x0280}, ++ {0, 0x098E, 0x6802}, ++ {0, 0x0990, 0x01E0}, ++ {0, 0x098E, 0xE88E}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0x68A0}, ++ {0, 0x0990, 0x082D}, ++ {0, 0x098E, 0x4802}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0x4804}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0x4806}, ++ {0, 0x0990, 0x060D}, ++ {0, 0x098E, 0x4808}, ++ {0, 0x0990, 0x080D}, ++ {0, 0x098E, 0x480A}, ++ {0, 0x0990, 0x0111}, ++ {0, 0x098E, 0x480C}, ++ {0, 0x0990, 0x046C}, ++ {0, 0x098E, 0x480F}, ++ {0, 0x0990, 0x00CC}, ++ {0, 0x098E, 0x4811}, ++ {0, 0x0990, 0x0381}, ++ {0, 0x098E, 0x4813}, ++ {0, 0x0990, 0x024F}, ++ {0, 0x098E, 0x481D}, ++ {0, 0x0990, 0x05AE}, ++ {0, 0x098E, 0x481F}, ++ {0, 0x0990, 0x05D0}, ++ {0, 0x098E, 0x4825}, ++ {0, 0x0990, 0x07AC}, ++ {0, 0x098E, 0x6C00}, ++ {0, 0x0990, 0x0800}, ++ {0, 0x098E, 0x6C02}, ++ {0, 0x0990, 0x0600}, ++ {0, 0x098E, 0xEC8E}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0x6CA0}, ++ {0, 0x0990, 0x082D}, ++ {0, 0x098E, 0x484A}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0x484C}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0x484E}, ++ {0, 0x0990, 0x060D}, ++ {0, 0x098E, 0x4850}, ++ {0, 0x0990, 0x080D}, ++ {0, 0x098E, 0x4852}, ++ {0, 0x0990, 0x0111}, ++ {0, 0x098E, 0x4854}, ++ {0, 0x0990, 0x146C}, ++ {0, 0x098E, 0x4857}, ++ {0, 0x0990, 0x00CC}, ++ {0, 0x098E, 0x4859}, ++ {0, 0x0990, 0x0381}, ++ {0, 0x098E, 0x485B}, ++ {0, 0x0990, 0x024F}, ++ {0, 0x098E, 0x4865}, ++ {0, 0x0990, 0x05AE}, ++ {0, 0x098E, 0x4867}, ++ {0, 0x0990, 0x05D0}, ++ {0, 0x098E, 0x486D}, ++ {0, 0x0990, 0x07AC}, ++ {0, 0x098E, 0xC8A5}, ++ {0, 0x0990, 0x001D}, ++ {0, 0x098E, 0xC8A6}, ++ {0, 0x0990, 0x0020}, ++ {0, 0x098E, 0xC8A7}, ++ {0, 0x0990, 0x0023}, ++ {0, 0x098E, 0xC8A8}, ++ {0, 0x0990, 0x0026}, ++ {0, 0x098E, 0xC844}, ++ {0, 0x0990, 0x0091}, ++ {0, 0x098E, 0xC92F}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xC845}, ++ {0, 0x0990, 0x0079}, ++ {0, 0x098E, 0xC92D}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xC88C}, ++ {0, 0x0990, 0x0091}, ++ {0, 0x098E, 0xC930}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xC88D}, ++ {0, 0x0990, 0x0079}, ++ {0, 0x098E, 0xC92E}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xA002}, ++ {0, 0x0990, 0x0010}, ++ {0, 0x098E, 0xA009}, ++ {0, 0x0990, 0x0002}, ++ {0, 0x098E, 0xA00A}, ++ {0, 0x0990, 0x0003}, ++ {0, 0x098E, 0xA00C}, ++ {0, 0x0990, 0x000A}, ++ {0, 0x098E, 0x4846}, ++ {0, 0x0990, 0x0014}, ++ {0, 0x098E, 0x68AA}, ++ {0, 0x0990, 0x0278}, ++ {0, 0x098E, 0x488E}, ++ {0, 0x0990, 0x0014}, ++ {0, 0x098E, 0x6CAA}, ++ {0, 0x0990, 0x0218}, ++ {0, 0x098E, 0x8400}, ++ {0, 0x0990, 0x0006}, ++ {0, 0x098E, 0x8400}, ++ {0, 0x0990, 0x0005}, ++ {0, 0x3C20, 0x0001}, ++ {0, 0x364A, 0x7D2F}, ++ {0, 0x364C, 0x79EB}, ++ {0, 0x364E, 0x18D2}, ++ {0, 0x3650, 0x9F8F}, ++ {0, 0x3652, 0xA7D2}, ++ {0, 0x368A, 0x460C}, ++ {0, 0x368C, 0x14F0}, ++ {0, 0x368E, 0x946F}, ++ {0, 0x3690, 0xC471}, ++ {0, 0x3692, 0x04B1}, ++ {0, 0x36CA, 0x0433}, ++ {0, 0x36CC, 0x680D}, ++ {0, 0x36CE, 0xEEF3}, ++ {0, 0x36D0, 0x4850}, ++ {0, 0x36D2, 0xF233}, ++ {0, 0x370A, 0xB2AF}, ++ {0, 0x370C, 0x2CF0}, ++ {0, 0x370E, 0x3F10}, ++ {0, 0x3710, 0xC673}, ++ {0, 0x3712, 0xA972}, ++ {0, 0x374A, 0x0590}, ++ {0, 0x374C, 0xAFB3}, ++ {0, 0x374E, 0x93D7}, ++ {0, 0x3750, 0x8D12}, ++ {0, 0x3752, 0x2539}, ++ {0, 0x3640, 0x0350}, ++ {0, 0x3642, 0x322C}, ++ {0, 0x3644, 0x77D1}, ++ {0, 0x3646, 0xA26F}, ++ {0, 0x3648, 0xC872}, ++ {0, 0x3680, 0x0C4C}, ++ {0, 0x3682, 0x9510}, ++ {0, 0x3684, 0x110E}, ++ {0, 0x3686, 0x4331}, ++ {0, 0x3688, 0xC1CF}, ++ {0, 0x36C0, 0x6152}, ++ {0, 0x36C2, 0x038E}, ++ {0, 0x36C4, 0x9AF4}, ++ {0, 0x36C6, 0xE12F}, ++ {0, 0x36C8, 0x09F3}, ++ {0, 0x3700, 0xC5AF}, ++ {0, 0x3702, 0xCA90}, ++ {0, 0x3704, 0x5D0F}, ++ {0, 0x3706, 0x3293}, ++ {0, 0x3708, 0x2B92}, ++ {0, 0x3740, 0xC590}, ++ {0, 0x3742, 0x8133}, ++ {0, 0x3744, 0xE0F6}, ++ {0, 0x3746, 0x0254}, ++ {0, 0x3748, 0x10B9}, ++ {0, 0x3654, 0x7F8F}, ++ {0, 0x3656, 0x6F6C}, ++ {0, 0x3658, 0x5971}, ++ {0, 0x365A, 0x9A0F}, ++ {0, 0x365C, 0xA1B2}, ++ {0, 0x3694, 0xB00C}, ++ {0, 0x3696, 0xEBCF}, ++ {0, 0x3698, 0x06AD}, ++ {0, 0x369A, 0x4D31}, ++ {0, 0x369C, 0x2A4E}, ++ {0, 0x36D4, 0x4752}, ++ {0, 0x36D6, 0x724D}, ++ {0, 0x36D8, 0xAD34}, ++ {0, 0x36DA, 0x1350}, ++ {0, 0x36DC, 0x4E94}, ++ {0, 0x3714, 0xA06E}, ++ {0, 0x3716, 0x9152}, ++ {0, 0x3718, 0x1F53}, ++ {0, 0x371A, 0x3933}, ++ {0, 0x371C, 0xBA94}, ++ {0, 0x3754, 0x1233}, ++ {0, 0x3756, 0xA032}, ++ {0, 0x3758, 0xE936}, ++ {0, 0x375A, 0xBE34}, ++ {0, 0x375C, 0x02D9}, ++ {0, 0x365E, 0x7DEF}, ++ {0, 0x3660, 0x434B}, ++ {0, 0x3662, 0x69F1}, ++ {0, 0x3664, 0x8A0F}, ++ {0, 0x3666, 0xBDB2}, ++ {0, 0x369E, 0x290D}, ++ {0, 0x36A0, 0x42CF}, ++ {0, 0x36A2, 0xDC6D}, ++ {0, 0x36A4, 0x91B1}, ++ {0, 0x36A6, 0x9DE9}, ++ {0, 0x36DE, 0x70B2}, ++ {0, 0x36E0, 0x02AC}, ++ {0, 0x36E2, 0x9714}, ++ {0, 0x36E4, 0xF3CF}, ++ {0, 0x36E6, 0x6BD1}, ++ {0, 0x371E, 0xE42E}, ++ {0, 0x3720, 0x1D32}, ++ {0, 0x3722, 0xCC31}, ++ {0, 0x3724, 0xAE94}, ++ {0, 0x3726, 0x6413}, ++ {0, 0x375E, 0xE290}, ++ {0, 0x3760, 0x8F53}, ++ {0, 0x3762, 0xF936}, ++ {0, 0x3764, 0x4614}, ++ {0, 0x3766, 0x1B59}, ++ {0, 0x3784, 0x0404}, ++ {0, 0x3782, 0x0304}, ++ {0, 0x3210, 0x01B8}, ++ {0, 0x098E, 0xC913}, ++ {0, 0x0990, 0x000A}, ++ {0, 0x098E, 0x686B}, ++ {0, 0x0990, 0x05DC}, ++ {0, 0x098E, 0x686D}, ++ {0, 0x0990, 0x0BB8}, ++ {0, 0x098E, 0x6C6B}, ++ {0, 0x0990, 0x05DC}, ++ {0, 0x098E, 0x6C6D}, ++ {0, 0x0990, 0x0BB8}, ++ {0, 0x098E, 0x3439}, ++ {0, 0x0990, 0x05DC}, ++ {0, 0x098E, 0x343B}, ++ {0, 0x0990, 0x0BB8}, ++ {0, 0x098E, 0x4926}, ++ {0, 0x0990, 0x0001}, ++ {0, 0x098E, 0x4928}, ++ {0, 0x0990, 0x0002}, ++ {0, 0x098E, 0x492A}, ++ {0, 0x0990, 0x0656}, ++ {0, 0x098E, 0x4D26}, ++ {0, 0x0990, 0x0001}, ++ {0, 0x098E, 0x4D28}, ++ {0, 0x0990, 0x0002}, ++ {0, 0x098E, 0x4D2A}, ++ {0, 0x0990, 0x0656}, ++ {0, 0x33F4, 0x040B}, ++ {0, 0x098E, 0xC916}, ++ {0, 0x0990, 0x0014}, ++ {0, 0x098E, 0xC919}, ++ {0, 0x0990, 0x0028}, ++ {0, 0x098E, 0xC917}, ++ {0, 0x0990, 0x0004}, ++ {0, 0x098E, 0xC918}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xC91A}, ++ {0, 0x0990, 0x0001}, ++ {0, 0x098E, 0xC91B}, ++ {0, 0x0990, 0x0009}, ++ {0, 0x326C, 0x0C00}, ++ {0, 0x098E, 0x494B}, ++ {0, 0x0990, 0x0042}, ++ {0, 0x098E, 0x494D}, ++ {0, 0x0990, 0x012C}, ++ {0, 0x098E, 0xC91E}, ++ {0, 0x0990, 0x0012}, ++ {0, 0x098E, 0xC91F}, ++ {0, 0x0990, 0x000A}, ++ {0, 0x098E, 0xC920}, ++ {0, 0x0990, 0x0012}, ++ {0, 0x098E, 0xC921}, ++ {0, 0x0990, 0x000A}, ++ {0, 0x098E, 0xC922}, ++ {0, 0x0990, 0x0026}, ++ {0, 0x098E, 0xC923}, ++ {0, 0x0990, 0x001E}, ++ {0, 0x098E, 0xC924}, ++ {0, 0x0990, 0x0026}, ++ {0, 0x098E, 0xC925}, ++ {0, 0x0990, 0x0026}, ++ {0, 0x098E, 0xBC02}, ++ {0, 0x0990, 0x0003}, ++ {0, 0x098E, 0xBC05}, ++ {0, 0x0990, 0x000E}, ++ {0, 0x098E, 0xC950}, ++ {0, 0x0990, 0x0064}, ++ {0, 0x098E, 0xC94F}, ++ {0, 0x0990, 0x0038}, ++ {0, 0x098E, 0xC952}, ++ {0, 0x0990, 0x0064}, ++ {0, 0x098E, 0xC951}, ++ {0, 0x0990, 0x0051}, ++ {0, 0x098E, 0xC954}, ++ {0, 0x0990, 0x0010}, ++ {0, 0x098E, 0xC953}, ++ {0, 0x0990, 0x0020}, ++ {0, 0x098E, 0xC956}, ++ {0, 0x0990, 0x0010}, ++ {0, 0x098E, 0xC955}, ++ {0, 0x0990, 0x0020}, ++ {0, 0x098E, 0xC958}, ++ {0, 0x0990, 0x0020}, ++ {0, 0x098E, 0xC957}, ++ {0, 0x0990, 0x0014}, ++ {0, 0x098E, 0xC95A}, ++ {0, 0x0990, 0x001D}, ++ {0, 0x098E, 0xC959}, ++ {0, 0x0990, 0x0020}, ++ {0, 0x098E, 0xC95C}, ++ {0, 0x0990, 0x000C}, ++ {0, 0x098E, 0xC95B}, ++ {0, 0x0990, 0x0008}, ++ {0, 0x098E, 0xC95E}, ++ {0, 0x0990, 0x000C}, ++ {0, 0x098E, 0xC95D}, ++ {0, 0x0990, 0x0008}, ++ {0, 0x098E, 0xC95F}, ++ {0, 0x0990, 0x0064}, ++ {0, 0x098E, 0x48DC}, ++ {0, 0x0990, 0x004D}, ++ {0, 0x098E, 0x48DE}, ++ {0, 0x0990, 0x0096}, ++ {0, 0x098E, 0x48E0}, ++ {0, 0x0990, 0x001D}, ++ {0, 0x098E, 0x48E2}, ++ {0, 0x0990, 0x004D}, ++ {0, 0x098E, 0x48E4}, ++ {0, 0x0990, 0x0096}, ++ {0, 0x098E, 0x48E6}, ++ {0, 0x0990, 0x001D}, ++ {0, 0x098E, 0x48E8}, ++ {0, 0x0990, 0x004D}, ++ {0, 0x098E, 0x48EA}, ++ {0, 0x0990, 0x0096}, ++ {0, 0x098E, 0x48EC}, ++ {0, 0x0990, 0x001D}, ++ {0, 0x098E, 0xDC2A}, ++ {0, 0x0990, 0x000B}, ++ {0, 0x098E, 0xDC2B}, ++ {0, 0x0990, 0x0017}, ++ {0, 0x098E, 0xBC0B}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xBC0C}, ++ {0, 0x0990, 0x001B}, ++ {0, 0x098E, 0xBC0D}, ++ {0, 0x0990, 0x002A}, ++ {0, 0x098E, 0xBC0E}, ++ {0, 0x0990, 0x003E}, ++ {0, 0x098E, 0xBC0F}, ++ {0, 0x0990, 0x005A}, ++ {0, 0x098E, 0xBC10}, ++ {0, 0x0990, 0x0070}, ++ {0, 0x098E, 0xBC11}, ++ {0, 0x0990, 0x0081}, ++ {0, 0x098E, 0xBC12}, ++ {0, 0x0990, 0x0090}, ++ {0, 0x098E, 0xBC13}, ++ {0, 0x0990, 0x009E}, ++ {0, 0x098E, 0xBC14}, ++ {0, 0x0990, 0x00AB}, ++ {0, 0x098E, 0xBC15}, ++ {0, 0x0990, 0x00B6}, ++ {0, 0x098E, 0xBC16}, ++ {0, 0x0990, 0x00C1}, ++ {0, 0x098E, 0xBC17}, ++ {0, 0x0990, 0x00CB}, ++ {0, 0x098E, 0xBC18}, ++ {0, 0x0990, 0x00D5}, ++ {0, 0x098E, 0xBC19}, ++ {0, 0x0990, 0x00DE}, ++ {0, 0x098E, 0xBC1A}, ++ {0, 0x0990, 0x00E7}, ++ {0, 0x098E, 0xBC1B}, ++ {0, 0x0990, 0x00EF}, ++ {0, 0x098E, 0xBC1C}, ++ {0, 0x0990, 0x00F7}, ++ {0, 0x098E, 0xBC1D}, ++ {0, 0x0990, 0x00FF}, ++ {0, 0x098E, 0xBC1E}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xBC1F}, ++ {0, 0x0990, 0x001B}, ++ {0, 0x098E, 0xBC20}, ++ {0, 0x0990, 0x002A}, ++ {0, 0x098E, 0xBC21}, ++ {0, 0x0990, 0x003E}, ++ {0, 0x098E, 0xBC22}, ++ {0, 0x0990, 0x005A}, ++ {0, 0x098E, 0xBC23}, ++ {0, 0x0990, 0x0070}, ++ {0, 0x098E, 0xBC24}, ++ {0, 0x0990, 0x0081}, ++ {0, 0x098E, 0xBC25}, ++ {0, 0x0990, 0x0090}, ++ {0, 0x098E, 0xBC26}, ++ {0, 0x0990, 0x009E}, ++ {0, 0x098E, 0xBC27}, ++ {0, 0x0990, 0x00AB}, ++ {0, 0x098E, 0xBC28}, ++ {0, 0x0990, 0x00B6}, ++ {0, 0x098E, 0xBC29}, ++ {0, 0x0990, 0x00C1}, ++ {0, 0x098E, 0xBC2A}, ++ {0, 0x0990, 0x00CB}, ++ {0, 0x098E, 0xBC2B}, ++ {0, 0x0990, 0x00D5}, ++ {0, 0x098E, 0xBC2C}, ++ {0, 0x0990, 0x00DE}, ++ {0, 0x098E, 0xBC2D}, ++ {0, 0x0990, 0x00E7}, ++ {0, 0x098E, 0xBC2E}, ++ {0, 0x0990, 0x00EF}, ++ {0, 0x098E, 0xBC2F}, ++ {0, 0x0990, 0x00F7}, ++ {0, 0x098E, 0xBC30}, ++ {0, 0x0990, 0x00FF}, ++ {0, 0x098E, 0xBC31}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xBC32}, ++ {0, 0x0990, 0x000D}, ++ {0, 0x098E, 0xBC33}, ++ {0, 0x0990, 0x0019}, ++ {0, 0x098E, 0xBC34}, ++ {0, 0x0990, 0x0030}, ++ {0, 0x098E, 0xBC35}, ++ {0, 0x0990, 0x0056}, ++ {0, 0x098E, 0xBC36}, ++ {0, 0x0990, 0x0070}, ++ {0, 0x098E, 0xBC37}, ++ {0, 0x0990, 0x0081}, ++ {0, 0x098E, 0xBC38}, ++ {0, 0x0990, 0x0090}, ++ {0, 0x098E, 0xBC39}, ++ {0, 0x0990, 0x009E}, ++ {0, 0x098E, 0xBC3A}, ++ {0, 0x0990, 0x00AB}, ++ {0, 0x098E, 0xBC3B}, ++ {0, 0x0990, 0x00B6}, ++ {0, 0x098E, 0xBC3C}, ++ {0, 0x0990, 0x00C1}, ++ {0, 0x098E, 0xBC3D}, ++ {0, 0x0990, 0x00CB}, ++ {0, 0x098E, 0xBC3E}, ++ {0, 0x0990, 0x00D5}, ++ {0, 0x098E, 0xBC3F}, ++ {0, 0x0990, 0x00DE}, ++ {0, 0x098E, 0xBC40}, ++ {0, 0x0990, 0x00E7}, ++ {0, 0x098E, 0xBC41}, ++ {0, 0x0990, 0x00EF}, ++ {0, 0x098E, 0xBC42}, ++ {0, 0x0990, 0x00F7}, ++ {0, 0x098E, 0xBC43}, ++ {0, 0x0990, 0x00FF}, ++ {0, 0x098E, 0x6865}, ++ {0, 0x0990, 0x00E0}, ++ {0, 0x098E, 0x6867}, ++ {0, 0x0990, 0x00F4}, ++ {0, 0x098E, 0x8400}, ++ {0, 0x0990, 0x0006}, ++ {0, 0x098E, 0xBC4A}, ++ {0, 0x0990, 0x007F}, ++ {0, 0x098E, 0xBC4B}, ++ {0, 0x0990, 0x007F}, ++ {0, 0x098E, 0xBC4C}, ++ {0, 0x0990, 0x007F}, ++ {0, 0x3542, 0x0010}, ++ {0, 0x3544, 0x0030}, ++ {0, 0x3546, 0x0040}, ++ {0, 0x3548, 0x0080}, ++ {0, 0x354A, 0x0100}, ++ {0, 0x354C, 0x0200}, ++ {0, 0x354E, 0x0300}, ++ {0, 0x3550, 0x0010}, ++ {0, 0x3552, 0x0030}, ++ {0, 0x3554, 0x0040}, ++ {0, 0x3556, 0x0080}, ++ {0, 0x3558, 0x012C}, ++ {0, 0x355A, 0x0320}, ++ {0, 0x355C, 0x03E8}, ++ {0, 0x3560, 0x0040}, ++ {0, 0x3562, 0x0020}, ++ {0, 0x3564, 0x0040}, ++ {0, 0x3566, 0x0010}, ++ {0, 0x3568, 0x0008}, ++ {0, 0x356A, 0x0004}, ++ {0, 0x356C, 0x0004}, ++ {0, 0x356E, 0x0004}, ++ {0, 0x098E, 0x3C4D}, ++ {0, 0x0990, 0x0DAC}, ++ {0, 0x098E, 0x3C4F}, ++ {0, 0x0990, 0x148A}, ++ {0, 0x098E, 0xC911}, ++ {0, 0x0990, 0x00C8}, ++ {0, 0x098E, 0xC8F4}, ++ {0, 0x0990, 0x0004}, ++ {0, 0x098E, 0xC8F5}, ++ {0, 0x0990, 0x0002}, ++ {0, 0x098E, 0x48F6}, ++ {0, 0x0990, 0x3B4D}, ++ {0, 0x098E, 0x48F8}, ++ {0, 0x0990, 0x6380}, ++ {0, 0x098E, 0x48FA}, ++ {0, 0x0990, 0x9B18}, ++ {0, 0x098E, 0x48FC}, ++ {0, 0x0990, 0x5D51}, ++ {0, 0x098E, 0x48FE}, ++ {0, 0x0990, 0xEDE8}, ++ {0, 0x098E, 0x4900}, ++ {0, 0x0990, 0xE515}, ++ {0, 0x098E, 0x4902}, ++ {0, 0x0990, 0xBFF4}, ++ {0, 0x098E, 0x4904}, ++ {0, 0x0990, 0x001E}, ++ {0, 0x098E, 0x4906}, ++ {0, 0x0990, 0x0026}, ++ {0, 0x098E, 0x4908}, ++ {0, 0x0990, 0x0033}, ++ {0, 0x098E, 0xE84A}, ++ {0, 0x0990, 0x0083}, ++ {0, 0x098E, 0xE84D}, ++ {0, 0x0990, 0x0083}, ++ {0, 0x098E, 0xE84C}, ++ {0, 0x0990, 0x0080}, ++ {0, 0x098E, 0xE84F}, ++ {0, 0x0990, 0x0080}, ++ {0, 0x098E, 0x8400}, ++ {0, 0x0990, 0x0006}, ++ {0, 0x098E, 0x48B0}, ++ {0, 0x0990, 0x0180}, ++ {0, 0x098E, 0x48B2}, ++ {0, 0x0990, 0xFF7A}, ++ {0, 0x098E, 0x48B4}, ++ {0, 0x0990, 0x0018}, ++ {0, 0x098E, 0x48B6}, ++ {0, 0x0990, 0xFFCA}, ++ {0, 0x098E, 0x48B8}, ++ {0, 0x0990, 0x017C}, ++ {0, 0x098E, 0x48BA}, ++ {0, 0x0990, 0xFFCC}, ++ {0, 0x098E, 0x48BC}, ++ {0, 0x0990, 0x000C}, ++ {0, 0x098E, 0x48BE}, ++ {0, 0x0990, 0xFF1F}, ++ {0, 0x098E, 0x48C0}, ++ {0, 0x0990, 0x01E8}, ++ {0, 0x098E, 0x48C2}, ++ {0, 0x0990, 0x0020}, ++ {0, 0x098E, 0x48C4}, ++ {0, 0x0990, 0x0044}, ++ {0, 0x098E, 0x48C6}, ++ {0, 0x0990, 0x0079}, ++ {0, 0x098E, 0x48C8}, ++ {0, 0x0990, 0xFFAD}, ++ {0, 0x098E, 0x48CA}, ++ {0, 0x0990, 0xFFE2}, ++ {0, 0x098E, 0x48CC}, ++ {0, 0x0990, 0x0033}, ++ {0, 0x098E, 0x48CE}, ++ {0, 0x0990, 0x002A}, ++ {0, 0x098E, 0x48D0}, ++ {0, 0x0990, 0xFFAA}, ++ {0, 0x098E, 0x48D2}, ++ {0, 0x0990, 0x0017}, ++ {0, 0x098E, 0x48D4}, ++ {0, 0x0990, 0x004B}, ++ {0, 0x098E, 0x48D6}, ++ {0, 0x0990, 0xFFA5}, ++ {0, 0x098E, 0x48D8}, ++ {0, 0x0990, 0x0015}, ++ {0, 0x098E, 0x48DA}, ++ {0, 0x0990, 0xFFE2}, ++ {0, 0x35A2, 0x0014}, ++ {0, 0x098E, 0xC949}, ++ {0, 0x0990, 0x0024}, ++ {0, 0x35A4, 0x0596}, ++ {0, 0x098E, 0xC94A}, ++ {0, 0x0990, 0x0062}, ++ {0, 0x098E, 0xC948}, ++ {0, 0x0990, 0x0006}, ++ {0, 0x098E, 0xC914}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xC915}, ++ {0, 0x0990, 0x00FF}, ++ {0, 0x098E, 0xE86F}, ++ {0, 0x0990, 0x0060}, ++ {0, 0x098E, 0xE870}, ++ {0, 0x0990, 0x003C}, ++ {0, 0x098E, 0xEC6F}, ++ {0, 0x0990, 0x0060}, ++ {0, 0x098E, 0xEC70}, ++ {0, 0x0990, 0x003C}, ++ {0, 0x098E, 0xE883}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xEC83}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0x8400}, ++ {0, 0x0990, 0x0006}, ++ {0, 0x098E, 0xE885}, ++ {0, 0x0990, 0x001E}, ++ {0, 0x098E, 0xE886}, ++ {0, 0x0990, 0x00D8}, ++ {0, 0x098E, 0xEC85}, ++ {0, 0x0990, 0x001E}, ++ {0, 0x098E, 0xEC86}, ++ {0, 0x0990, 0x00D8}, ++ {0, 0x098E, 0xE884}, ++ {0, 0x0990, 0x005C}, ++ {0, 0x098E, 0xEC84}, ++ {0, 0x0990, 0x005C}, ++ {0, 0x098E, 0x490A}, ++ {0, 0x0990, 0x0666}, ++ {0, 0x098E, 0x490C}, ++ {0, 0x0990, 0x0140}, ++ {0, 0x098E, 0x6857}, ++ {0, 0x0990, 0x0014}, ++ {0, 0x098E, 0x685C}, ++ {0, 0x0990, 0x0005}, ++ {0, 0x098E, 0x490E}, ++ {0, 0x0990, 0x00A4}, ++ {0, 0x098E, 0xB43D}, ++ {0, 0x0990, 0x0031}, ++ {0, 0x098E, 0xB43E}, ++ {0, 0x0990, 0x001B}, ++ {0, 0x098E, 0xB43F}, ++ {0, 0x0990, 0x0028}, ++ {0, 0x098E, 0xB440}, ++ {0, 0x0990, 0x0003}, ++ {0, 0x098E, 0xB441}, ++ {0, 0x0990, 0x00CD}, ++ {0, 0x098E, 0xB442}, ++ {0, 0x0990, 0x0064}, ++ {0, 0x098E, 0xB443}, ++ {0, 0x0990, 0x000F}, ++ {0, 0x098E, 0xB444}, ++ {0, 0x0990, 0x0007}, ++ {0, 0x098E, 0x300D}, ++ {0, 0x0990, 0x000F}, ++ {0, 0x098E, 0x3017}, ++ {0, 0x0990, 0x0F0F}, ++ {0, 0x098E, 0x8400}, ++ {0, 0x0990, 0x0006}, ++ {0, 0x098E, 0xE81F}, ++ {0, 0x0990, 0x0020}, ++ {0, 0x098E, 0x68A0}, ++ {0, 0x0990, 0x082E}, ++ {0, 0x098E, 0x6CA0}, ++ {0, 0x0990, 0x082E}, ++ {0, 0x098E, 0x70A0}, ++ {0, 0x0990, 0x082E}, ++ {0, 0x098E, 0x74A0}, ++ {0, 0x0990, 0x082E}, ++ {0, 0x3C52, 0x082E}, ++ {0, 0x098E, 0x488E}, ++ {0, 0x0990, 0x0020}, ++ {0, 0x098E, 0xECAC}, ++ {0, 0x0990, 0x0000} ++}; ++ ++mt9t111_regs def_regs2[] = { ++ {100, 0x0018, 0x0028}, ++ {0, 0x316C, 0x350F}, ++ {0, 0x098E, 0x6817}, ++ {0, 0x0990, 0x000C}, ++ {0, 0x0034, 0x0000} ++}; ++ ++mt9t111_regs pll_regs1[] = { ++ {0, 0x0014, 0x2425}, ++ {0, 0x0014, 0x2425}, ++ {0, 0x0014, 0x2145}, ++ {0, 0x0010, 0x0219}, ++ {0, 0x0012, 0x0090}, ++ {0, 0x002A, 0x79DD}, ++ {0, 0x0014, 0x2545}, ++ {0, 0x0014, 0x2547}, ++ {0, 0x0014, 0x3447}, ++ {0, 0x0014, 0x3047} ++}; ++ ++mt9t111_regs pll_regs2[] = { ++ {0, 0x0014, 0x3046}, ++ {0, 0x0022, 0x01E0}, ++ {0, 0x001E, 0x0707}, ++ {0, 0x3B84, 0x011D} ++}; ++ ++mt9t111_regs bayer_pattern_regs[] = { ++ {0, 0x098E, 0x6807}, ++ {0, 0x0990, 0x0100}, ++ {0, 0x098E, 0x6809}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xE88E}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0x6C07}, ++ {0, 0x0990, 0x0100}, ++ {0, 0x098E, 0x6C09}, ++ {0, 0x0990, 0x0000}, ++ {0, 0x098E, 0xEC8E}, ++ {0, 0x0990, 0x0000} ++}; ++ ++#endif +diff --git a/include/media/mt9t111.h b/include/media/mt9t111.h +new file mode 100644 +index 0000000..7acbeed +--- /dev/null ++++ b/include/media/mt9t111.h +@@ -0,0 +1,79 @@ ++/* ++ * include/media/mt9t111.h ++ * ++ * mt9t111 sensor driver ++ * ++ * Copyright (C) 2009 Leopard Imaging ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#ifndef MT9T111_H ++#define MT9T111_H ++ ++/********************************* ++ * Defines and Macros and globals ++ ********************************/ ++ ++#ifdef TRUE ++#undef TRUE ++#endif ++ ++#ifdef FALSE ++#undef FALSE ++#endif ++ ++#define TRUE 1 ++#define FALSE 0 ++ ++#ifdef DEBUG ++#undef DEBUG ++#endif ++ ++#ifndef TYPES ++#define TYPES ++#endif ++ ++#define MT9T111_I2C_REGISTERED (1) ++#define MT9T111_I2C_UNREGISTERED (0) ++ ++/*i2c adress for MT9T111*/ ++#define MT9T111_I2C_ADDR (0x78 >>1) ++ ++#define MT9T111_CLK_MAX (75000000) /* 75MHz */ ++#define MT9T111_CLK_MIN (6000000) /* 6Mhz */ ++ ++#define MT9T111_I2C_CONFIG (1) ++#define I2C_ONE_BYTE_TRANSFER (1) ++#define I2C_TWO_BYTE_TRANSFER (2) ++#define I2C_THREE_BYTE_TRANSFER (3) ++#define I2C_FOUR_BYTE_TRANSFER (4) ++#define I2C_TXRX_DATA_MASK (0x00FF) ++#define I2C_TXRX_DATA_MASK_UPPER (0xFF00) ++#define I2C_TXRX_DATA_SHIFT (8) ++ ++struct mt9t111_platform_data { ++ char *master; ++ int (*power_set) (enum v4l2_power on); ++ int (*ifparm) (struct v4l2_ifparm *p); ++ int (*priv_data_set) (void *); ++ /* Interface control params */ ++ bool clk_polarity; ++ bool hs_polarity; ++ bool vs_polarity; ++}; ++ ++/** ++ * struct capture_size - image capture size information ++ * @width: image width in pixels ++ * @height: image height in pixels ++ */ ++struct capture_size { ++ unsigned long width; ++ unsigned long height; ++}; ++ ++#endif /*for ifndef MT9T111 */ ++ +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0008-board-omap3beagle-ugly-copy-paste-job-to-get-mt9p111.patch b/recipes/linux/linux-omap-psp-2.6.32/0008-board-omap3beagle-ugly-copy-paste-job-to-get-mt9p111.patch new file mode 100644 index 0000000000..a009ec5194 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0008-board-omap3beagle-ugly-copy-paste-job-to-get-mt9p111.patch @@ -0,0 +1,214 @@ +From b1f02af6bdbf845ad928e0f046e737f9af000f11 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <k-kooi@ti.com> +Date: Tue, 9 Feb 2010 20:53:56 +0100 +Subject: [PATCH 08/30] board-omap3beagle: ugly copy/paste job to get mt9p111 sensor data in (only compile tested) + +--- + arch/arm/mach-omap2/board-omap3beagle.c | 169 +++++++++++++++++++++++++++++++ + 1 files changed, 169 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index accf80d..e63bec6 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -25,6 +25,12 @@ + #include <linux/input.h> + #include <linux/gpio_keys.h> + ++#include <media/v4l2-int-device.h> ++#include <media/mt9t111.h> ++ ++/* Include V4L2 ISP-Camera driver related header file */ ++#include <../drivers/media/video/omap34xxcam.h> ++ + #include <linux/mtd/mtd.h> + #include <linux/mtd/partitions.h> + #include <linux/mtd/nand.h> +@@ -441,6 +447,157 @@ static struct twl4030_platform_data beagle_twldata = { + .vpll2 = &beagle_vpll2, + }; + ++ ++#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE) ++static struct isp_interface_config mt9t111_if_config = { ++ .ccdc_par_ser = ISP_PARLL, ++ .dataline_shift = 0x0, ++ .hsvs_syncdetect = ISPCTRL_SYNC_DETECT_VSRISE, ++ .strobe = 0x0, ++ .prestrobe = 0x0, ++ .shutter = 0x0, ++ .u.par.par_bridge = 0x1, ++ .u.par.par_clk_pol = 0x0, ++}; ++ ++static struct v4l2_ifparm mt9t111_ifparm_s = { ++#if 1 ++ .if_type = V4L2_IF_TYPE_RAW, ++ .u = { ++ .raw = { ++ .frame_start_on_rising_vs = 1, ++ .bt_sync_correct = 0, ++ .swap = 0, ++ .latch_clk_inv = 0, ++ .nobt_hs_inv = 0, /* active high */ ++ .nobt_vs_inv = 0, /* active high */ ++ .clock_min = MT9T111_CLK_MIN, ++ .clock_max = MT9T111_CLK_MAX, ++ }, ++ }, ++#else ++ .if_type = V4L2_IF_TYPE_YCbCr, ++ .u = { ++ .ycbcr = { ++ .frame_start_on_rising_vs = 1, ++ .bt_sync_correct = 0, ++ .swap = 0, ++ .latch_clk_inv = 0, ++ .nobt_hs_inv = 0, /* active high */ ++ .nobt_vs_inv = 0, /* active high */ ++ .clock_min = MT9T111_CLK_MIN, ++ .clock_max = MT9T111_CLK_MAX, ++ }, ++ }, ++#endif ++}; ++ ++/** ++ * @brief mt9t111_ifparm - Returns the mt9t111 interface parameters ++ * ++ * @param p - pointer to v4l2_ifparm structure ++ * ++ * @return result of operation - 0 is success ++ */ ++static int mt9t111_ifparm(struct v4l2_ifparm *p) ++{ ++ if (p == NULL) ++ return -EINVAL; ++ ++ *p = mt9t111_ifparm_s; ++ return 0; ++} ++ ++#if defined(CONFIG_VIDEO_OMAP3_CAM) || defined(CONFIG_VIDEO_OMAP3_CAM_MODULE) ++static struct omap34xxcam_hw_config mt9t111_decoder_hwc = { ++ .dev_index = 0, ++ .dev_minor = 0, ++ .dev_type = OMAP34XXCAM_SLAVE_SENSOR, ++ .u.sensor.xclk = OMAP34XXCAM_XCLK_NONE, ++ .u.sensor.sensor_isp = 1, ++}; ++#endif ++ ++/** ++ * @brief mt9t111_set_prv_data - Returns mt9t111 omap34xx driver private data ++ * ++ * @param priv - pointer to omap34xxcam_hw_config structure ++ * ++ * @return result of operation - 0 is success ++ */ ++static int mt9t111_set_prv_data(void *priv) ++{ ++#if defined(CONFIG_VIDEO_OMAP3_CAM) || defined(CONFIG_VIDEO_OMAP3_CAM_MODULE) ++ struct omap34xxcam_hw_config *hwc = priv; ++ ++ if (priv == NULL) ++ return -EINVAL; ++ ++ hwc->u.sensor.sensor_isp = mt9t111_decoder_hwc.u.sensor.sensor_isp; ++ hwc->u.sensor.xclk = mt9t111_decoder_hwc.u.sensor.xclk; ++ hwc->dev_index = mt9t111_decoder_hwc.dev_index; ++ hwc->dev_minor = mt9t111_decoder_hwc.dev_minor; ++ hwc->dev_type = mt9t111_decoder_hwc.dev_type; ++ return 0; ++#else ++ return -EINVAL; ++#endif ++} ++ ++/** ++ * @brief mt9t111_power_set - Power-on or power-off TVP5146 device ++ * ++ * @param power - enum, Power on/off, resume/standby ++ * ++ * @return result of operation - 0 is success ++ */ ++static int mt9t111_power_set(enum v4l2_power power) ++{ ++ switch (power) { ++ case V4L2_POWER_OFF: ++ /* Disable mux for TVP5146 decoder data path */ ++// if (omap3evmdc_set_mux(MUX_CAMERA_SENSOR, DISABLE_MUX)) ++// return -ENODEV; ++ break; ++ ++ case V4L2_POWER_STANDBY: ++ break; ++ ++ case V4L2_POWER_ON: ++ /* Enable mux for expension camera data path */ ++// if (omap3evmdc_set_mux(MUX_CAMERA_SENSOR, ENABLE_MUX)) ++// return -ENODEV; ++ ++#if defined(CONFIG_VIDEO_OMAP3_CAM) || defined(CONFIG_VIDEO_OMAP3_CAM_MODULE) ++ isp_configure_interface(&mt9t111_if_config); ++#endif ++ break; ++ ++ default: ++ return -ENODEV; ++ break; ++ } ++ return 0; ++} ++ ++static struct mt9t111_platform_data mt9t111_pdata = { ++ .master = "omap34xxcam", ++ .power_set = mt9t111_power_set, ++ .priv_data_set = mt9t111_set_prv_data, ++ .ifparm = mt9t111_ifparm, ++ /* Some interface dependent params */ ++ .clk_polarity = 0, /* data clocked out on falling edge */ ++ .hs_polarity = 1, /* 0 - Active low, 1- Active high */ ++ .vs_polarity = 1, /* 0 - Active low, 1- Active high */ ++}; ++ ++static struct i2c_board_info __initdata mt9t111_i2c_board_info = { ++ I2C_BOARD_INFO("mt9t111", MT9T111_I2C_ADDR), ++ .platform_data = &mt9t111_pdata, ++}; ++ ++#endif /* #ifdef CONFIG_VIDEO_MT9T111 */ ++ + static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { + { + I2C_BOARD_INFO("twl4030", 0x48), +@@ -618,6 +775,8 @@ static struct omap_board_mux board_mux[] __initdata = { + + static void __init omap3_beagle_init(void) + { ++ int err; ++ + omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); + omap3_beagle_i2c_init(); + platform_add_devices(omap3_beagle_devices, +@@ -640,7 +799,17 @@ static void __init omap3_beagle_init(void) + omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); + + beagle_display_init(); ++ ++ // Revisit: hardcodes i2c bus 2 ++#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE) ++ err = i2c_register_board_info(2, &mt9t111_i2c_board_info, 1); ++ if (err) { ++ printk("beagle: MT9T111 I2C Board Registration failed \n"); ++ return err; ++ } ++#endif + } ++ + static void __init omap3_beagle_map_io(void) + { + omap2_set_globals_343x(); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0008-scripts-Makefile.fwinst-fix-typo-missing-space-in.patch b/recipes/linux/linux-omap-psp-2.6.32/0008-scripts-Makefile.fwinst-fix-typo-missing-space-in.patch deleted file mode 100644 index 9b5ccaac69..0000000000 --- a/recipes/linux/linux-omap-psp-2.6.32/0008-scripts-Makefile.fwinst-fix-typo-missing-space-in.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ce9fc5ab828b050605eb7d916f64ace7b227eea6 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman <steve@sakoman.com> -Date: Thu, 17 Dec 2009 12:51:53 -0800 -Subject: [PATCH 08/16] scripts/Makefile.fwinst: fix typo (missing space in setting mode) - ---- - scripts/Makefile.fwinst | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst -index 6bf8e87..fb20532 100644 ---- a/scripts/Makefile.fwinst -+++ b/scripts/Makefile.fwinst -@@ -37,7 +37,7 @@ install-all-dirs: $(installed-fw-dirs) - @true - - quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) -- cmd_install = $(INSTALL) -m0644 $< $@ -+ cmd_install = $(INSTALL) -m 0644 $< $@ - - $(installed-fw-dirs): - $(call cmd,mkdir) --- -1.6.2.4 - diff --git a/recipes/linux/linux-omap-psp-2.6.32/0009-board-omap3beagle-turn-on-power-to-camera-on-boot-an.patch b/recipes/linux/linux-omap-psp-2.6.32/0009-board-omap3beagle-turn-on-power-to-camera-on-boot-an.patch new file mode 100644 index 0000000000..1611395216 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0009-board-omap3beagle-turn-on-power-to-camera-on-boot-an.patch @@ -0,0 +1,31 @@ +From 9786b91716b67411bf4f77d7023898b0bc8c92c4 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <k-kooi@ti.com> +Date: Thu, 11 Feb 2010 20:23:01 +0100 +Subject: [PATCH 09/30] board-omap3beagle: turn on power to camera on boot and add some comments + +--- + arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index e63bec6..91d835a 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -327,9 +327,14 @@ static int beagle_twl_gpio_setup(struct device *dev, + */ + + if (cpu_is_omap3630()) { ++ /* Power on DVI, Serial and PWR led */ + gpio_request(gpio + 1, "nDVI_PWR_EN"); + gpio_direction_output(gpio + 1, 0); + ++ /* Power on camera interface */ ++ gpio_request(gpio + 2, "CAM_EN"); ++ gpio_direction_output(gpio + 2, 1); ++ + /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ + gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0010-board-omap3beagle-update-omap34xxcam-to-more-recent-.patch b/recipes/linux/linux-omap-psp-2.6.32/0010-board-omap3beagle-update-omap34xxcam-to-more-recent-.patch new file mode 100644 index 0000000000..efbebc04f0 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0010-board-omap3beagle-update-omap34xxcam-to-more-recent-.patch @@ -0,0 +1,84 @@ +From dd062cb38878fa74769e2f0c92a7d6a750a229f6 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <k-kooi@ti.com> +Date: Thu, 11 Feb 2010 22:59:19 +0100 +Subject: [PATCH 10/30] board-omap3beagle: update omap34xxcam to more recent v4l-int-device-api + +--- + arch/arm/mach-omap2/board-omap3beagle.c | 20 +++++++++++--------- + 1 files changed, 11 insertions(+), 9 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 91d835a..d09a676 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -461,6 +461,7 @@ static struct isp_interface_config mt9t111_if_config = { + .strobe = 0x0, + .prestrobe = 0x0, + .shutter = 0x0, ++ .wait_hs_vs = 2, + .u.par.par_bridge = 0x1, + .u.par.par_clk_pol = 0x0, + }; +@@ -513,14 +514,13 @@ static int mt9t111_ifparm(struct v4l2_ifparm *p) + return 0; + } + +-#if defined(CONFIG_VIDEO_OMAP3_CAM) || defined(CONFIG_VIDEO_OMAP3_CAM_MODULE) ++#if defined(CONFIG_VIDEO_OMAP3) + static struct omap34xxcam_hw_config mt9t111_decoder_hwc = { + .dev_index = 0, + .dev_minor = 0, + .dev_type = OMAP34XXCAM_SLAVE_SENSOR, +- .u.sensor.xclk = OMAP34XXCAM_XCLK_NONE, + .u.sensor.sensor_isp = 1, +-}; ++ .u.sensor.capture_mem = PAGE_ALIGN(2048*1536*2*4),}; + #endif + + /** +@@ -530,16 +530,16 @@ static struct omap34xxcam_hw_config mt9t111_decoder_hwc = { + * + * @return result of operation - 0 is success + */ +-static int mt9t111_set_prv_data(void *priv) ++static int mt9t111_set_prv_data(struct v4l2_int_device *s, void *priv) + { +-#if defined(CONFIG_VIDEO_OMAP3_CAM) || defined(CONFIG_VIDEO_OMAP3_CAM_MODULE) ++#if defined(CONFIG_VIDEO_OMAP3) + struct omap34xxcam_hw_config *hwc = priv; + + if (priv == NULL) + return -EINVAL; + + hwc->u.sensor.sensor_isp = mt9t111_decoder_hwc.u.sensor.sensor_isp; +- hwc->u.sensor.xclk = mt9t111_decoder_hwc.u.sensor.xclk; ++ hwc->u.sensor.capture_mem = mt9t111_decoder_hwc.u.sensor.capture_mem; + hwc->dev_index = mt9t111_decoder_hwc.dev_index; + hwc->dev_minor = mt9t111_decoder_hwc.dev_minor; + hwc->dev_type = mt9t111_decoder_hwc.dev_type; +@@ -556,8 +556,10 @@ static int mt9t111_set_prv_data(void *priv) + * + * @return result of operation - 0 is success + */ +-static int mt9t111_power_set(enum v4l2_power power) ++static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power) + { ++ struct omap34xxcam_videodev *vdev = s->u.slave->master->priv; ++ + switch (power) { + case V4L2_POWER_OFF: + /* Disable mux for TVP5146 decoder data path */ +@@ -573,8 +575,8 @@ static int mt9t111_power_set(enum v4l2_power power) + // if (omap3evmdc_set_mux(MUX_CAMERA_SENSOR, ENABLE_MUX)) + // return -ENODEV; + +-#if defined(CONFIG_VIDEO_OMAP3_CAM) || defined(CONFIG_VIDEO_OMAP3_CAM_MODULE) +- isp_configure_interface(&mt9t111_if_config); ++#if defined(CONFIG_VIDEO_OMAP3) ++ isp_configure_interface(vdev->cam->isp, &mt9t111_if_config); + #endif + break; + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0007-ASoC-enable-audio-capture-by-default-for-twl4030.patch b/recipes/linux/linux-omap-psp-2.6.32/0011-ASoC-enable-audio-capture-by-default-for-twl4030.patch index 6ad4366f02..18d714fd94 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0007-ASoC-enable-audio-capture-by-default-for-twl4030.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0011-ASoC-enable-audio-capture-by-default-for-twl4030.patch @@ -1,14 +1,14 @@ -From a0cf94cd5d99280fccc29e6b7777c448f15d1c65 Mon Sep 17 00:00:00 2001 +From e6b4e0cd8513a6ac08a3f36e2a4ee68363c291e0 Mon Sep 17 00:00:00 2001 From: Steve Sakoman <steve@sakoman.com> Date: Thu, 17 Dec 2009 12:45:20 -0800 -Subject: [PATCH 07/16] ASoC: enable audio capture by default for twl4030 +Subject: [PATCH 11/30] ASoC: enable audio capture by default for twl4030 --- sound/soc/codecs/twl4030.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c -index 4df7c6c..e85db73 100644 +index 74f0d65..53da465 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c @@ -46,8 +46,8 @@ static const u8 twl4030_reg[TWL4030_CACHEREGNUM] = { @@ -23,5 +23,5 @@ index 4df7c6c..e85db73 100644 0x00, /* REG_ADCMICSEL (0x8) */ 0x00, /* REG_DIGMIXING (0x9) */ -- -1.6.2.4 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/0009-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch b/recipes/linux/linux-omap-psp-2.6.32/0012-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch index 6e7f706c51..c90fc5931b 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0009-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0012-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch @@ -1,14 +1,14 @@ -From 64e4fc11b960da97728e0d87dcf4c1e98f808501 Mon Sep 17 00:00:00 2001 +From 437f85fb371c394132814cb39aed2876d4f9c4d8 Mon Sep 17 00:00:00 2001 From: Steve Sakoman <steve@sakoman.com> Date: Thu, 31 Dec 2009 07:05:02 -0800 -Subject: [PATCH] MTD: NAND: omap2: proper fix for subpage read ECC errors +Subject: [PATCH 12/30] MTD: NAND: omap2: proper fix for subpage read ECC errors --- drivers/mtd/nand/omap2.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c -index 1bb799f..75004fe 100644 +index 08c193c..9b185b0 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -295,11 +295,14 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len) @@ -31,5 +31,5 @@ index 1bb799f..75004fe 100644 /* configure and start prefetch transfer */ ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x0); -- -1.6.5 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/0013-OMAP3630-DSS2-Enable-Pre-Multiplied-Alpha-Support.patch b/recipes/linux/linux-omap-psp-2.6.32/0013-OMAP3630-DSS2-Enable-Pre-Multiplied-Alpha-Support.patch new file mode 100644 index 0000000000..19416c6fdc --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0013-OMAP3630-DSS2-Enable-Pre-Multiplied-Alpha-Support.patch @@ -0,0 +1,44 @@ +From 3e317b58ac4299f1f537879b03ad3ef4d4837a22 Mon Sep 17 00:00:00 2001 +From: Sudeep Basavaraj <sudeep.basavaraj@ti.com> +Date: Tue, 5 Jan 2010 18:58:18 +0530 +Subject: [PATCH 13/30] OMAP3630:DSS2:Enable Pre-Multiplied Alpha Support + +Enables dss to process color formats with pre-mulitplied alpha values. +With this we can have alpha values defined for each pixel +and hence can have different blending values for each pixel. + +Signed-off-by: Sudeep Basavaraj <sudeep.basavaraj@ti.com> +Signed-off-by: Kishore Y <kishore.y@ti.com> +--- + drivers/video/omap2/dss/dispc.c | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c +index 7a66ee8..53f2e6f 100644 +--- a/drivers/video/omap2/dss/dispc.c ++++ b/drivers/video/omap2/dss/dispc.c +@@ -913,6 +913,11 @@ static void _dispc_set_vid_color_conv(enum omap_plane plane, bool enable) + dispc_write_reg(dispc_reg_att[plane], val); + } + ++static void _dispc_set_alpha_blend_attrs(enum omap_plane plane, bool enable) ++{ ++ REG_FLD_MOD(dispc_reg_att[plane], enable ? 1 : 0, 28, 28); ++} ++ + void dispc_enable_replication(enum omap_plane plane, bool enable) + { + int bit; +@@ -1689,6 +1694,9 @@ static int _dispc_setup_plane(enum omap_plane plane, + + _dispc_set_rotation_attrs(plane, rotation, mirror, color_mode); + ++ if (cpu_is_omap3630() && (plane != OMAP_DSS_VIDEO1)) ++ _dispc_set_alpha_blend_attrs(plane, 1); ++ + if (plane != OMAP_DSS_VIDEO1) + _dispc_setup_global_alpha(plane, global_alpha); + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0014-DSS2-add-bootarg-for-selecting-svideo-or-composite-f.patch b/recipes/linux/linux-omap-psp-2.6.32/0014-DSS2-add-bootarg-for-selecting-svideo-or-composite-f.patch new file mode 100644 index 0000000000..b70c5ed6a4 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0014-DSS2-add-bootarg-for-selecting-svideo-or-composite-f.patch @@ -0,0 +1,75 @@ +From 63530c023c9fd08db61291c12db73f8cff5166ef Mon Sep 17 00:00:00 2001 +From: Steve Sakoman <steve@sakoman.com> +Date: Tue, 19 Jan 2010 21:19:15 -0800 +Subject: [PATCH 14/30] DSS2: add bootarg for selecting svideo or composite for tv output + +also add pal-16 and ntsc-16 omapfb.mode settings for 16bpp +--- + drivers/video/omap2/dss/venc.c | 22 ++++++++++++++++++++++ + drivers/video/omap2/omapfb/omapfb-main.c | 10 +++++++++- + 2 files changed, 31 insertions(+), 1 deletions(-) + +diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c +index 749a5a0..14aa721 100644 +--- a/drivers/video/omap2/dss/venc.c ++++ b/drivers/video/omap2/dss/venc.c +@@ -87,6 +87,11 @@ + #define VENC_OUTPUT_TEST 0xC8 + #define VENC_DAC_B__DAC_C 0xC8 + ++static char *tv_connection; ++ ++module_param_named(tvcable, tv_connection, charp, 0); ++MODULE_PARM_DESC(tvcable, "TV connection type (svideo, composite)"); ++ + struct venc_config { + u32 f_control; + u32 vidout_ctrl; +@@ -409,6 +414,23 @@ static int venc_panel_probe(struct omap_dss_device *dssdev) + { + dssdev->panel.timings = omap_dss_pal_timings; + ++ /* Allow the TV output to be overriden */ ++ if (tv_connection) { ++ if (strcmp(tv_connection, "svideo") == 0) { ++ printk(KERN_INFO ++ "omapdss: tv output is svideo.\n"); ++ dssdev->phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO; ++ } else if (strcmp(tv_connection, "composite") == 0) { ++ printk(KERN_INFO ++ "omapdss: tv output is composite.\n"); ++ dssdev->phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE; ++ } else { ++ printk(KERN_INFO ++ "omapdss: unsupported output type'%s'.\n", ++ tv_connection); ++ } ++ } ++ + return 0; + } + +diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c +index 340ab51..c2c9663 100644 +--- a/drivers/video/omap2/omapfb/omapfb-main.c ++++ b/drivers/video/omap2/omapfb/omapfb-main.c +@@ -1988,7 +1988,15 @@ static int omapfb_mode_to_timings(const char *mode_str, + int r; + + #ifdef CONFIG_OMAP2_DSS_VENC +- if (strcmp(mode_str, "pal") == 0) { ++ if (strcmp(mode_str, "pal-16") == 0) { ++ *timings = omap_dss_pal_timings; ++ *bpp = 16; ++ return 0; ++ } else if (strcmp(mode_str, "ntsc-16") == 0) { ++ *timings = omap_dss_ntsc_timings; ++ *bpp = 16; ++ return 0; ++ } else if (strcmp(mode_str, "pal") == 0) { + *timings = omap_dss_pal_timings; + *bpp = 0; + return 0; +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0015-ISP-add-some-more-from-Leopard-imaging-patch.patch b/recipes/linux/linux-omap-psp-2.6.32/0015-ISP-add-some-more-from-Leopard-imaging-patch.patch new file mode 100644 index 0000000000..5ef32c3031 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0015-ISP-add-some-more-from-Leopard-imaging-patch.patch @@ -0,0 +1,133 @@ +From b42f1800184ddd5202d48ca0a0f166472b4f04ce Mon Sep 17 00:00:00 2001 +From: Koen Kooi <k-kooi@ti.com> +Date: Thu, 11 Feb 2010 21:34:00 +0100 +Subject: [PATCH 15/30] ISP: add some more from Leopard imaging patch + +--- + drivers/media/video/isp/isppreview.c | 16 ++++++++- + include/media/v4l2-int-device.h | 58 ++++++++++++++++++++++++++++++++++ + 2 files changed, 72 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/video/isp/isppreview.c b/drivers/media/video/isp/isppreview.c +index 5494efc..85ee25d 100644 +--- a/drivers/media/video/isp/isppreview.c ++++ b/drivers/media/video/isp/isppreview.c +@@ -79,13 +79,26 @@ static struct ispprev_rgbtorgb flr_rgb2rgb = { + {0x0000, 0x0000, 0x0000} + }; + ++static struct ispprev_rgbtorgb unity_rgb2rgb = { ++ { /* RGB-RGB Matrix */ ++ {0x0100, 0x0000, 0x0000}, ++ {0x0000, 0x0100, 0x0000}, ++ {0x0000, 0x0000, 0x0100} ++ }, /* RGB Offset */ ++ {0x0000, 0x0000, 0x0000} ++}; ++ + /* Default values in Office Flourescent Light for RGB to YUV Conversion*/ + static struct ispprev_csc flr_prev_csc[] = { + { + { /* CSC Coef Matrix */ +- {66, 129, 25}, ++/* {66, 129, 25}, + {-38, -75, 112}, + {112, -94 , -18} ++*/ ++ {0x04C, 0x098, 0x01C}, ++ {0x3D4, 0x3AC, 0x080}, ++ {0x080, 0x39E, 0x3EC} + }, /* CSC Offset */ + {0x0, 0x0, 0x0} + }, +@@ -107,7 +120,6 @@ static struct ispprev_csc flr_prev_csc[] = { + } + }; + +- + /* Default values in Office Flourescent Light for CFA Gradient*/ + #define FLR_CFA_GRADTHRS_HORZ 0x28 + #define FLR_CFA_GRADTHRS_VERT 0x28 +diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h +index ed32d3f..ce415ec 100644 +--- a/include/media/v4l2-int-device.h ++++ b/include/media/v4l2-int-device.h +@@ -113,6 +113,8 @@ enum v4l2_if_type { + * on certain image sensors. + */ + V4L2_IF_TYPE_BT656, ++ V4L2_IF_TYPE_YCbCr, ++ V4L2_IF_TYPE_RAW, + }; + + enum v4l2_if_type_bt656_mode { +@@ -159,10 +161,66 @@ struct v4l2_if_type_bt656 { + u32 clock_curr; + }; + ++struct v4l2_if_type_ycbcr { ++ /* ++ * 0: Frame begins when vsync is high. ++ * 1: Frame begins when vsync changes from low to high. ++ */ ++ unsigned frame_start_on_rising_vs:1; ++ /* Use Bt synchronisation codes for sync correction. */ ++ unsigned bt_sync_correct:1; ++ /* Swap every two adjacent image data elements. */ ++ unsigned swap:1; ++ /* Inverted latch clock polarity from slave. */ ++ unsigned latch_clk_inv:1; ++ /* Hs polarity. 0 is active high, 1 active low. */ ++ unsigned nobt_hs_inv:1; ++ /* Vs polarity. 0 is active high, 1 active low. */ ++ unsigned nobt_vs_inv:1; ++ /* Minimum accepted bus clock for slave (in Hz). */ ++ u32 clock_min; ++ /* Maximum accepted bus clock for slave. */ ++ u32 clock_max; ++ /* ++ * Current wish of the slave. May only change in response to ++ * ioctls that affect image capture. ++ */ ++ u32 clock_curr; ++}; ++ ++struct v4l2_if_type_raw { ++ /* ++ * 0: Frame begins when vsync is high. ++ * 1: Frame begins when vsync changes from low to high. ++ */ ++ unsigned frame_start_on_rising_vs:1; ++ /* Use Bt synchronisation codes for sync correction. */ ++ unsigned bt_sync_correct:1; ++ /* Swap every two adjacent image data elements. */ ++ unsigned swap:1; ++ /* Inverted latch clock polarity from slave. */ ++ unsigned latch_clk_inv:1; ++ /* Hs polarity. 0 is active high, 1 active low. */ ++ unsigned nobt_hs_inv:1; ++ /* Vs polarity. 0 is active high, 1 active low. */ ++ unsigned nobt_vs_inv:1; ++ /* Minimum accepted bus clock for slave (in Hz). */ ++ u32 clock_min; ++ /* Maximum accepted bus clock for slave. */ ++ u32 clock_max; ++ /* ++ * Current wish of the slave. May only change in response to ++ * ioctls that affect image capture. ++ */ ++ u32 clock_curr; ++}; ++ + struct v4l2_ifparm { + enum v4l2_if_type if_type; + union { + struct v4l2_if_type_bt656 bt656; ++ struct v4l2_if_type_ycbcr ycbcr; ++ struct v4l2_if_type_raw raw; + } u; + }; + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0001-ARM-OMAP-Overo-Add-support-for-second-ethernet-po.patch b/recipes/linux/linux-omap-psp-2.6.32/0016-ARM-OMAP-Overo-Add-support-for-second-ethernet-port.patch index 3254fe4562..a2d0c6a7f9 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0001-ARM-OMAP-Overo-Add-support-for-second-ethernet-po.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0016-ARM-OMAP-Overo-Add-support-for-second-ethernet-port.patch @@ -1,7 +1,7 @@ -From 190c75031e65008425dbdd74c3e3237beed18460 Mon Sep 17 00:00:00 2001 +From e98c43b693a4893bbe52ed1874e31961d36a4116 Mon Sep 17 00:00:00 2001 From: Steve Sakoman <sakoman@gmail.com> Date: Tue, 15 Dec 2009 14:59:42 -0800 -Subject: [PATCH 01/16] ARM: OMAP: Overo: Add support for second ethernet port +Subject: [PATCH 16/30] ARM: OMAP: Overo: Add support for second ethernet port Signed-off-by: Steve Sakoman <sakoman@gmail.com> --- @@ -9,7 +9,7 @@ Signed-off-by: Steve Sakoman <sakoman@gmail.com> 1 files changed, 53 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c -index 52dfd51..1b94f2c 100644 +index e0aebc3..6204b8c 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c @@ -63,6 +63,8 @@ @@ -106,5 +106,5 @@ index 52dfd51..1b94f2c 100644 #else -- -1.6.2.4 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/0003-drivers-net-smsc911x-return-ENODEV-if-device-is-n.patch b/recipes/linux/linux-omap-psp-2.6.32/0017-drivers-net-smsc911x-return-ENODEV-if-device-is-not-.patch index c15cf3a396..8858611d1d 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0003-drivers-net-smsc911x-return-ENODEV-if-device-is-n.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0017-drivers-net-smsc911x-return-ENODEV-if-device-is-not-.patch @@ -1,7 +1,7 @@ -From 196c189ca20294fdcef264995f68cca74b1e16ea Mon Sep 17 00:00:00 2001 +From 0ebe3f2429da9162e658f4571727a45e1eaf2340 Mon Sep 17 00:00:00 2001 From: Steve Sakoman <sakoman@gmail.com> Date: Tue, 15 Dec 2009 15:17:44 -0800 -Subject: [PATCH 03/16] drivers: net: smsc911x: return ENODEV if device is not found +Subject: [PATCH 17/30] drivers: net: smsc911x: return ENODEV if device is not found Signed-off-by: Steve Sakoman <sakoman@gmail.com> --- @@ -9,7 +9,7 @@ Signed-off-by: Steve Sakoman <sakoman@gmail.com> 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c -index f9cdcbc..9ca18b5 100644 +index 494cd91..2472cb0 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@ -2021,8 +2021,10 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) @@ -25,5 +25,5 @@ index f9cdcbc..9ca18b5 100644 /* configure irq polarity and type before connecting isr */ if (pdata->config.irq_polarity == SMSC911X_IRQ_POLARITY_ACTIVE_HIGH) -- -1.6.2.4 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/0004-drivers-input-touchscreen-ads7846-return-ENODEV.patch b/recipes/linux/linux-omap-psp-2.6.32/0018-drivers-input-touchscreen-ads7846-return-ENODEV-if-d.patch index 345213cb59..10a9199366 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/0004-drivers-input-touchscreen-ads7846-return-ENODEV.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0018-drivers-input-touchscreen-ads7846-return-ENODEV-if-d.patch @@ -1,7 +1,7 @@ -From deb568b94c448aa7ffcc9e6788bcf9069fd3b864 Mon Sep 17 00:00:00 2001 +From 7e5f28ca06be8efdbe2c03a252e09a2d5a1b8384 Mon Sep 17 00:00:00 2001 From: Steve Sakoman <sakoman@gmail.com> Date: Tue, 15 Dec 2009 15:24:10 -0800 -Subject: [PATCH 04/16] drivers: input: touchscreen: ads7846: return ENODEV if device is not found +Subject: [PATCH 18/30] drivers: input: touchscreen: ads7846: return ENODEV if device is not found Signed-off-by: Steve Sakoman <sakoman@gmail.com> --- @@ -9,10 +9,10 @@ Signed-off-by: Steve Sakoman <sakoman@gmail.com> 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c -index 09c8109..7cc9973 100644 +index 52d2ca1..ce12c63 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c -@@ -1170,9 +1170,16 @@ static int __devinit ads7846_probe(struct spi_device *spi) +@@ -1161,9 +1161,16 @@ static int __devinit ads7846_probe(struct spi_device *spi) /* take a first sample, leaving nPENIRQ active and vREF off; avoid * the touchscreen, in case it's not connected. */ @@ -30,7 +30,7 @@ index 09c8109..7cc9973 100644 err = sysfs_create_group(&spi->dev.kobj, &ads784x_attr_group); if (err) goto err_remove_hwmon; -@@ -1190,7 +1197,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) +@@ -1181,7 +1188,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) err_free_irq: free_irq(spi->irq, ts); err_free_gpio: @@ -39,7 +39,7 @@ index 09c8109..7cc9973 100644 gpio_free(ts->gpio_pendown); err_cleanup_filter: if (ts->filter_cleanup) -@@ -1217,7 +1224,7 @@ static int __devexit ads7846_remove(struct spi_device *spi) +@@ -1208,7 +1215,7 @@ static int __devexit ads7846_remove(struct spi_device *spi) /* suspend left the IRQ disabled */ enable_irq(ts->spi->irq); @@ -49,5 +49,5 @@ index 09c8109..7cc9973 100644 if (ts->filter_cleanup) -- -1.6.2.4 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/0019-drivers-mfd-add-twl4030-madc-driver.patch b/recipes/linux/linux-omap-psp-2.6.32/0019-drivers-mfd-add-twl4030-madc-driver.patch new file mode 100644 index 0000000000..e6c2c2609f --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0019-drivers-mfd-add-twl4030-madc-driver.patch @@ -0,0 +1,601 @@ +From a58f3362585b07b0b0980f2ae0781feb66b7f827 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman <steve@sakoman.com> +Date: Thu, 17 Dec 2009 14:19:34 -0800 +Subject: [PATCH 19/30] drivers: mfd: add twl4030 madc driver + +--- + drivers/mfd/Kconfig | 21 ++ + drivers/mfd/Makefile | 1 + + drivers/mfd/twl4030-madc.c | 536 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 558 insertions(+), 0 deletions(-) + create mode 100644 drivers/mfd/twl4030-madc.c + +diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig +index 8782978..aefdd66 100644 +--- a/drivers/mfd/Kconfig ++++ b/drivers/mfd/Kconfig +@@ -135,6 +135,27 @@ config TWL4030_CODEC + select MFD_CORE + default n + ++config TWL4030_MADC ++ tristate "TWL4030 MADC Driver" ++ depends on TWL4030_CORE ++ help ++ The TWL4030 Monitoring ADC driver enables the host ++ processor to monitor analog signals using analog-to-digital ++ conversions on the input source. TWL4030 MADC provides the ++ following features: ++ - Single 10-bit ADC with successive approximation register (SAR) conversion; ++ - Analog multiplexer for 16 inputs; ++ - Seven (of the 16) inputs are freely available; ++ - Battery voltage monitoring; ++ - Concurrent conversion request management; ++ - Interrupt signal to Primary Interrupt Handler; ++ - Averaging feature; ++ - Selective enable/disable of the averaging feature. ++ ++ Say 'y' here to statically link this module into the kernel or 'm' ++ to build it as a dinamically loadable module. The module will be ++ called twl4030-madc.ko ++ + config MFD_TMIO + bool + default n +diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile +index ca2f2c4..ec9c4f2 100644 +--- a/drivers/mfd/Makefile ++++ b/drivers/mfd/Makefile +@@ -29,6 +29,7 @@ obj-$(CONFIG_MENELAUS) += menelaus.o + obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o + obj-$(CONFIG_TWL4030_POWER) += twl4030-power.o + obj-$(CONFIG_TWL4030_CODEC) += twl4030-codec.o ++obj-$(CONFIG_TWL4030_MADC) += twl4030-madc.o + + obj-$(CONFIG_MFD_MC13783) += mc13783-core.o + +diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c +new file mode 100644 +index 0000000..7d83ab8 +--- /dev/null ++++ b/drivers/mfd/twl4030-madc.c +@@ -0,0 +1,536 @@ ++/* ++ * TWL4030 MADC module driver ++ * ++ * Copyright (C) 2008 Nokia Corporation ++ * Mikko Ylinen <mikko.k.ylinen@nokia.com> ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ * ++ */ ++ ++#include <linux/init.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/types.h> ++#include <linux/module.h> ++#include <linux/delay.h> ++#include <linux/fs.h> ++#include <linux/platform_device.h> ++#include <linux/miscdevice.h> ++#include <linux/i2c/twl4030.h> ++#include <linux/i2c/twl4030-madc.h> ++ ++#include <asm/uaccess.h> ++ ++#define TWL4030_MADC_PFX "twl4030-madc: " ++ ++struct twl4030_madc_data { ++ struct device *dev; ++ struct mutex lock; ++ struct work_struct ws; ++ struct twl4030_madc_request requests[TWL4030_MADC_NUM_METHODS]; ++ int imr; ++ int isr; ++}; ++ ++static struct twl4030_madc_data *the_madc; ++ ++static ++const struct twl4030_madc_conversion_method twl4030_conversion_methods[] = { ++ [TWL4030_MADC_RT] = { ++ .sel = TWL4030_MADC_RTSELECT_LSB, ++ .avg = TWL4030_MADC_RTAVERAGE_LSB, ++ .rbase = TWL4030_MADC_RTCH0_LSB, ++ }, ++ [TWL4030_MADC_SW1] = { ++ .sel = TWL4030_MADC_SW1SELECT_LSB, ++ .avg = TWL4030_MADC_SW1AVERAGE_LSB, ++ .rbase = TWL4030_MADC_GPCH0_LSB, ++ .ctrl = TWL4030_MADC_CTRL_SW1, ++ }, ++ [TWL4030_MADC_SW2] = { ++ .sel = TWL4030_MADC_SW2SELECT_LSB, ++ .avg = TWL4030_MADC_SW2AVERAGE_LSB, ++ .rbase = TWL4030_MADC_GPCH0_LSB, ++ .ctrl = TWL4030_MADC_CTRL_SW2, ++ }, ++}; ++ ++static int twl4030_madc_read(struct twl4030_madc_data *madc, u8 reg) ++{ ++ int ret; ++ u8 val; ++ ++ ret = twl4030_i2c_read_u8(TWL4030_MODULE_MADC, &val, reg); ++ if (ret) { ++ dev_dbg(madc->dev, "unable to read register 0x%X\n", reg); ++ return ret; ++ } ++ ++ return val; ++} ++ ++static void twl4030_madc_write(struct twl4030_madc_data *madc, u8 reg, u8 val) ++{ ++ int ret; ++ ++ ret = twl4030_i2c_write_u8(TWL4030_MODULE_MADC, val, reg); ++ if (ret) ++ dev_err(madc->dev, "unable to write register 0x%X\n", reg); ++} ++ ++static int twl4030_madc_channel_raw_read(struct twl4030_madc_data *madc, u8 reg) ++{ ++ u8 msb, lsb; ++ ++ /* For each ADC channel, we have MSB and LSB register pair. MSB address ++ * is always LSB address+1. reg parameter is the addr of LSB register */ ++ msb = twl4030_madc_read(madc, reg + 1); ++ lsb = twl4030_madc_read(madc, reg); ++ ++ return (int)(((msb << 8) | lsb) >> 6); ++} ++ ++static int twl4030_madc_read_channels(struct twl4030_madc_data *madc, ++ u8 reg_base, u16 channels, int *buf) ++{ ++ int count = 0; ++ u8 reg, i; ++ ++ if (unlikely(!buf)) ++ return 0; ++ ++ for (i = 0; i < TWL4030_MADC_MAX_CHANNELS; i++) { ++ if (channels & (1<<i)) { ++ reg = reg_base + 2*i; ++ buf[i] = twl4030_madc_channel_raw_read(madc, reg); ++ count++; ++ } ++ } ++ return count; ++} ++ ++static void twl4030_madc_enable_irq(struct twl4030_madc_data *madc, int id) ++{ ++ u8 val; ++ ++ val = twl4030_madc_read(madc, madc->imr); ++ val &= ~(1 << id); ++ twl4030_madc_write(madc, madc->imr, val); ++} ++ ++static void twl4030_madc_disable_irq(struct twl4030_madc_data *madc, int id) ++{ ++ u8 val; ++ ++ val = twl4030_madc_read(madc, madc->imr); ++ val |= (1 << id); ++ twl4030_madc_write(madc, madc->imr, val); ++} ++ ++static irqreturn_t twl4030_madc_irq_handler(int irq, void *_madc) ++{ ++ struct twl4030_madc_data *madc = _madc; ++ u8 isr_val, imr_val; ++ int i; ++ ++#ifdef CONFIG_LOCKDEP ++ /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which ++ * we don't want and can't tolerate. Although it might be ++ * friendlier not to borrow this thread context... ++ */ ++ local_irq_enable(); ++#endif ++ ++ /* Use COR to ack interrupts since we have no shared IRQs in ISRx */ ++ isr_val = twl4030_madc_read(madc, madc->isr); ++ imr_val = twl4030_madc_read(madc, madc->imr); ++ ++ isr_val &= ~imr_val; ++ ++ for (i = 0; i < TWL4030_MADC_NUM_METHODS; i++) { ++ ++ if (!(isr_val & (1<<i))) ++ continue; ++ ++ twl4030_madc_disable_irq(madc, i); ++ madc->requests[i].result_pending = 1; ++ } ++ ++ schedule_work(&madc->ws); ++ ++ return IRQ_HANDLED; ++} ++ ++static void twl4030_madc_work(struct work_struct *ws) ++{ ++ const struct twl4030_madc_conversion_method *method; ++ struct twl4030_madc_data *madc; ++ struct twl4030_madc_request *r; ++ int len, i; ++ ++ madc = container_of(ws, struct twl4030_madc_data, ws); ++ mutex_lock(&madc->lock); ++ ++ for (i = 0; i < TWL4030_MADC_NUM_METHODS; i++) { ++ ++ r = &madc->requests[i]; ++ ++ /* No pending results for this method, move to next one */ ++ if (!r->result_pending) ++ continue; ++ ++ method = &twl4030_conversion_methods[r->method]; ++ ++ /* Read results */ ++ len = twl4030_madc_read_channels(madc, method->rbase, ++ r->channels, r->rbuf); ++ ++ /* Return results to caller */ ++ if (r->func_cb != NULL) { ++ r->func_cb(len, r->channels, r->rbuf); ++ r->func_cb = NULL; ++ } ++ ++ /* Free request */ ++ r->result_pending = 0; ++ r->active = 0; ++ } ++ ++ mutex_unlock(&madc->lock); ++} ++ ++static int twl4030_madc_set_irq(struct twl4030_madc_data *madc, ++ struct twl4030_madc_request *req) ++{ ++ struct twl4030_madc_request *p; ++ ++ p = &madc->requests[req->method]; ++ ++ memcpy(p, req, sizeof *req); ++ ++ twl4030_madc_enable_irq(madc, req->method); ++ ++ return 0; ++} ++ ++static inline void twl4030_madc_start_conversion(struct twl4030_madc_data *madc, ++ int conv_method) ++{ ++ const struct twl4030_madc_conversion_method *method; ++ ++ method = &twl4030_conversion_methods[conv_method]; ++ ++ switch (conv_method) { ++ case TWL4030_MADC_SW1: ++ case TWL4030_MADC_SW2: ++ twl4030_madc_write(madc, method->ctrl, TWL4030_MADC_SW_START); ++ break; ++ case TWL4030_MADC_RT: ++ default: ++ break; ++ } ++} ++ ++static int twl4030_madc_wait_conversion_ready( ++ struct twl4030_madc_data *madc, ++ unsigned int timeout_ms, u8 status_reg) ++{ ++ unsigned long timeout; ++ ++ timeout = jiffies + msecs_to_jiffies(timeout_ms); ++ do { ++ u8 reg; ++ ++ reg = twl4030_madc_read(madc, status_reg); ++ if (!(reg & TWL4030_MADC_BUSY) && (reg & TWL4030_MADC_EOC_SW)) ++ return 0; ++ } while (!time_after(jiffies, timeout)); ++ ++ return -EAGAIN; ++} ++ ++int twl4030_madc_conversion(struct twl4030_madc_request *req) ++{ ++ const struct twl4030_madc_conversion_method *method; ++ u8 ch_msb, ch_lsb; ++ int ret; ++ ++ if (unlikely(!req)) ++ return -EINVAL; ++ ++ mutex_lock(&the_madc->lock); ++ ++ /* Do we have a conversion request ongoing */ ++ if (the_madc->requests[req->method].active) { ++ ret = -EBUSY; ++ goto out; ++ } ++ ++ ch_msb = (req->channels >> 8) & 0xff; ++ ch_lsb = req->channels & 0xff; ++ ++ method = &twl4030_conversion_methods[req->method]; ++ ++ /* Select channels to be converted */ ++ twl4030_madc_write(the_madc, method->sel + 1, ch_msb); ++ twl4030_madc_write(the_madc, method->sel, ch_lsb); ++ ++ /* Select averaging for all channels if do_avg is set */ ++ if (req->do_avg) { ++ twl4030_madc_write(the_madc, method->avg + 1, ch_msb); ++ twl4030_madc_write(the_madc, method->avg, ch_lsb); ++ } ++ ++ if ((req->type == TWL4030_MADC_IRQ_ONESHOT) && (req->func_cb != NULL)) { ++ twl4030_madc_set_irq(the_madc, req); ++ twl4030_madc_start_conversion(the_madc, req->method); ++ the_madc->requests[req->method].active = 1; ++ ret = 0; ++ goto out; ++ } ++ ++ /* With RT method we should not be here anymore */ ++ if (req->method == TWL4030_MADC_RT) { ++ ret = -EINVAL; ++ goto out; ++ } ++ ++ twl4030_madc_start_conversion(the_madc, req->method); ++ the_madc->requests[req->method].active = 1; ++ ++ /* Wait until conversion is ready (ctrl register returns EOC) */ ++ ret = twl4030_madc_wait_conversion_ready(the_madc, 5, method->ctrl); ++ if (ret) { ++ dev_dbg(the_madc->dev, "conversion timeout!\n"); ++ the_madc->requests[req->method].active = 0; ++ goto out; ++ } ++ ++ ret = twl4030_madc_read_channels(the_madc, method->rbase, req->channels, ++ req->rbuf); ++ ++ the_madc->requests[req->method].active = 0; ++ ++out: ++ mutex_unlock(&the_madc->lock); ++ ++ return ret; ++} ++EXPORT_SYMBOL(twl4030_madc_conversion); ++ ++static int twl4030_madc_set_current_generator(struct twl4030_madc_data *madc, ++ int chan, int on) ++{ ++ int ret; ++ u8 regval; ++ ++ /* Current generator is only available for ADCIN0 and ADCIN1. NB: ++ * ADCIN1 current generator only works when AC or VBUS is present */ ++ if (chan > 1) ++ return EINVAL; ++ ++ ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE, ++ ®val, TWL4030_BCI_BCICTL1); ++ if (on) ++ regval |= (chan) ? TWL4030_BCI_ITHEN : TWL4030_BCI_TYPEN; ++ else ++ regval &= (chan) ? ~TWL4030_BCI_ITHEN : ~TWL4030_BCI_TYPEN; ++ ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE, ++ regval, TWL4030_BCI_BCICTL1); ++ ++ return ret; ++} ++ ++static int twl4030_madc_set_power(struct twl4030_madc_data *madc, int on) ++{ ++ u8 regval; ++ ++ regval = twl4030_madc_read(madc, TWL4030_MADC_CTRL1); ++ if (on) ++ regval |= TWL4030_MADC_MADCON; ++ else ++ regval &= ~TWL4030_MADC_MADCON; ++ twl4030_madc_write(madc, TWL4030_MADC_CTRL1, regval); ++ ++ return 0; ++} ++ ++static long twl4030_madc_ioctl(struct file *filp, unsigned int cmd, ++ unsigned long arg) ++{ ++ struct twl4030_madc_user_parms par; ++ int val, ret; ++ ++ ret = copy_from_user(&par, (void __user *) arg, sizeof(par)); ++ if (ret) { ++ dev_dbg(the_madc->dev, "copy_from_user: %d\n", ret); ++ return -EACCES; ++ } ++ ++ switch (cmd) { ++ case TWL4030_MADC_IOCX_ADC_RAW_READ: { ++ struct twl4030_madc_request req; ++ if (par.channel >= TWL4030_MADC_MAX_CHANNELS) ++ return -EINVAL; ++ ++ req.channels = (1 << par.channel); ++ req.do_avg = par.average; ++ req.method = TWL4030_MADC_SW1; ++ req.func_cb = NULL; ++ ++ val = twl4030_madc_conversion(&req); ++ if (val <= 0) { ++ par.status = -1; ++ } else { ++ par.status = 0; ++ par.result = (u16)req.rbuf[par.channel]; ++ } ++ break; ++ } ++ default: ++ return -EINVAL; ++ } ++ ++ ret = copy_to_user((void __user *) arg, &par, sizeof(par)); ++ if (ret) { ++ dev_dbg(the_madc->dev, "copy_to_user: %d\n", ret); ++ return -EACCES; ++ } ++ ++ return 0; ++} ++ ++static struct file_operations twl4030_madc_fileops = { ++ .owner = THIS_MODULE, ++ .unlocked_ioctl = twl4030_madc_ioctl ++}; ++ ++static struct miscdevice twl4030_madc_device = { ++ .minor = MISC_DYNAMIC_MINOR, ++ .name = "twl4030-madc", ++ .fops = &twl4030_madc_fileops ++}; ++ ++static int __init twl4030_madc_probe(struct platform_device *pdev) ++{ ++ struct twl4030_madc_data *madc; ++ struct twl4030_madc_platform_data *pdata = pdev->dev.platform_data; ++ int ret; ++ u8 regval; ++ ++ madc = kzalloc(sizeof *madc, GFP_KERNEL); ++ if (!madc) ++ return -ENOMEM; ++ ++ if (!pdata) { ++ dev_dbg(&pdev->dev, "platform_data not available\n"); ++ ret = -EINVAL; ++ goto err_pdata; ++ } ++ ++ madc->imr = (pdata->irq_line == 1) ? TWL4030_MADC_IMR1 : TWL4030_MADC_IMR2; ++ madc->isr = (pdata->irq_line == 1) ? TWL4030_MADC_ISR1 : TWL4030_MADC_ISR2; ++ ++ ret = misc_register(&twl4030_madc_device); ++ if (ret) { ++ dev_dbg(&pdev->dev, "could not register misc_device\n"); ++ goto err_misc; ++ } ++ twl4030_madc_set_power(madc, 1); ++ twl4030_madc_set_current_generator(madc, 0, 1); ++ ++ /* Enable ADCIN3 through 6 */ ++ ret = twl4030_i2c_read_u8(TWL4030_MODULE_USB, ++ ®val, TWL4030_USB_CARKIT_ANA_CTRL); ++ ++ regval |= TWL4030_USB_SEL_MADC_MCPC; ++ ++ ret = twl4030_i2c_write_u8(TWL4030_MODULE_USB, ++ regval, TWL4030_USB_CARKIT_ANA_CTRL); ++ ++ ++ ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE, ++ ®val, TWL4030_BCI_BCICTL1); ++ ++ regval |= TWL4030_BCI_MESBAT; ++ ++ ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE, ++ regval, TWL4030_BCI_BCICTL1); ++ ++ ret = request_irq(platform_get_irq(pdev, 0), twl4030_madc_irq_handler, ++ 0, "twl4030_madc", madc); ++ if (ret) { ++ dev_dbg(&pdev->dev, "could not request irq\n"); ++ goto err_irq; ++ } ++ ++ platform_set_drvdata(pdev, madc); ++ mutex_init(&madc->lock); ++ INIT_WORK(&madc->ws, twl4030_madc_work); ++ ++ the_madc = madc; ++ ++ return 0; ++ ++err_irq: ++ misc_deregister(&twl4030_madc_device); ++ ++err_misc: ++err_pdata: ++ kfree(madc); ++ ++ return ret; ++} ++ ++static int __exit twl4030_madc_remove(struct platform_device *pdev) ++{ ++ struct twl4030_madc_data *madc = platform_get_drvdata(pdev); ++ ++ twl4030_madc_set_power(madc, 0); ++ twl4030_madc_set_current_generator(madc, 0, 0); ++ free_irq(platform_get_irq(pdev, 0), madc); ++ cancel_work_sync(&madc->ws); ++ misc_deregister(&twl4030_madc_device); ++ ++ return 0; ++} ++ ++static struct platform_driver twl4030_madc_driver = { ++ .probe = twl4030_madc_probe, ++ .remove = __exit_p(twl4030_madc_remove), ++ .driver = { ++ .name = "twl4030_madc", ++ .owner = THIS_MODULE, ++ }, ++}; ++ ++static int __init twl4030_madc_init(void) ++{ ++ return platform_driver_register(&twl4030_madc_driver); ++} ++module_init(twl4030_madc_init); ++ ++static void __exit twl4030_madc_exit(void) ++{ ++ platform_driver_unregister(&twl4030_madc_driver); ++} ++module_exit(twl4030_madc_exit); ++ ++MODULE_ALIAS("platform:twl4030-madc"); ++MODULE_AUTHOR("Nokia Corporation"); ++MODULE_DESCRIPTION("twl4030 ADC driver"); ++MODULE_LICENSE("GPL"); ++ +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0020-ARM-OMAP-Add-missing-twl4030-madc-header-file.patch b/recipes/linux/linux-omap-psp-2.6.32/0020-ARM-OMAP-Add-missing-twl4030-madc-header-file.patch new file mode 100644 index 0000000000..f923a733e6 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0020-ARM-OMAP-Add-missing-twl4030-madc-header-file.patch @@ -0,0 +1,149 @@ +From d2bb4331443838278487b8754cc5a77737583038 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman <steve@sakoman.com> +Date: Thu, 17 Dec 2009 15:54:58 -0800 +Subject: [PATCH 20/30] ARM: OMAP: Add missing twl4030 madc header file + +--- + include/linux/i2c/twl4030-madc.h | 130 ++++++++++++++++++++++++++++++++++++++ + 1 files changed, 130 insertions(+), 0 deletions(-) + create mode 100644 include/linux/i2c/twl4030-madc.h + +diff --git a/include/linux/i2c/twl4030-madc.h b/include/linux/i2c/twl4030-madc.h +new file mode 100644 +index 0000000..341a665 +--- /dev/null ++++ b/include/linux/i2c/twl4030-madc.h +@@ -0,0 +1,130 @@ ++/* ++ * include/linux/i2c/twl4030-madc.h ++ * ++ * TWL4030 MADC module driver header ++ * ++ * Copyright (C) 2008 Nokia Corporation ++ * Mikko Ylinen <mikko.k.ylinen@nokia.com> ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ * ++ */ ++ ++#ifndef _TWL4030_MADC_H ++#define _TWL4030_MADC_H ++ ++struct twl4030_madc_conversion_method { ++ u8 sel; ++ u8 avg; ++ u8 rbase; ++ u8 ctrl; ++}; ++ ++#define TWL4030_MADC_MAX_CHANNELS 16 ++ ++struct twl4030_madc_request { ++ u16 channels; ++ u16 do_avg; ++ u16 method; ++ u16 type; ++ int active; ++ int result_pending; ++ int rbuf[TWL4030_MADC_MAX_CHANNELS]; ++ void (*func_cb)(int len, int channels, int *buf); ++}; ++ ++enum conversion_methods { ++ TWL4030_MADC_RT, ++ TWL4030_MADC_SW1, ++ TWL4030_MADC_SW2, ++ TWL4030_MADC_NUM_METHODS ++}; ++ ++enum sample_type { ++ TWL4030_MADC_WAIT, ++ TWL4030_MADC_IRQ_ONESHOT, ++ TWL4030_MADC_IRQ_REARM ++}; ++ ++#define TWL4030_MADC_CTRL1 0x00 ++#define TWL4030_MADC_CTRL2 0x01 ++ ++#define TWL4030_MADC_RTSELECT_LSB 0x02 ++#define TWL4030_MADC_SW1SELECT_LSB 0x06 ++#define TWL4030_MADC_SW2SELECT_LSB 0x0A ++ ++#define TWL4030_MADC_RTAVERAGE_LSB 0x04 ++#define TWL4030_MADC_SW1AVERAGE_LSB 0x08 ++#define TWL4030_MADC_SW2AVERAGE_LSB 0x0C ++ ++#define TWL4030_MADC_CTRL_SW1 0x12 ++#define TWL4030_MADC_CTRL_SW2 0x13 ++ ++#define TWL4030_MADC_RTCH0_LSB 0x17 ++#define TWL4030_MADC_GPCH0_LSB 0x37 ++ ++#define TWL4030_MADC_MADCON (1<<0) /* MADC power on */ ++#define TWL4030_MADC_BUSY (1<<0) /* MADC busy */ ++#define TWL4030_MADC_EOC_SW (1<<1) /* MADC conversion completion */ ++#define TWL4030_MADC_SW_START (1<<5) /* MADC SWx start conversion */ ++ ++#define TWL4030_MADC_ADCIN0 (1<<0) ++#define TWL4030_MADC_ADCIN1 (1<<1) ++#define TWL4030_MADC_ADCIN2 (1<<2) ++#define TWL4030_MADC_ADCIN3 (1<<3) ++#define TWL4030_MADC_ADCIN4 (1<<4) ++#define TWL4030_MADC_ADCIN5 (1<<5) ++#define TWL4030_MADC_ADCIN6 (1<<6) ++#define TWL4030_MADC_ADCIN7 (1<<7) ++#define TWL4030_MADC_ADCIN8 (1<<8) ++#define TWL4030_MADC_ADCIN9 (1<<9) ++#define TWL4030_MADC_ADCIN10 (1<<10) ++#define TWL4030_MADC_ADCIN11 (1<<11) ++#define TWL4030_MADC_ADCIN12 (1<<12) ++#define TWL4030_MADC_ADCIN13 (1<<13) ++#define TWL4030_MADC_ADCIN14 (1<<14) ++#define TWL4030_MADC_ADCIN15 (1<<15) ++ ++/* Fixed channels */ ++#define TWL4030_MADC_BTEMP TWL4030_MADC_ADCIN1 ++#define TWL4030_MADC_VBUS TWL4030_MADC_ADCIN8 ++#define TWL4030_MADC_VBKB TWL4030_MADC_ADCIN9 ++#define TWL4030_MADC_ICHG TWL4030_MADC_ADCIN10 ++#define TWL4030_MADC_VCHG TWL4030_MADC_ADCIN11 ++#define TWL4030_MADC_VBAT TWL4030_MADC_ADCIN12 ++ ++/* BCI related - XXX To be moved elsewhere */ ++#define TWL4030_BCI_BCICTL1 0x23 ++#define TWL4030_BCI_MESBAT (1<<1) ++#define TWL4030_BCI_TYPEN (1<<4) ++#define TWL4030_BCI_ITHEN (1<<3) ++ ++/* USB related - XXX To be moved elsewhere */ ++#define TWL4030_USB_CARKIT_ANA_CTRL 0xBB ++#define TWL4030_USB_SEL_MADC_MCPC (1<<3) ++ ++#define TWL4030_MADC_IOC_MAGIC '`' ++#define TWL4030_MADC_IOCX_ADC_RAW_READ _IO(TWL4030_MADC_IOC_MAGIC, 0) ++ ++struct twl4030_madc_user_parms { ++ int channel; ++ int average; ++ int status; ++ u16 result; ++}; ++ ++int twl4030_madc_conversion(struct twl4030_madc_request *conv); ++ ++#endif +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0021-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch b/recipes/linux/linux-omap-psp-2.6.32/0021-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch new file mode 100644 index 0000000000..1336748878 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0021-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch @@ -0,0 +1,32 @@ +From b493857b86991f6e45bc59158ae5724cba2bca93 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman <steve@sakoman.com> +Date: Thu, 17 Dec 2009 14:27:15 -0800 +Subject: [PATCH 21/30] ARM: OMAP: Add twl4030 madc support to Overo + +--- + arch/arm/mach-omap2/board-overo.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c +index 6204b8c..9c76588 100644 +--- a/arch/arm/mach-omap2/board-overo.c ++++ b/arch/arm/mach-omap2/board-overo.c +@@ -390,10 +390,15 @@ static struct twl4030_codec_data overo_codec_data = { + + /* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */ + ++static struct twl4030_madc_platform_data overo_madc_data = { ++ .irq_line = 1, ++}; ++ + static struct twl4030_platform_data overo_twldata = { + .irq_base = TWL4030_IRQ_BASE, + .irq_end = TWL4030_IRQ_END, + .gpio = &overo_gpio_data, ++ .madc = &overo_madc_data, + .usb = &overo_usb_data, + .codec = &overo_codec_data, + .vmmc1 = &overo_vmmc1, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0022-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch b/recipes/linux/linux-omap-psp-2.6.32/0022-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch new file mode 100644 index 0000000000..2009986710 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0022-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch @@ -0,0 +1,35 @@ +From 01b3d1865d5ebaa2a0f084fce346fe7c9fb90140 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman <steve@sakoman.com> +Date: Thu, 17 Dec 2009 14:32:36 -0800 +Subject: [PATCH 22/30] ARM: OMAP: Add twl4030 madc support to Beagle + +--- + arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index d09a676..4b7ed8a 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -438,6 +438,10 @@ static struct twl4030_codec_data beagle_codec_data = { + .audio = &beagle_audio_data, + }; + ++static struct twl4030_madc_platform_data beagle_madc_data = { ++ .irq_line = 1, ++}; ++ + static struct twl4030_platform_data beagle_twldata = { + .irq_base = TWL4030_IRQ_BASE, + .irq_end = TWL4030_IRQ_END, +@@ -446,6 +450,7 @@ static struct twl4030_platform_data beagle_twldata = { + .usb = &beagle_usb_data, + .gpio = &beagle_gpio_data, + .codec = &beagle_codec_data, ++ .madc = &beagle_madc_data, + .vmmc1 = &beagle_vmmc1, + .vsim = &beagle_vsim, + .vdac = &beagle_vdac, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0023-netdev-rt73usb-add-vendor-device-ID-for-Ceiva-Wirele.patch b/recipes/linux/linux-omap-psp-2.6.32/0023-netdev-rt73usb-add-vendor-device-ID-for-Ceiva-Wirele.patch new file mode 100644 index 0000000000..d080932b97 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0023-netdev-rt73usb-add-vendor-device-ID-for-Ceiva-Wirele.patch @@ -0,0 +1,25 @@ +From 845dba8a566ff0e1fee0ef8326cd04cc1459d752 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman <steve@sakoman.com> +Date: Tue, 19 Jan 2010 20:00:46 -0800 +Subject: [PATCH 23/30] netdev: rt73usb - add vendor/device ID for Ceiva Wireless PartNo 81726-00702 + +--- + drivers/net/wireless/rt2x00/rt73usb.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c +index ced3b6a..719ac0a 100644 +--- a/drivers/net/wireless/rt2x00/rt73usb.c ++++ b/drivers/net/wireless/rt2x00/rt73usb.c +@@ -2357,6 +2357,8 @@ static struct usb_device_id rt73usb_device_table[] = { + { USB_DEVICE(0x0411, 0x00f4), USB_DEVICE_DATA(&rt73usb_ops) }, + { USB_DEVICE(0x0411, 0x0116), USB_DEVICE_DATA(&rt73usb_ops) }, + { USB_DEVICE(0x0411, 0x0119), USB_DEVICE_DATA(&rt73usb_ops) }, ++ /* Ceiva Wireless PartNo 81726-00702 */ ++ { USB_DEVICE(0x178d, 0x02be), USB_DEVICE_DATA(&rt73usb_ops) }, + /* CNet */ + { USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt73usb_ops) }, + { USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) }, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/no-mmc-spew.patch b/recipes/linux/linux-omap-psp-2.6.32/0024-mmc-don-t-display-single-block-read-console-messages.patch index fbdbaf6fe6..9e44a7894e 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/no-mmc-spew.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0024-mmc-don-t-display-single-block-read-console-messages.patch @@ -1,10 +1,12 @@ +From 77117a884acafbca2466f236a96a05f4d85bb29a Mon Sep 17 00:00:00 2001 From: Steve Sakoman <steve@sakoman.com> -Date: Mon, 4 Jan 2010 19:20:25 +0000 (-0800) -Subject: mmc: don't display single block read console messages -X-Git-Url: http://www.sakoman.com/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff_plain;h=38cc380db66d9ac5ef25f25c9f7ef6bf094347b5 +Date: Mon, 4 Jan 2010 19:20:25 -0800 +Subject: [PATCH 24/30] mmc: don't display single block read console messages mmc: don't display single block read console messages --- + drivers/mmc/card/block.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 85f0e8c..05492e9 100644 @@ -21,3 +23,6 @@ index 85f0e8c..05492e9 100644 disable_multi = 1; continue; } +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0025-ARM-OMAP2-mmc-twl4030-move-clock-input-selection-pri.patch b/recipes/linux/linux-omap-psp-2.6.32/0025-ARM-OMAP2-mmc-twl4030-move-clock-input-selection-pri.patch new file mode 100644 index 0000000000..31122faee3 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0025-ARM-OMAP2-mmc-twl4030-move-clock-input-selection-pri.patch @@ -0,0 +1,47 @@ +From 2be74286ea90595a7ab3fc36fc3ce2d9a2696a35 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman <steve@sakoman.com> +Date: Sun, 24 Jan 2010 09:33:56 -0800 +Subject: [PATCH 25/30] ARM: OMAP2: mmc-twl4030: move clock input selection prior to vcc test + +otherwise it is not executed on systems that use non-twl regulators +--- + arch/arm/mach-omap2/mmc-twl4030.c | 16 ++++++++-------- + 1 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c +index 0c3c72d..dbdafb9 100644 +--- a/arch/arm/mach-omap2/mmc-twl4030.c ++++ b/arch/arm/mach-omap2/mmc-twl4030.c +@@ -302,6 +302,14 @@ static int twl_mmc23_set_power(struct device *dev, int slot, int power_on, int v + if (c == NULL) + return -ENODEV; + ++ if (mmc->slots[0].internal_clock) { ++ u32 reg; ++ ++ reg = omap_ctrl_readl(control_devconf1_offset); ++ reg |= OMAP2_MMCSDIO2ADPCLKISEL; ++ omap_ctrl_writel(reg, control_devconf1_offset); ++ } ++ + /* If we don't see a Vcc regulator, assume it's a fixed + * voltage always-on regulator. + */ +@@ -322,14 +330,6 @@ static int twl_mmc23_set_power(struct device *dev, int slot, int power_on, int v + * chips/cards need an interface voltage rail too. + */ + if (power_on) { +- /* only MMC2 supports a CLKIN */ +- if (mmc->slots[0].internal_clock) { +- u32 reg; +- +- reg = omap_ctrl_readl(control_devconf1_offset); +- reg |= OMAP2_MMCSDIO2ADPCLKISEL; +- omap_ctrl_writel(reg, control_devconf1_offset); +- } + ret = mmc_regulator_set_ocr(c->vcc, vdd); + /* enable interface voltage rail, if needed */ + if (ret == 0 && c->vcc_aux) { +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/dss2/0014-OMAP-DSS-Add-DSS2-support-for-Overo.patch b/recipes/linux/linux-omap-psp-2.6.32/0026-board-overo-add-PM-code-and-sync-with-http-www.sakom.patch index c673a09a76..2de6a04015 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/dss2/0014-OMAP-DSS-Add-DSS2-support-for-Overo.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0026-board-overo-add-PM-code-and-sync-with-http-www.sakom.patch @@ -1,25 +1,25 @@ -From 6b135653505a2a5da42c92cfa31c3ab22e2b130f Mon Sep 17 00:00:00 2001 -From: Steve Sakoman <steve@sakoman.com> -Date: Fri, 18 Dec 2009 06:39:24 -0800 -Subject: [PATCH 14/16] OMAP: DSS: Add DSS2 support for Overo +From 854cb25abd08485f4b2c127112cf621471347040 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Sun, 14 Feb 2010 12:52:02 +0100 +Subject: [PATCH 26/30] board-overo: add PM code and sync with http://www.sakoman.com/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=shortlog;h=refs/heads/omap3-2.6.32 --- - arch/arm/mach-omap2/board-overo.c | 233 +++++++++++++++++++++++++++++++----- - 1 files changed, 200 insertions(+), 33 deletions(-) + arch/arm/mach-omap2/board-overo.c | 274 ++++++++++++++++++++++++++++++++----- + 1 files changed, 242 insertions(+), 32 deletions(-) diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c -index d0394d9..b90b140 100644 +index 9c76588..2595f81 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c @@ -28,6 +28,7 @@ #include <linux/platform_device.h> - #include <linux/i2c/twl4030.h> + #include <linux/i2c/twl.h> #include <linux/regulator/machine.h> +#include <linux/spi/spi.h> #include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> -@@ -40,10 +41,12 @@ +@@ -40,16 +41,24 @@ #include <plat/board.h> #include <plat/common.h> @@ -29,19 +29,24 @@ index d0394d9..b90b140 100644 #include <mach/hardware.h> #include <plat/nand.h> +#include <plat/mcspi.h> - #include <plat/mux.h> #include <plat/usb.h> +- +-#include "mux.h" ++#include <plat/clock.h> ++#include <plat/omap-pm.h> ++ + #include "sdram-micron-mt46h32m32lf-6.h" + #include "mmc-twl4030.h" -@@ -69,8 +72,6 @@ - #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ - defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) - --#include <plat/mcspi.h> --#include <linux/spi/spi.h> - #include <linux/spi/ads7846.h> - - static struct omap2_mcspi_device_config ads7846_mcspi_config = { -@@ -95,18 +96,6 @@ static struct ads7846_platform_data ads7846_config = { ++#include "mux.h" ++ ++#include "pm.h" ++#include "omap3-opp.h" ++ + #define OVERO_GPIO_BT_XGATE 15 + #define OVERO_GPIO_W2W_NRESET 16 + #define OVERO_GPIO_PENDOWN 114 +@@ -95,18 +104,6 @@ static struct ads7846_platform_data ads7846_config = { .keep_vref_on = 1, }; @@ -60,7 +65,7 @@ index d0394d9..b90b140 100644 static void __init overo_ads7846_init(void) { if ((gpio_request(OVERO_GPIO_PENDOWN, "ADS7846_PENDOWN") == 0) && -@@ -116,9 +105,6 @@ static void __init overo_ads7846_init(void) +@@ -116,9 +113,6 @@ static void __init overo_ads7846_init(void) printk(KERN_ERR "could not obtain gpio for ADS7846_PENDOWN\n"); return; } @@ -70,7 +75,7 @@ index d0394d9..b90b140 100644 } #else -@@ -234,6 +220,137 @@ static inline void __init overo_init_smsc911x(void) +@@ -234,6 +228,169 @@ static inline void __init overo_init_smsc911x(void) static inline void __init overo_init_smsc911x(void) { return; } #endif @@ -123,6 +128,37 @@ index d0394d9..b90b140 100644 + .platform_disable = overo_panel_disable_dvi, +}; + ++static int overo_panel_enable_tv(struct omap_dss_device *dssdev) ++{ ++#define ENABLE_VDAC_DEDICATED 0x03 ++#define ENABLE_VDAC_DEV_GRP 0x20 ++ ++ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, ++ ENABLE_VDAC_DEDICATED, ++ TWL4030_VDAC_DEDICATED); ++ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, ++ ENABLE_VDAC_DEV_GRP, TWL4030_VDAC_DEV_GRP); ++ ++ return 0; ++} ++ ++static void overo_panel_disable_tv(struct omap_dss_device *dssdev) ++{ ++ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00, ++ TWL4030_VDAC_DEDICATED); ++ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00, ++ TWL4030_VDAC_DEV_GRP); ++} ++ ++static struct omap_dss_device overo_tv_device = { ++ .name = "tv", ++ .driver_name = "venc", ++ .type = OMAP_DISPLAY_TYPE_VENC, ++ .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, ++ .platform_enable = overo_panel_enable_tv, ++ .platform_disable = overo_panel_disable_tv, ++}; ++ +static int overo_panel_enable_lcd(struct omap_dss_device *dssdev) +{ + if (dvi_enabled) { @@ -171,6 +207,7 @@ index d0394d9..b90b140 100644 + +static struct omap_dss_device *overo_dss_devices[] = { + &overo_dvi_device, ++ &overo_tv_device, +#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \ + defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE) + &overo_lcd35_device, @@ -208,7 +245,7 @@ index d0394d9..b90b140 100644 static struct mtd_partition overo_nand_partitions[] = { { .name = "xloader", -@@ -379,6 +496,37 @@ static struct regulator_init_data overo_vmmc1 = { +@@ -379,6 +536,37 @@ static struct regulator_init_data overo_vmmc1 = { .consumer_supplies = &overo_vmmc1_supply, }; @@ -246,16 +283,7 @@ index d0394d9..b90b140 100644 static struct twl4030_codec_audio_data overo_audio_data = { .audio_mclk = 26000000, }; -@@ -388,8 +536,6 @@ static struct twl4030_codec_data overo_codec_data = { - .audio = &overo_audio_data, - }; - --/* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */ -- - static struct twl4030_madc_platform_data overo_madc_data = { - .irq_line = 1, - }; -@@ -402,6 +548,8 @@ static struct twl4030_platform_data overo_twldata = { +@@ -402,6 +590,8 @@ static struct twl4030_platform_data overo_twldata = { .usb = &overo_usb_data, .codec = &overo_codec_data, .vmmc1 = &overo_vmmc1, @@ -264,7 +292,7 @@ index d0394d9..b90b140 100644 }; static struct i2c_board_info __initdata overo_i2c_boardinfo[] = { -@@ -422,23 +570,41 @@ static int __init overo_i2c_init(void) +@@ -422,31 +612,50 @@ static int __init overo_i2c_init(void) return 0; } @@ -316,9 +344,11 @@ index d0394d9..b90b140 100644 - omap_board_config = overo_config; - omap_board_config_size = ARRAY_SIZE(overo_config); omap2_init_common_hw(mt46h32m32lf6_sdrc_params, - mt46h32m32lf6_sdrc_params); +- mt46h32m32lf6_sdrc_params, NULL, NULL, NULL); ++ NULL, omap35x_mpu_rate_table, ++ omap35x_dsp_rate_table, omap35x_l3_rate_table); omap_init_irq(); -@@ -446,7 +612,7 @@ static void __init overo_init_irq(void) + omap_gpio_init(); } static struct platform_device *overo_devices[] __initdata = { @@ -327,7 +357,7 @@ index d0394d9..b90b140 100644 }; static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { -@@ -469,8 +635,9 @@ static void __init overo_init(void) +@@ -477,8 +686,9 @@ static void __init overo_init(void) overo_flash_init(); usb_musb_init(); usb_ehci_init(&ehci_pdata); @@ -337,7 +367,7 @@ index d0394d9..b90b140 100644 + overo_display_init(); /* Ensure SDRC pins are mux'd for self-refresh */ - omap_cfg_reg(H16_34XX_SDRC_CKE0); + omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); -- -1.6.2.4 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/0027-twl4030-madc-adjust-for-twl4030-twl-api-changes.patch b/recipes/linux/linux-omap-psp-2.6.32/0027-twl4030-madc-adjust-for-twl4030-twl-api-changes.patch new file mode 100644 index 0000000000..b86fe4771a --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0027-twl4030-madc-adjust-for-twl4030-twl-api-changes.patch @@ -0,0 +1,85 @@ +From d9c0a35b57e7f77706834dfed1132c32eb09f74e Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Mon, 15 Feb 2010 14:20:51 +0100 +Subject: [PATCH 27/30] twl4030-madc: adjust for twl4030 -> twl api changes + +--- + drivers/mfd/twl4030-madc.c | 18 +++++++++--------- + 1 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c +index 7d83ab8..de6bdcd 100644 +--- a/drivers/mfd/twl4030-madc.c ++++ b/drivers/mfd/twl4030-madc.c +@@ -29,7 +29,7 @@ + #include <linux/fs.h> + #include <linux/platform_device.h> + #include <linux/miscdevice.h> +-#include <linux/i2c/twl4030.h> ++#include <linux/i2c/twl.h> + #include <linux/i2c/twl4030-madc.h> + + #include <asm/uaccess.h> +@@ -73,7 +73,7 @@ static int twl4030_madc_read(struct twl4030_madc_data *madc, u8 reg) + int ret; + u8 val; + +- ret = twl4030_i2c_read_u8(TWL4030_MODULE_MADC, &val, reg); ++ ret = twl_i2c_read_u8(TWL4030_MODULE_MADC, &val, reg); + if (ret) { + dev_dbg(madc->dev, "unable to read register 0x%X\n", reg); + return ret; +@@ -86,7 +86,7 @@ static void twl4030_madc_write(struct twl4030_madc_data *madc, u8 reg, u8 val) + { + int ret; + +- ret = twl4030_i2c_write_u8(TWL4030_MODULE_MADC, val, reg); ++ ret = twl_i2c_write_u8(TWL4030_MODULE_MADC, val, reg); + if (ret) + dev_err(madc->dev, "unable to write register 0x%X\n", reg); + } +@@ -342,13 +342,13 @@ static int twl4030_madc_set_current_generator(struct twl4030_madc_data *madc, + if (chan > 1) + return EINVAL; + +- ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE, ++ ret = twl_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE, + ®val, TWL4030_BCI_BCICTL1); + if (on) + regval |= (chan) ? TWL4030_BCI_ITHEN : TWL4030_BCI_TYPEN; + else + regval &= (chan) ? ~TWL4030_BCI_ITHEN : ~TWL4030_BCI_TYPEN; +- ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE, ++ ret = twl_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE, + regval, TWL4030_BCI_BCICTL1); + + return ret; +@@ -453,21 +453,21 @@ static int __init twl4030_madc_probe(struct platform_device *pdev) + twl4030_madc_set_current_generator(madc, 0, 1); + + /* Enable ADCIN3 through 6 */ +- ret = twl4030_i2c_read_u8(TWL4030_MODULE_USB, ++ ret = twl_i2c_read_u8(TWL4030_MODULE_USB, + ®val, TWL4030_USB_CARKIT_ANA_CTRL); + + regval |= TWL4030_USB_SEL_MADC_MCPC; + +- ret = twl4030_i2c_write_u8(TWL4030_MODULE_USB, ++ ret = twl_i2c_write_u8(TWL4030_MODULE_USB, + regval, TWL4030_USB_CARKIT_ANA_CTRL); + + +- ret = twl4030_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE, ++ ret = twl_i2c_read_u8(TWL4030_MODULE_MAIN_CHARGE, + ®val, TWL4030_BCI_BCICTL1); + + regval |= TWL4030_BCI_MESBAT; + +- ret = twl4030_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE, ++ ret = twl_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE, + regval, TWL4030_BCI_BCICTL1); + + ret = request_irq(platform_get_irq(pdev, 0), twl4030_madc_irq_handler, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0028-OMAP-DSS2-Re-add-support-for-Samsung-lte430wq-f0c-pa.patch b/recipes/linux/linux-omap-psp-2.6.32/0028-OMAP-DSS2-Re-add-support-for-Samsung-lte430wq-f0c-pa.patch new file mode 100644 index 0000000000..db7428f09e --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0028-OMAP-DSS2-Re-add-support-for-Samsung-lte430wq-f0c-pa.patch @@ -0,0 +1,161 @@ +From 0887ecd7c5f5c9d879ec96fc3f4796de41a6c228 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Mon, 15 Feb 2010 14:38:00 +0100 +Subject: [PATCH 28/30] OMAP: DSS2: (Re)add support for Samsung lte430wq-f0c panel + +--- + drivers/video/omap2/displays/Kconfig | 6 + + drivers/video/omap2/displays/Makefile | 1 + + .../omap2/displays/panel-samsung-lte430wq-f0c.c | 113 ++++++++++++++++++++ + 3 files changed, 120 insertions(+), 0 deletions(-) + create mode 100644 drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c + +diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig +index 4ce47dd..4229a28 100644 +--- a/drivers/video/omap2/displays/Kconfig ++++ b/drivers/video/omap2/displays/Kconfig +@@ -7,6 +7,12 @@ config PANEL_GENERIC + Generic panel driver. + Used for DVI output for Beagle and OMAP3 SDP. + ++config PANEL_SAMSUNG_LTE430WQ_F0C ++ tristate "Samsung LTE430WQ-F0C LCD Panel" ++ depends on OMAP2_DSS ++ help ++ LCD Panel used on Overo Palo43 ++ + config PANEL_SHARP_LS037V7DW01 + tristate "Sharp LS037V7DW01 LCD Panel" + depends on OMAP2_DSS +diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile +index 8f3d0ad..9317445 100644 +--- a/drivers/video/omap2/displays/Makefile ++++ b/drivers/video/omap2/displays/Makefile +@@ -1,4 +1,5 @@ + obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o ++obj-$(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) += panel-samsung-lte430wq-f0c.o + obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o + obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o + +diff --git a/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c +new file mode 100644 +index 0000000..3f0477e +--- /dev/null ++++ b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c +@@ -0,0 +1,113 @@ ++/* ++ * LCD panel driver for Samsung LTE430WQ-F0C ++ * ++ * Author: Steve Sakoman <steve@sakoman.com> ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published by ++ * the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ * ++ * You should have received a copy of the GNU General Public License along with ++ * this program. If not, see <http://www.gnu.org/licenses/>. ++ */ ++ ++#include <linux/module.h> ++#include <linux/delay.h> ++ ++#include <plat/display.h> ++ ++static struct omap_video_timings samsung_lte_timings = { ++ .x_res = 480, ++ .y_res = 272, ++ ++ .pixel_clock = 9200, ++ ++ .hsw = 41, ++ .hfp = 8, ++ .hbp = 45-41, ++ ++ .vsw = 10, ++ .vfp = 4, ++ .vbp = 12-10, ++}; ++ ++static int samsung_lte_panel_probe(struct omap_dss_device *dssdev) ++{ ++ dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | ++ OMAP_DSS_LCD_IHS; ++ dssdev->panel.timings = samsung_lte_timings; ++ ++ return 0; ++} ++ ++static void samsung_lte_panel_remove(struct omap_dss_device *dssdev) ++{ ++} ++ ++static int samsung_lte_panel_enable(struct omap_dss_device *dssdev) ++{ ++ int r = 0; ++ ++ /* wait couple of vsyncs until enabling the LCD */ ++ msleep(50); ++ ++ if (dssdev->platform_enable) ++ r = dssdev->platform_enable(dssdev); ++ ++ return r; ++} ++ ++static void samsung_lte_panel_disable(struct omap_dss_device *dssdev) ++{ ++ if (dssdev->platform_disable) ++ dssdev->platform_disable(dssdev); ++ ++ /* wait at least 5 vsyncs after disabling the LCD */ ++ ++ msleep(100); ++} ++ ++static int samsung_lte_panel_suspend(struct omap_dss_device *dssdev) ++{ ++ samsung_lte_panel_disable(dssdev); ++ return 0; ++} ++ ++static int samsung_lte_panel_resume(struct omap_dss_device *dssdev) ++{ ++ return samsung_lte_panel_enable(dssdev); ++} ++ ++static struct omap_dss_driver samsung_lte_driver = { ++ .probe = samsung_lte_panel_probe, ++ .remove = samsung_lte_panel_remove, ++ ++ .enable = samsung_lte_panel_enable, ++ .disable = samsung_lte_panel_disable, ++ .suspend = samsung_lte_panel_suspend, ++ .resume = samsung_lte_panel_resume, ++ ++ .driver = { ++ .name = "samsung_lte_panel", ++ .owner = THIS_MODULE, ++ }, ++}; ++ ++static int __init samsung_lte_panel_drv_init(void) ++{ ++ return omap_dss_register_driver(&samsung_lte_driver); ++} ++ ++static void __exit samsung_lte_panel_drv_exit(void) ++{ ++ omap_dss_unregister_driver(&samsung_lte_driver); ++} ++ ++module_init(samsung_lte_panel_drv_init); ++module_exit(samsung_lte_panel_drv_exit); ++MODULE_LICENSE("GPL"); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/dss2/0012-OMAP-DSS2-Add-support-for-LG-Philips-LB035Q02-pane.patch b/recipes/linux/linux-omap-psp-2.6.32/0029-OMAP-DSS2-Add-support-for-LG-Philips-LB035Q02-panel.patch index a22f3e712f..ee05863c4f 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/dss2/0012-OMAP-DSS2-Add-support-for-LG-Philips-LB035Q02-pane.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/0029-OMAP-DSS2-Add-support-for-LG-Philips-LB035Q02-panel.patch @@ -1,7 +1,7 @@ -From e09abf20005e9abf41e44e712bc600d2cb346cb5 Mon Sep 17 00:00:00 2001 +From 29fb8d970cf88080881269f99b886fd53534603c Mon Sep 17 00:00:00 2001 From: Steve Sakoman <steve@sakoman.com> Date: Thu, 17 Dec 2009 15:05:30 -0800 -Subject: [PATCH 12/16] OMAP: DSS2: Add support for LG Philips LB035Q02 panel +Subject: [PATCH 29/30] OMAP: DSS2: Add support for LG Philips LB035Q02 panel --- drivers/video/omap2/displays/Kconfig | 6 + @@ -11,7 +11,7 @@ Subject: [PATCH 12/16] OMAP: DSS2: Add support for LG Philips LB035Q02 panel create mode 100644 drivers/video/omap2/displays/panel-lgphilips-lb035q02.c diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig -index 79d2861..050f29c 100644 +index 4229a28..875250a 100644 --- a/drivers/video/omap2/displays/Kconfig +++ b/drivers/video/omap2/displays/Kconfig @@ -7,6 +7,12 @@ config PANEL_GENERIC @@ -28,7 +28,7 @@ index 79d2861..050f29c 100644 tristate "Samsung LTE430WQ-F0C LCD Panel" depends on OMAP2_DSS diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile -index d44e765..28f6f9b 100644 +index 9317445..f8e6c52 100644 --- a/drivers/video/omap2/displays/Makefile +++ b/drivers/video/omap2/displays/Makefile @@ -1,4 +1,5 @@ @@ -36,7 +36,7 @@ index d44e765..28f6f9b 100644 +obj-$(CONFIG_PANEL_LGPHILIPS_LB035Q02) += panel-lgphilips-lb035q02.o obj-$(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) += panel-samsung-lte430wq-f0c.o obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o - + obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o diff --git a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c new file mode 100644 index 0000000..22dc865 @@ -250,5 +250,5 @@ index 0000000..22dc865 +module_exit(lb035q02_panel_drv_exit); +MODULE_LICENSE("GPL"); -- -1.6.2.4 +1.6.6.1 diff --git a/recipes/linux/linux-omap-psp-2.6.32/0030-Fix-for-bus-width-which-improves-SD-card-s-peformanc.patch b/recipes/linux/linux-omap-psp-2.6.32/0030-Fix-for-bus-width-which-improves-SD-card-s-peformanc.patch new file mode 100644 index 0000000000..5650006925 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0030-Fix-for-bus-width-which-improves-SD-card-s-peformanc.patch @@ -0,0 +1,32 @@ +From 19ecb9ad009ce48d903d225ab511539a03a7867b Mon Sep 17 00:00:00 2001 +From: Kishore Kadiyala <kishore.kadiyala@ti.com> +Date: Wed, 17 Feb 2010 19:34:47 +0530 +Subject: [PATCH 30/32] Fix for bus width which improves SD card's peformance. + +This patch fixes bus width which improves peformance for SD cards. +OMAP-MMC controller's can support maximum bus width of '8'. +when bus width is mentioned as "8" in controller data,the SD +stack will check whether bus width is "4" and if not it will +set bus width to "1" and there by degrading peformance. + +Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com> +--- + drivers/mmc/host/omap_hsmmc.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c +index 4b23225..e7323c6 100644 +--- a/drivers/mmc/host/omap_hsmmc.c ++++ b/drivers/mmc/host/omap_hsmmc.c +@@ -1737,7 +1737,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) + MMC_CAP_WAIT_WHILE_BUSY; + + if (mmc_slot(host).wires >= 8) +- mmc->caps |= MMC_CAP_8_BIT_DATA; ++ mmc->caps |= (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA); + else if (mmc_slot(host).wires >= 4) + mmc->caps |= MMC_CAP_4_BIT_DATA; + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0031-ARM-VFP-add-support-to-sync-the-VFP-state-of-the-cur.patch b/recipes/linux/linux-omap-psp-2.6.32/0031-ARM-VFP-add-support-to-sync-the-VFP-state-of-the-cur.patch new file mode 100644 index 0000000000..1a4979e8e2 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0031-ARM-VFP-add-support-to-sync-the-VFP-state-of-the-cur.patch @@ -0,0 +1,109 @@ +From 7f82f1bbba1f762468617387702002c0ca81df0f Mon Sep 17 00:00:00 2001 +From: Imre Deak <imre.deak@nokia.com> +Date: Thu, 4 Feb 2010 21:38:02 +0200 +Subject: [PATCH 31/32] ARM: VFP: add support to sync the VFP state of the current thread + +ARM: VFP: add support to sync the VFP state of the current thread + +So far vfp_sync_state worked only for threads other than the current +one. This worked for tracing other threads, but not for PTRACE_TRACEME. +Syncing for the current thread will also be needed by an upcoming patch +adding support for VFP context save / restore around signal handlers. + +For SMP we need get_cpu now, since we have to protect the FPEXC +register, other than this things remained the same for threads other +than the current. + +Signed-off-by: Imre Deak <imre.deak@nokia.com> +Signed-off-by: Bryan Wu <bryan.wu@canonical.com> +--- + arch/arm/vfp/vfpmodule.c | 46 +++++++++++++++++++++++++++++++--------------- + 1 files changed, 31 insertions(+), 15 deletions(-) + +diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c +index aed05bc..f28f45b 100644 +--- a/arch/arm/vfp/vfpmodule.c ++++ b/arch/arm/vfp/vfpmodule.c +@@ -423,12 +423,19 @@ static inline void vfp_pm_init(void) { } + #endif /* CONFIG_PM */ + + /* +- * Synchronise the hardware VFP state of a thread other than current with the +- * saved one. This function is used by the ptrace mechanism. ++ * Synchronise the hardware VFP state of a thread with the saved one. ++ * This function is used by the ptrace mechanism and the signal handler path. + */ +-#ifdef CONFIG_SMP + void vfp_sync_state(struct thread_info *thread) + { ++ unsigned int cpu = get_cpu(); ++ u32 fpexc = fmrx(FPEXC); ++ int vfp_enabled; ++ int self; ++ ++ vfp_enabled = fpexc & FPEXC_EN; ++ self = thread == current_thread_info(); ++#ifdef CONFIG_SMP + /* + * On SMP systems, the VFP state is automatically saved at every + * context switch. We mark the thread VFP state as belonging to a +@@ -436,18 +443,22 @@ void vfp_sync_state(struct thread_info *thread) + * needed. + */ + thread->vfpstate.hard.cpu = NR_CPUS; +-} +-#else +-void vfp_sync_state(struct thread_info *thread) +-{ +- unsigned int cpu = get_cpu(); +- u32 fpexc = fmrx(FPEXC); +- + /* +- * If VFP is enabled, the previous state was already saved and +- * last_VFP_context updated. ++ * Only the current thread's saved VFP context can be out-of-date. ++ * For others there is nothing else to do, since we already ensured ++ * force loading above. + */ +- if (fpexc & FPEXC_EN) ++ if (!self) ++ goto out; ++#endif ++ /* ++ * If the VFP is enabled only the current thread's saved VFP ++ * context can get out-of-date. For other threads the context ++ * was updated when the current thread started to use the VFP. ++ * This also means that the context will be reloaded next time ++ * the thread uses the VFP, so no need to enforce it. ++ */ ++ if (vfp_enabled && !self) + goto out; + + if (!last_VFP_context[cpu]) +@@ -456,8 +467,14 @@ void vfp_sync_state(struct thread_info *thread) + /* + * Save the last VFP state on this CPU. + */ +- fmxr(FPEXC, fpexc | FPEXC_EN); ++ if (!vfp_enabled) ++ fmxr(FPEXC, fpexc | FPEXC_EN); + vfp_save_state(last_VFP_context[cpu], fpexc); ++ /* ++ * Disable VFP in case it was enabled so that the force reload ++ * can happen. ++ */ ++ fpexc &= ~FPEXC_EN; + fmxr(FPEXC, fpexc); + + /* +@@ -469,7 +486,6 @@ void vfp_sync_state(struct thread_info *thread) + out: + put_cpu(); + } +-#endif + + #include <linux/smp.h> + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0032-ARM-VFP-preserve-the-HW-context-when-calling-signal-.patch b/recipes/linux/linux-omap-psp-2.6.32/0032-ARM-VFP-preserve-the-HW-context-when-calling-signal-.patch new file mode 100644 index 0000000000..90db80a3d5 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0032-ARM-VFP-preserve-the-HW-context-when-calling-signal-.patch @@ -0,0 +1,211 @@ +From fb730244df2f3bd3f51b6f052c4c0dbe2e1428f4 Mon Sep 17 00:00:00 2001 +From: Imre Deak <imre.deak@nokia.com> +Date: Thu, 4 Feb 2010 21:38:30 +0200 +Subject: [PATCH 32/32] ARM: VFP: preserve the HW context when calling signal handlers + +ARM: VFP: preserve the HW context when calling signal handlers + +Signal handlers can use floating point, so prevent them to corrupt +the main thread's VFP context. So far there were two signal stack +frame formats defined based on the VFP implementation, but the user +struct used for ptrace covers all posibilities, so use it for the +signal stack too. This patch extends the user struct and leaves +its magic number the same, in the hope that user space code does +not depend on its size and can parse the original regs w/o +problems. + +Support to save / restore the exception registers was added by +Will Deacon. + +Signed-off-by: Imre Deak <imre.deak@nokia.com> +Signed-off-by: Will Deacon <will.deacon@arm.com> +Signed-off-by: Bryan Wu <bryan.wu@canonical.com> +--- + arch/arm/include/asm/ucontext.h | 19 +++----- + arch/arm/include/asm/user.h | 3 + + arch/arm/kernel/signal.c | 91 +++++++++++++++++++++++++++++++++++++-- + 3 files changed, 97 insertions(+), 16 deletions(-) + +diff --git a/arch/arm/include/asm/ucontext.h b/arch/arm/include/asm/ucontext.h +index bf65e9f..1c3236b 100644 +--- a/arch/arm/include/asm/ucontext.h ++++ b/arch/arm/include/asm/ucontext.h +@@ -59,23 +59,18 @@ struct iwmmxt_sigframe { + #endif /* CONFIG_IWMMXT */ + + #ifdef CONFIG_VFP +-#if __LINUX_ARM_ARCH__ < 6 +-/* For ARM pre-v6, we use fstmiax and fldmiax. This adds one extra +- * word after the registers, and a word of padding at the end for +- * alignment. */ + #define VFP_MAGIC 0x56465001 +-#define VFP_STORAGE_SIZE 152 +-#else +-#define VFP_MAGIC 0x56465002 +-#define VFP_STORAGE_SIZE 144 +-#endif + + struct vfp_sigframe + { + unsigned long magic; + unsigned long size; +- union vfp_state storage; +-}; ++ struct user_vfp ufp; ++} __attribute__((__aligned__(8))); ++ ++/* 8 byte for magic and size, 272 byte for ufp */ ++#define VFP_STORAGE_SIZE sizeof(struct vfp_sigframe) ++ + #endif /* CONFIG_VFP */ + + /* +@@ -91,7 +86,7 @@ struct aux_sigframe { + #ifdef CONFIG_IWMMXT + struct iwmmxt_sigframe iwmmxt; + #endif +-#if 0 && defined CONFIG_VFP /* Not yet saved. */ ++#ifdef CONFIG_VFP + struct vfp_sigframe vfp; + #endif + /* Something that isn't a valid magic number for any coprocessor. */ +diff --git a/arch/arm/include/asm/user.h b/arch/arm/include/asm/user.h +index df95e05..ea7e44d 100644 +--- a/arch/arm/include/asm/user.h ++++ b/arch/arm/include/asm/user.h +@@ -88,6 +88,9 @@ struct user{ + struct user_vfp { + unsigned long long fpregs[32]; + unsigned long fpscr; ++ unsigned long fpexc; ++ unsigned long fpinst; ++ unsigned long fpinst2; + }; + + #endif /* _ARM_USER_H */ +diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c +index e7714f3..6a36851 100644 +--- a/arch/arm/kernel/signal.c ++++ b/arch/arm/kernel/signal.c +@@ -18,6 +18,7 @@ + #include <asm/cacheflush.h> + #include <asm/ucontext.h> + #include <asm/unistd.h> ++#include <asm/vfp.h> + + #include "ptrace.h" + #include "signal.h" +@@ -175,6 +176,88 @@ static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame) + + #endif + ++#ifdef CONFIG_VFP ++ ++static int preserve_vfp_context(struct vfp_sigframe __user *frame) ++{ ++ struct thread_info *thread = current_thread_info(); ++ struct vfp_hard_struct *h = &thread->vfpstate.hard; ++ const unsigned long magic = VFP_MAGIC; ++ const unsigned long size = VFP_STORAGE_SIZE; ++ int err = 0; ++ ++ vfp_sync_state(thread); ++ __put_user_error(magic, &frame->magic, err); ++ __put_user_error(size, &frame->size, err); ++ ++ /* ++ * Copy the floating point registers. There can be unused ++ * registers see asm/hwcap.h for details. ++ */ ++ err |= __copy_to_user(&frame->ufp.fpregs, &h->fpregs, ++ sizeof(h->fpregs)); ++ /* ++ * Copy the status and control register. ++ */ ++ __put_user_error(h->fpscr, &frame->ufp.fpscr, err); ++ ++ /* ++ * Copy the exception registers. ++ */ ++ __put_user_error(h->fpexc, &frame->ufp.fpexc, err); ++ __put_user_error(h->fpinst, &frame->ufp.fpinst, err); ++ __put_user_error(h->fpinst2, &frame->ufp.fpinst2, err); ++ ++ return err ? -EFAULT : 0; ++} ++ ++static int restore_vfp_context(struct vfp_sigframe __user *frame) ++{ ++ struct thread_info *thread = current_thread_info(); ++ struct vfp_hard_struct *h = &thread->vfpstate.hard; ++ unsigned long magic; ++ unsigned long size; ++ unsigned long fpexc; ++ int err = 0; ++ ++ vfp_sync_state(thread); ++ __get_user_error(magic, &frame->magic, err); ++ __get_user_error(size, &frame->size, err); ++ ++ if (err) ++ return -EFAULT; ++ if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE) ++ return -EINVAL; ++ ++ /* ++ * Copy the floating point registers. There can be unused ++ * registers see asm/hwcap.h for details. ++ */ ++ err |= __copy_from_user(&h->fpregs, &frame->ufp.fpregs, ++ sizeof(h->fpregs)); ++ /* ++ * Copy the status and control register. ++ */ ++ __get_user_error(h->fpscr, &frame->ufp.fpscr, err); ++ ++ /* ++ * Sanitise and restore the exception registers. ++ */ ++ __get_user_error(fpexc, &frame->ufp.fpexc, err); ++ /* Ensure the VFP is enabled. */ ++ fpexc |= FPEXC_EN; ++ /* Ensure FPINST2 is invalid and the exception flag is cleared. */ ++ fpexc &= ~(FPEXC_EX | FPEXC_FP2V); ++ h->fpexc = fpexc; ++ ++ __get_user_error(h->fpinst, &frame->ufp.fpinst, err); ++ __get_user_error(h->fpinst2, &frame->ufp.fpinst2, err); ++ ++ return err ? -EFAULT : 0; ++} ++ ++#endif ++ + /* + * Do a signal return; undo the signal stack. These are aligned to 64-bit. + */ +@@ -233,8 +316,8 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf) + err |= restore_iwmmxt_context(&aux->iwmmxt); + #endif + #ifdef CONFIG_VFP +-// if (err == 0) +-// err |= vfp_restore_state(&sf->aux.vfp); ++ if (err == 0) ++ err |= restore_vfp_context(&aux->vfp); + #endif + + return err; +@@ -348,8 +431,8 @@ setup_sigframe(struct sigframe __user *sf, struct pt_regs *regs, sigset_t *set) + err |= preserve_iwmmxt_context(&aux->iwmmxt); + #endif + #ifdef CONFIG_VFP +-// if (err == 0) +-// err |= vfp_save_state(&sf->aux.vfp); ++ if (err == 0) ++ err |= preserve_vfp_context(&aux->vfp); + #endif + __put_user_error(0, &aux->end_magic, err); + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/am3517-evm/am3517-ehci-mux.patch b/recipes/linux/linux-omap-psp-2.6.32/am3517-evm/am3517-ehci-mux.patch deleted file mode 100755 index 2c1c0752d3..0000000000 --- a/recipes/linux/linux-omap-psp-2.6.32/am3517-evm/am3517-ehci-mux.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
-index ea80c5a..f9c2b03 100755
---- a/arch/arm/mach-omap2/board-am3517evm.c
-+++ b/arch/arm/mach-omap2/board-am3517evm.c
-@@ -960,6 +960,9 @@ static void __init am3517_evm_init(void)
- omap_serial_init();
- am3517evm_flash_init();
- usb_musb_init();
-+
-+ /* EHCI */
-+ omap_mux_init_gpio(57, OMAP_PIN_OUTPUT);
- usb_ehci_init(&ehci_pdata);
-
- /* TSC 2004 */
diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig b/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig index b83e652f20..67ae51069f 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32 -# Tue Feb 9 09:34:08 2010 +# Thu Feb 25 19:07:26 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -255,8 +255,8 @@ CONFIG_OMAP_DM_TIMER=y CONFIG_OMAP_LL_DEBUG_UART3=y # CONFIG_OMAP_LL_DEBUG_NONE is not set # CONFIG_OMAP_PM_NONE is not set -CONFIG_OMAP_PM_NOOP=y -# CONFIG_OMAP_PM_SRF is not set +# CONFIG_OMAP_PM_NOOP is not set +CONFIG_OMAP_PM_SRF=y CONFIG_ARCH_OMAP34XX=y CONFIG_ARCH_OMAP3430=y CONFIG_OMAP_PACKAGE_CBB=y @@ -378,9 +378,9 @@ CONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_DEBUG=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_STAT_DETAILS=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y @@ -1616,6 +1616,7 @@ CONFIG_MFD_CORE=y CONFIG_TWL4030_CORE=y CONFIG_TWL4030_POWER=y CONFIG_TWL4030_CODEC=y +# CONFIG_TWL4030_MADC is not set # CONFIG_MFD_TMIO is not set # CONFIG_MFD_T7L66XB is not set # CONFIG_MFD_TC6387XB is not set @@ -1733,6 +1734,7 @@ CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_MT9V011=m # CONFIG_VIDEO_TCM825X is not set CONFIG_VIDEO_MT9P012=m +# CONFIG_VIDEO_MT9T111 is not set # CONFIG_VIDEO_DW9710 is not set # CONFIG_VIDEO_OV3640 is not set # CONFIG_VIDEO_IMX046 is not set @@ -1741,8 +1743,8 @@ CONFIG_VIDEO_MT9P012=m CONFIG_VIDEO_SAA711X=m # CONFIG_VIDEO_SAA717X is not set # CONFIG_VIDEO_SAA7191 is not set -CONFIG_VIDEO_TVP514X=m -CONFIG_VIDEO_TVP5150=m +# CONFIG_VIDEO_TVP514X is not set +# CONFIG_VIDEO_TVP5150 is not set # CONFIG_VIDEO_VPX3220 is not set # @@ -1998,10 +2000,9 @@ CONFIG_OMAP2_DSS_VENC=y CONFIG_OMAP2_VENC_OUT_TYPE_SVIDEO=y # CONFIG_OMAP2_VENC_OUT_TYPE_COMPOSITE is not set # CONFIG_OMAP2_DSS_SDI is not set -CONFIG_OMAP2_DSS_DSI=y -CONFIG_OMAP2_DSS_USE_DSI_PLL=y +# CONFIG_OMAP2_DSS_DSI is not set # CONFIG_OMAP2_DSS_FAKE_VSYNC is not set -CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=1 +CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 CONFIG_FB_OMAP2=y CONFIG_FB_OMAP2_DEBUG_SUPPORT=y # CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set @@ -2011,9 +2012,10 @@ CONFIG_FB_OMAP2_NUM_FBS=3 # OMAP2/3 Display Device Drivers # CONFIG_PANEL_GENERIC=y +# CONFIG_PANEL_LGPHILIPS_LB035Q02 is not set +# CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C is not set CONFIG_PANEL_SHARP_LS037V7DW01=y # CONFIG_PANEL_SHARP_LQ043T1DG01 is not set -# CONFIG_PANEL_TAAL is not set # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # @@ -2432,7 +2434,7 @@ CONFIG_RTC_INTF_DEV=y # # I2C RTC drivers # -CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_DS1307=n # CONFIG_RTC_DRV_DS1374 is not set # CONFIG_RTC_DRV_DS1672 is not set # CONFIG_RTC_DRV_MAX6900 is not set diff --git a/recipes/linux/linux-omap-psp-2.6.32/dss2/0016-video-add-timings-for-hd720.patch b/recipes/linux/linux-omap-psp-2.6.32/dss2/0016-video-add-timings-for-hd720.patch deleted file mode 100644 index e5f7a4e072..0000000000 --- a/recipes/linux/linux-omap-psp-2.6.32/dss2/0016-video-add-timings-for-hd720.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 77c7ed5e802e9bb244cd00fa60c95de1e28c29be Mon Sep 17 00:00:00 2001 -From: Steve Sakoman <steve@sakoman.com> -Date: Sat, 19 Dec 2009 06:52:43 -0800 -Subject: [PATCH 16/16] video: add timings for hd720 - ---- - drivers/video/modedb.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c -index 34e4e79..9d9114d 100644 ---- a/drivers/video/modedb.c -+++ b/drivers/video/modedb.c -@@ -100,6 +100,10 @@ static const struct fb_videomode modedb[] = { - NULL, 70, 1024, 768, 13333, 144, 24, 29, 3, 136, 6, - 0, FB_VMODE_NONINTERLACED - }, { -+ /* 1280x720 @ 60 Hz, 45 kHz hsync, CEA 681-E Format 4 */ -+ "hd720", 60, 1280, 720, 13468, 220, 110, 20, 5, 40, 5, -+ 0, FB_VMODE_NONINTERLACED -+ }, { - /* 1280x1024 @ 87 Hz interlaced, 51 kHz hsync */ - NULL, 87, 1280, 1024, 12500, 56, 16, 128, 1, 216, 12, - 0, FB_VMODE_INTERLACED --- -1.6.2.4 - diff --git a/recipes/linux/linux-omap-psp-2.6.32/dss2/beagle-dss2-support.diff b/recipes/linux/linux-omap-psp-2.6.32/dss2/beagle-dss2-support.diff deleted file mode 100755 index 15d7971fa8..0000000000 --- a/recipes/linux/linux-omap-psp-2.6.32/dss2/beagle-dss2-support.diff +++ /dev/null @@ -1,308 +0,0 @@ ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -30,6 +30,7 @@ - - #include <linux/regulator/machine.h> - #include <linux/i2c/twl4030.h> -+#include <linux/omapfb.h> - - #include <mach/hardware.h> - #include <asm/mach-types.h> -@@ -44,6 +45,7 @@ - #include <plat/mux.h> - #include <plat/usb.h> - #include <plat/timer-gp.h> -+#include <plat/display.h> - - #include "mmc-twl4030.h" - -@@ -115,15 +117,6 @@ - .gpio_wp = 29, - }, - {} /* Terminator */ --}; -- --static struct platform_device omap3_beagle_lcd_device = { -- .name = "omap3beagle_lcd", -- .id = -1, --}; -- --static struct omap_lcd_config omap3_beagle_lcd_config __initdata = { -- .ctrl_name = "internal", - }; - - static struct regulator_consumer_supply beagle_vmmc1_supply = { -@@ -179,16 +172,6 @@ - .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13) - | BIT(15) | BIT(16) | BIT(17), - .setup = beagle_twl_gpio_setup, --}; -- --static struct regulator_consumer_supply beagle_vdac_supply = { -- .supply = "vdac", -- .dev = &omap3_beagle_lcd_device.dev, --}; -- --static struct regulator_consumer_supply beagle_vdvi_supply = { -- .supply = "vdvi", -- .dev = &omap3_beagle_lcd_device.dev, - }; - - /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ -@@ -221,35 +204,6 @@ - .consumer_supplies = &beagle_vsim_supply, - }; - --/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ --static struct regulator_init_data beagle_vdac = { -- .constraints = { -- .min_uV = 1800000, -- .max_uV = 1800000, -- .valid_modes_mask = REGULATOR_MODE_NORMAL -- | REGULATOR_MODE_STANDBY, -- .valid_ops_mask = REGULATOR_CHANGE_MODE -- | REGULATOR_CHANGE_STATUS, -- }, -- .num_consumer_supplies = 1, -- .consumer_supplies = &beagle_vdac_supply, --}; -- --/* VPLL2 for digital video outputs */ --static struct regulator_init_data beagle_vpll2 = { -- .constraints = { -- .name = "VDVI", -- .min_uV = 1800000, -- .max_uV = 1800000, -- .valid_modes_mask = REGULATOR_MODE_NORMAL -- | REGULATOR_MODE_STANDBY, -- .valid_ops_mask = REGULATOR_CHANGE_MODE -- | REGULATOR_CHANGE_STATUS, -- }, -- .num_consumer_supplies = 1, -- .consumer_supplies = &beagle_vdvi_supply, --}; -- - static struct twl4030_usb_data beagle_usb_data = { - .usb_mode = T2_USB_MODE_ULPI, - }; -@@ -262,39 +216,6 @@ - .audio_mclk = 26000000, - .audio = &beagle_audio_data, - }; -- --static struct twl4030_platform_data beagle_twldata = { -- .irq_base = TWL4030_IRQ_BASE, -- .irq_end = TWL4030_IRQ_END, -- -- /* platform_data for children goes here */ -- .usb = &beagle_usb_data, -- .gpio = &beagle_gpio_data, -- .codec = &beagle_codec_data, -- .vmmc1 = &beagle_vmmc1, -- .vsim = &beagle_vsim, -- .vdac = &beagle_vdac, -- .vpll2 = &beagle_vpll2, --}; -- --static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { -- { -- I2C_BOARD_INFO("twl4030", 0x48), -- .flags = I2C_CLIENT_WAKE, -- .irq = INT_34XX_SYS_NIRQ, -- .platform_data = &beagle_twldata, -- }, --}; -- --static int __init omap3_beagle_i2c_init(void) --{ -- omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo, -- ARRAY_SIZE(beagle_i2c_boardinfo)); -- /* Bus 3 is attached to the DVI port where devices like the pico DLP -- * projector don't work reliably with 400kHz */ -- omap_register_i2c_bus(3, 100, NULL, 0); -- return 0; --} - - static struct gpio_led gpio_leds[] = { - { -@@ -349,14 +270,156 @@ - }, - }; - --static struct omap_board_config_kernel omap3_beagle_config[] __initdata = { -- { OMAP_TAG_LCD, &omap3_beagle_lcd_config }, --}; -+/* DSS */ -+ -+static int beagle_enable_dvi(struct omap_dss_device *dssdev) -+{ -+ if (dssdev->reset_gpio != -1) -+ gpio_set_value(dssdev->reset_gpio, 1); -+ -+ return 0; -+} -+ -+static void beagle_disable_dvi(struct omap_dss_device *dssdev) -+{ -+ if (dssdev->reset_gpio != -1) -+ gpio_set_value(dssdev->reset_gpio, 0); -+} -+ -+static struct omap_dss_device beagle_dvi_device = { -+ .type = OMAP_DISPLAY_TYPE_DPI, -+ .name = "dvi", -+ .driver_name = "generic_panel", -+ .phy.dpi.data_lines = 24, -+ .reset_gpio = 170, -+ .platform_enable = beagle_enable_dvi, -+ .platform_disable = beagle_disable_dvi, -+}; -+ -+static int beagle_panel_enable_tv(struct omap_dss_device *dssdev) -+{ -+ return 0; -+} -+ -+static void beagle_panel_disable_tv(struct omap_dss_device *dssdev) -+{ -+} -+ -+static struct omap_dss_device beagle_tv_device = { -+ .name = "tv", -+ .driver_name = "venc", -+ .type = OMAP_DISPLAY_TYPE_VENC, -+ .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, -+ .platform_enable = beagle_panel_enable_tv, -+ .platform_disable = beagle_panel_disable_tv, -+}; -+ -+static struct omap_dss_device *beagle_dss_devices[] = { -+ &beagle_dvi_device, -+ &beagle_tv_device, -+}; -+ -+static struct omap_dss_board_info beagle_dss_data = { -+ .num_devices = ARRAY_SIZE(beagle_dss_devices), -+ .devices = beagle_dss_devices, -+ .default_device = &beagle_dvi_device, -+}; -+ -+static struct platform_device beagle_dss_device = { -+ .name = "omapdss", -+ .id = -1, -+ .dev = { -+ .platform_data = &beagle_dss_data, -+ }, -+}; -+ -+static struct regulator_consumer_supply beagle_vdda_dac_supply = { -+ .supply = "vdda_dac", -+ .dev = &beagle_dss_device.dev, -+}; -+ -+static struct regulator_consumer_supply beagle_vdds_dsi_supply = { -+ .supply = "vdds_dsi", -+ .dev = &beagle_dss_device.dev, -+}; -+ -+static void __init beagle_display_init(void) -+{ -+ int r; -+ -+ r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset"); -+ if (r < 0) { -+ printk(KERN_ERR "Unable to get DVI reset GPIO\n"); -+ return; -+ } -+ -+ gpio_direction_output(beagle_dvi_device.reset_gpio, 0); -+} -+ -+/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ -+static struct regulator_init_data beagle_vdac = { -+ .constraints = { -+ .min_uV = 1800000, -+ .max_uV = 1800000, -+ .apply_uV = true, -+ .valid_modes_mask = REGULATOR_MODE_NORMAL -+ | REGULATOR_MODE_STANDBY, -+ .valid_ops_mask = REGULATOR_CHANGE_MODE -+ | REGULATOR_CHANGE_STATUS, -+ }, -+ .num_consumer_supplies = 1, -+ .consumer_supplies = &beagle_vdda_dac_supply, -+}; -+ -+/* VPLL2 for digital video outputs */ -+static struct regulator_init_data beagle_vpll2 = { -+ .constraints = { -+ .name = "VDVI", -+ .min_uV = 1800000, -+ .max_uV = 1800000, .valid_modes_mask = REGULATOR_MODE_NORMAL -+ | REGULATOR_MODE_STANDBY, -+ .valid_ops_mask = REGULATOR_CHANGE_MODE -+ | REGULATOR_CHANGE_STATUS, -+ }, -+ .num_consumer_supplies = 1, -+ .consumer_supplies = &beagle_vdds_dsi_supply, -+}; -+ -+static struct twl4030_platform_data beagle_twldata = { -+ .irq_base = TWL4030_IRQ_BASE, -+ .irq_end = TWL4030_IRQ_END, -+ -+ /* platform_data for children goes here */ -+ .usb = &beagle_usb_data, -+ .gpio = &beagle_gpio_data, -+ .vmmc1 = &beagle_vmmc1, -+ .vsim = &beagle_vsim, -+ .vdac = &beagle_vdac, -+ .vpll2 = &beagle_vpll2, -+}; -+ -+static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { -+ { -+ I2C_BOARD_INFO("twl4030", 0x48), -+ .flags = I2C_CLIENT_WAKE, -+ .irq = INT_34XX_SYS_NIRQ, -+ .platform_data = &beagle_twldata, -+ }, -+}; -+ -+static int __init omap3_beagle_i2c_init(void) -+{ -+ omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, -+ ARRAY_SIZE(beagle_i2c1_boardinfo)); -+ /* Bus 3 is attached to the DVI port where devices like the pico DLP -+ * projector don't work reliably with 400kHz */ -+ omap_register_i2c_bus(3, 100, NULL, 0); -+ return 0; -+} -+ - - static void __init omap3_beagle_init_irq(void) - { -- omap_board_config = omap3_beagle_config; -- omap_board_config_size = ARRAY_SIZE(omap3_beagle_config); - omap2_init_common_hw(mt46h32m32lf6_sdrc_params, - mt46h32m32lf6_sdrc_params); - omap_init_irq(); -@@ -367,7 +430,7 @@ - } - - static struct platform_device *omap3_beagle_devices[] __initdata = { -- &omap3_beagle_lcd_device, -+ &beagle_dss_device, - &leds_gpio, - &keys_gpio, - }; -@@ -437,6 +500,8 @@ - usb_musb_init(); - usb_ehci_init(&ehci_pdata); - omap3beagle_flash_init(); -+ -+ beagle_display_init(); - - /* Ensure SDRC pins are mux'd for self-refresh */ - omap_cfg_reg(H16_34XX_SDRC_CKE0); - diff --git a/recipes/linux/linux-omap-psp-2.6.32/fix-usbgadgets.diff b/recipes/linux/linux-omap-psp-2.6.32/fix-usbgadgets.diff deleted file mode 100755 index 04309bf66c..0000000000 --- a/recipes/linux/linux-omap-psp-2.6.32/fix-usbgadgets.diff +++ /dev/null @@ -1,26 +0,0 @@ -From: Gupta, Ajay Kumar -Sent: 21 January, 2010 06:23 -To: Kooi, Koen - -Koen, - -Enabling USB Audio Gadget is showing this issue. I tested with -File storage and CDC gadget and didn’t observe this. - -Please use below patch to fix it, - --------------------------------- -diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h -index c75f777..2868d3c 100644 ---- a/drivers/usb/gadget/gadget_chips.h -+++ b/drivers/usb/gadget/gadget_chips.h -@@ -15,6 +15,8 @@ - #ifndef __GADGET_CHIPS_H - #define __GADGET_CHIPS_H - -+#include <plat/cpu.h> -+ - #ifdef CONFIG_USB_GADGET_NET2280 - #define gadget_is_net2280(g) !strcmp("net2280", (g)->name) - #else - diff --git a/recipes/linux/linux-omap-psp-2.6.32/holes.patch b/recipes/linux/linux-omap-psp-2.6.32/holes.patch deleted file mode 100644 index 504bf40021..0000000000 --- a/recipes/linux/linux-omap-psp-2.6.32/holes.patch +++ /dev/null @@ -1,39 +0,0 @@ -From patchwork Thu Jan 7 12:30:08 2010 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: ARCH OMAP : enable ARCH_HAS_HOLES_MEMORYMODEL for OMAP -Date: Thu, 07 Jan 2010 12:30:08 -0000 -From: Sriram <srk@ti.com> -X-Patchwork-Id: 71579 - -From: Sriram <srk@ti.com> - -OMAP platforms(like OMAP3530) include DSP or other co-processors -for media acceleration. when carving out memory for the -accelerators we can end up creating a hole in the memory map -of sort: -<kernel memory><hole(memory for accelerator)><kernel memory> - -To handle such a memory configuration ARCH_HAS_HOLES_MEMORYMODEL -has to be enabled. For further information refer discussion at: -http://www.mail-archive.com/linux-omap@vger.kernl.org/msg15262.html. - -Signed-off-by: Sriramakrishnan <srk@ti.com> - ---- -arch/arm/Kconfig | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 5e0bcc5..88f628b 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -699,6 +699,7 @@ config ARCH_OMAP - select ARCH_HAS_CPUFREQ - select GENERIC_TIME - select GENERIC_CLOCKEVENTS -+ select ARCH_HAS_HOLES_MEMORYMODEL - help - Support for TI's OMAP platform (OMAP1 and OMAP2). - diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3evm/defconfig b/recipes/linux/linux-omap-psp-2.6.32/omap3evm/defconfig index ae02c1a419..10e64c9eb3 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/omap3evm/defconfig +++ b/recipes/linux/linux-omap-psp-2.6.32/omap3evm/defconfig @@ -1951,7 +1951,7 @@ CONFIG_USB_G_SERIAL=m CONFIG_USB_MIDI_GADGET=m CONFIG_USB_G_PRINTER=m CONFIG_USB_CDC_COMPOSITE=m -CONFIG_USB_G_MULTI=m +CONFIG_USB_G_MULTI=n CONFIG_USB_G_MULTI_RNDIS=y # CONFIG_USB_G_MULTI_CDC is not set diff --git a/recipes/linux/linux-omap-psp-2.6.32/sctp-fix.patch b/recipes/linux/linux-omap-psp-2.6.32/sctp-fix.patch deleted file mode 100644 index fad8e1b67b..0000000000 --- a/recipes/linux/linux-omap-psp-2.6.32/sctp-fix.patch +++ /dev/null @@ -1,47 +0,0 @@ -From patchwork Tue Dec 8 19:52:09 2009 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: net/sctp/sysctl.c: Remove dead strategy handler -Date: Tue, 08 Dec 2009 19:52:09 -0000 -From: Ingo Molnar <mingo@elte.hu> -X-Patchwork-Id: 65744 - -* Ingo Molnar <mingo@elte.hu> wrote: - -> hi Dave, -> -> i just switched to today's -git tree and there's this new build failure -> on x86: -> -> net/sctp/sysctl.c:251: error: unknown field 'strategy' specified in initializer -> net/sctp/sysctl.c:251: error: 'sysctl_intvec' undeclared here (not in a function) -> -> havent looked into it yet - config attached. - -That's interaction with the strategy handler removal from Eric. I think -the patch below will do the trick - the callsites have been updated -already to use proc_handler, so ->handler was a dead field. - - Ingo - -Signed-off-by: Ingo Molnar <mingo@elte.hu> - ---- -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html -Please read the FAQ at http://www.tux.org/lkml/ - -diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c -index 419e1e9..832590b 100644 ---- a/net/sctp/sysctl.c -+++ b/net/sctp/sysctl.c -@@ -248,7 +248,6 @@ static ctl_table sctp_table[] = { - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec_minmax, -- .strategy = &sysctl_intvec, - .extra1 = &one, - .extra2 = &rwnd_scale_max, - }, diff --git a/recipes/linux/linux-omap-psp_2.6.32.bb b/recipes/linux/linux-omap-psp_2.6.32.bb index 8709673c9d..2b4e22ebdf 100644 --- a/recipes/linux/linux-omap-psp_2.6.32.bb +++ b/recipes/linux/linux-omap-psp_2.6.32.bb @@ -5,31 +5,49 @@ KERNEL_IMAGETYPE = "uImage" COMPATIBLE_MACHINE = "beagleboard|omap3evm|am3517-evm|omap3-touchbook" -SRCREV = "06733a907b777f7dca21b2d44e36b6c4afbe01fe" +SRCREV = "ac07af55554567b6226ba8dd623756c630e93103" # The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc MACHINE_KERNEL_PR_append = "+gitr${SRCREV}" SRC_URI = "git://arago-project.org/git/people/sriram/ti-psp-omap.git;protocol=git;branch=master \ - file://0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch;patch=1 \ - file://0006-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch;patch=1 \ - file://0007-ASoC-enable-audio-capture-by-default-for-twl4030.patch;patch=1 \ - file://0009-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch;patch=1 \ - file://dss2/0015-OMAP-DSS-Add-DSS2-support-for-Beagle.patch;patch=1 \ - file://dss2/0016-video-add-timings-for-hd720.patch;patch=1 \ - file://holes.patch;patch=1 \ - file://no-mmc-spew.patch;patch=1 \ - file://beagleboard/0001-beagleboard-omap3_-foo-_rate_table-omap35x_-foo.patch;patch=1 \ - file://beagleboard/0001-board-omap3beagle-prepare-for-DM3730-based-Beaglebo.patch;patch=1 \ - file://0001-board-omap3touchbook-make-it-build-against-TI-linux.patch;patch=1 \ + file://0001-board-omap3touchbook-make-it-build-against-TI-linux-.patch;patch=1 \ + file://0002-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board-f.patch;patch=1 \ + file://0003-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch;patch=1 \ + file://0004-board-omap3-beagle-add-DSS2-support.patch;patch=1 \ + file://0005-beagleboard-omap3_-foo-_rate_table-omap35x_-foo-_rat.patch;patch=1 \ + file://0006-board-omap3beagle-prepare-for-DM3730-based-Beagleboa.patch;patch=1 \ + file://0007-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch;patch=1 \ + file://0008-board-omap3beagle-ugly-copy-paste-job-to-get-mt9p111.patch;patch=1 \ + file://0009-board-omap3beagle-turn-on-power-to-camera-on-boot-an.patch;patch=1 \ + file://0010-board-omap3beagle-update-omap34xxcam-to-more-recent-.patch;patch=1 \ + file://0011-ASoC-enable-audio-capture-by-default-for-twl4030.patch;patch=1 \ + file://0012-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch;patch=1 \ + file://0013-OMAP3630-DSS2-Enable-Pre-Multiplied-Alpha-Support.patch;patch=1 \ + file://0014-DSS2-add-bootarg-for-selecting-svideo-or-composite-f.patch;patch=1 \ + file://0015-ISP-add-some-more-from-Leopard-imaging-patch.patch;patch=1 \ + file://0016-ARM-OMAP-Overo-Add-support-for-second-ethernet-port.patch;patch=1 \ + file://0017-drivers-net-smsc911x-return-ENODEV-if-device-is-not-.patch;patch=1 \ + file://0018-drivers-input-touchscreen-ads7846-return-ENODEV-if-d.patch;patch=1 \ + file://0019-drivers-mfd-add-twl4030-madc-driver.patch;patch=1 \ + file://0020-ARM-OMAP-Add-missing-twl4030-madc-header-file.patch;patch=1 \ + file://0021-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch;patch=1 \ + file://0022-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch;patch=1 \ + file://0023-netdev-rt73usb-add-vendor-device-ID-for-Ceiva-Wirele.patch;patch=1 \ + file://0024-mmc-don-t-display-single-block-read-console-messages.patch;patch=1 \ + file://0025-ARM-OMAP2-mmc-twl4030-move-clock-input-selection-pri.patch;patch=1 \ + file://0026-board-overo-add-PM-code-and-sync-with-http-www.sakom.patch;patch=1 \ + file://0027-twl4030-madc-adjust-for-twl4030-twl-api-changes.patch;patch=1 \ + file://0028-OMAP-DSS2-Re-add-support-for-Samsung-lte430wq-f0c-pa.patch;patch=1 \ + file://0029-OMAP-DSS2-Add-support-for-LG-Philips-LB035Q02-panel.patch;patch=1 \ + file://0030-Fix-for-bus-width-which-improves-SD-card-s-peformanc.patch;patch=1 \ + file://0031-ARM-VFP-add-support-to-sync-the-VFP-state-of-the-cur.patch;patch=1 \ + file://0032-ARM-VFP-preserve-the-HW-context-when-calling-signal-.patch;patch=1 \ file://defconfig" SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \ " -SRC_URI_append_am3517-evm = " file://am3517-ehci-mux.patch;patch=1 \ -" - addtask quiltfixup before do_patch after do_unpack do_quiltfixup() { rm ${S}/.pc -rf |