From 4dab2a3bd62003416bbc7557d42dd40d0fb81cfe Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 10 Sep 2007 03:35:48 +0000 Subject: linux-ezx: update to svn r2050 --- .../linux/linux-ezx-2.6.21/patches/a1200-eoc.patch | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 packages/linux/linux-ezx-2.6.21/patches/a1200-eoc.patch (limited to 'packages/linux/linux-ezx-2.6.21/patches/a1200-eoc.patch') diff --git a/packages/linux/linux-ezx-2.6.21/patches/a1200-eoc.patch b/packages/linux/linux-ezx-2.6.21/patches/a1200-eoc.patch new file mode 100644 index 0000000000..577aa66303 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/a1200-eoc.patch @@ -0,0 +1,82 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a1200.c 2007-09-07 22:15:52.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c 2007-09-09 13:29:56.000000000 -0300 +@@ -25,6 +25,7 @@ + #include + + #include "generic.h" ++#include "ezx-eoc.h" + + extern void ezx_lcd_power(int, struct fb_var_screeninfo *); + extern void ezx_backlight_power(int); +@@ -227,11 +228,69 @@ + .resource = pcap_ts_resources, + }; + ++ ++/* EOC */ ++static const unsigned int tab_init_eoc_reg[][2] = ++{ ++ {POWER_IC_REG_EOC_INT_MASK, 0x00000FEF}, ++ {POWER_IC_REG_EOC_POWER_CONTROL_0, 0x00000C00}, ++ {POWER_IC_REG_EOC_POWER_CONTROL_1, 0x0000000C}, ++ {POWER_IC_REG_EOC_CONN_CONTROL, 0x00021044}, ++}; ++ ++static void dump_eoc_registers(void) ++{ ++ int i, val = 0; ++ ++ printk("========DUMP EOC=========\n"); ++ for (i = 0; i < POWER_IC_REG_EOC_NUM; i++) { ++ eoc_reg_read(i, &val); ++ printk("eoc_registers[%d] = 0x%08X\n", i, val); ++ } ++ printk("========END DUMP=========\n"); ++} ++ ++/* ++ * FIXME: The same about the PCAP driver applies here. ++ * This is the initial state only. ++ * Which bits does the change to USB/UART/AUDIO mode? ++ * I think that this is causing the crash on pxa27x-udc ++ * you are setting the 'port connected' bit, and thats why ++ * you are getting interrupts early. ++ * --WM ++ */ ++ ++static int __init a1200_eoc_init(void) ++{ ++ int i; ++ ++ for (i = 0; i < sizeof(tab_init_eoc_reg)/sizeof(unsigned int)/2; i++) ++ { ++ eoc_reg_write(tab_init_eoc_reg[i][0], tab_init_eoc_reg[i][1]); ++ } ++ dump_eoc_registers(); ++ return 0; ++} ++ ++static struct ezx_eoc_platform_data a1200_eoc_platform_data = { ++ .init = a1200_eoc_init, ++}; ++ ++struct platform_device a1200_eoc_device = { ++ .name = "ezx-eoc", ++ .id = -1, ++ .dev = { ++ .platform_data = &a1200_eoc_platform_data, ++ }, ++}; ++ + static struct platform_device *devices[] __initdata = { + &a1200_pcap_device, + &pcap_ts_device, ++ &a1200_eoc_device, + }; + ++ + static void __init a1200_init(void) + { + set_pxa_fb_info(&a1200_fb_info); -- cgit v1.2.3