summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-05-01 21:14:47 +0000
committerKoen Kooi <koen@openembedded.org>2007-05-01 21:14:47 +0000
commit23a69763708f6c95528a47ac5a4ba36c43d5e106 (patch)
tree01eb3d1b193f2d4e334403e8bdad8b69a134333e /packages
parentecf440c620921904d155cd66d4ac1dd630e10e99 (diff)
linux-ezx 2.6.21: update patches to r1995, gives you working ts, keys and some powermanagement
Diffstat (limited to 'packages')
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-core.patch54
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-emu.patch51
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-kbd.patch139
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-pcap.patch34
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-pm.patch58
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-ts.patch399
-rw-r--r--packages/linux/linux-ezx-2.6.21/mux-linux-2.6.20.7-fix.patch224
-rw-r--r--packages/linux/linux-ezx-2.6.21/mux-linux-2.6.21-fix.patch11
-rw-r--r--packages/linux/linux-ezx-2.6.21/pcap_ts.c.patch237
-rw-r--r--packages/linux/linux-ezx-2.6.21/pxa-kbd.patch463
-rw-r--r--packages/linux/linux-ezx-2.6.21/touchscreen-fix-r0.patch21
-rw-r--r--packages/linux/linux-ezx-2.6.21/wyrm-ts.diff124
-rw-r--r--packages/linux/linux-ezx_2.6.21.bb23
13 files changed, 1765 insertions, 73 deletions
diff --git a/packages/linux/linux-ezx-2.6.21/ezx-core.patch b/packages/linux/linux-ezx-2.6.21/ezx-core.patch
index 81be0ef159..8423db6e00 100644
--- a/packages/linux/linux-ezx-2.6.21/ezx-core.patch
+++ b/packages/linux/linux-ezx-2.6.21/ezx-core.patch
@@ -1,7 +1,7 @@
Index: linux-2.6.21/arch/arm/boot/compressed/head-xscale.S
===================================================================
---- linux-2.6.21.orig/arch/arm/boot/compressed/head-xscale.S 2007-04-26 00:08:32.000000000 -0300
-+++ linux-2.6.21/arch/arm/boot/compressed/head-xscale.S 2007-04-26 20:27:42.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/boot/compressed/head-xscale.S 2007-05-01 00:21:30.000000000 -0300
++++ linux-2.6.21/arch/arm/boot/compressed/head-xscale.S 2007-05-01 00:21:34.000000000 -0300
@@ -53,3 +53,6 @@
str r1, [r0, #0x18]
#endif
@@ -11,8 +11,8 @@ Index: linux-2.6.21/arch/arm/boot/compressed/head-xscale.S
+#endif
Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-04-26 00:08:32.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-04-26 20:27:42.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-01 00:21:30.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-01 01:39:12.000000000 -0300
@@ -37,6 +37,10 @@
bool "Keith und Koep Trizeps4 DIMM-Module"
select PXA27x
@@ -60,8 +60,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig
endif
Index: linux-2.6.21/arch/arm/mach-pxa/Makefile
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-04-26 00:08:32.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-04-26 20:27:42.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-01 00:21:30.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-01 01:39:13.000000000 -0300
@@ -18,6 +18,7 @@
obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o
obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o
@@ -73,8 +73,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/Makefile
Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-04-26 20:27:42.000000000 -0300
-@@ -0,0 +1,379 @@
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-01 01:39:14.000000000 -0300
+@@ -0,0 +1,378 @@
+/*
+ * linux/arch/arm/mach-ezx/a780.c
+ *
@@ -97,7 +97,6 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+#include <linux/bitops.h>
+#include <linux/apm_bios.h>
+#include <linux/platform_device.h>
-+#include <linux/input.h>
+
+#include <asm/types.h>
+#include <asm/setup.h>
@@ -379,7 +378,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+
+static void __init a780_init(void)
+{
-+//FIXME CKEN = CKEN9_OSTIMER | CKEN22_MEMC | CKEN5_STUART;
++ CKEN = CKEN9_OSTIMER | CKEN22_MEMC;
+
+ ezx_ssp_set_machinfo(&ezx_ssp_machinfo);
+
@@ -457,7 +456,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
Index: linux-2.6.21/include/asm-arm/arch-pxa/ezx.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/include/asm-arm/arch-pxa/ezx.h 2007-04-26 20:27:42.000000000 -0300
++++ linux-2.6.21/include/asm-arm/arch-pxa/ezx.h 2007-05-01 00:21:34.000000000 -0300
@@ -0,0 +1,225 @@
+/*
+ * linux/include/asm-arm/arch-pxa/ezx.h
@@ -686,8 +685,8 @@ Index: linux-2.6.21/include/asm-arm/arch-pxa/ezx.h
+
Index: linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h
===================================================================
---- linux-2.6.21.orig/include/asm-arm/arch-pxa/pxa-regs.h 2007-04-26 00:08:32.000000000 -0300
-+++ linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h 2007-04-26 20:28:45.000000000 -0300
+--- linux-2.6.21.orig/include/asm-arm/arch-pxa/pxa-regs.h 2007-05-01 00:21:30.000000000 -0300
++++ linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h 2007-05-01 01:39:11.000000000 -0300
@@ -849,6 +849,8 @@
#define UP2OCR_HXOE (1 << 17) /* Host Port 2 Transceiver Output Enable */
#define UP2OCR_SEOS (1 << 24) /* Single-Ended Output Select */
@@ -803,8 +802,8 @@ Index: linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h
#define PGSR2 __REG(0x40F00028) /* Power Manager GPIO Sleep State Register for GP[84-64] */
Index: linux-2.6.21/arch/arm/boot/compressed/head.S
===================================================================
---- linux-2.6.21.orig/arch/arm/boot/compressed/head.S 2007-04-26 00:08:32.000000000 -0300
-+++ linux-2.6.21/arch/arm/boot/compressed/head.S 2007-04-26 20:27:42.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/boot/compressed/head.S 2007-05-01 00:21:30.000000000 -0300
++++ linux-2.6.21/arch/arm/boot/compressed/head.S 2007-05-01 00:21:34.000000000 -0300
@@ -117,6 +117,9 @@
mov r0, r0
.endr
@@ -817,8 +816,8 @@ Index: linux-2.6.21/arch/arm/boot/compressed/head.S
.word start @ absolute load/run zImage address
Index: linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h
===================================================================
---- linux-2.6.21.orig/include/asm-arm/arch-pxa/uncompress.h 2007-04-26 00:08:32.000000000 -0300
-+++ linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h 2007-04-26 20:27:42.000000000 -0300
+--- linux-2.6.21.orig/include/asm-arm/arch-pxa/uncompress.h 2007-05-01 00:21:30.000000000 -0300
++++ linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h 2007-05-01 00:21:34.000000000 -0300
@@ -14,14 +14,14 @@
#define STUART ((volatile unsigned long *)0x40700000)
#define HWUART ((volatile unsigned long *)0x41600000)
@@ -840,7 +839,7 @@ Index: linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h
Index: linux-2.6.21/arch/arm/mach-pxa/ezx_ssp.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/arch/arm/mach-pxa/ezx_ssp.c 2007-04-26 20:27:42.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx_ssp.c 2007-05-01 00:21:34.000000000 -0300
@@ -0,0 +1,126 @@
+/*
+ * SSP control code for Motorola EZX phones
@@ -971,7 +970,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx_ssp.c
Index: linux-2.6.21/arch/arm/mach-pxa/ezx.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/arch/arm/mach-pxa/ezx.h 2007-04-26 20:27:42.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.h 2007-05-01 00:21:34.000000000 -0300
@@ -0,0 +1,9 @@
+#include <asm/arch/ezx.h>
+
@@ -985,8 +984,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.h
Index: linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c 2007-04-26 20:27:42.000000000 -0300
-@@ -0,0 +1,112 @@
++++ linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c 2007-05-01 01:51:20.000000000 -0300
+@@ -0,0 +1,113 @@
+/*
+ * linux/arch/arm/mach-ezx/a780.c
+ *
@@ -1028,8 +1027,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c
+ }
+}
+
-+#ifdef CONFIG_PXA_E2
-+static void sumatra_backlight_power(int on)
++static void ezx_backlight_power(int on)
+{
+ if (on) {
+ pxa_gpio_mode(GPIO16_PWM0_MD);
@@ -1045,6 +1043,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c
+ }
+}
+
++#ifdef CONFIG_PXA_E2
+static struct pxafb_mode_info mode_ezx = {
+ .pixclock = 192308,
+ .xres = 240,
@@ -1064,7 +1063,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c
+ .num_modes = 1,
+ .lccr0 = 0x022008B8,
+ .lccr3 = 0xC130FF13,
-+ .pxafb_backlight_power = sumatra_backlight_power,
++ .pxafb_backlight_power = ezx_backlight_power,
+ .pxafb_lcd_power = &pxafb_lcd_power,
+};
+
@@ -1088,7 +1087,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c
+ .num_modes = 1,
+ .lccr0 = 0x002008F8,
+ .lccr3 = 0x0430FF09,
-+ .pxafb_lcd_power= &pxafb_lcd_power,
++ .pxafb_backlight_power = ezx_backlight_power,
++ .pxafb_lcd_power = &pxafb_lcd_power,
+};
+#endif
+
@@ -1101,8 +1101,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c
+arch_initcall(__ezx_lcd_init);
Index: linux-2.6.21/arch/arm/mm/init.c
===================================================================
---- linux-2.6.21.orig/arch/arm/mm/init.c 2007-04-26 00:08:32.000000000 -0300
-+++ linux-2.6.21/arch/arm/mm/init.c 2007-04-26 20:27:42.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mm/init.c 2007-05-01 00:21:30.000000000 -0300
++++ linux-2.6.21/arch/arm/mm/init.c 2007-05-01 00:21:34.000000000 -0300
@@ -241,6 +241,10 @@
*/
reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT,
diff --git a/packages/linux/linux-ezx-2.6.21/ezx-emu.patch b/packages/linux/linux-ezx-2.6.21/ezx-emu.patch
index cb3bfc53e7..95fdd96fc1 100644
--- a/packages/linux/linux-ezx-2.6.21/ezx-emu.patch
+++ b/packages/linux/linux-ezx-2.6.21/ezx-emu.patch
@@ -1,8 +1,8 @@
-Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx-emu.c
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-emu.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx-emu.c 2007-04-23 01:14:40.000000000 -0300
-@@ -0,0 +1,200 @@
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-emu.c 2007-05-01 03:58:42.000000000 -0300
+@@ -0,0 +1,215 @@
+/*
+ * EMU Driver for Motorola EZX phones
+ *
@@ -135,7 +135,10 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx-emu.c
+
+ pxa_set_udc_info(&ezx_udc_info);
+
-+ emu_switch_to_default();
++ if(ezx_pcap_read_bit(SSP_PCAP_ADJ_BIT_PSTAT_USBDET_4V))
++ emu_switch_to_default();
++ else
++ emu_switch_to_nothing();
+
+ return 0;
+}
@@ -148,6 +151,18 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx-emu.c
+ return 0;
+}
+
++static int ezx_emu_suspend(struct platform_device *dev)
++{
++ emu_switch_to_nothing();
++ return 0;
++}
++
++static int ezx_emu_resume(struct platform_device *dev)
++{
++ emu_switch_to_default();
++ return 0;
++}
++
+/* USB Device Controller */
+static int udc_connected_status;
+static void ezx_udc_command(int cmd)
@@ -179,8 +194,8 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx-emu.c
+static struct platform_driver ezxemu_driver = {
+ .probe = ezx_emu_probe,
+ .remove = ezx_emu_remove,
-+ //.suspend = ezx_emu_suspend,
-+ //.resume = ezx_emu_resume,
++ .suspend = ezx_emu_suspend,
++ .resume = ezx_emu_resume,
+ .driver = {
+ .name = "ezx-emu",
+ .owner = THIS_MODULE,
@@ -203,10 +218,10 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx-emu.c
+MODULE_DESCRIPTION("Motorola Enchanced Mini Usb driver");
+MODULE_AUTHOR("Daniel Ribeiro <drwyrm@gmail.com>");
+MODULE_LICENSE("GPL");
-Index: linux-2.6.20.7/arch/arm/mach-pxa/Kconfig
+Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig
===================================================================
---- linux-2.6.20.7.orig/arch/arm/mach-pxa/Kconfig 2007-04-22 15:02:54.000000000 -0300
-+++ linux-2.6.20.7/arch/arm/mach-pxa/Kconfig 2007-04-22 15:23:10.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-01 01:39:12.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-01 02:07:23.000000000 -0300
@@ -94,6 +94,27 @@
endchoice
@@ -235,10 +250,10 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/Kconfig
endif
endmenu
-Index: linux-2.6.20.7/arch/arm/mach-pxa/Makefile
+Index: linux-2.6.21/arch/arm/mach-pxa/Makefile
===================================================================
---- linux-2.6.20.7.orig/arch/arm/mach-pxa/Makefile 2007-04-22 15:23:01.000000000 -0300
-+++ linux-2.6.20.7/arch/arm/mach-pxa/Makefile 2007-04-22 15:23:10.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-01 02:07:23.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-01 04:10:48.000000000 -0300
@@ -19,6 +19,7 @@
obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o
obj-$(CONFIG_MACH_TOSA) += tosa.o
@@ -247,11 +262,11 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/Makefile
# Support for blinky lights
led-y := leds.o
-Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx.c
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
===================================================================
---- linux-2.6.20.7.orig/arch/arm/mach-pxa/ezx.c 2007-04-22 15:22:55.000000000 -0300
-+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx.c 2007-04-23 01:02:05.000000000 -0300
-@@ -36,6 +36,7 @@
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-01 02:07:23.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-01 02:07:23.000000000 -0300
+@@ -35,6 +35,7 @@
#include <asm/arch/ohci.h>
#include <asm/arch/pxa-regs.h>
@@ -259,7 +274,7 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx.c
#include "ezx.h"
#include "generic.h"
#include <linux/tty.h>
-@@ -92,6 +93,30 @@
+@@ -91,6 +92,30 @@
.resource = ezxpcap_resources,
};
@@ -290,7 +305,7 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx.c
/* OHCI Controller */
static int ezx_ohci_init(struct device *dev)
-@@ -317,6 +342,7 @@
+@@ -316,6 +341,7 @@
&ezxssp_device,
&ezxpcap_device,
&ezxbp_device,
diff --git a/packages/linux/linux-ezx-2.6.21/ezx-kbd.patch b/packages/linux/linux-ezx-2.6.21/ezx-kbd.patch
new file mode 100644
index 0000000000..7c020a2d96
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/ezx-kbd.patch
@@ -0,0 +1,139 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-kbd.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-kbd.c 2007-04-30 20:33:19.000000000 -0300
+@@ -0,0 +1,109 @@
++#include <linux/input.h>
++#include <asm/arch/kbd.h>
++#include <asm/arch/pxa-regs.h>
++
++extern void __init pxa_set_kbd_info(struct pxakbd_platform_data *);
++
++#if defined(CONFIG_PXA_EZX_E680)
++static unsigned char ezx_keycode[] = {
++ /* row 0 */
++ KEY_UP, KEY_RIGHT, KEY_RESERVED, KEY_PHONE,
++ /* row 1 */
++ KEY_DOWN, KEY_LEFT, KEY_VOLUMEUP, KEY_VOLUMEDOWN,
++ /* row 2 */
++ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_KPENTER,
++};
++
++static unsigned char ezx_direct_keycode[] = {
++ KEY_CAMERA,
++ KEYPAD_RESERVED,
++ KEYPAD_RESERVED,
++ KEYPAD_HOME,
++ KEY_POWER,
++ KEYPAD_MENU,
++};
++#elif defined(CONFIG_PXA_EZX_A780)
++static unsigned char ezx_keycode[] = {
++ /* row 0 */
++ KEY_KPENTER, KEY_MENU, KEY_CANCEL, KEY_PAGEUP, KEY_UP,
++ /* row 1 */
++ KEY_KP1, KEY_KP2, KEY_KP3, KEY_ENTER, KEY_KPENTER, /*center joypad */
++ /* row 2 */
++ KEY_KP4, KEY_KP5, KEY_KP6, KEY_PAGEDOWN, KEY_PHONE,
++ /* row 3 */
++ KEY_KP7, KEY_KP8, KEY_KP9, KEY_PHONE, KEY_LEFT,
++ /* row 4 */
++ KEY_KPASTERISK, KEY_KP0, KEY_KPDOT, KEY_PAGEDOWN, KEY_DOWN,
++};
++static unsigned char ezx_direct_keycode[] = {
++ KEY_CAMERA,
++};
++#else
++#error "no EZX subarchitecture defined"
++#endif
++
++static int ezx_kbd_init(void)
++{
++#if defined(CONFIG_PXA_EZX_E680)
++ pxa_gpio_mode(93 | GPIO_ALT_FN_1_IN); /* KP_DKIN<0>, VR Key */
++ pxa_gpio_mode(96 | GPIO_ALT_FN_1_IN); /* KP_DKIN<3>, GAME_A */
++ pxa_gpio_mode(97 | GPIO_ALT_FN_1_IN); /* KP_DKIN<4>, power key */
++ pxa_gpio_mode(98 | GPIO_ALT_FN_1_IN); /* KP_DKIN<5>, GAME_B */
++ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* KP_MKIN<0> */
++ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* KP_MKIN<1> */
++ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* KP_MKIN<2> */
++ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<0> */
++ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<1> */
++ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<2> */
++ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<3> */
++ pxa_gpio_mode(GPIO_TC_MM_EN);
++ GPDR(GPIO_TC_MM_EN) |= GPIO_bit(GPIO_TC_MM_EN);
++ GPSR(GPIO_TC_MM_EN) = GPIO_bit(GPIO_TC_MM_EN);
++ PGSR3 |= GPIO_bit(GPIO_TC_MM_EN);
++#elif defined(CONFIG_PXA_EZX_A780)
++ pxa_gpio_mode(93 | GPIO_ALT_FN_1_IN); /* KP_DKIN<0>, voice_rec */
++ pxa_gpio_mode(97 | GPIO_ALT_FN_3_IN); /* KP_MKIN<3> */
++ pxa_gpio_mode(98 | GPIO_ALT_FN_3_IN); /* KP_MKIN<4> */
++ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* KP_MKIN<0> */
++ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* KP_MKIN<1> */
++ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* KP_MKIN<2> */
++ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<0> */
++ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<1> */
++ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<2> */
++ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<3> */
++ pxa_gpio_mode(107 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<4> */
++#endif
++ return 0;
++}
++
++static struct pxakbd_platform_data ezx_kbd_platform_data = {
++ .init = &ezx_kbd_init,
++ .scan_interval = HZ/40,
++ .matrix = {
++ .keycode = ezx_keycode,
++#if defined(CONFIG_PXA_EZX_E680)
++ .cols = 4,
++ .rows = 3,
++#elif defined(CONFIG_PXA_EZX_A780)
++ .cols = 5,
++ .rows = 5,
++#endif
++ },
++ .direct = {
++ .keycode = ezx_direct_keycode,
++#if defined(CONFIG_PXA_EZX_E680)
++ .num = 6,
++#elif defined(CONFIG_PXA_EZX_A780)
++ .num = 1,
++#endif
++ },
++};
++
++
++int __init __ezx_kbd_init (void)
++{
++ pxa_set_kbd_info(&ezx_kbd_platform_data);
++ return 0;
++}
++
++arch_initcall(__ezx_kbd_init);
+Index: linux-2.6.21/arch/arm/mach-pxa/Makefile
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-04-30 20:09:21.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-04-30 20:09:34.000000000 -0300
+@@ -18,7 +18,7 @@
+ obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o
+ obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o
+ obj-$(CONFIG_MACH_TOSA) += tosa.o
+-obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o ezx-pcap.o ezx-mci.o
++obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o ezx-pcap.o ezx-mci.o ezx-kbd.o
+ obj-$(CONFIG_PXA_EZX_EMU) += ezx-emu.o
+
+ # Support for blinky lights
+Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c
+===================================================================
+--- linux-2.6.21.orig/drivers/input/keyboard/pxakbd.c 2007-04-30 20:47:29.000000000 -0300
++++ linux-2.6.21/drivers/input/keyboard/pxakbd.c 2007-04-30 20:49:32.000000000 -0300
+@@ -213,6 +213,7 @@
+ if (!input_dev)
+ goto out_pxa;
+
++ spin_lock_init(&pxakbd->lock);
+ pxakbd->irq = platform_get_irq(pdev, 0);
+ r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!r || pxakbd->irq == NO_IRQ) {
diff --git a/packages/linux/linux-ezx-2.6.21/ezx-pcap.patch b/packages/linux/linux-ezx-2.6.21/ezx-pcap.patch
index 22c5d44f36..de64d722e9 100644
--- a/packages/linux/linux-ezx-2.6.21/ezx-pcap.patch
+++ b/packages/linux/linux-ezx-2.6.21/ezx-pcap.patch
@@ -1,7 +1,7 @@
-Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx-pcap.c
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx-pcap.c 2007-04-21 08:26:37.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c 2007-05-01 14:00:50.000000000 -0300
@@ -0,0 +1,411 @@
+/* Driver for Motorola PCAP2 as present in EZX phones
+ *
@@ -414,10 +414,10 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx-pcap.c
+MODULE_AUTHOR("Harald Welte");
+MODULE_DESCRIPTION("SPI Driver for Motorola PCAP2");
+
-Index: linux-2.6.20.7/include/asm-arm/arch-pxa/ezx-pcap.h
+Index: linux-2.6.21/include/asm-arm/arch-pxa/ezx-pcap.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20.7/include/asm-arm/arch-pxa/ezx-pcap.h 2007-04-21 08:26:37.000000000 -0300
++++ linux-2.6.21/include/asm-arm/arch-pxa/ezx-pcap.h 2007-05-01 14:00:50.000000000 -0300
@@ -0,0 +1,665 @@
+/* (c) Copyright Motorola Beijing 2002 all rights reserved.
+
@@ -1084,10 +1084,10 @@ Index: linux-2.6.20.7/include/asm-arm/arch-pxa/ezx-pcap.h
+extern void ssp_pcap_screenlock_unlock(u32 data);
+
+#endif
-Index: linux-2.6.20.7/include/asm-arm/arch-pxa/irqs.h
+Index: linux-2.6.21/include/asm-arm/arch-pxa/irqs.h
===================================================================
---- linux-2.6.20.7.orig/include/asm-arm/arch-pxa/irqs.h 2007-04-21 08:26:32.000000000 -0300
-+++ linux-2.6.20.7/include/asm-arm/arch-pxa/irqs.h 2007-04-21 08:26:37.000000000 -0300
+--- linux-2.6.21.orig/include/asm-arm/arch-pxa/irqs.h 2007-05-01 14:00:24.000000000 -0300
++++ linux-2.6.21/include/asm-arm/arch-pxa/irqs.h 2007-05-01 14:00:50.000000000 -0300
@@ -176,7 +176,8 @@
#define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1)
#elif defined(CONFIG_ARCH_LUBBOCK) || \
@@ -1115,10 +1115,10 @@ Index: linux-2.6.20.7/include/asm-arm/arch-pxa/irqs.h
+#define EZX_IRQ_ONOFF EZX_IRQ(7)
+#define EZX_IRQ_ONOFF2 EZX_IRQ(8)
+
-Index: linux-2.6.20.7/arch/arm/mach-pxa/Makefile
+Index: linux-2.6.21/arch/arm/mach-pxa/Makefile
===================================================================
---- linux-2.6.20.7.orig/arch/arm/mach-pxa/Makefile 2007-04-21 08:26:37.000000000 -0300
-+++ linux-2.6.20.7/arch/arm/mach-pxa/Makefile 2007-04-21 08:45:09.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-01 14:00:48.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-01 14:00:50.000000000 -0300
@@ -18,7 +18,7 @@
obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o
obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o
@@ -1128,11 +1128,11 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/Makefile
# Support for blinky lights
led-y := leds.o
-Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx.c
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
===================================================================
---- linux-2.6.20.7.orig/arch/arm/mach-pxa/ezx.c 2007-04-21 08:26:37.000000000 -0300
-+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx.c 2007-04-21 08:51:15.000000000 -0300
-@@ -73,6 +73,24 @@
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-01 14:00:48.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-01 14:00:50.000000000 -0300
+@@ -72,6 +72,24 @@
.clk_pcap = 1,
};
@@ -1157,7 +1157,7 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx.c
/* OHCI Controller */
-@@ -236,7 +254,7 @@
+@@ -235,7 +253,7 @@
};
@@ -1166,7 +1166,7 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx.c
[0] = {
.start = GPIO_BP_RDY,
.end = GPIO_BP_RDY,
-@@ -256,15 +274,15 @@
+@@ -255,15 +273,15 @@
#endif
};
@@ -1185,7 +1185,7 @@ Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx.c
};
static void __init ezx_init_gpio_irq(void)
-@@ -297,7 +315,8 @@
+@@ -296,7 +314,8 @@
static struct platform_device *devices[] __initdata = {
&ezxssp_device,
diff --git a/packages/linux/linux-ezx-2.6.21/ezx-pm.patch b/packages/linux/linux-ezx-2.6.21/ezx-pm.patch
new file mode 100644
index 0000000000..2b498c8b8c
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/ezx-pm.patch
@@ -0,0 +1,58 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/pxa27x.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/pxa27x.c 2007-04-26 00:08:32.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/pxa27x.c 2007-04-30 18:29:49.000000000 -0300
+@@ -22,6 +22,10 @@
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/ohci.h>
+
++#ifdef CONFIG_PXA_EZX
++#include <asm/arch/ezx.h>
++#endif
++
+ #include "generic.h"
+
+ /* Crystal clock: 13MHz */
+@@ -156,7 +160,13 @@
+ break;
+ case PM_SUSPEND_MEM:
+ /* set resume return address */
++#ifdef CONFIG_PXA_EZX
++ /* set EZX flags for blob - WM */
++ *(unsigned long *)(phys_to_virt(RESUME_ADDR)) = virt_to_phys(pxa_cpu_resume);
++ *(unsigned long *)(phys_to_virt(FLAG_ADDR)) = SLEEP_FLAG;
++#else
+ PSPR = virt_to_phys(pxa_cpu_resume);
++#endif
+ pxa_cpu_suspend(PWRMODE_SLEEP);
+ break;
+ }
+Index: linux-2.6.21/arch/arm/mach-pxa/pm.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/pm.c 2007-04-26 00:08:32.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/pm.c 2007-04-30 18:29:49.000000000 -0300
+@@ -24,6 +24,10 @@
+ #include <asm/arch/lubbock.h>
+ #include <asm/mach/time.h>
+
++#ifdef CONFIG_PXA_EZX
++#include <asm/arch/ezx.h>
++#endif
++
+
+ /*
+ * Debug macros
+@@ -152,8 +156,12 @@
+ }
+
+ /* ensure not to come back here if it wasn't intended */
++#ifdef CONFIG_PXA_EZX
++ *(unsigned long *)(phys_to_virt(RESUME_ADDR)) = 0;
++ *(unsigned long *)(phys_to_virt(FLAG_ADDR)) = OFF_FLAG;
++#else
+ PSPR = 0;
+-
++#endif
+ /* restore registers */
+ RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2);
+ RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2);
diff --git a/packages/linux/linux-ezx-2.6.21/ezx-ts.patch b/packages/linux/linux-ezx-2.6.21/ezx-ts.patch
new file mode 100644
index 0000000000..1dd88efd6e
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/ezx-ts.patch
@@ -0,0 +1,399 @@
+Index: linux-2.6.21/drivers/input/touchscreen/Kconfig
+===================================================================
+--- linux-2.6.21.orig/drivers/input/touchscreen/Kconfig 2007-04-26 05:08:32.000000000 +0200
++++ linux-2.6.21/drivers/input/touchscreen/Kconfig 2007-04-26 23:27:05.000000000 +0200
+@@ -164,4 +164,16 @@
+ To compile this driver as a module, choose M here: the
+ module will be called ucb1400_ts.
+
++config TOUCHSCREEN_PCAP
++ tristate "Motorola PCAP touchscreen"
++ depends on PXA_EZX_PCAP
++ help
++ Say Y here if you have a Motorola EZX (E680, A780) telephone
++ and want to support the built-in touchscreen.
++
++ If unsure, say N.
++
++ To compile this driver as a module, choose M here: the
++ module will be called hp680_ts_input.
++
+ endif
+Index: linux-2.6.21/drivers/input/touchscreen/Makefile
+===================================================================
+--- linux-2.6.21.orig/drivers/input/touchscreen/Makefile 2007-04-26 05:08:32.000000000 +0200
++++ linux-2.6.21/drivers/input/touchscreen/Makefile 2007-04-26 23:27:52.000000000 +0200
+@@ -16,3 +16,4 @@
+ obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o
+ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
+ obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o
++obj-$(CONFIG_TOUCHSCREEN_PCAP) += pcap_ts.o
+Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21/drivers/input/touchscreen/pcap_ts.c 2007-04-26 23:27:05.000000000 +0200
+@@ -0,0 +1,364 @@
++/*
++ * pcap_ts.c - Touchscreen driver for Motorola PCAP2 based touchscreen as found
++ * in the EZX phone platform.
++ *
++ * Copyright (C) 2006 Harald Welte <laforge@openezx.org>
++ *
++ * Based on information found in the original Motorola 2.4.x ezx-ts.c driver.
++ *
++ * 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.
++ *
++ * TODO:
++ * split this in a hardirq handler and a tasklet/bh
++ * suspend/resume support
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/fs.h>
++#include <linux/string.h>
++#include <linux/pm.h>
++#include <linux/timer.h>
++#include <linux/config.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/input.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++
++#include "../../misc/ezx/ssp_pcap.h"
++
++#if 1
++#define DEBUGP(x, args ...) printk(KERN_DEBUG "%s: " x, __FUNCTION__, ## args)
++#else
++#define DEBUGP(x, args ...)
++#endif
++
++#define PRESSURE 1
++#define COORDINATE 2
++
++struct pcap_ts {
++ int irq_xy;
++ int irq_touch;
++ struct input_dev *input;
++ struct timer_list timer;
++
++ u_int16_t x, y;
++ u_int16_t pressure, pressure_last;
++
++ u_int8_t read_state;
++};
++
++#define X_AXIS_MIN 0
++#define X_AXIS_MAX 1023
++
++#define Y_AXIS_MAX X_AXIS_MAX
++#define Y_AXIS_MIN X_AXIS_MIN
++
++#define PRESSURE_MAX X_AXIS_MAX
++#define PRESSURE_MIN X_AXIS_MIN
++
++static int pcap_ts_mode(u_int32_t mode)
++{
++ int ret;
++
++ u_int32_t tmp;
++
++ ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp);
++ if (ret < 0)
++ return ret;
++
++ tmp &= ~SSP_PCAP_TOUCH_PANEL_POSITION_DETECT_MODE_MASK;
++ tmp |= mode;
++ ret = ezx_pcap_write(SSP_PCAP_ADJ_ADC1_REGISTER, tmp);
++
++ DEBUGP("set ts mode ");
++ if (mode == PCAP_TS_POSITION_XY_MEASUREMENT)
++ DEBUGP("COORD\n");
++ else if (mode == PCAP_TS_PRESSURE_MEASUREMENT)
++ DEBUGP("PRESS\n");
++ else if (mode == PCAP_TS_STANDBY_MODE)
++ DEBUGP("STANDBY\n");
++ else
++ printk("UNKNOWN\n");
++
++ return ret;
++}
++
++/* issue a XY read command to the ADC of PCAP2. Well get an ADCDONE2 interrupt
++ * once the result of the conversion is available */
++static int pcap_ts_start_xy_read(struct pcap_ts *pcap_ts)
++{
++ int ret;
++ u_int32_t tmp;
++ DEBUGP("start xy read in mode %s\n",
++ pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS");
++
++ ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp);
++ if (ret < 0)
++ return ret;
++
++ tmp &= SSP_PCAP_ADC_START_VALUE_SET_MASK;
++ tmp |= SSP_PCAP_ADC_START_VALUE;
++
++ ret = ezx_pcap_write(SSP_PCAP_ADJ_ADC1_REGISTER, tmp);
++ if (ret < 0)
++ return ret;
++
++ ret = ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ADC2_ASC, 1);
++
++ return ret;
++}
++
++/* read the XY result from the ADC of PCAP2 */
++static int pcap_ts_get_xy_value(struct pcap_ts *pcap_ts)
++{
++ int ret;
++ u_int32_t tmp;
++
++ DEBUGP("get xy value in mode %s\n",
++ pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS");
++
++ ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC2_REGISTER, &tmp);
++ if (ret < 0)
++ return ret;
++
++ if (tmp & 0x00400000)
++ return -EIO;
++
++ if (pcap_ts->read_state == COORDINATE) {
++ pcap_ts->x = (tmp & SSP_PCAP_ADD1_VALUE_MASK);
++ pcap_ts->y = (tmp & SSP_PCAP_ADD2_VALUE_MASK)
++ >>SSP_PCAP_ADD2_VALUE_SHIFT;
++ } else {
++ pcap_ts->pressure_last = pcap_ts->pressure;
++ pcap_ts->pressure = (tmp & SSP_PCAP_ADD2_VALUE_MASK)
++ >>SSP_PCAP_ADD2_VALUE_SHIFT;
++ }
++
++ return 0;
++}
++
++/* PCAP2 interrupts us when ADC conversion result is available */
++static irqreturn_t pcap_ts_irq_xy(int irq, void *dev_id, struct pt_regs *regs)
++{
++ struct pcap_ts *pcap_ts = dev_id;
++
++ if (pcap_ts_get_xy_value(pcap_ts) < 0) {
++ printk("pcap_ts: error reading XY value\n");
++ return IRQ_HANDLED;
++ }
++
++ DEBUGP("%s X=%4d, Y=%4d Z=%4d\n",
++ pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS",
++ pcap_ts->x, pcap_ts->y, pcap_ts->pressure);
++
++ if (pcap_ts->read_state == PRESSURE) {
++ input_report_abs(pcap_ts->input, ABS_PRESSURE,
++ pcap_ts->pressure);
++ if ((pcap_ts->pressure >= PRESSURE_MAX ||
++ pcap_ts->pressure <= PRESSURE_MIN ) &&
++ pcap_ts->pressure == pcap_ts->pressure_last) {
++ /* pen has been released */
++ input_report_key(pcap_ts->input, BTN_TOUCH, 0);
++ input_sync(pcap_ts->input);
++
++ pcap_ts->x = pcap_ts->y = 0;
++
++ /* ask PCAP2 to interrupt us if touch event happens
++ * again */
++ pcap_ts->read_state = PRESSURE;
++ pcap_ts_mode(PCAP_TS_STANDBY_MODE);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0);
++
++ /* no need for timer, we'll get interrupted with
++ * next touch down event */
++ del_timer(&pcap_ts->timer);
++ } else {
++ /* pen has been touched down */
++ input_report_key(pcap_ts->input, BTN_TOUCH, 1);
++ /* don't input_sync(), we don't know position yet */
++
++ /* switch state machine into coordinate read mode */
++ pcap_ts->read_state = COORDINATE;
++ pcap_ts_mode(PCAP_TS_POSITION_XY_MEASUREMENT);
++ pcap_ts_start_xy_read(pcap_ts);
++
++ mod_timer(&pcap_ts->timer, jiffies + HZ/20);
++ }
++ } else {
++ /* we are in coordinate mode */
++ if (pcap_ts->x <= X_AXIS_MIN || pcap_ts->x >= X_AXIS_MAX ||
++ pcap_ts->y <= Y_AXIS_MIN || pcap_ts->y >= Y_AXIS_MAX) {
++ DEBUGP("invalid x/y coordinate position: PEN_UP?\n");
++#if 0
++ input_report_key(pcap_ts->input, BTN_TOUCH, 0);
++ pcap_ts->x = pcap_ts->y = 0;
++#endif
++ } else {
++ input_report_abs(pcap_ts->input, ABS_X, pcap_ts->x);
++ input_report_abs(pcap_ts->input, ABS_Y, pcap_ts->y);
++ }
++ input_sync(pcap_ts->input);
++
++ /* switch back to pressure read mode */
++ pcap_ts->read_state = PRESSURE;
++ pcap_ts_mode(PCAP_TS_STANDBY_MODE);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0);
++ }