[Armadeus-commitlog] armadeus branch, master, updated. release-3.2-558-g4bcbe72
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2010-07-28 09:58:33
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 4bcbe72de1441b11f0ca3180b8472707f9c3f75b (commit)
via ad815df596d75197ac1068a2578d000c8b8f40f4 (commit)
via 4031ee10b2c1a0ee07bb2ed5ce0b4c93d1e0dffd (commit)
via 7312588cfdc2368ba0639243697f8bb71d98034a (commit)
from 665b5d2e27a33e95f683a810c88044878d42f949 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4bcbe72de1441b11f0ca3180b8472707f9c3f75b
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jul 28 11:54:17 2010 +0200
[LINUX] Merge patches 344 & 339 into 281 one + add new correct OV96xx config define
commit ad815df596d75197ac1068a2578d000c8b8f40f4
Merge: 4031ee10b2c1a0ee07bb2ed5ce0b4c93d1e0dffd 665b5d2e27a33e95f683a810c88044878d42f949
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jul 27 20:28:16 2010 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 4031ee10b2c1a0ee07bb2ed5ce0b4c93d1e0dffd
Merge: 7312588cfdc2368ba0639243697f8bb71d98034a fb72aedbc92c05f903c6d438ffb0b2c3fc2c607a
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jul 27 17:57:19 2010 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 7312588cfdc2368ba0639243697f8bb71d98034a
Author: Julien Boibessot <jul...@ar...>
Date: Tue Jul 27 17:55:08 2010 +0200
[LINUX] Makes ov96xx, ov7670 & ov3640 drivers compile when CONFIG_ADV_DEBUG is used
-----------------------------------------------------------------------
Summary of changes:
.../2.6.29/281-apf27-armadeus-add_apf27.c.patch | 142 ++++++++++++++++---
...deus-soc_camera_add_ov96xx_sensors_driver.patch | 21 ++--
.../2.6.29/339-apf27-armadeus-spidev.patch | 100 +--------------
.../2.6.29/344-apf27-spi_configuration.patch | 143 --------------------
...adeus-soc_camera-add_ov7670_sensor_driver.patch | 4 +-
...adeus-soc_camera-add_ov3640_sensor_driver.patch | 35 +++---
6 files changed, 150 insertions(+), 295 deletions(-)
delete mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/344-apf27-spi_configuration.patch
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
index 40b465b..d47bea5 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
@@ -9,7 +9,7 @@ Signed-off-by: Eric Jarrige <eri...@ar...>
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27.c 2010-06-29 16:12:27.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27.c 2010-07-28 10:43:04.000000000 +0200
@@ -0,0 +1,789 @@
+ /*
+ * apf27.c
@@ -803,8 +803,8 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2010-07-01 16:25:06.000000000 +0200
-@@ -0,0 +1,1049 @@
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2010-07-28 10:59:04.000000000 +0200
+@@ -0,0 +1,1147 @@
+ /*
+ * apf27-dev.c
+ * Support for AFP27 module's development baseboard
@@ -831,6 +831,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+#include <linux/mtd/physmap.h>
+#include <asm/mach/flash.h>
+#include <linux/spi/spi.h>
++#include <linux/spi/spidev.h>
+#include <linux/i2c.h>
+#include <linux/serial.h>
+#include <linux/delay.h>
@@ -900,6 +901,9 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+#ifdef CONFIG_CAN_MCP251X_MODULE
+#define CONFIG_CAN_MCP251X 1
+#endif
++#ifdef CONFIG_SPI_SPIDEV_MODULE
++#define CONFIG_SPI_SPIDEV 1
++#endif
+#ifdef CONFIG_IMX_BACKLIGHT_MODULE
+#define CONFIG_IMX_BACKLIGHT
+#endif
@@ -909,8 +913,8 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+#ifdef CONFIG_VIDEO_MX27_MODULE
+#define CONFIG_VIDEO_MX27 1
+#endif
-+#ifdef CONFIG_VIDEO_OV96xx_MODULE
-+#define CONFIG_VIDEO_OV96xx 1
++#ifdef CONFIG_SOC_CAMERA_OV96XX_MODULE
++#define CONFIG_SOC_CAMERA_OV96XX 1
+#endif
+#ifdef CONFIG_ARMADEUS_PWM_DRIVER_MODULE
+#define CONFIG_PWM
@@ -945,7 +949,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+};
+
+/* I2C1 devices: RTC & Optionnal Camera */
-+# ifdef CONFIG_VIDEO_OV96xx
++# ifdef CONFIG_SOC_CAMERA_OV96XX
+static struct soc_camera_link ov96xx_iclink; /* declared later */
+#endif
+static struct i2c_board_info apf27dev_i2c_devices_bus0[] = {
@@ -957,7 +961,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+ .platform_data = NULL,
+ .irq = 0
+ },
-+# ifdef CONFIG_VIDEO_OV96xx
++# ifdef CONFIG_SOC_CAMERA_OV96XX
+ [1] = {
+ .type = "ov96xx",
+ .flags = 0, /* FIXME */
@@ -1201,15 +1205,17 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+#endif /* CONFIG_SERIAL_IMX_UART6 */
+
+
-+/* Both APF27 SPI ports are used on APF27Dev */
-+#ifdef CONFIG_SPI
++/* SPI ports declarations */
++#ifdef CONFIG_SPI_MXC_SELECT1
+static int mxc_cspi0_pins[] = {
+ /* PD28_PF_CSPI1_SS0, Preferably use CS pin as GPIO */
+ PD29_PF_CSPI1_SCLK,
+ PD30_PF_CSPI1_MISO,
+ PD31_PF_CSPI1_MOSI
+};
++#endif /* CONFIG_SPI_MXC_SELECT1 */
+
++#ifdef CONFIG_SPI_MXC_SELECT2
+static int mxc_cspi1_pins[] = {
+ /* PD19_PF_CSPI2_SS2,
+ PD20_PF_CSPI2_SS1, Preferably use CS pin as GPIO
@@ -1218,11 +1224,25 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+ PD23_PF_CSPI2_MISO,
+ PD24_PF_CSPI2_MOSI
+};
++#endif /* CONFIG_SPI_MXC_SELECT2 */
++
++#ifdef CONFIG_SPI_MXC_SELECT3
++static int mxc_cspi2_pins[] = {
++ /*
++ PE21_AF_CSPI3_SS,
++ Preferably use CS pin as GPIO
++ */
++ PE23_AF_CSPI3_SCLK,
++ PE18_AF_CSPI3_MISO,
++ PE22_AF_CSPI3_MOSI
++};
++#endif /* CONFIG_SPI_MXC_SELECT3 */
+
++#ifdef CONFIG_SPI_MXC_SELECT1
+static int gpio_spi0_active(struct platform_device *pdev)
+{
+ return mxc_gpio_setup_multiple_pins(mxc_cspi0_pins,
-+ ARRAY_SIZE(mxc_cspi0_pins), "CSPI0");
++ ARRAY_SIZE(mxc_cspi0_pins), "CSPI1");
+}
+
+static int gpio_spi0_inactive(struct platform_device *pdev)
@@ -1230,11 +1250,13 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+ mxc_gpio_release_multiple_pins(mxc_cspi0_pins, ARRAY_SIZE(mxc_cspi0_pins));
+ return 0;
+}
++#endif /* CONFIG_SPI_MXC_SELECT1 */
+
++#ifdef CONFIG_SPI_MXC_SELECT2
+static int gpio_spi1_active(struct platform_device *pdev)
+{
+ return mxc_gpio_setup_multiple_pins(mxc_cspi1_pins,
-+ ARRAY_SIZE(mxc_cspi1_pins), "CSPI1");
++ ARRAY_SIZE(mxc_cspi1_pins), "CSPI2");
+}
+
+static int gpio_spi1_inactive(struct platform_device *pdev)
@@ -1242,21 +1264,48 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+ mxc_gpio_release_multiple_pins(mxc_cspi1_pins, ARRAY_SIZE(mxc_cspi1_pins));
+ return 0;
+}
++#endif /* CONFIG_SPI_MXC_SELECT2 */
++
++#ifdef CONFIG_SPI_MXC_SELECT3
++static int gpio_spi2_active(struct platform_device *pdev)
++{
++ return mxc_gpio_setup_multiple_pins(mxc_cspi2_pins, ARRAY_SIZE(mxc_cspi2_pins), "CSPI3");
++}
++
++static int gpio_spi2_inactive(struct platform_device *pdev)
++{
++ mxc_gpio_release_multiple_pins(mxc_cspi2_pins, ARRAY_SIZE(mxc_cspi2_pins));
++ return 0;
++}
++#endif /* CONFIG_SPI_MXC_SELECT3 */
+
++#ifdef CONFIG_SPI_MXC_SELECT1
+static struct spi_imx_master imx_spi0_master_info = {
+ .num_chipselect = 1,
+ .enable_dma = 0,
+ .init = gpio_spi0_active,
+ .exit = gpio_spi0_inactive,
+};
++#endif /* CONFIG_SPI_MXC_SELECT1 */
+
++#ifdef CONFIG_SPI_MXC_SELECT2
+static struct spi_imx_master imx_spi1_master_info = {
-+ .num_chipselect = 2,
++ .num_chipselect = 3,
+ .enable_dma = 0,
+ .init = gpio_spi1_active,
+ .exit = gpio_spi1_inactive,
+};
-+#endif /* CONFIG_SPI */
++#endif /* CONFIG_SPI_MXC_SELECT2 */
++
++#ifdef CONFIG_SPI_MXC_SELECT3
++static struct spi_imx_master imx_spi2_master_info = {
++ .num_chipselect = 1,
++ .enable_dma = 0,
++ .init = gpio_spi2_active,
++ .exit = gpio_spi2_inactive,
++};
++#endif /* CONFIG_SPI_MXC_SELECT3 */
++
+
+
+/* APF27Dev has an optionnal 7 channels 10 bits ADC (SPI1) */
@@ -1305,7 +1354,6 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+};
+#endif /* CONFIG_ARMADEUS_MAX1027 */
+
-+
+/* APF27Dev has a SPI Touchscreen controller */
+#define TSC2101_INT 17
+#define TSC2101_CS (GPIO_PORTD | 21) /* SPI2_SS0 used as GPIO */
@@ -1398,6 +1446,38 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+#endif /* CONFIG_CAN_MCP251X */
+
+
++/* SPI2 can be used as userspace general SPI bus (CS 2) */
++#ifdef CONFIG_SPI_SPIDEV
++#define SPIDEV_CS (GPIO_PORTB | 17)
++
++static int spidev_pins[] = {
++ (SPIDEV_CS | GPIO_OUT | GPIO_GPIO),
++};
++
++static int spidev_init_gpio(void)
++{
++ gpio_set_value(SPIDEV_CS, 1);
++ return mxc_gpio_setup_multiple_pins(spidev_pins, ARRAY_SIZE(spidev_pins), "spidev");
++}
++
++/* Chip select command for spidev */
++static void spidev_cs(u32 command)
++{
++ if (command == SPI_CS_DEASSERT)
++ gpio_set_value(SPIDEV_CS, 1);
++ else
++ gpio_set_value(SPIDEV_CS, 0);
++}
++
++static struct spi_imx_chip spidev_hw = {
++ .cs_control = spidev_cs,
++};
++
++static struct spidev_platform_data apf27_spidev_config = {
++ .init = spidev_init_gpio,
++};
++#endif /* CONFIG_SPI_SPIDEV */
++
+static struct spi_board_info spi_board_info[] __initdata = {
+#ifdef CONFIG_ARMADEUS_MAX1027
+ {
@@ -1435,6 +1515,17 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+ .platform_data = &apf27_mcp251x_config,
+ },
+#endif /* CONFIG_CAN_MCP251X */
++#ifdef CONFIG_SPI_SPIDEV
++ {
++ .modalias = "spidev",
++ .controller_data = &spidev_hw,
++ .max_speed_hz = 8000000, /* 8MHz */
++ .bus_num = 1, /* SPI2 */
++ .mode = SPI_MODE_1,
++ .chip_select = 2,
++ .platform_data = &apf27_spidev_config,
++ },
++#endif /* CONFIG_SPI_SPIDEV */
+};
+
+
@@ -1624,7 +1715,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+
+/* APF27Dev can have an optionnal Camera module extension using i.MX27 CSI */
+#ifdef CONFIG_VIDEO_MX27
-+# ifdef CONFIG_VIDEO_OV96xx
++# ifdef CONFIG_SOC_CAMERA_OV96XX
+#define OV9653_PWRDN (GPIO_PORTC | 30) /* SSI3_TX as POWERDOWN*/
+#define OV9653_RESET (GPIO_PORTC | 31) /* SSI3_CLK as RESET */
+
@@ -1651,7 +1742,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+
+static int apf27dev_camera_init(struct platform_device *pdev)
+{
-+# ifdef CONFIG_VIDEO_OV96xx
++# ifdef CONFIG_SOC_CAMERA_OV96XX
+ int err;
+
+ /* Setup PWRDN/RESET pins default value */
@@ -1669,7 +1760,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+
+static int apf27dev_camera_exit(struct platform_device *pdev)
+{
-+# ifdef CONFIG_VIDEO_OV96xx
++# ifdef CONFIG_SOC_CAMERA_OV96XX
+ mxc_gpio_release_multiple_pins(apf27dev_ov9653_ctl_pins,
+ ARRAY_SIZE(apf27dev_ov9653_ctl_pins));
+# endif
@@ -1687,7 +1778,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+ MX27_CAMERA_SWAP16,
+};
+
-+# ifdef CONFIG_VIDEO_OV96xx
++# ifdef CONFIG_SOC_CAMERA_OV96XX
+static int ov96xx_power(struct device *dev, int state)
+{
+ printk(KERN_DEBUG "*** %s %d\n", __func__, state);
@@ -1822,10 +1913,17 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+ i2c_register_board_info(1, apf27dev_i2c_devices_bus1,
+ ARRAY_SIZE(apf27dev_i2c_devices_bus1));
+#endif
-+#ifdef CONFIG_SPI
++#ifdef CONFIG_SPI_MXC_SELECT1
+ mxc_register_device(&mxc_spi_device0, &imx_spi0_master_info);
++#endif
++#ifdef CONFIG_SPI_MXC_SELECT2
+ mxc_register_device(&mxc_spi_device1, &imx_spi1_master_info);
+#endif
++#ifdef CONFIG_SPI_MXC_SELECT3
++ mxc_register_device(&mxc_spi_device2, &imx_spi2_master_info);
++#endif
++
++
+ platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
+
+#ifdef CONFIG_SPI_TSC2102
@@ -1837,7 +1935,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+ /* Reserve "fixed" GPIOs */
+ tsc2101_init_fixed_gpio();
+#endif
-+#if defined (CONFIG_ARMADEUS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X)
++#if defined (CONFIG_ARMADEUS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X) || defined(CONFIG_SPI_SPIDEV)
+ spi_register_board_info(spi_board_info,
+ ARRAY_SIZE(spi_board_info));
+#endif
@@ -1857,7 +1955,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c 2010-06-29 16:12:27.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c 2010-07-28 10:43:04.000000000 +0200
@@ -0,0 +1,220 @@
+/*
+ * apf27-lcd.c
@@ -2082,7 +2180,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c 2010-06-29 16:12:27.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c 2010-07-28 10:43:04.000000000 +0200
@@ -0,0 +1,190 @@
+ /*
+ * apf27-dev-ext-apw.c
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/319-armadeus-soc_camera_add_ov96xx_sensors_driver.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/319-armadeus-soc_camera_add_ov96xx_sensors_driver.patch
index 90c57c7..30bd4c2 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/319-armadeus-soc_camera_add_ov96xx_sensors_driver.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/319-armadeus-soc_camera_add_ov96xx_sensors_driver.patch
@@ -7,7 +7,7 @@ Signed-off-by: Julien boibessot <jul...@ar...>
Index: linux-2.6.29.6/drivers/media/video/Kconfig
===================================================================
--- linux-2.6.29.6.orig/drivers/media/video/Kconfig 2010-07-01 16:25:15.000000000 +0200
-+++ linux-2.6.29.6/drivers/media/video/Kconfig 2010-07-20 15:22:05.000000000 +0200
++++ linux-2.6.29.6/drivers/media/video/Kconfig 2010-07-27 17:11:53.000000000 +0200
@@ -789,6 +789,13 @@
help
This is a ov772x camera driver
@@ -25,7 +25,7 @@ Index: linux-2.6.29.6/drivers/media/video/Kconfig
Index: linux-2.6.29.6/drivers/media/video/Makefile
===================================================================
--- linux-2.6.29.6.orig/drivers/media/video/Makefile 2010-07-01 16:25:15.000000000 +0200
-+++ linux-2.6.29.6/drivers/media/video/Makefile 2010-07-20 15:22:05.000000000 +0200
++++ linux-2.6.29.6/drivers/media/video/Makefile 2010-07-27 17:11:53.000000000 +0200
@@ -145,6 +145,7 @@
obj-$(CONFIG_SOC_CAMERA_MT9T031) += mt9t031.o
obj-$(CONFIG_SOC_CAMERA_MT9V022) += mt9v022.o
@@ -37,8 +37,8 @@ Index: linux-2.6.29.6/drivers/media/video/Makefile
Index: linux-2.6.29.6/drivers/media/video/ov96xx.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/media/video/ov96xx.c 2010-07-20 15:21:57.000000000 +0200
-@@ -0,0 +1,1673 @@
++++ linux-2.6.29.6/drivers/media/video/ov96xx.c 2010-07-27 17:01:32.000000000 +0200
+@@ -0,0 +1,1672 @@
+/*
+ * drivers/media/video/ov96xx.c
+ *
@@ -1357,37 +1357,36 @@ Index: linux-2.6.29.6/drivers/media/video/ov96xx.c
+
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+static int ov96xx_get_register(struct soc_camera_device *icd,
-+ struct v4l2_register *reg)
++ struct v4l2_dbg_register *reg)
+{
+ struct ov96xx_sensor *ov96xx = container_of(icd, struct ov96xx_sensor, icd);
+ int ret;
+ u8 val;
+
-+ if (reg->match_type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
++ if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
+ return -EINVAL;
+
-+ if (reg->match_chip != ov96xx->i2c_client->addr)
++ if (reg->match.addr != ov96xx->i2c_client->addr)
+ return -ENODEV;
+
+ ret = ov96xx_read_reg(ov96xx->i2c_client, (u8)reg->reg, &val);
+ if (ret)
+ return ret;
-+
+ reg->val = val;
+
+ return 0;
+}
+
+static int ov96xx_set_register(struct soc_camera_device *icd,
-+ struct v4l2_register *reg)
++ struct v4l2_dbg_register *reg)
+{
+ struct ov96xx_sensor *ov96xx = container_of(icd, struct ov96xx_sensor, icd);
+ int ret;
+
-+ if (reg->match_type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
++ if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
+ return -EINVAL;
+
-+ if (reg->match_chip != ov96xx->i2c_client->addr)
++ if (reg->match.addr != ov96xx->i2c_client->addr)
+ return -ENODEV;
+
+ ret = ov96xx_write(ov96xx->i2c_client, (u8)reg->reg, (u8)reg->val);
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch
index 0937459..ec7012c 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch
@@ -1,107 +1,9 @@
-Add platform init call to spidev + spidev support for APF27Dev on
-SPI2 (spi1 for Linux).
+Add platform init call to spidev.
Signed-off-by: Fabien Marteau <fab...@ar...>
Signed-off-by: Gwenhaël Goavec-Merou <gw...@tr...>
---
-Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
-===================================================================
---- linux-2.6.29.6.orig/arch/arm/mach-mx2/apf27-dev.c 2010-01-19 14:37:17.000000000 +0100
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2010-01-19 14:53:32.000000000 +0100
-@@ -24,6 +24,7 @@
- #include <linux/mtd/physmap.h>
- #include <asm/mach/flash.h>
- #include <linux/spi/spi.h>
-+#include <linux/spi/spidev.h>
- #include <linux/i2c.h>
- #include <linux/serial.h>
- #include <linux/delay.h>
-@@ -96,6 +97,9 @@
- #ifdef CONFIG_CAN_MCP251X_MODULE
- #define CONFIG_CAN_MCP251X 1
- #endif
-+#ifdef CONFIG_SPI_SPIDEV_MODULE
-+#define CONFIG_SPI_SPIDEV 1
-+#endif
- #ifdef CONFIG_IMX_BACKLIGHT_MODULE
- #define CONFIG_IMX_BACKLIGHT
- #endif
-@@ -443,7 +447,7 @@
- };
-
- static struct spi_imx_master imx_spi1_master_info = {
-- .num_chipselect = 2,
-+ .num_chipselect = 3,
- .enable_dma = 0,
- .init = gpio_spi1_active,
- .exit = gpio_spi1_inactive,
-@@ -590,6 +594,38 @@
- #endif /* CONFIG_CAN_MCP251X */
-
-
-+/* SPI2 can be used as userspace general SPI bus (CS 2) */
-+#ifdef CONFIG_SPI_SPIDEV
-+#define SPIDEV_CS (GPIO_PORTB | 17)
-+
-+static int spidev_pins[] = {
-+ (SPIDEV_CS | GPIO_OUT | GPIO_GPIO),
-+};
-+
-+static int spidev_init_gpio(void)
-+{
-+ gpio_set_value(SPIDEV_CS, 1);
-+ return mxc_gpio_setup_multiple_pins(spidev_pins, ARRAY_SIZE(spidev_pins), "spidev");
-+}
-+
-+/* Chip select command for spidev */
-+static void spidev_cs(u32 command)
-+{
-+ if (command == SPI_CS_DEASSERT)
-+ gpio_set_value(SPIDEV_CS, 1);
-+ else
-+ gpio_set_value(SPIDEV_CS, 0);
-+}
-+
-+static struct spi_imx_chip spidev_hw = {
-+ .cs_control = spidev_cs,
-+};
-+
-+static struct spidev_platform_data apf27_spidev_config = {
-+ .init = spidev_init_gpio,
-+};
-+#endif /* CONFIG_SPI_SPIDEV */
-+
- static struct spi_board_info spi_board_info[] __initdata = {
- #ifdef CONFIG_ARMADEUS_MAX1027
- {
-@@ -627,6 +663,17 @@
- .platform_data = &apf27_mcp251x_config,
- },
- #endif /* CONFIG_CAN_MCP251X */
-+#ifdef CONFIG_SPI_SPIDEV
-+ {
-+ .modalias = "spidev",
-+ .controller_data = &spidev_hw,
-+ .max_speed_hz = 8000000, /* 8MHz */
-+ .bus_num = 1, /* SPI2 */
-+ .mode = SPI_MODE_1,
-+ .chip_select = 2,
-+ .platform_data = &apf27_spidev_config,
-+ },
-+#endif /* CONFIG_SPI_SPIDEV */
- };
-
-
-@@ -1044,7 +1091,7 @@
- /* Reserve "fixed" GPIOs */
- tsc2101_init_fixed_gpio();
- #endif
--#if defined (CONFIG_ARMADEUS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X)
-+#if defined (CONFIG_ARMADEUS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X) || defined(CONFIG_SPI_SPIDEV)
- spi_register_board_info(spi_board_info,
- ARRAY_SIZE(spi_board_info));
- #endif
Index: linux-2.6.29.6/drivers/spi/spidev.c
===================================================================
--- linux-2.6.29.6.orig/drivers/spi/spidev.c 2009-03-24 00:12:14.000000000 +0100
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/344-apf27-spi_configuration.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/344-apf27-spi_configuration.patch
deleted file mode 100644
index b725de8..0000000
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/344-apf27-spi_configuration.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
-===================================================================
---- linux-2.6.29.6.orig/arch/arm/mach-mx2/apf27-dev.c 2009-12-17 19:43:17.000000000 +0100
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2009-12-17 19:43:17.000000000 +0100
-@@ -371,15 +371,17 @@
- #endif /* CONFIG_SERIAL_IMX_UART6 */
-
-
--/* Both APF27 SPI ports are used on APF27Dev */
--#ifdef CONFIG_SPI
-+/* SPI ports declarations */
-+#ifdef CONFIG_SPI_MXC_SELECT1
- static int mxc_cspi0_pins[] = {
- /* PD28_PF_CSPI1_SS0, Preferably use CS pin as GPIO */
- PD29_PF_CSPI1_SCLK,
- PD30_PF_CSPI1_MISO,
- PD31_PF_CSPI1_MOSI
- };
-+#endif /* CONFIG_SPI_MXC_SELECT1 */
-
-+#ifdef CONFIG_SPI_MXC_SELECT2
- static int mxc_cspi1_pins[] = {
- /* PD19_PF_CSPI2_SS2,
- PD20_PF_CSPI2_SS1, Preferably use CS pin as GPIO
-@@ -388,11 +390,25 @@
- PD23_PF_CSPI2_MISO,
- PD24_PF_CSPI2_MOSI
- };
-+#endif /* CONFIG_SPI_MXC_SELECT2 */
-
-+#ifdef CONFIG_SPI_MXC_SELECT3
-+static int mxc_cspi2_pins[] = {
-+ /*
-+ PE21_AF_CSPI3_SS,
-+ Preferably use CS pin as GPIO
-+ */
-+ PE23_AF_CSPI3_SCLK,
-+ PE18_AF_CSPI3_MISO,
-+ PE22_AF_CSPI3_MOSI
-+};
-+#endif /* CONFIG_SPI_MXC_SELECT3 */
-+
-+#ifdef CONFIG_SPI_MXC_SELECT1
- static int gpio_spi0_active(struct platform_device *pdev)
- {
- return mxc_gpio_setup_multiple_pins(mxc_cspi0_pins,
-- ARRAY_SIZE(mxc_cspi0_pins), "CSPI0");
-+ ARRAY_SIZE(mxc_cspi0_pins), "CSPI1");
- }
-
- static int gpio_spi0_inactive(struct platform_device *pdev)
-@@ -400,11 +416,13 @@
- mxc_gpio_release_multiple_pins(mxc_cspi0_pins, ARRAY_SIZE(mxc_cspi0_pins));
- return 0;
- }
-+#endif /* CONFIG_SPI_MXC_SELECT1 */
-
-+#ifdef CONFIG_SPI_MXC_SELECT2
- static int gpio_spi1_active(struct platform_device *pdev)
- {
- return mxc_gpio_setup_multiple_pins(mxc_cspi1_pins,
-- ARRAY_SIZE(mxc_cspi1_pins), "CSPI1");
-+ ARRAY_SIZE(mxc_cspi1_pins), "CSPI2");
- }
-
- static int gpio_spi1_inactive(struct platform_device *pdev)
-@@ -412,21 +430,48 @@
- mxc_gpio_release_multiple_pins(mxc_cspi1_pins, ARRAY_SIZE(mxc_cspi1_pins));
- return 0;
- }
-+#endif /* CONFIG_SPI_MXC_SELECT2 */
-+
-+#ifdef CONFIG_SPI_MXC_SELECT3
-+static int gpio_spi2_active(struct platform_device *pdev)
-+{
-+ return mxc_gpio_setup_multiple_pins(mxc_cspi2_pins, ARRAY_SIZE(mxc_cspi2_pins), "CSPI3");
-+}
-+
-+static int gpio_spi2_inactive(struct platform_device *pdev)
-+{
-+ mxc_gpio_release_multiple_pins(mxc_cspi2_pins, ARRAY_SIZE(mxc_cspi2_pins));
-+ return 0;
-+}
-+#endif /* CONFIG_SPI_MXC_SELECT3 */
-
-+#ifdef CONFIG_SPI_MXC_SELECT1
- static struct spi_imx_master imx_spi0_master_info = {
- .num_chipselect = 1,
- .enable_dma = 0,
- .init = gpio_spi0_active,
- .exit = gpio_spi0_inactive,
- };
-+#endif /* CONFIG_SPI_MXC_SELECT1 */
-
-+#ifdef CONFIG_SPI_MXC_SELECT2
- static struct spi_imx_master imx_spi1_master_info = {
- .num_chipselect = 3,
- .enable_dma = 0,
- .init = gpio_spi1_active,
- .exit = gpio_spi1_inactive,
- };
--#endif /* CONFIG_SPI */
-+#endif /* CONFIG_SPI_MXC_SELECT2 */
-+
-+#ifdef CONFIG_SPI_MXC_SELECT3
-+static struct spi_imx_master imx_spi2_master_info = {
-+ .num_chipselect = 1,
-+ .enable_dma = 0,
-+ .init = gpio_spi2_active,
-+ .exit = gpio_spi2_inactive,
-+};
-+#endif /* CONFIG_SPI_MXC_SELECT3 */
-+
-
-
- /* APF27Dev has an optionnal 7 channels 10 bits ADC (SPI) */
-@@ -475,7 +520,6 @@
- };
- #endif /* CONFIG_ARMADEUS_MAX1027 */
-
--
- /* APF27Dev has a SPI Touchscreen controller */
- #define TSC2101_INT 17
- #define TSC2101_CS (GPIO_PORTD | 21) /* SPI2_SS0 used as GPIO */
-@@ -1048,10 +1092,17 @@
- i2c_register_board_info(1, apf27dev_i2c_devices_bus1,
- ARRAY_SIZE(apf27dev_i2c_devices_bus1));
- #endif
--#ifdef CONFIG_SPI
-+#ifdef CONFIG_SPI_MXC_SELECT1
- mxc_register_device(&mxc_spi_device0, &imx_spi0_master_info);
-+#endif
-+#ifdef CONFIG_SPI_MXC_SELECT2
- mxc_register_device(&mxc_spi_device1, &imx_spi1_master_info);
- #endif
-+#ifdef CONFIG_SPI_MXC_SELECT3
-+ mxc_register_device(&mxc_spi_device2, &imx_spi2_master_info);
-+#endif
-+
-+
- platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
-
- #ifdef CONFIG_SPI_TSC2102
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch
index 7ac44ab..7d42352 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/356-armadeus-soc_camera-add_ov7670_sensor_driver.patch
@@ -1612,10 +1612,10 @@ Index: linux-2.6.29.6/drivers/media/video/ov7670_soc.c
+ .get_control = ov7670_get_control,
+ .set_control = ov7670_set_control,
+ .get_chip_id = ov7670_get_chip_id,
-+#ifdef CONFIG_VIDEO_ADV_DEBUG
++/*#ifdef CONFIG_VIDEO_ADV_DEBUG
+ .get_register = ov7670_get_register,
+ .set_register = ov7670_set_register,
-+#endif
++#endif*/
+};
+
+static int __init
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/361-armadeus-soc_camera-add_ov3640_sensor_driver.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/361-armadeus-soc_camera-add_ov3640_sensor_driver.patch
index 3e2e6c4..f777fd3 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/361-armadeus-soc_camera-add_ov3640_sensor_driver.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/361-armadeus-soc_camera-add_ov3640_sensor_driver.patch
@@ -1,7 +1,7 @@
Index: linux-2.6.29.6/drivers/media/video/Kconfig
===================================================================
---- linux-2.6.29.6.orig/drivers/media/video/Kconfig 2010-07-15 12:19:53.000000000 +0200
-+++ linux-2.6.29.6/drivers/media/video/Kconfig 2010-07-15 12:22:35.000000000 +0200
+--- linux-2.6.29.6.orig/drivers/media/video/Kconfig 2010-07-23 11:41:31.000000000 +0200
++++ linux-2.6.29.6/drivers/media/video/Kconfig 2010-07-23 11:41:31.000000000 +0200
@@ -783,6 +783,12 @@
help
This is a generic SoC camera platform driver, useful for testing
@@ -17,8 +17,8 @@ Index: linux-2.6.29.6/drivers/media/video/Kconfig
depends on SOC_CAMERA && I2C
Index: linux-2.6.29.6/drivers/media/video/Makefile
===================================================================
---- linux-2.6.29.6.orig/drivers/media/video/Makefile 2010-07-15 12:22:50.000000000 +0200
-+++ linux-2.6.29.6/drivers/media/video/Makefile 2010-07-15 12:23:50.000000000 +0200
+--- linux-2.6.29.6.orig/drivers/media/video/Makefile 2010-07-23 11:41:31.000000000 +0200
++++ linux-2.6.29.6/drivers/media/video/Makefile 2010-07-23 11:41:31.000000000 +0200
@@ -144,6 +144,7 @@
obj-$(CONFIG_SOC_CAMERA_MT9M111) += mt9m111.o
obj-$(CONFIG_SOC_CAMERA_MT9T031) += mt9t031.o
@@ -30,8 +30,8 @@ Index: linux-2.6.29.6/drivers/media/video/Makefile
Index: linux-2.6.29.6/drivers/media/video/ov3640.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/media/video/ov3640.c 2010-07-20 15:06:58.000000000 +0200
-@@ -0,0 +1,1460 @@
++++ linux-2.6.29.6/drivers/media/video/ov3640.c 2010-07-27 12:28:15.000000000 +0200
+@@ -0,0 +1,1459 @@
+/*
+ *
+ * Copyright 2010 Armadeus Systems
@@ -1234,40 +1234,39 @@ Index: linux-2.6.29.6/drivers/media/video/ov3640.c
+
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+static int ov3640_get_register(struct soc_camera_device *icd,
-+ struct v4l2_register *reg)
++ struct v4l2_dbg_register *reg)
+{
+ struct ov3640_sensor *ov3640 = container_of(icd, struct ov3640_sensor, icd);
+ int ret;
+ u8 val;
+
-+ if (reg->match_type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
++ if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xffff)
+ return -EINVAL;
+
-+ if (reg->match_chip != ov3640->i2c_client->addr)
++ if (reg->match.addr != ov3640->i2c_client->addr)
+ return -ENODEV;
+
-+ ret = ov3640_read(ov3640->i2c_client, (u8)reg->reg, &val);
++ ret = ov3640_read(ov3640->i2c_client, (u16)reg->reg, &val);
+ if (ret)
+ return ret;
-+
+ reg->val = val;
+
+ return 0;
+}
+
+static int ov3640_set_register(struct soc_camera_device *icd,
-+ struct v4l2_register *reg)
++ struct v4l2_dbg_register *reg)
+{
+ struct ov3640_sensor *ov3640 = container_of(icd, struct ov3640_sensor, icd);
+ int ret;
+
-+ if (reg->match_type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
++ if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xffff)
+ return -EINVAL;
+
-+ if (reg->match_chip != ov3640->i2c_client->addr)
++ if (reg->match.addr != ov3640->i2c_client->addr)
+ return -ENODEV;
+
-+ ret = ov3640_write(ov3640->i2c_client, (u8)reg->reg, (u8)reg->val);
++ ret = ov3640_write(ov3640->i2c_client, (u16)reg->reg, (u8)reg->val);
+ if (ret)
+ return ret;
+
@@ -1495,7 +1494,7 @@ Index: linux-2.6.29.6/drivers/media/video/ov3640.c
Index: linux-2.6.29.6/drivers/media/video/ov3640_regs.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/drivers/media/video/ov3640_regs.h 2010-07-19 11:00:29.000000000 +0200
++++ linux-2.6.29.6/drivers/media/video/ov3640_regs.h 2010-07-23 11:41:31.000000000 +0200
@@ -0,0 +1,596 @@
+/*
+ * drivers/media/video/ov3640_regs.h
@@ -2095,8 +2094,8 @@ Index: linux-2.6.29.6/drivers/media/video/ov3640_regs.h
+#endif /* ifndef OV3640_REGS_H */
Index: linux-2.6.29.6/include/media/v4l2-chip-ident.h
===================================================================
---- linux-2.6.29.6.orig/include/media/v4l2-chip-ident.h 2010-07-19 15:43:26.000000000 +0200
-+++ linux-2.6.29.6/include/media/v4l2-chip-ident.h 2010-07-19 15:44:12.000000000 +0200
+--- linux-2.6.29.6.orig/include/media/v4l2-chip-ident.h 2010-07-23 11:36:30.000000000 +0200
++++ linux-2.6.29.6/include/media/v4l2-chip-ident.h 2010-07-23 11:41:31.000000000 +0200
@@ -62,6 +62,7 @@
V4L2_IDENT_OV7670 = 250,
V4L2_IDENT_OV7720 = 251,
hooks/post-receive
--
armadeus
|