X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/101bcffa4f181122120ee1d86b8711dadb30a440..ef2f8edd20a874423aecbcc2b2ed094af0708db3:/target/linux/omap24xx/patches-2.6.37/300-nokia-board.patch?ds=sidebyside diff --git a/target/linux/omap24xx/patches-2.6.37/300-nokia-board.patch b/target/linux/omap24xx/patches-2.6.37/300-nokia-board.patch index e61212be4..d8c48b83b 100644 --- a/target/linux/omap24xx/patches-2.6.37/300-nokia-board.patch +++ b/target/linux/omap24xx/patches-2.6.37/300-nokia-board.patch @@ -9,10 +9,10 @@ arch/arm/mach-omap2/serial.c | 8 8 files changed, 608 insertions(+), 87 deletions(-) -Index: linux-2.6.37-rc1/arch/arm/mach-omap1/board-nokia770.c +Index: linux-2.6.37/arch/arm/mach-omap1/board-nokia770.c =================================================================== ---- linux-2.6.37-rc1.orig/arch/arm/mach-omap1/board-nokia770.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1/arch/arm/mach-omap1/board-nokia770.c 2010-11-05 17:36:26.186000001 +0100 +--- linux-2.6.37.orig/arch/arm/mach-omap1/board-nokia770.c 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/arch/arm/mach-omap1/board-nokia770.c 2011-01-28 18:09:59.378233620 +0100 @@ -36,6 +36,7 @@ #include #include @@ -45,10 +45,10 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap1/board-nokia770.c }; static void mipid_shutdown(struct mipid_platform_data *pdata) -Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c +Index: linux-2.6.37/arch/arm/mach-omap2/board-n8x0.c =================================================================== ---- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/board-n8x0.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c 2010-11-05 17:37:40.169999973 +0100 +--- linux-2.6.37.orig/arch/arm/mach-omap2/board-n8x0.c 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/arch/arm/mach-omap2/board-n8x0.c 2011-01-28 18:13:25.864968462 +0100 @@ -18,9 +18,13 @@ #include #include @@ -72,7 +72,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c #include "mux.h" -@@ -40,109 +46,156 @@ +@@ -40,109 +46,162 @@ static int slot2_cover_open; static struct device *mmc_device; @@ -81,22 +81,14 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c -#define TUSB6010_GPIO_INT 58 -#define TUSB6010_GPIO_ENABLE 0 -#define TUSB6010_DMACHAN 0x3f -- --#if defined(CONFIG_USB_TUSB6010) || \ -- defined(CONFIG_USB_TUSB6010_MODULE) --/* -- * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and -- * 1.5 V voltage regulators of PM companion chip. Companion chip will then -- * provide then PGOOD signal to TUSB6010 which will release it from reset. -- */ --static int tusb_set_power(int state) --{ -- int i, retval = 0; +#define RX51_TSC2005_RESET_GPIO 94 +#define RX51_TSC2005_IRQ_GPIO 106 +#define OMAP_TAG_NOKIA_BT 0x4e01 + -+#if 0 ++/* We map the FN key as LALT to workaround an X keycode problem. ++ * The XKB map needs to be adjusted to support this. */ ++#define MAP_FN_AS_LEFTALT ++ +static s16 rx44_keymap[LM8323_KEYMAP_SIZE] = { + [0x01] = KEY_Q, + [0x02] = KEY_K, @@ -128,10 +120,24 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c + [0x22] = KEY_SEMICOLON, + [0x23] = KEY_MINUS, + [0x24] = KEY_EQUAL, ++#ifdef MAP_FN_AS_LEFTALT ++ [0x2b] = KEY_LEFTALT, ++#else + [0x2b] = KEY_FN, ++#endif + [0x2c] = KEY_M, + [0x2f] = KEY_F8, -+ + +-#if defined(CONFIG_USB_TUSB6010) || \ +- defined(CONFIG_USB_TUSB6010_MODULE) +-/* +- * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and +- * 1.5 V voltage regulators of PM companion chip. Companion chip will then +- * provide then PGOOD signal to TUSB6010 which will release it from reset. +- */ +-static int tusb_set_power(int state) +-{ +- int i, retval = 0; + [0x31] = KEY_R, + [0x32] = KEY_RIGHTCTRL, + [0x34] = KEY_SPACE, @@ -170,11 +176,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c + //.pwm1_name = "n810::keyboard", + //.pwm2_name = "n810::cover", +}; -+#endif - -- if (state) { -- gpio_set_value(TUSB6010_GPIO_ENABLE, 1); -- msleep(1); ++ +struct omap_bluetooth_config { + u8 chip_type; + u8 bt_wakeup_gpio; @@ -202,16 +204,23 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c + BUG(); +} +- if (state) { +- gpio_set_value(TUSB6010_GPIO_ENABLE, 1); +- msleep(1); ++static struct omap2_mcspi_device_config mipid_mcspi_config = { ++ .turbo_mode = 0, ++ .single_channel = 1, ++}; + - /* Wait until TUSB6010 pulls INT pin down */ - i = 100; - while (i && gpio_get_value(TUSB6010_GPIO_INT)) { - msleep(1); - i--; - } -+static struct omap2_mcspi_device_config mipid_mcspi_config = { -+ .turbo_mode = 0, -+ .single_channel = 1, -+}; ++static int slot1_cover_open; ++static int slot2_cover_open; ++static struct device *mmc_device; - if (!i) { - printk(KERN_ERR "tusb: powerup failed\n"); @@ -221,13 +230,10 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c - gpio_set_value(TUSB6010_GPIO_ENABLE, 0); - msleep(10); - } -+static int slot1_cover_open; -+static int slot2_cover_open; -+static struct device *mmc_device; - return retval; -} - +- -static struct musb_hdrc_config musb_config = { - .multipoint = 1, - .dyn_fifo = 1, @@ -288,12 +294,12 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c + gpio_set_value(RX51_TSC2005_RESET_GPIO, enable); } -#else - +- -static void __init n8x0_usb_init(void) {} - -#endif /*CONFIG_USB_TUSB6010 */ - -- + -static struct omap2_mcspi_device_config p54spi_mcspi_config = { +static struct omap2_mcspi_device_config tsc2005_mcspi_config = { .turbo_mode = 0, @@ -315,7 +321,7 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c { .modalias = "p54spi", .bus_num = 2, -@@ -150,7 +203,71 @@ +@@ -150,8 +209,60 @@ .max_speed_hz = 48000000, .controller_data = &p54spi_mcspi_config, }, @@ -328,8 +334,8 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c + .controller_data = &tsc2005_mcspi_config, + .platform_data = &tsc2005_config, + }, -+}; -+ + }; + +static void __init tsc2005_set_config(void) +{ + const struct omap_lcd_config *conf; @@ -373,21 +379,10 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c + } +} + -+#if 0 -+static struct i2c_board_info __initdata_or_module n8x0_i2c_board_info_2[] = {}; -+ -+static struct i2c_board_info __initdata_or_module n810_i2c_board_info_2[] = { -+ { -+ I2C_BOARD_INFO("lm8323", 0x45), -+ .irq = OMAP_GPIO_IRQ(109), -+ .platform_data = &lm8323_pdata, -+ }, - }; -+#endif - #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) -@@ -184,6 +301,20 @@ + +@@ -184,6 +295,20 @@ }, }; @@ -408,7 +403,19 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c static struct omap_onenand_platform_data board_onenand_data = { .cs = 0, .gpio_irq = 26, -@@ -657,10 +788,62 @@ +@@ -626,6 +751,11 @@ + + static struct i2c_board_info n810_i2c_board_info_2[] __initdata = { + { ++ I2C_BOARD_INFO("lm8323", 0x45), ++ .irq = OMAP_GPIO_IRQ(109), ++ .platform_data = &lm8323_pdata, ++ }, ++ { + I2C_BOARD_INFO("tlv320aic3x", 0x18), + .platform_data = &n810_aic33_data, + }, +@@ -657,10 +787,62 @@ #define board_mux NULL #endif @@ -471,10 +478,21 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0.c spi_register_board_info(n800_spi_board_info, ARRAY_SIZE(n800_spi_board_info)); omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1, -Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-lcd.c +@@ -671,6 +853,10 @@ + ARRAY_SIZE(n810_i2c_board_info_2)); + + omap_serial_init(); ++ ++ n8x0_mipid_init(); ++ n8x0_blizzard_init(); ++ + n8x0_onenand_init(); + n8x0_mmc_init(); + n8x0_usb_init(); +Index: linux-2.6.37/arch/arm/mach-omap2/board-n8x0-lcd.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-lcd.c 2010-11-05 17:36:45.209000001 +0100 ++++ linux-2.6.37/arch/arm/mach-omap2/board-n8x0-lcd.c 2011-01-28 18:10:37.941647955 +0100 @@ -0,0 +1,127 @@ +/* + * linux/arch/arm/mach-omap2/board-n8x0.c @@ -603,10 +621,10 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-lcd.c + + printk(KERN_INFO "N8x0 Blizzard initialized"); +} -Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-usb.c +Index: linux-2.6.37/arch/arm/mach-omap2/board-n8x0-usb.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-usb.c 2010-11-05 17:36:26.187000001 +0100 ++++ linux-2.6.37/arch/arm/mach-omap2/board-n8x0-usb.c 2011-01-28 18:09:59.378233620 +0100 @@ -0,0 +1,175 @@ +/* + * linux/arch/arm/mach-omap2/board-n8x0-usb.c @@ -783,10 +801,10 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/board-n8x0-usb.c +err: + gpio_free(GPIO_TUSB_ENABLE); +} -Index: linux-2.6.37-rc1/arch/arm/mach-omap2/control.c +Index: linux-2.6.37/arch/arm/mach-omap2/control.c =================================================================== ---- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/control.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1/arch/arm/mach-omap2/control.c 2010-11-05 17:36:26.187000001 +0100 +--- linux-2.6.37.orig/arch/arm/mach-omap2/control.c 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/arch/arm/mach-omap2/control.c 2011-01-28 18:09:59.378233620 +0100 @@ -172,6 +172,7 @@ return __raw_readw(OMAP_CTRL_REGADDR(offset)); } @@ -803,10 +821,10 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/control.c void omap_ctrl_writel(u32 val, u16 offset) { __raw_writel(val, OMAP_CTRL_REGADDR(offset)); -Index: linux-2.6.37-rc1/arch/arm/mach-omap2/Kconfig +Index: linux-2.6.37/arch/arm/mach-omap2/Kconfig =================================================================== ---- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/Kconfig 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1/arch/arm/mach-omap2/Kconfig 2010-11-05 17:36:26.187000001 +0100 +--- linux-2.6.37.orig/arch/arm/mach-omap2/Kconfig 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/arch/arm/mach-omap2/Kconfig 2011-01-28 18:09:59.378233620 +0100 @@ -210,6 +210,16 @@ select MACH_NOKIA_N810 select MACH_NOKIA_N810_WIMAX @@ -824,10 +842,10 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/Kconfig config MACH_NOKIA_RX51 bool "Nokia RX-51 board" depends on ARCH_OMAP3 -Index: linux-2.6.37-rc1/arch/arm/mach-omap2/Makefile +Index: linux-2.6.37/arch/arm/mach-omap2/Makefile =================================================================== ---- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/Makefile 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1/arch/arm/mach-omap2/Makefile 2010-11-05 17:36:26.187000001 +0100 +--- linux-2.6.37.orig/arch/arm/mach-omap2/Makefile 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/arch/arm/mach-omap2/Makefile 2011-01-28 18:09:59.378233620 +0100 @@ -139,6 +139,8 @@ hsmmc.o \ board-flash.o @@ -837,38 +855,3 @@ Index: linux-2.6.37-rc1/arch/arm/mach-omap2/Makefile obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ board-rx51-sdram.o \ board-rx51-peripherals.o \ -Index: linux-2.6.37-rc1/arch/arm/mach-omap2/serial.c -=================================================================== ---- linux-2.6.37-rc1.orig/arch/arm/mach-omap2/serial.c 2010-11-01 12:54:12.000000000 +0100 -+++ linux-2.6.37-rc1/arch/arm/mach-omap2/serial.c 2010-11-05 17:36:26.187000001 +0100 -@@ -545,10 +545,10 @@ - uart->padconf = 0; - } - -- uart->irqflags |= IRQF_SHARED; -+/* uart->irqflags |= IRQF_SHARED; - ret = request_threaded_irq(uart->irq, NULL, omap_uart_interrupt, - IRQF_SHARED, "serial idle", (void *)uart); -- WARN_ON(ret); -+ WARN_ON(ret); */ - } - - void omap_uart_enable_irqs(int enable) -@@ -556,7 +556,7 @@ - int ret; - struct omap_uart_state *uart; - -- list_for_each_entry(uart, &uart_list, node) { -+/* list_for_each_entry(uart, &uart_list, node) { - if (enable) { - pm_runtime_put_sync(&uart->pdev->dev); - ret = request_threaded_irq(uart->irq, NULL, -@@ -568,7 +568,7 @@ - pm_runtime_get_noresume(&uart->pdev->dev); - free_irq(uart->irq, (void *)uart); - } -- } -+ } */ - } - - static ssize_t sleep_timeout_show(struct device *dev,