summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0016-ARM-OMAP-omap3-touchbook-update-boardfile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0016-ARM-OMAP-omap3-touchbook-update-boardfile.patch')
-rw-r--r--recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0016-ARM-OMAP-omap3-touchbook-update-boardfile.patch98
1 files changed, 65 insertions, 33 deletions
diff --git a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0016-ARM-OMAP-omap3-touchbook-update-boardfile.patch b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0016-ARM-OMAP-omap3-touchbook-update-boardfile.patch
index db8cf7ce17..5c1fa3f962 100644
--- a/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0016-ARM-OMAP-omap3-touchbook-update-boardfile.patch
+++ b/recipes/linux/linux-omap-psp-2.6.32/omap3-touchbook/0016-ARM-OMAP-omap3-touchbook-update-boardfile.patch
@@ -1,16 +1,25 @@
-From bd54c9c7527199156f6cd16bf3e02ebf9d663feb Mon Sep 17 00:00:00 2001
+From d0e8e774fdc82320822246fae3167302730bd7e8 Mon Sep 17 00:00:00 2001
From: Gregoire Gentil <gregoire@gentil.com>
Date: Fri, 12 Mar 2010 11:49:16 +0100
Subject: [PATCH 16/16] ARM: OMAP: omap3-touchbook: update boardfile
---
- arch/arm/mach-omap2/board-omap3touchbook.c | 394 +++++++++++++++++++++-------
- 1 files changed, 305 insertions(+), 89 deletions(-)
+ arch/arm/mach-omap2/board-omap3touchbook.c | 408 +++++++++++++++++++++-------
+ 1 files changed, 313 insertions(+), 95 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
-index fc3e03c..3628362 100644
+index fc3e03c..ec7830e 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
+@@ -1,7 +1,7 @@
+ /*
+ * linux/arch/arm/mach-omap2/board-omap3touchbook.c
+ *
+- * Copyright (C) 2009 Always Innovating
++ * Copyright (C) 2009-2010 Always Innovating
+ *
+ * Modified from mach-omap2/board-omap3beagleboard.c
+ *
@@ -33,6 +33,7 @@
#include <linux/spi/spi.h>
@@ -27,7 +36,7 @@ index fc3e03c..3628362 100644
#include <plat/gpmc.h>
#include <plat/nand.h>
#include <plat/usb.h>
-@@ -60,6 +62,8 @@
+@@ -60,18 +62,22 @@
#include <asm/setup.h>
@@ -36,11 +45,13 @@ index fc3e03c..3628362 100644
#define GPMC_CS0_BASE 0x60
#define GPMC_CS_SIZE 0x30
-@@ -68,10 +72,11 @@
+ #define NAND_BLOCK_SIZE SZ_128K
+
++#define OMAP3_HJ_GPIO 56
#define OMAP3_AC_GPIO 136
++#define OMAP3_TS2_GPIO 154
#define OMAP3_TS_GPIO 162
-+#define OMAP3_CHACHA_GPIO 154
#define TB_BL_PWM_TIMER 9
#define TB_KILL_POWER_GPIO 168
@@ -49,7 +60,7 @@ index fc3e03c..3628362 100644
static struct mtd_partition omap3touchbook_nand_partitions[] = {
/* All the partition sizes are listed in terms of NAND block size */
-@@ -126,6 +131,103 @@ static struct platform_device omap3touchbook_nand_device = {
+@@ -126,6 +132,103 @@ static struct platform_device omap3touchbook_nand_device = {
.resource = &omap3touchbook_nand_resource,
};
@@ -153,7 +164,7 @@ index fc3e03c..3628362 100644
#include "sdram-micron-mt46h32m32lf-6.h"
static struct twl4030_hsmmc_info mmc[] = {
-@@ -137,15 +239,6 @@ static struct twl4030_hsmmc_info mmc[] = {
+@@ -137,15 +240,6 @@ static struct twl4030_hsmmc_info mmc[] = {
{} /* Terminator */
};
@@ -169,7 +180,7 @@ index fc3e03c..3628362 100644
static struct regulator_consumer_supply touchbook_vmmc1_supply = {
.supply = "vmmc",
};
-@@ -177,6 +270,7 @@ static int touchbook_twl_gpio_setup(struct device *dev,
+@@ -177,6 +271,7 @@ static int touchbook_twl_gpio_setup(struct device *dev,
* power switch and overcurrent detect
*/
@@ -177,7 +188,7 @@ index fc3e03c..3628362 100644
gpio_request(gpio + 1, "EHCI_nOC");
gpio_direction_input(gpio + 1);
-@@ -187,6 +281,7 @@ static int touchbook_twl_gpio_setup(struct device *dev,
+@@ -187,6 +282,7 @@ static int touchbook_twl_gpio_setup(struct device *dev,
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
@@ -185,7 +196,7 @@ index fc3e03c..3628362 100644
return 0;
}
-@@ -201,16 +296,6 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = {
+@@ -201,16 +297,6 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = {
.setup = touchbook_twl_gpio_setup,
};
@@ -202,7 +213,7 @@ index fc3e03c..3628362 100644
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
static struct regulator_init_data touchbook_vmmc1 = {
.constraints = {
-@@ -283,6 +368,10 @@ static struct twl4030_codec_data touchbook_codec_data = {
+@@ -283,6 +369,10 @@ static struct twl4030_codec_data touchbook_codec_data = {
.audio = &touchbook_audio_data,
};
@@ -213,7 +224,7 @@ index fc3e03c..3628362 100644
static struct twl4030_platform_data touchbook_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
-@@ -291,6 +380,7 @@ static struct twl4030_platform_data touchbook_twldata = {
+@@ -291,6 +381,7 @@ static struct twl4030_platform_data touchbook_twldata = {
.usb = &touchbook_usb_data,
.gpio = &touchbook_gpio_data,
.codec = &touchbook_codec_data,
@@ -221,13 +232,13 @@ index fc3e03c..3628362 100644
.vmmc1 = &touchbook_vmmc1,
.vsim = &touchbook_vsim,
.vdac = &touchbook_vdac,
-@@ -310,10 +400,18 @@ static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
+@@ -310,10 +401,18 @@ static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
{
I2C_BOARD_INFO("bq27200", 0x55),
},
+ {
+ I2C_BOARD_INFO("chacha", 0x40),
-+ .irq = OMAP_GPIO_IRQ(OMAP3_CHACHA_GPIO),
++ .irq = OMAP_GPIO_IRQ(OMAP3_TS2_GPIO),
+ },
+ {
+ I2C_BOARD_INFO("ds1307", 0x68),
@@ -240,7 +251,7 @@ index fc3e03c..3628362 100644
/* Standard TouchBook bus */
omap_register_i2c_bus(1, 2600, touchbook_i2c_boardinfo,
ARRAY_SIZE(touchbook_i2c_boardinfo));
-@@ -322,53 +420,16 @@ static int __init omap3_touchbook_i2c_init(void)
+@@ -322,53 +421,16 @@ static int __init omap3_touchbook_i2c_init(void)
omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
ARRAY_SIZE(touchBook_i2c_boardinfo));
@@ -253,12 +264,12 @@ index fc3e03c..3628362 100644
- printk(KERN_ERR "Failed to request GPIO %d for "
- "ads7846 pen down IRQ\n", OMAP3_TS_GPIO);
- return;
-+ ret = gpio_request(OMAP3_CHACHA_GPIO, "chacha");
++ ret = gpio_request(OMAP3_TS2_GPIO, "chacha");
+ if (ret < 0) {
-+ printk(KERN_ERR "Failed to request GPIO %d for chacha IRQ\n", OMAP3_CHACHA_GPIO);
++ printk(KERN_ERR "Failed to request GPIO %d for chacha IRQ\n", OMAP3_TS2_GPIO);
+ return 0;
}
-+ gpio_direction_input(OMAP3_CHACHA_GPIO);
++ gpio_direction_input(OMAP3_TS2_GPIO);
- gpio_direction_input(OMAP3_TS_GPIO);
- omap_set_gpio_debounce(OMAP3_TS_GPIO, 1);
@@ -300,7 +311,7 @@ index fc3e03c..3628362 100644
static struct gpio_led gpio_leds[] = {
{
.name = "touchbook::usr0",
-@@ -412,6 +473,7 @@ static struct gpio_keys_button gpio_buttons[] = {
+@@ -412,6 +474,7 @@ static struct gpio_keys_button gpio_buttons[] = {
.gpio = 183,
.desc = "power",
.wakeup = 1,
@@ -308,7 +319,7 @@ index fc3e03c..3628362 100644
},
};
-@@ -428,23 +490,8 @@ static struct platform_device keys_gpio = {
+@@ -428,23 +491,8 @@ static struct platform_device keys_gpio = {
},
};
@@ -332,7 +343,7 @@ index fc3e03c..3628362 100644
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params, omap35x_mpu_rate_table,
omap35x_dsp_rate_table, omap35x_l3_rate_table);
-@@ -456,9 +503,9 @@ static void __init omap3_touchbook_init_irq(void)
+@@ -456,9 +504,9 @@ static void __init omap3_touchbook_init_irq(void)
}
static struct platform_device *omap3_touchbook_devices[] __initdata = {
@@ -343,7 +354,16 @@ index fc3e03c..3628362 100644
};
static void __init omap3touchbook_flash_init(void)
-@@ -512,6 +559,170 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+@@ -500,7 +548,7 @@ static void __init omap3touchbook_flash_init(void)
+ }
+ }
+
+-static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
++static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
+
+ .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+ .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+@@ -512,6 +560,170 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
.reset_gpio_port[2] = -EINVAL
};
@@ -456,7 +476,7 @@ index fc3e03c..3628362 100644
+
+ /* Halve input brightness */
+ if (!bd->props.boost)
-+ value /= 2;
++ value /= 2;
+
+ /* For maximum brightness, just stop the timer... */
+ if(value != bd->props.max_brightness)
@@ -514,21 +534,24 @@ index fc3e03c..3628362 100644
static void omap3_touchbook_poweroff(void)
{
int r;
-@@ -525,33 +736,27 @@ static void omap3_touchbook_poweroff(void)
+@@ -525,33 +737,26 @@ static void omap3_touchbook_poweroff(void)
gpio_direction_output(TB_KILL_POWER_GPIO, 0);
}
-static void __init early_touchbook_revision(char **p)
-+static void __init early_ai_revision(char **p)
++static int __init ai_revision_instance(char *str)
{
- if (!*p)
- return;
+- if (!*p)
+- return;
++ if (!str)
++ return -EINVAL;
++
++ ai_revision = simple_strtoul(str, NULL, 10);
- strict_strtoul(*p, 10, &touchbook_revision);
-+ strict_strtoul(*p, 10, &ai_revision);
++ return 0;
}
-__early_param("tbr=", early_touchbook_revision);
-+__early_param("air=", early_ai_revision);
static void __init omap3_touchbook_init(void)
{
@@ -541,10 +564,10 @@ index fc3e03c..3628362 100644
omap_serial_init();
- omap_mux_init_gpio(170, OMAP_PIN_INPUT);
- gpio_request(176, "DVI_nPD");
+- gpio_request(176, "DVI_nPD");
- /* REVISIT leave DVI powered down until it's needed ... */
- gpio_direction_output(176, true);
-
+-
- /* Touchscreen and accelerometer */
- spi_register_board_info(omap3_ads7846_spi_board_info,
- ARRAY_SIZE(omap3_ads7846_spi_board_info));
@@ -570,6 +593,15 @@ index fc3e03c..3628362 100644
}
static void __init omap3_touchbook_map_io(void)
+@@ -567,6 +783,8 @@ static void __init omap3_touchbook_map_io(void)
+ omap2_map_common_io();
+ }
+
++early_param("air", ai_revision_instance);
++
+ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
+ /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */
+ .phys_io = 0x48000000,
--
1.6.6.1