summaryrefslogtreecommitdiff
path: root/packages/linux
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-05-19 09:38:22 +0000
committerKoen Kooi <koen@openembedded.org>2007-05-19 09:38:22 +0000
commitc50fe0c5f0eb2e243a4921e8576ba49db26483fc (patch)
tree45fbe157b566abc7dc092d7d1b5d34d0cdfec4ba /packages/linux
parenta338dfb607b7a17292b6ec719c2db6528e6a87ad (diff)
linux-ezx 2.6.21: update to r2011:
r2011: call send_readurb on bp_rdy signal from BP to keep BP communication active add asoc pxa2xx-ssp.c driver from asoc-v0.13rc3 r2010: * pxa-kbd.patch: Fix pxakbd bug: direct keys were not passed to userspace * a780-kbd.patch: Cleanup keycodes definition for a780, use unique keycodes so to avoid the double event problem occurring when the same keycode is used more than once. r2003: core: EZX subsystem ezx-phone.c file for each phone BP handshake code on a platform_driver (and another .patch) pm: fully functional suspend/resume (except for BP) reboot/poweroff new: a780 flip e680 lock switch bp: Kconfig entry to disable BP handshake (the watchdog dont start if we dont try to handshake) other: delete obsolete files r2002: * Implement vibrator handling for a780 using the leds class. r1999: * Port and readapt ezx-backlight patch. Let's use again the backlight class to handle lcd brightness. r1998: * Port leds patches for A780 and E680 (we still pollute ezx.c for now)
Diffstat (limited to 'packages/linux')
-rw-r--r--packages/linux/linux-ezx-2.6.21/a780-flip.patch43
-rw-r--r--packages/linux/linux-ezx-2.6.21/a780-kbd.patch90
-rw-r--r--packages/linux/linux-ezx-2.6.21/a780-leds.patch181
-rw-r--r--packages/linux/linux-ezx-2.6.21/a780-mci.patch123
-rw-r--r--packages/linux/linux-ezx-2.6.21/a780-vibrator.patch151
-rw-r--r--packages/linux/linux-ezx-2.6.21/asoc-pxa-ssp.patch755
-rw-r--r--packages/linux/linux-ezx-2.6.21/defconfig-a780114
-rw-r--r--packages/linux/linux-ezx-2.6.21/defconfig-e6801240
-rw-r--r--packages/linux/linux-ezx-2.6.21/e680-kbd.patch93
-rw-r--r--packages/linux/linux-ezx-2.6.21/e680-leds.patch368
-rw-r--r--packages/linux/linux-ezx-2.6.21/e680-locksw.patch42
-rw-r--r--packages/linux/linux-ezx-2.6.21/e680-mci.patch127
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-backlight.patch203
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-bp.patch327
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-core.patch656
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-emu.patch78
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-pcap.patch161
-rw-r--r--packages/linux/linux-ezx-2.6.21/ezx-pm.patch90
-rw-r--r--packages/linux/linux-ezx-2.6.21/mux_cli.patch21
-rw-r--r--packages/linux/linux-ezx-2.6.21/pcap-ts.patch46
-rw-r--r--packages/linux/linux-ezx-2.6.21/pxa-kbd.patch87
-rw-r--r--packages/linux/linux-ezx_2.6.21.bb19
22 files changed, 4382 insertions, 633 deletions
diff --git a/packages/linux/linux-ezx-2.6.21/a780-flip.patch b/packages/linux/linux-ezx-2.6.21/a780-flip.patch
new file mode 100644
index 0000000000..56f1e4336d
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/a780-flip.patch
@@ -0,0 +1,43 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 13:23:57.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 13:26:53.000000000 -0300
+@@ -17,6 +17,7 @@
+ #include <linux/mmc/host.h>
+ #include <linux/irq.h>
+ #include <linux/input.h>
++#include <linux/gpio_keys.h>
+
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+@@ -193,7 +194,30 @@
+ },
+ };
+
++static struct gpio_keys_button a780flip_buttons[] = {
++ [0] = {
++ .keycode = KEY_SLEEP,
++ .gpio = GPIO_FLIP_PIN,
++ .desc = "A780 flip",
++ },
++};
++
++static struct gpio_keys_platform_data a780flip_platform_data = {
++ .buttons = a780flip_buttons,
++ .nbuttons = 1,
++};
++
++static struct platform_device a780flip_device = {
++ .name = "gpio-keys",
++ .id = -1,
++ .dev = {
++ .platform_data = &a780flip_platform_data,
++ },
++};
++
++
+ static struct platform_device *devices[] __initdata = {
++ &a780flip_device,
+ };
+
+ static void __init a780_init(void)
diff --git a/packages/linux/linux-ezx-2.6.21/a780-kbd.patch b/packages/linux/linux-ezx-2.6.21/a780-kbd.patch
new file mode 100644
index 0000000000..383839d639
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/a780-kbd.patch
@@ -0,0 +1,90 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-17 22:04:57.000000000 +0200
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-17 22:05:05.000000000 +0200
+@@ -16,18 +16,21 @@
+ #include <linux/fb.h>
+ #include <linux/mmc/host.h>
+ #include <linux/irq.h>
++#include <linux/input.h>
+
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/pxafb.h>
+ #include <asm/arch/mmc.h>
++#include <asm/arch/kbd.h>
+
+ #include "generic.h"
+ #include "ezx.h"
+
+ extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
+ extern void ezx_backlight_power(int);
++extern void __init pxa_set_kbd_info(struct pxakbd_platform_data *);
+
+ #ifdef CONFIG_EZX_PCAP
+ extern int ezx_pcap_mmcsd_power(int);
+@@ -141,6 +144,55 @@
+ .pxafb_lcd_power = &ezx_lcd_power,
+ };
+
++static unsigned char a780_keycode[] = {
++ /* row 0 */
++ KEY_PHONE, 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_RECORD, KEY_LEFT,
++ /* row 3 */
++ KEY_KP7, KEY_KP8, KEY_KP9, KEY_HOME, KEY_RIGHT,
++ /* row 4 */
++ KEY_KPASTERISK, KEY_KP0, KEY_KPDOT, KEY_PAGEDOWN, KEY_DOWN,
++};
++
++static unsigned char a780_direct_keycode[] = {
++ KEY_CAMERA,
++};
++
++static int a780_kbd_init(void)
++{
++ 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> */
++ PKWR = 0xec400;
++ PGSR3 |= 0xf80;
++ return 0;
++}
++
++static struct pxakbd_platform_data a780_kbd_platform_data = {
++ .init = &a780_kbd_init,
++ .scan_interval = HZ/40,
++ .matrix = {
++ .keycode = a780_keycode,
++ .cols = 5,
++ .rows = 5,
++ },
++ .direct = {
++ .keycode = a780_direct_keycode,
++ .num = 1,
++ },
++};
++
+ static struct platform_device *devices[] __initdata = {
+ };
+
+@@ -159,6 +211,7 @@
+
+ set_pxa_fb_info(&a780_fb_info);
+ pxa_set_mci_info(&a780_mci_platform_data);
++ pxa_set_kbd_info(&a780_kbd_platform_data);
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
diff --git a/packages/linux/linux-ezx-2.6.21/a780-leds.patch b/packages/linux/linux-ezx-2.6.21/a780-leds.patch
new file mode 100644
index 0000000000..09913df2ca
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/a780-leds.patch
@@ -0,0 +1,181 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+Index: linux-2.6.21/drivers/leds/Kconfig
+===================================================================
+--- linux-2.6.21.orig/drivers/leds/Kconfig 2007-05-08 04:09:08.000000000 -0300
++++ linux-2.6.21/drivers/leds/Kconfig 2007-05-08 14:09:03.000000000 -0300
+@@ -104,6 +104,13 @@
+ These triggers allow kernel events to drive the LEDs and can
+ be configured via sysfs. If unsure, say Y.
+
++config LEDS_A780
++ tristate "LED Support for the Motorola A780 GSM Phone"
++ depends LEDS_CLASS && PXA_EZX_A780
++ help
++ This option enables support for the LEDs on the
++ Motorola A780 GSM Phone.
++
+ config LEDS_TRIGGER_TIMER
+ tristate "LED Timer Trigger"
+ depends on LEDS_TRIGGERS
+Index: linux-2.6.21/drivers/leds/Makefile
+===================================================================
+--- linux-2.6.21.orig/drivers/leds/Makefile 2007-05-08 04:09:08.000000000 -0300
++++ linux-2.6.21/drivers/leds/Makefile 2007-05-08 14:09:03.000000000 -0300
+@@ -16,6 +16,7 @@
+ obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
+ obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
+ obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o
++obj-$(CONFIG_LEDS_A780) += leds-a780.o
+
+ # LED Triggers
+ obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
+Index: linux-2.6.21/drivers/leds/leds-a780.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21/drivers/leds/leds-a780.c 2007-05-08 14:09:03.000000000 -0300
+@@ -0,0 +1,122 @@
++/*
++ * EZX Platform LED Driver for the Motorola A780 GSM Phone
++ *
++ * Copyright 2006 Vanille-Media
++ *
++ * Author: Michael Lauer <mickey@Vanille.de>
++ *
++ * Based on keylight.c by Motorola and leds-corgi.c by Richard Purdie
++ *
++ * 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.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++#include <asm/arch/ezx-pcap.h>
++
++static void a780led_main_set(struct led_classdev *led_cdev, enum led_brightness value)
++{
++ if ( value > 31 ) value = 31;
++ printk( KERN_DEBUG "a780led_main_set: %d\n", value );
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL0, value & 0x01);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL1, value & 0x02);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL2, value & 0x04);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL3, value & 0x08);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL4, value & 0x10);
++}
++
++static void a780led_aux_set(struct led_classdev *led_cdev, enum led_brightness value)
++{
++ if ( value > 31 ) value = 31;
++ printk( KERN_DEBUG "a780led_aux_set: %d\n", value );
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL0, value & 0x01);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL1, value & 0x02);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL2, value & 0x04);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL3, value & 0x08);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL4, value & 0x10);
++}
++
++static struct led_classdev a780_main_led = {
++ .name = "a780:main",
++ .default_trigger = "none",
++ .brightness_set = a780led_main_set,
++};
++
++static struct led_classdev a780_aux_led = {
++ .name = "a780:aux",
++ .default_trigger = "none",
++ .brightness_set = a780led_aux_set,
++};
++
++#ifdef CONFIG_PM
++static int a780led_suspend(struct platform_device *dev, pm_message_t state)
++{
++ led_classdev_suspend(&a780_main_led);
++ led_classdev_suspend(&a780_aux_led);
++ return 0;
++}
++
++static int a780led_resume(struct platform_device *dev)
++{
++ led_classdev_resume(&a780_main_led);
++ led_classdev_resume(&a780_aux_led);
++ return 0;
++}
++#endif
++
++static int a780led_probe(struct platform_device *pdev)
++{
++ int ret;
++
++ ret = led_classdev_register(&pdev->dev, &a780_main_led);
++ if (ret < 0)
++ return ret;
++
++ ret = led_classdev_register(&pdev->dev, &a780_aux_led);
++ if (ret < 0)
++ led_classdev_unregister(&a780_main_led);
++
++ return ret;
++}
++
++static int a780led_remove(struct platform_device *pdev)
++{
++ led_classdev_unregister(&a780_main_led);
++ led_classdev_unregister(&a780_aux_led);
++ return 0;
++}
++
++static struct platform_driver a780led_driver = {
++ .probe = a780led_probe,
++ .remove = a780led_remove,
++#ifdef CONFIG_PM
++ .suspend = a780led_suspend,
++ .resume = a780led_resume,
++#endif
++ .driver = {
++ .name = "a780-led",
++ },
++};
++
++static int __init a780led_init(void)
++{
++ return platform_driver_register(&a780led_driver);
++}
++
++static void __exit a780led_exit(void)
++{
++ a780led_main_set( &a780_main_led, 0 );
++ a780led_aux_set( &a780_aux_led, 0 );
++ platform_driver_unregister(&a780led_driver);
++}
++
++module_init(a780led_init);
++module_exit(a780led_exit);
++
++MODULE_AUTHOR("Michael Lauer <mickey@Vanille.de>");
++MODULE_DESCRIPTION("Motorola A780 LED driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 14:09:13.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 14:11:37.000000000 -0300
+@@ -215,9 +215,14 @@
+ },
+ };
+
++static struct platform_device a780led_device = {
++ .name = "a780-led",
++ .id = -1,
++};
+
+ static struct platform_device *devices[] __initdata = {
+ &a780flip_device,
++ &a780led_device,
+ };
+
+ static void __init a780_init(void)
diff --git a/packages/linux/linux-ezx-2.6.21/a780-mci.patch b/packages/linux/linux-ezx-2.6.21/a780-mci.patch
new file mode 100644
index 0000000000..b9d601856a
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/a780-mci.patch
@@ -0,0 +1,123 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 03:46:17.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 04:05:48.000000000 -0300
+@@ -14,11 +14,14 @@
+ #include <linux/init.h>
+ #include <linux/platform_device.h>
+ #include <linux/fb.h>
++#include <linux/mmc/host.h>
++#include <linux/irq.h>
+
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/pxafb.h>
++#include <asm/arch/mmc.h>
+
+ #include "generic.h"
+ #include "ezx.h"
+@@ -26,6 +29,95 @@
+ extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
+ extern void ezx_backlight_power(int);
+
++#ifdef CONFIG_EZX_PCAP
++extern int ezx_pcap_mmcsd_power(int);
++extern void ezx_pcap_mmcsd_voltage(u_int32_t);
++#else
++#define ezx_pcap_mmcsd_voltage(x) {}
++#define ezx_pcap_mmcsd_power(x) {}
++#endif
++
++static struct pxamci_platform_data a780_mci_platform_data;
++
++static u_int8_t mmc_voltage[] = {
++ [MMC_VDD_160] = 5,
++ [MMC_VDD_170] = 5,
++ [MMC_VDD_180] = 6,
++ [MMC_VDD_190] = 6,
++ [MMC_VDD_200] = 7,
++ [MMC_VDD_210] = 7,
++ [MMC_VDD_220] = 8,
++ [MMC_VDD_230] = 8,
++ [MMC_VDD_240] = 9,
++ [MMC_VDD_250] = 9,
++ [MMC_VDD_260] = 10,
++ [MMC_VDD_270] = 10,
++ [MMC_VDD_280] = 11,
++ [MMC_VDD_290] = 11,
++ [MMC_VDD_300] = 12,
++ [MMC_VDD_310] = 12,
++ [MMC_VDD_320] = 13,
++ [MMC_VDD_330] = 13,
++ [MMC_VDD_340] = 14,
++ [MMC_VDD_350] = 14,
++ [MMC_VDD_360] = 15,
++};
++
++static int a780_mci_init(struct device *dev,
++ irqreturn_t (*ezx_detect_int)(int, void *),
++ void *data)
++{
++ int err;
++
++ /* Setup GPIO for PXA27x MMC/SD controller */
++ pxa_gpio_mode(GPIO32_MMCCLK_MD);
++ pxa_gpio_mode(GPIO112_MMCCMD_MD);
++ pxa_gpio_mode(GPIO92_MMCDAT0_MD);
++ pxa_gpio_mode(GPIO109_MMCDAT1_MD);
++ pxa_gpio_mode(GPIO110_MMCDAT2_MD);
++ pxa_gpio_mode(GPIO111_MMCDAT3_MD);
++
++ ezx_pcap_mmcsd_power(1);
++
++ a780_mci_platform_data.detect_delay = msecs_to_jiffies(250);
++
++ err = request_irq(0x49, ezx_detect_int, SA_INTERRUPT,
++ "MMC card detect", data);
++ if (err) {
++ printk(KERN_ERR "ezx_mci_detect: MMC/SD: can't request "
++ "MMC card detect IRQ\n");
++ return -1;
++ }
++
++ set_irq_type(0x0b, IRQT_BOTHEDGE);
++
++ return 0;
++}
++
++static void a780_mci_setpower(struct device *dev, unsigned int vdd)
++{
++ if (vdd <= MMC_VDD_360)
++ ezx_pcap_mmcsd_voltage(mmc_voltage[vdd]);
++
++ ezx_pcap_mmcsd_power(1);
++}
++
++static void a780_mci_exit(struct device *dev, void *data)
++{
++ ezx_pcap_mmcsd_power(0);
++ free_irq(0x49, data);
++}
++
++static struct pxamci_platform_data a780_mci_platform_data = {
++ .ocr_mask = MMC_VDD_160_165|MMC_VDD_18_19|MMC_VDD_20_21
++ |MMC_VDD_22_23|MMC_VDD_24_25|MMC_VDD_26_27
++ |MMC_VDD_28_29|MMC_VDD_30_31|MMC_VDD_32_33
++ |MMC_VDD_34_35|MMC_VDD_35_36,
++ .init = a780_mci_init,
++ .setpower = a780_mci_setpower,
++ .exit = a780_mci_exit,
++};
++
+ static struct pxafb_mode_info mode_a780 = {
+ .pixclock = 150000,
+ .xres = 240,
+@@ -66,6 +158,7 @@
+ PSLR = 0x05800f00;
+
+ set_pxa_fb_info(&a780_fb_info);
++ pxa_set_mci_info(&a780_mci_platform_data);
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
diff --git a/packages/linux/linux-ezx-2.6.21/a780-vibrator.patch b/packages/linux/linux-ezx-2.6.21/a780-vibrator.patch
new file mode 100644
index 0000000000..7436c40f5f
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/a780-vibrator.patch
@@ -0,0 +1,151 @@
+Index: linux-2.6.21/drivers/leds/leds-a780.c
+===================================================================
+--- linux-2.6.21.orig/drivers/leds/leds-a780.c 2007-05-08 15:09:26.000000000 -0300
++++ linux-2.6.21/drivers/leds/leds-a780.c 2007-05-08 15:19:26.000000000 -0300
+@@ -18,10 +18,13 @@
+ #include <linux/leds.h>
+ #include <asm/arch/ezx-pcap.h>
+
++extern void ezx_pcap_vibrator_level(u_int32_t);
++
+ static void a780led_main_set(struct led_classdev *led_cdev, enum led_brightness value)
+ {
+ if ( value > 31 ) value = 31;
+ printk( KERN_DEBUG "a780led_main_set: %d\n", value );
++#warning FIXME: use read/write operations
+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL0, value & 0x01);
+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL1, value & 0x02);
+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL2, value & 0x04);
+@@ -33,6 +36,7 @@
+ {
+ if ( value > 31 ) value = 31;
+ printk( KERN_DEBUG "a780led_aux_set: %d\n", value );
++#warning FIXME: use read/write operations
+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL0, value & 0x01);
+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL1, value & 0x02);
+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL2, value & 0x04);
+@@ -40,6 +44,43 @@
+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL4, value & 0x10);
+ }
+
++static void a780vibrator_set(struct led_classdev *led_cdev, enum led_brightness value)
++{
++ if ( value > 4 ) value = 4;
++ printk( KERN_DEBUG "a780vibrator_set: %d\n", value );
++
++ switch(value)
++ {
++ case 0:
++ /* turn off vibrator */
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 0);
++ break;
++
++ case 1:
++ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL0);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1);
++ break;
++
++ case 2:
++ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL1);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1);
++ break;
++
++ case 3:
++ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL2);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1);
++ break;
++
++ case 4:
++ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL3);
++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1);
++ break;
++
++ default:
++ break;
++ }
++}
++
+ static struct led_classdev a780_main_led = {
+ .name = "a780:main",
+ .default_trigger = "none",
+@@ -52,11 +93,18 @@
+ .brightness_set = a780led_aux_set,
+ };
+
++static struct led_classdev a780_vibrator = {
++ .name = "a780:vibrator",
++ .default_trigger = "none",
++ .brightness_set = a780vibrator_set,
++};
++
+ #ifdef CONFIG_PM
+ static int a780led_suspend(struct platform_device *dev, pm_message_t state)
+ {
+ led_classdev_suspend(&a780_main_led);
+ led_classdev_suspend(&a780_aux_led);
++ led_classdev_suspend(&a780_vibrator);
+ return 0;
+ }
+
+@@ -64,6 +112,7 @@
+ {
+ led_classdev_resume(&a780_main_led);
+ led_classdev_resume(&a780_aux_led);
++ led_classdev_resume(&a780_vibrator);
+ return 0;
+ }
+ #endif
+@@ -77,8 +126,16 @@
+ return ret;
+
+ ret = led_classdev_register(&pdev->dev, &a780_aux_led);
+- if (ret < 0)
++ if (ret < 0) {
++ led_classdev_unregister(&a780_main_led);
++ return ret;
++ }
++
++ ret = led_classdev_register(&pdev->dev, &a780_vibrator);
++ if (ret < 0) {
+ led_classdev_unregister(&a780_main_led);
++ led_classdev_unregister(&a780_aux_led);
++ }
+
+ return ret;
+ }
+@@ -87,6 +144,7 @@
+ {
+ led_classdev_unregister(&a780_main_led);
+ led_classdev_unregister(&a780_aux_led);
++ led_classdev_unregister(&a780_vibrator);
+ return 0;
+ }
+
+@@ -111,6 +169,8 @@
+ {
+ a780led_main_set( &a780_main_led, 0 );
+ a780led_aux_set( &a780_aux_led, 0 );
++ a780vibrator_set( &a780_vibrator, 0 );
++
+ platform_driver_unregister(&a780led_driver);
+ }
+
+Index: linux-2.6.21/drivers/leds/Kconfig
+===================================================================
+--- linux-2.6.21.orig/drivers/leds/Kconfig 2007-05-08 15:09:26.000000000 -0300
++++ linux-2.6.21/drivers/leds/Kconfig 2007-05-08 15:09:26.000000000 -0300
+@@ -105,11 +105,11 @@
+ be configured via sysfs. If unsure, say Y.
+
+ config LEDS_A780
+- tristate "LED Support for the Motorola A780 GSM Phone"
++ tristate "LED/Vibrator Support for the Motorola A780 GSM Phone"
+ depends LEDS_CLASS && PXA_EZX_A780
+ help
+- This option enables support for the LEDs on the
+- Motorola A780 GSM Phone.
++ This option enables support for the LEDs and the
++ vibrator on the Motorola A780 GSM Phone.
+
+ config LEDS_E680
+ tristate "LED Support for the Motorola E680(i) GSM Phone"
diff --git a/packages/linux/linux-ezx-2.6.21/asoc-pxa-ssp.patch b/packages/linux/linux-ezx-2.6.21/asoc-pxa-ssp.patch
new file mode 100644
index 0000000000..1fc8283ca2
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/asoc-pxa-ssp.patch
@@ -0,0 +1,755 @@
+Index: linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.c 2007-05-14 21:14:38.000000000 -0300
+@@ -0,0 +1,671 @@
++/*
++ * pxa2xx-ssp.c -- ALSA Soc Audio Layer
++ *
++ * Copyright 2005 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ * Revision history
++ * 12th Aug 2005 Initial version.
++ *
++ * TODO:
++ * o The SSP driver _mostly_ works, however is in need of testing and
++ * someone with time to complete it.
++ * o Test network mode for > 16bit sample size
++ */
++
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++
++#include <sound/driver.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/initval.h>
++#include <sound/pcm_params.h>
++#include <sound/soc.h>
++
++#include <asm/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/audio.h>
++#include <asm/arch/ssp.h>
++
++#include "pxa2xx-pcm.h"
++#include "pxa2xx-ssp.h"
++
++#define PXA_SSP_DEBUG 1
++
++/*
++ * The following should be defined in pxa-regs.h
++ */
++#define SSCR0_ACS (1 << 30) /* Audio Clock Select */
++#define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass (SSCR0[ACS] must be set) */
++#define SSACD_ACPS(x) (x << 4) /* Audio clock PLL select */
++#define SSACD_ACDS(x) (x << 0) /* Audio clock divider select */
++
++/*
++ * SSP audio private data
++ */
++struct ssp_priv {
++ unsigned int sysclk;
++};
++
++static struct ssp_priv ssp_clk[3];
++static struct ssp_dev ssp[3];
++#ifdef CONFIG_PM
++static struct ssp_state ssp_state[3];
++#endif
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_mono_out = {
++ .name = "SSP1 PCM Mono out",
++ .dev_addr = __PREG(SSDR_P1),
++ .drcmr = &DRCMRTXSSDR,
++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG |
++ DCMD_BURST16 | DCMD_WIDTH2,
++};
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_mono_in = {
++ .name = "SSP1 PCM Mono in",
++ .dev_addr = __PREG(SSDR_P1),
++ .drcmr = &DRCMRRXSSDR,
++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC |
++ DCMD_BURST16 | DCMD_WIDTH2,
++};
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_stereo_out = {
++ .name = "SSP1 PCM Stereo out",
++ .dev_addr = __PREG(SSDR_P1),
++ .drcmr = &DRCMRTXSSDR,
++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG |
++ DCMD_BURST16 | DCMD_WIDTH4,
++};
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_stereo_in = {
++ .name = "SSP1 PCM Stereo in",
++ .dev_addr = __PREG(SSDR_P1),
++ .drcmr = &DRCMRRXSSDR,
++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC |
++ DCMD_BURST16 | DCMD_WIDTH4,
++};
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_mono_out = {
++ .name = "SSP2 PCM Mono out",
++ .dev_addr = __PREG(SSDR_P2),
++ .drcmr = &DRCMRTXSS2DR,
++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG |
++ DCMD_BURST16 | DCMD_WIDTH2,
++};
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_mono_in = {
++ .name = "SSP2 PCM Mono in",
++ .dev_addr = __PREG(SSDR_P2),
++ .drcmr = &DRCMRRXSS2DR,
++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC |
++ DCMD_BURST16 | DCMD_WIDTH2,
++};
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_stereo_out = {
++ .name = "SSP2 PCM Stereo out",
++ .dev_addr = __PREG(SSDR_P2),
++ .drcmr = &DRCMRTXSS2DR,
++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG |
++ DCMD_BURST16 | DCMD_WIDTH4,
++};
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_stereo_in = {
++ .name = "SSP2 PCM Stereo in",
++ .dev_addr = __PREG(SSDR_P2),
++ .drcmr = &DRCMRRXSS2DR,
++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC |
++ DCMD_BURST16 | DCMD_WIDTH4,
++};
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_mono_out = {
++ .name = "SSP3 PCM Mono out",
++ .dev_addr = __PREG(SSDR_P3),
++ .drcmr = &DRCMRTXSS3DR,
++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG |
++ DCMD_BURST16 | DCMD_WIDTH2,
++};
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_mono_in = {
++ .name = "SSP3 PCM Mono in",
++ .dev_addr = __PREG(SSDR_P3),
++ .drcmr = &DRCMRRXSS3DR,
++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC |
++ DCMD_BURST16 | DCMD_WIDTH2,
++};
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_stereo_out = {
++ .name = "SSP3 PCM Stereo out",
++ .dev_addr = __PREG(SSDR_P3),
++ .drcmr = &DRCMRTXSS3DR,
++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG |
++ DCMD_BURST16 | DCMD_WIDTH4,
++};
++
++static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_stereo_in = {
++ .name = "SSP3 PCM Stereo in",
++ .dev_addr = __PREG(SSDR_P3),
++ .drcmr = &DRCMRRXSS3DR,
++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC |
++ DCMD_BURST16 | DCMD_WIDTH4,
++};
++
++static struct pxa2xx_pcm_dma_params *ssp_dma_params[3][4] = {
++ {&pxa2xx_ssp1_pcm_mono_out, &pxa2xx_ssp1_pcm_mono_in,
++ &pxa2xx_ssp1_pcm_stereo_out,&pxa2xx_ssp1_pcm_stereo_in,},
++ {&pxa2xx_ssp2_pcm_mono_out, &pxa2xx_ssp2_pcm_mono_in,
++ &pxa2xx_ssp2_pcm_stereo_out, &pxa2xx_ssp2_pcm_stereo_in,},
++ {&pxa2xx_ssp3_pcm_mono_out, &pxa2xx_ssp3_pcm_mono_in,
++ &pxa2xx_ssp3_pcm_stereo_out,&pxa2xx_ssp3_pcm_stereo_in,},
++};
++
++static int pxa2xx_ssp_startup(struct snd_pcm_substream *substream)
++{
++ struct snd_soc_pcm_runtime *rtd = substream->private_data;
++ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai;
++ int ret = 0;
++
++ if (!rtd->dai->cpu_dai->active) {
++ ret = ssp_init (&ssp[cpu_dai->id], cpu_dai->id + 1,
++ SSP_NO_IRQ);
++ if (ret < 0)
++ return ret;
++ ssp_disable(&ssp[cpu_dai->id]);
++ }
++ return ret;
++}
++
++static void pxa2xx_ssp_shutdown(struct snd_pcm_substream *substream)
++{
++ struct snd_soc_pcm_runtime *rtd = substream->private_data;
++ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai;
++
++ if (!cpu_dai->active) {
++ ssp_disable(&ssp[cpu_dai->id]);
++ ssp_exit(&ssp[cpu_dai->id]);
++ }
++}
++
++#if defined (CONFIG_PXA27x)
++static int cken[3] = {CKEN23_SSP1, CKEN3_SSP2, CKEN4_SSP3};
++#else
++static int cken[3] = {CKEN3_SSP, CKEN9_NSSP, CKEN10_ASSP};
++#endif
++
++#ifdef CONFIG_PM
++
++static int pxa2xx_ssp_suspend(struct platform_device *pdev,
++ struct snd_soc_cpu_dai *dai)
++{
++ if (!dai->active)
++ return 0;
++
++ ssp_save_state(&ssp[dai->id], &ssp_state[dai->id]);
++ pxa_set_cken(cken[dai->id], 0);
++ return 0;
++}
++
++static int pxa2xx_ssp_resume(struct platform_device *pdev,
++ struct snd_soc_cpu_dai *dai)
++{
++ if (!dai->active)
++ return 0;
++
++ pxa_set_cken(cken[dai->id], 1);
++ ssp_restore_state(&ssp[dai->id], &ssp_state[dai->id]);
++ ssp_enable(&ssp[dai->id]);
++
++ return 0;
++}
++
++#else
++#define pxa2xx_ssp_suspend NULL
++#define pxa2xx_ssp_resume NULL
++#endif
++
++/*
++ * Set the SSP ports SYSCLK.
++ */
++static int pxa2xx_ssp_set_dai_sysclk(struct snd_soc_cpu_dai *cpu_dai,
++ int clk_id, unsigned int freq, int dir)
++{
++ int port = cpu_dai->id + 1;
++ u32 sscr0 = SSCR0_P(port) &
++ ~(SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS);
++
++ switch (clk_id) {
++ case PXA2XX_SSP_CLK_PLL:
++ /* Internal PLL is fixed on pxa25x and pxa27x */
++#ifdef CONFIG_PXA27x
++ ssp_clk[cpu_dai->id].sysclk = 13000000;
++#else
++ ssp_clk[cpu_dai->id].sysclk = 1843200;
++#endif
++ break;
++ case PXA2XX_SSP_CLK_EXT:
++ ssp_clk[cpu_dai->id].sysclk = freq;
++ sscr0 |= SSCR0_ECS;
++ break;
++ case PXA2XX_SSP_CLK_NET:
++ ssp_clk[cpu_dai->id].sysclk = freq;
++ sscr0 |= SSCR0_NCS | SSCR0_MOD;
++ break;
++ case PXA2XX_SSP_CLK_AUDIO:
++ ssp_clk[cpu_dai->id].sysclk = 0;
++ SSCR0_P(port) |= SSCR0_SerClkDiv(1);
++ sscr0 |= SSCR0_ACS;
++ break;
++ default:
++ return -ENODEV;
++ }
++
++ /* the SSP CKEN clock must be disabled when changing SSP clock mode */
++ pxa_set_cken(cken[cpu_dai->id], 0);
++ SSCR0_P(port) |= sscr0;
++ pxa_set_cken(cken[cpu_dai->id], 1);
++ return 0;
++}
++
++/*
++ * Set the SSP clock dividers.
++ */
++static int pxa2xx_ssp_set_dai_clkdiv(struct snd_soc_cpu_dai *cpu_dai,
++ int div_id, int div)
++{
++ int port = cpu_dai->id + 1;
++
++ switch (div_id) {
++ case PXA2XX_SSP_AUDIO_DIV_ACDS:
++ SSACD_P(port) &= ~ 0x7;
++ SSACD_P(port) |= SSACD_ACDS(div);
++ break;
++ case PXA2XX_SSP_AUDIO_DIV_SCDB:
++ SSACD_P(port) &= ~0x8;
++ if (div == PXA2XX_SSP_CLK_SCDB_1)
++ SSACD_P(port) |= SSACD_SCDB;
++ break;
++ case PXA2XX_SSP_DIV_SCR:
++ SSCR0_P(port) &= ~SSCR0_SCR;
++ SSCR0_P(port) |= SSCR0_SerClkDiv(div);
++ break;
++ default:
++ return -ENODEV;
++ }
++
++ return 0;
++}
++
++/*
++ * Configure the PLL frequency pxa27x and (afaik - pxa320 only)
++ */
++static int pxa2xx_ssp_set_dai_pll(struct snd_soc_cpu_dai *cpu_dai,
++ int pll_id, unsigned int freq_in, unsigned int freq_out)
++{
++ int port = cpu_dai->id + 1;
++
++ SSACD_P(port) &= ~0x70;
++ switch (freq_out) {
++ case 5622000:
++ break;
++ case 11345000:
++ SSACD_P(port) |= (0x1 << 4);
++ break;
++ case 12235000:
++ SSACD_P(port) |= (0x2 << 4);
++ break;
++ case 14857000:
++ SSACD_P(port) |= (0x3 << 4);
++ break;
++ case 32842000:
++ SSACD_P(port) |= (0x4 << 4);
++ break;
++ case 48000000:
++ SSACD_P(port) |= (0x5 << 4);
++ break;
++ }
++ return 0;
++}
++
++/*
++ * Set the active slots in TDM/Network mode
++ */
++static int pxa2xx_ssp_set_dai_tdm_slot(struct snd_soc_cpu_dai *cpu_dai,
++ unsigned int mask, int slots)
++{
++ int port = cpu_dai->id + 1;
++
++ SSCR0_P(port) &= ~SSCR0_SlotsPerFrm(7);
++
++ /* set number of active slots */
++ SSCR0_P(port) |= SSCR0_SlotsPerFrm(slots);
++
++ /* set active slot mask */
++ SSTSA_P(port) = mask;
++ SSRSA_P(port) = mask;
++ return 0;
++}
++
++/*
++ * Tristate the SSP DAI lines
++ */
++static int pxa2xx_ssp_set_dai_tristate(struct snd_soc_cpu_dai *cpu_dai,
++ int tristate)
++{
++ int port = cpu_dai->id + 1;
++
++ if (tristate)
++ SSCR1_P(port) &= ~SSCR1_TTE;
++ else
++ SSCR1_P(port) |= SSCR1_TTE;
++
++ return 0;
++}
++
++/*
++ * Set up the SSP DAI format.
++ * The SSP Port must be inactive before calling this function as the
++ * physical interface format is changed.
++ */
++static int pxa2xx_ssp_set_dai_fmt(struct snd_soc_cpu_dai *cpu_dai,
++ unsigned int fmt)
++{
++ int port = cpu_dai->id + 1;
++
++ /* reset port settings */
++ SSCR0_P(port) = 0;
++ SSCR1_P(port) = 0;
++ SSPSP_P(port) = 0;
++
++ /* NOTE: I2S emulation is still very much work in progress here */
++
++ /* FIXME: this is what wince uses for msb */
++ if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_MSB) {
++ SSCR0_P(port) = SSCR0_EDSS | SSCR0_TISSP | SSCR0_DataSize(16);
++
++// SSCR1_P(port) = SSCR1_RxTresh(8) | SSCR1_TxTresh(8); /* doesn't seem to be needed */
++ return 0;
++ }
++
++ /* check for I2S emulation mode - handle it separately */
++ if (((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_I2S) ||
++ ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_MSB)) {
++ /* 8.4.11 */
++
++ /* Only SSCR0[NCS] or SSCR0[ECS] bit fields settings are optional */
++ SSCR0_P(port) = SSCR0_EDSS | SSCR0_PSP | SSCR0_DataSize(16);
++
++ /* SSCR1 = 0x203C3C03 */
++ /* SSCR1[SCLKDIR] and SSCR1[SFRMDIR] must be cleared (master only ???),
++ * all other bit fields settings are optional. */
++ //SSCR1_P(port) &= ~(SSCR1_SCLKDIR | SSCR1_SFRMDIR);
++
++ /* set FIFO thresholds */
++ SSCR1_P(port) = SSCR1_RxTresh(14) | SSCR1_TxTresh(1);
++
++ /* normal: */
++ /* all bit fields must be cleared except: FSRT = 1 and
++ * SFRMWDTH = 16, DMYSTART=0,1) */
++ SSPSP_P(port) = SSPSP_FSRT | SSPSP_SFRMWDTH(16) | SSPSP_DMYSTRT(0);
++ return 0;
++ }
++
++ SSCR0_P(port) |= SSCR0_PSP;
++ SSCR1_P(port) = SSCR1_RxTresh(14) | SSCR1_TxTresh(1) |
++ SSCR1_TRAIL | SSCR1_RWOT;
++
++ switch(fmt & SND_SOC_DAIFMT_MASTER_MASK) {
++ case SND_SOC_DAIFMT_CBM_CFM:
++ SSCR1_P(port) |= (SSCR1_SCLKDIR | SSCR1_SFRMDIR);
++ break;
++ case SND_SOC_DAIFMT_CBM_CFS:
++ SSCR1_P(port) |= SSCR1_SCLKDIR;
++ break;
++ case SND_SOC_DAIFMT_CBS_CFM:
++ SSCR1_P(port) |= SSCR1_SFRMDIR;
++ break;
++ case SND_SOC_DAIFMT_CBS_CFS:
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
++ case SND_SOC_DAIFMT_NB_NF:
++ SSPSP_P(port) |= SSPSP_SFRMP | SSPSP_FSRT;
++ break;
++ case SND_SOC_DAIFMT_IB_IF:
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
++ case SND_SOC_DAIFMT_DSP_A:
++ SSPSP_P(port) |= SSPSP_DMYSTRT(1);
++ case SND_SOC_DAIFMT_DSP_B:
++ SSPSP_P(port) |= SSPSP_SCMODE(2);
++ break;
++ case SND_SOC_DAIFMT_I2S:
++ case SND_SOC_DAIFMT_MSB:
++ /* handled above */
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ return 0;
++}
++
++/*
++ * Set the SSP audio DMA parameters and sample size.
++ * Can be called multiple times by oss emulation.
++ */
++static int pxa2xx_ssp_hw_params(struct snd_pcm_substream *substream,
++ struct snd_pcm_hw_params *params)
++{
++ struct snd_soc_pcm_runtime *rtd = substream->private_data;
++ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai;
++ int dma = 0, chn = params_channels(params);
++ int port = cpu_dai->id + 1;
++
++ /* select correct DMA params */
++ if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK)
++ dma = 1; /* capture DMA offset is 1,3 */
++ if (chn == 2)
++ dma += 2; /* stereo DMA offset is 2, mono is 0 */
++ cpu_dai->dma_data = ssp_dma_params[cpu_dai->id][dma];
++
++ /* we can only change the settings if the port is not in use */
++ if (SSCR0_P(port) & SSCR0_SSE)
++ return 0;
++
++ /* clear selected SSP bits */
++ SSCR0_P(port) &= ~(SSCR0_DSS | SSCR0_EDSS);
++
++ /* bit size */
++ switch(params_format(params)) {
++ case SNDRV_PCM_FORMAT_S16_LE:
++ SSCR0_P(port) |= SSCR0_DataSize(16);
++ break;
++ case SNDRV_PCM_FORMAT_S24_LE:
++ SSCR0_P(port) |=(SSCR0_EDSS | SSCR0_DataSize(8));
++ /* we must be in network mode (2 slots) for 24 bit stereo */
++ break;
++ case SNDRV_PCM_FORMAT_S32_LE:
++ SSCR0_P(port) |= (SSCR0_EDSS | SSCR0_DataSize(16));
++ /* we must be in network mode (2 slots) for 32 bit stereo */
++ break;
++ }
++
++#if PXA_SSP_DEBUG
++ printk("SSCR0 %x SSCR1 %x SSTO %x SSPSP %x SSSR %x SSACD %x\n",
++ SSCR0_P(port), SSCR1_P(port),
++ SSTO_P(port), SSPSP_P(port),
++ SSSR_P(port), SSACD_P(port));
++#endif
++ return 0;
++}
++
++static int pxa2xx_ssp_trigger(struct snd_pcm_substream *substream, int cmd)
++{
++ struct snd_soc_pcm_runtime *rtd = substream->private_data;
++ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai;
++ int ret = 0;
++ int port = cpu_dai->id + 1;
++
++ switch (cmd) {
++ case SNDRV_PCM_TRIGGER_RESUME:
++ ssp_enable(&ssp[cpu_dai->id]);
++ break;
++ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
++ SSCR1_P(port) |= SSCR1_TSRE;
++ else
++ SSCR1_P(port) |= SSCR1_RSRE;
++ SSSR_P(port) |= SSSR_P(port);
++ break;
++ case SNDRV_PCM_TRIGGER_START:
++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
++ SSCR1_P(port) |= SSCR1_TSRE;
++ else
++ SSCR1_P(port) |= SSCR1_RSRE;
++ ssp_enable(&ssp[cpu_dai->id]);
++ break;
++ case SNDRV_PCM_TRIGGER_STOP:
++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
++ SSCR1_P(port) &= ~SSCR1_TSRE;
++ else
++ SSCR1_P(port) &= ~SSCR1_RSRE;
++ break;
++ case SNDRV_PCM_TRIGGER_SUSPEND:
++ ssp_disable(&ssp[cpu_dai->id]);
++ break;
++ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
++ SSCR1_P(port) &= ~SSCR1_TSRE;
++ else
++ SSCR1_P(port) &= ~SSCR1_RSRE;
++ break;
++
++ default:
++ ret = -EINVAL;
++ }
++#if PXA_SSP_DEBUG
++ printk("trig cmd %d\n", cmd);
++ printk("SSCR0 %x SSCR1 %x SSTO %x SSPSP %x SSSR %x\n",
++ SSCR0_P(port), SSCR1_P(port),
++ SSTO_P(port), SSPSP_P(port),
++ SSSR_P(port));
++#endif
++ return ret;
++}
++
++#define PXA2XX_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
++ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \
++ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)
++
++#define PXA2XX_SSP_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\
++ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
++
++struct snd_soc_cpu_dai pxa_ssp_dai[] = {
++ { .name = "pxa2xx-ssp1",
++ .id = 0,
++ .type = SND_SOC_DAI_PCM,
++ .suspend = pxa2xx_ssp_suspend,
++ .resume = pxa2xx_ssp_resume,
++ .playback = {
++ .channels_min = 1,
++ .channels_max = 2,
++ .rates = PXA2XX_SSP_RATES,
++ .formats = PXA2XX_SSP_FORMATS,},
++ .capture = {
++ .channels_min = 1,
++ .channels_max = 2,
++ .rates = PXA2XX_SSP_RATES,
++ .formats = PXA2XX_SSP_FORMATS,},
++ .ops = {
++ .startup = pxa2xx_ssp_startup,
++ .shutdown = pxa2xx_ssp_shutdown,
++ .trigger = pxa2xx_ssp_trigger,
++ .hw_params = pxa2xx_ssp_hw_params,},
++ .dai_ops = {
++ .set_sysclk = pxa2xx_ssp_set_dai_sysclk,
++ .set_clkdiv = pxa2xx_ssp_set_dai_clkdiv,
++ .set_pll = pxa2xx_ssp_set_dai_pll,
++ .set_fmt = pxa2xx_ssp_set_dai_fmt,
++ .set_tdm_slot = pxa2xx_ssp_set_dai_tdm_slot,
++ .set_tristate = pxa2xx_ssp_set_dai_tristate,
++ },
++ },
++ { .name = "pxa2xx-ssp2",
++ .id = 1,
++ .type = SND_SOC_DAI_PCM,
++ .suspend = pxa2xx_ssp_suspend,
++ .resume = pxa2xx_ssp_resume,
++ .playback = {
++ .channels_min = 1,
++ .channels_max = 2,
++ .rates = PXA2XX_SSP_RATES,
++ .formats = PXA2XX_SSP_FORMATS,},
++ .capture = {
++ .channels_min = 1,
++ .channels_max = 2,
++ .rates = PXA2XX_SSP_RATES,
++ .formats = PXA2XX_SSP_FORMATS,},
++ .ops = {
++ .startup = pxa2xx_ssp_startup,
++ .shutdown = pxa2xx_ssp_shutdown,
++ .trigger = pxa2xx_ssp_trigger,
++ .hw_params = pxa2xx_ssp_hw_params,},
++ .dai_ops = {
++ .set_sysclk = pxa2xx_ssp_set_dai_sysclk,
++ .set_clkdiv = pxa2xx_ssp_set_dai_clkdiv,
++ .set_pll = pxa2xx_ssp_set_dai_pll,
++ .set_fmt = pxa2xx_ssp_set_dai_fmt,
++ .set_tdm_slot = pxa2xx_ssp_set_dai_tdm_slot,
++ .set_tristate = pxa2xx_ssp_set_dai_tristate,
++ },
++ },
++ { .name = "pxa2xx-ssp3",
++ .id = 2,
++ .type = SND_SOC_DAI_PCM,
++ .suspend = pxa2xx_ssp_suspend,
++ .resume = pxa2xx_ssp_resume,
++ .playback = {
++ .channels_min = 1,
++ .channels_max = 2,
++ .rates = PXA2XX_SSP_RATES,
++ .formats = PXA2XX_SSP_FORMATS,},
++ .capture = {
++ .channels_min = 1,
++ .channels_max = 2,
++ .rates = PXA2XX_SSP_RATES,
++ .formats = PXA2XX_SSP_FORMATS,},
++ .ops = {
++ .startup = pxa2xx_ssp_startup,
++ .shutdown = pxa2xx_ssp_shutdown,
++ .trigger = pxa2xx_ssp_trigger,
++ .hw_params = pxa2xx_ssp_hw_params,},
++ .dai_ops = {
++ .set_sysclk = pxa2xx_ssp_set_dai_sysclk,
++ .set_clkdiv = pxa2xx_ssp_set_dai_clkdiv,
++ .set_pll = pxa2xx_ssp_set_dai_pll,
++ .set_fmt = pxa2xx_ssp_set_dai_fmt,
++ .set_tdm_slot = pxa2xx_ssp_set_dai_tdm_slot,
++ .set_tristate = pxa2xx_ssp_set_dai_tristate,
++ },
++ },
++};
++EXPORT_SYMBOL_GPL(pxa_ssp_dai);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com");
++MODULE_DESCRIPTION("pxa2xx SSP/PCM SoC Interface");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.h 2007-05-14 21:14:38.000000000 -0300
+@@ -0,0 +1,42 @@
++/*
++ * linux/sound/arm/pxa2xx-ssp.h
++ *
++ * 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.
++ */
++
++#ifndef _PXA2XX_SSP_H
++#define _PXA2XX_SSP_H
++
++/* pxa2xx DAI SSP ID's */
++#define PXA2XX_DAI_SSP1 0
++#define PXA2XX_DAI_SSP2 1
++#define PXA2XX_DAI_SSP3 2
++
++/* SSP clock sources */
++#define PXA2XX_SSP_CLK_PLL 0
++#define PXA2XX_SSP_CLK_EXT 1
++#define PXA2XX_SSP_CLK_NET 2
++#define PXA2XX_SSP_CLK_AUDIO 3
++
++/* SSP audio dividers */
++#define PXA2XX_SSP_AUDIO_DIV_ACDS 0
++#define PXA2XX_SSP_AUDIO_DIV_SCDB 1
++#define PXA2XX_SSP_DIV_SCR 2
++
++/* SSP ACDS audio dividers values */
++#define PXA2XX_SSP_CLK_AUDIO_DIV_1 0
++#define PXA2XX_SSP_CLK_AUDIO_DIV_2 1
++#define PXA2XX_SSP_CLK_AUDIO_DIV_4 2
++#define PXA2XX_SSP_CLK_AUDIO_DIV_8 3
++#define PXA2XX_SSP_CLK_AUDIO_DIV_16 4
++#define PXA2XX_SSP_CLK_AUDIO_DIV_32 5
++
++/* SSP divider bypass */
++#define PXA2XX_SSP_CLK_SCDB_4 0
++#define PXA2XX_SSP_CLK_SCDB_1 1
++
++extern struct snd_soc_cpu_dai pxa_ssp_dai[3];
++
++#endif
+Index: linux-2.6.21/sound/soc/pxa/Kconfig
+===================================================================
+--- linux-2.6.21.orig/sound/soc/pxa/Kconfig 2007-05-14 21:16:22.000000000 -0300
++++ linux-2.6.21/sound/soc/pxa/Kconfig 2007-05-14 21:17:01.000000000 -0300
+@@ -20,6 +20,10 @@
+ config SND_PXA2XX_SOC_I2S
+ tristate
+
++config SND_PXA2XX_SOC_SSP
++ tristate
++ select PXA_SSP
++
+ config SND_PXA2XX_SOC_CORGI
+ tristate "SoC Audio support for Sharp Zaurus SL-C7x0"
+ depends on SND_PXA2XX_SOC && PXA_SHARP_C7xx
+Index: linux-2.6.21/sound/soc/pxa/Makefile
+===================================================================
+--- linux-2.6.21.orig/sound/soc/pxa/Makefile 2007-05-14 21:14:52.000000000 -0300
++++ linux-2.6.21/sound/soc/pxa/Makefile 2007-05-14 21:16:10.000000000 -0300
+@@ -2,10 +2,12 @@
+ snd-soc-pxa2xx-objs := pxa2xx-pcm.o
+ snd-soc-pxa2xx-ac97-objs := pxa2xx-ac97.o
+ snd-soc-pxa2xx-i2s-objs := pxa2xx-i2s.o
++snd-soc-pxa2xx-ssp-objs := pxa2xx-ssp.o
+
+ obj-$(CONFIG_SND_PXA2XX_SOC) += snd-soc-pxa2xx.o
+ obj-$(CONFIG_SND_PXA2XX_SOC_AC97) += snd-soc-pxa2xx-ac97.o
+ obj-$(CONFIG_SND_PXA2XX_SOC_I2S) += snd-soc-pxa2xx-i2s.o
++obj-$(CONFIG_SND_PXA2XX_SOC_SSP) += snd-soc-pxa2xx-ssp.o
+
+ # PXA Machine Support
+ snd-soc-corgi-objs := corgi.o
diff --git a/packages/linux/linux-ezx-2.6.21/defconfig-a780 b/packages/linux/linux-ezx-2.6.21/defconfig-a780
index 42fb38751c..85701ae3d1 100644
--- a/packages/linux/linux-ezx-2.6.21/defconfig-a780
+++ b/packages/linux/linux-ezx-2.6.21/defconfig-a780
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.21
-# Fri Apr 27 21:27:36 2007
+# Tue May 8 15:14:00 2007
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -45,8 +45,7 @@ CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_TASKSTATS is not set
# CONFIG_UTS_NS is not set
# CONFIG_AUDIT is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
+# CONFIG_IKCONFIG is not set
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
# CONFIG_BLK_DEV_INITRD is not set
@@ -54,9 +53,8 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_EMBEDDED=y
CONFIG_UID16=y
-CONFIG_SYSCTL_SYSCALL=y
+# CONFIG_SYSCTL_SYSCALL is not set
CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
@@ -151,10 +149,12 @@ CONFIG_PXA_EZX=y
# CONFIG_PXA_EZX_E680 is not set
CONFIG_PXA_EZX_A780=y
# CONFIG_PXA_EZX_E2 is not set
-CONFIG_PXA_EZX_EMU=y
-CONFIG_PXA_EZX_EMU_USB=y
-# CONFIG_PXA_EZX_EMU_UART is not set
-# CONFIG_PXA_EZX_EMU_NOTHING is not set
+CONFIG_EZX_BP=y
+CONFIG_EZX_PCAP=y
+CONFIG_EZX_EMU=y
+CONFIG_EZX_EMU_USB=y
+# CONFIG_EZX_EMU_UART is not set
+# CONFIG_EZX_EMU_NOTHING is not set
CONFIG_PXA27x=y
CONFIG_PXA_SSP=y
@@ -192,10 +192,10 @@ CONFIG_XSCALE_PMU=y
# Kernel Features
#
CONFIG_PREEMPT=y
-# CONFIG_NO_IDLE_HZ is not set
+CONFIG_NO_IDLE_HZ=y
CONFIG_HZ=100
CONFIG_AEABI=y
-CONFIG_OABI_COMPAT=y
+# CONFIG_OABI_COMPAT is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
@@ -225,9 +225,6 @@ CONFIG_CMDLINE="console=tty1 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 ip=169
#
# At least one emulation must be selected
#
-CONFIG_FPE_NWFPE=y
-# CONFIG_FPE_NWFPE_XP is not set
-# CONFIG_FPE_FASTFPE is not set
#
# Userspace binary formats
@@ -257,10 +254,6 @@ CONFIG_NET=y
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=y
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-# CONFIG_XFRM_SUB_POLICY is not set
-# CONFIG_XFRM_MIGRATE is not set
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
@@ -279,11 +272,10 @@ CONFIG_SYN_COOKIES=y
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
-CONFIG_INET_XFRM_MODE_TRANSPORT=y
-CONFIG_INET_XFRM_MODE_TUNNEL=y
-CONFIG_INET_XFRM_MODE_BEET=y
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_DIAG is not set
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
@@ -364,8 +356,6 @@ CONFIG_BT_HCIUART_H4=y
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
#
@@ -559,8 +549,17 @@ CONFIG_DUMMY=y
# Wan interfaces
#
# CONFIG_WAN is not set
-# CONFIG_PPP is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
# CONFIG_SLIP is not set
+CONFIG_SLHC=m
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
@@ -599,6 +598,7 @@ CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_PXA=y
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
CONFIG_INPUT_TOUCHSCREEN=y
@@ -611,6 +611,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_TOUCHSCREEN_PCAP=y
# CONFIG_INPUT_MISC is not set
#
@@ -653,7 +654,7 @@ CONFIG_LEGACY_PTY_COUNT=8
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
-# CONFIG_HW_RANDOM is not set
+CONFIG_HW_RANDOM=y
# CONFIG_NVRAM is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
@@ -708,14 +709,13 @@ CONFIG_I2C_PXA=m
# SPI support
#
CONFIG_SPI=y
-CONFIG_SPI_DEBUG=y
CONFIG_SPI_MASTER=y
#
# SPI Master Controller Drivers
#
# CONFIG_SPI_BITBANG is not set
-CONFIG_SPI_PXA2XX=y
+CONFIG_SPI_PXA2XX=m
#
# SPI Protocol Masters
@@ -745,7 +745,8 @@ CONFIG_SPI_PXA2XX=y
#
# LED devices
#
-# CONFIG_NEW_LEDS is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
#
# LED drivers
@@ -754,6 +755,10 @@ CONFIG_SPI_PXA2XX=y
#
# LED Triggers
#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_A780=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
#
# Multimedia devices
@@ -772,6 +777,7 @@ CONFIG_SPI_PXA2XX=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_EZX=y
CONFIG_FB=y
# CONFIG_FIRMWARE_EDID is not set
# CONFIG_FB_DDC is not set
@@ -825,7 +831,7 @@ CONFIG_FONT_MINI_4x6=y
#
# HID Devices
#
-CONFIG_HID=y
+CONFIG_HID=m
# CONFIG_HID_DEBUG is not set
#
@@ -908,7 +914,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET_MII is not set
# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
+# CONFIG_USB_MON is not set
#
# USB port drivers
@@ -982,14 +988,17 @@ CONFIG_MMC_PXA=y
# Real Time Clock
#
CONFIG_RTC_LIB=y
-CONFIG_RTC_CLASS=m
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
#
# RTC interfaces
#
-CONFIG_RTC_INTF_SYSFS=m
-CONFIG_RTC_INTF_PROC=m
-CONFIG_RTC_INTF_DEV=m
+# CONFIG_RTC_INTF_SYSFS is not set
+# CONFIG_RTC_INTF_PROC is not set
+CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
#
@@ -1006,7 +1015,7 @@ CONFIG_RTC_INTF_DEV=m
# CONFIG_RTC_DRV_RS5C348 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_M48T86 is not set
-CONFIG_RTC_DRV_SA1100=m
+CONFIG_RTC_DRV_SA1100=y
# CONFIG_RTC_DRV_TEST is not set
# CONFIG_RTC_DRV_MAX6902 is not set
# CONFIG_RTC_DRV_V3020 is not set
@@ -1051,7 +1060,9 @@ CONFIG_AUTOFS4_FS=y
#
# CD-ROM/DVD Filesystems
#
-# CONFIG_ISO9660_FS is not set
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
# CONFIG_UDF_FS is not set
#
@@ -1200,33 +1211,11 @@ CONFIG_ENABLE_MUST_CHECK=y
# CONFIG_UNUSED_SYMBOLS is not set
# CONFIG_DEBUG_FS is not set
# CONFIG_HEADERS_CHECK is not set
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DEBUG_KERNEL is not set
CONFIG_LOG_BUF_SHIFT=14
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_TIMER_STATS is not set
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_PREEMPT=y
-CONFIG_DEBUG_RT_MUTEXES=y
-CONFIG_DEBUG_PI_LIST=y
-# CONFIG_RT_MUTEX_TESTER is not set
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-# CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_VM is not set
-# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
CONFIG_FRAME_POINTER=y
-CONFIG_FORCED_INLINING=y
-# CONFIG_RCU_TORTURE_TEST is not set
-# CONFIG_FAULT_INJECTION is not set
# CONFIG_DEBUG_USER is not set
-CONFIG_DEBUG_ERRORS=y
-# CONFIG_DEBUG_LL is not set
#
# Security options
@@ -1248,6 +1237,7 @@ CONFIG_CRC16=m
CONFIG_CRC32=y
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=m
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
diff --git a/packages/linux/linux-ezx-2.6.21/defconfig-e680 b/packages/linux/linux-ezx-2.6.21/defconfig-e680
new file mode 100644
index 0000000000..59b639f910
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/defconfig-e680
@@ -0,0 +1,1240 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21
+# Tue May 8 14:31:50 2007
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION="-ezxdev"
+# CONFIG_LOCALVERSION_AUTO is not set
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+# CONFIG_SHMEM is not set
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+CONFIG_TINY_SHMEM=y
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA_EZX=y
+CONFIG_PXA_EZX_E680=y
+# CONFIG_PXA_EZX_A780 is not set
+# CONFIG_PXA_EZX_E2 is not set
+CONFIG_EZX_BP=y
+CONFIG_EZX_PCAP=y
+CONFIG_EZX_EMU=y
+CONFIG_EZX_EMU_USB=y
+# CONFIG_EZX_EMU_UART is not set
+# CONFIG_EZX_EMU_NOTHING is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SSP=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="console=tty1 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 ip=169.254.1.11:169.254.1.10:169.254.1.10:255.255.255.254:ezx:usb0:off debug mem=32M@0xA0000000 mem=16M@0xAC000000"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+# CONFIG_PM_SYSFS_DEPRECATED is not set
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+# CONFIG_BT_HCIUSB is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+# CONFIG_BT_HCIUART_BCSP is not set
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+CONFIG_CONNECTOR=m
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+# CONFIG_MTD_BLKDEVS is not set
+# CONFIG_MTD_BLOCK is not set
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=m
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=m
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=m
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+CONFIG_MTD_XIP=y
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_SHARP_SL is not set
+CONFIG_MTD_EZX=m
+# CONFIG_MTD_EZX_A780 is not set
+CONFIG_MTD_EZX_A780_ALTERNATE=y
+# CONFIG_MTD_EZX_E2 is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=y
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# PHY device support
+#
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_TSDEV=y
+CONFIG_INPUT_TSDEV_SCREEN_X=240
+CONFIG_INPUT_TSDEV_SCREEN_Y=320
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_PXA=y
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+CONFIG_TOUCHSCREEN_PCAP=y
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=8
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TS0710_MUX is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+CONFIG_SPI_PXA2XX=m
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+
+#
+# Misc devices
+#
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+# CONFIG_LEDS_TRIGGERS is not set
+CONFIG_LEDS_E680=y
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_EZX=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+CONFIG_FB_PXA_PARAMETERS=y
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_MINI_4x6=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEVICEFS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_SL811_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Input Devices
+#
+# CONFIG_USB_HID is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+# CONFIG_USB_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_TOUCHSCREEN is not set
+# CONFIG_USB_YEALINK is not set
+# CONFIG_USB_XPAD is not set
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
+# CONFIG_USB_GTCO is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_USB_MON is not set
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_PXA27X=y
+CONFIG_USB_PXA27X=y
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=y
+# CONFIG_USB_ETH_RNDIS is not set
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_FILE_STORAGE is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_PXA=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+# CONFIG_RTC_INTF_SYSFS is not set
+# CONFIG_RTC_INTF_PROC is not set
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+CONFIG_REISERFS_FS_XATTR=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+CONFIG_AUTOFS_FS=y
+CONFIG_AUTOFS4_FS=y
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+# CONFIG_NFS_V4 is not set
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V2_ACL=y
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V3_ACL=y
+# CONFIG_NFSD_V4 is not set
+CONFIG_NFSD_TCP=y
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_ACL_SUPPORT=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=y
+# CONFIG_CIFS_STATS2 is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
diff --git a/packages/linux/linux-ezx-2.6.21/e680-kbd.patch b/packages/linux/linux-ezx-2.6.21/e680-kbd.patch
new file mode 100644
index 0000000000..054c567d6b
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/e680-kbd.patch
@@ -0,0 +1,93 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 13:03:53.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 14:21:56.000000000 -0300
+@@ -15,18 +15,21 @@
+ #include <linux/fb.h>
+ #include <linux/mmc/host.h>
+ #include <linux/irq.h>
++#include <linux/input.h>
+
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/pxafb.h>
+ #include <asm/arch/mmc.h>
++#include <asm/arch/kbd.h>
+
+ #include "generic.h"
+ #include "ezx.h"
+
+ extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
+ extern void ezx_backlight_power(int);
++extern void __init pxa_set_kbd_info(struct pxakbd_platform_data *);
+
+ #ifdef CONFIG_EZX_PCAP
+ extern int ezx_pcap_mmcsd_power(int);
+@@ -144,6 +147,58 @@
+ .pxafb_lcd_power = &ezx_lcd_power,
+ };
+
++static unsigned char e680_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 e680_direct_keycode[] = {
++ KEY_CAMERA,
++ KEY_RESERVED,
++ KEY_RESERVED,
++ KEY_HOME,
++ KEY_POWER,
++ KEY_MENU,
++};
++
++static int e680_kbd_init(void)
++{
++ 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);
++ return 0;
++}
++
++static struct pxakbd_platform_data e680_kbd_platform_data = {
++ .init = &e680_kbd_init,
++ .scan_interval = HZ/40,
++ .matrix = {
++ .keycode = e680_keycode,
++ .cols = 4,
++ .rows = 3,
++ },
++ .direct = {
++ .keycode = e680_direct_keycode,
++ .num = 6,
++ },
++};
++
+ static struct platform_device *devices[] __initdata = {
+ };
+
+@@ -162,6 +217,7 @@
+
+ set_pxa_fb_info(&e680_fb_info);
+ pxa_set_mci_info(&e680_mci_platform_data);
++ pxa_set_kbd_info(&e680_kbd_platform_data);
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
diff --git a/packages/linux/linux-ezx-2.6.21/e680-leds.patch b/packages/linux/linux-ezx-2.6.21/e680-leds.patch
new file mode 100644
index 0000000000..37d47f89dc
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/e680-leds.patch
@@ -0,0 +1,368 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+Index: linux-2.6.21/drivers/leds/Kconfig
+===================================================================
+--- linux-2.6.21.orig/drivers/leds/Kconfig 2007-05-08 14:31:16.000000000 -0300
++++ linux-2.6.21/drivers/leds/Kconfig 2007-05-08 14:31:17.000000000 -0300
+@@ -111,6 +111,13 @@
+ This option enables support for the LEDs on the
+ Motorola A780 GSM Phone.
+
++config LEDS_E680
++ tristate "LED Support for the Motorola E680(i) GSM Phone"
++ depends LEDS_CLASS && PXA_EZX_E680
++ help
++ This options enables support for the LEDs on the
++ Motorola E680(i) GSM Phone.
++
+ config LEDS_TRIGGER_TIMER
+ tristate "LED Timer Trigger"
+ depends on LEDS_TRIGGERS
+Index: linux-2.6.21/drivers/leds/Makefile
+===================================================================
+--- linux-2.6.21.orig/drivers/leds/Makefile 2007-05-08 14:31:16.000000000 -0300
++++ linux-2.6.21/drivers/leds/Makefile 2007-05-08 14:31:17.000000000 -0300
+@@ -17,6 +17,7 @@
+ obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
+ obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o
+ obj-$(CONFIG_LEDS_A780) += leds-a780.o
++obj-$(CONFIG_LEDS_E680) += leds-e680.o
+
+ # LED Triggers
+ obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
+Index: linux-2.6.21/drivers/leds/leds-e680.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21/drivers/leds/leds-e680.c 2007-05-08 14:44:39.000000000 -0300
+@@ -0,0 +1,309 @@
++/*
++ * EZX Platform LED Driver for the Motorola E680(i) GSM Phone
++ *
++ * Copyright 2006 Vanille-Media
++ *
++ * Author: Michael Lauer <mickey@Vanille.de>
++ *
++ * Based on the Motorola 2.4 leds-e680.c and leds-corgi.c by Richard Purdie
++ *
++ * 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.
++ *
++ */
++
++#include <linux/delay.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++#include <asm/mach-types.h>
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/ezx-pcap.h>
++
++//FIXME move defines to a common header file
++#define IND_CNTL_R_BUL 46
++#define IND_CNTL_G_BUL 47
++#define SSP_PCAP_LED_MASK 0x000fffe0
++#define SSP_PCAP_LED_SHIFT 5
++#define GPIO_TC_MM_EN 99
++
++extern int ezx_pcap_read(u_int8_t, u_int32_t *);
++extern int ezx_pcap_write(u_int8_t, u_int32_t);
++
++static enum led_brightness old_red;
++static enum led_brightness old_green;
++static enum led_brightness old_blue;
++
++typedef struct {
++ unsigned char ind_GPIO_red; /*Indicator Red control GPIO 46: 0 active, 1 disactive*/
++ unsigned char ind_GPIO_green; /*Indicator Green control GPIO 47: 0 active, 1 disactive*/
++ unsigned char pcap_LEDR_en; /*pcap LEDR_EN bit value: 1 =Red LED(&Green) sink circuit enabled*/
++ unsigned char pcap_LEDG_en; /*pcap LEDG_EN bit value:1 =Green(->Blue)LED sink circuit enabled*/
++ unsigned char pcap_LEDR_CTRL; /* 4bits Sets the timing for the red(&Green) LED sink circuit*/
++ unsigned char pcap_LEDG_CTRL; /* 4bits Sets the timing for the GREEN (->Blue) LED sink circuit*/
++ unsigned char pcap_LEDR_I; /* 2 bits 00 3mA,01 4mA, 10 5mA, 11 9mA, sets the pulsed current level for LEDR*/
++ unsigned char pcap_LEDG_I; /* 2 bits 00 3mA,01 4mA, 10 5mA, 11 9mA, sets the pulsed current level for LEDG*/
++ unsigned char pcap_SKIP_on; /*1=The ON timing sequence defined by LEDx_CTRL is executed on every other cycle*/
++} PCAP2_LED_REGISTER_VALUE;
++
++const PCAP2_LED_REGISTER_VALUE led_register_value[]=
++{
++ /* on/off pulsepower timing intensity */
++ {0x1,0x1, 0x0,0x0, 0x0,0x0, 0x0,0x0,0x0}, /* OFF */
++ {0x0,0x1, 0x1,0x0, 0xc,0x0, 0x1,0x0,0x0}, /* RED */
++ {0x1,0x0, 0x1,0x0, 0xc,0x0, 0x1,0x0,0x0}, /* GREEN */
++ {0x0,0x0, 0x1,0x0, 0xc,0x0, 0x1,0x0,0x0}, /* ORANGE = RED + GREEN */
++ {0x1,0x1, 0x0,0x1, 0x0,0xc, 0x0,0x0,0x0}, /* BLUE */
++ {0x0,0x1, 0x1,0x1, 0xc,0xc, 0x1,0x0,0x0}, /* LIGHT_RED = RED + BLUE */
++ {0x1,0x0, 0x1,0x1, 0xc,0xc, 0x1,0x0,0x0}, /* LIGHT_GREEN = GREEN + BLUE */
++ {0x0,0x0, 0x1,0x1, 0xc,0xc, 0x1,0x0,0x0}, /* WHITE = RED + GREEN + BLUE */
++};
++
++static void e680led_led_set( enum led_brightness red, enum led_brightness green, enum led_brightness blue )
++{
++ unsigned int tempValue = 0;
++ unsigned int value = 0;
++ unsigned int stateIndex = 0;
++ unsigned char gpio_red, gpio_green, ledr_en, ledg_en, ledr_ctrl, ledg_ctrl, ledr_i, ledg_i,skip;
++
++ printk( KERN_DEBUG "e680led_led_set: red=%d, green=%d, blue=%d", red, green, blue );
++ stateIndex = ( ( blue << 2 ) | ( green << 1 ) | ( red ) ) & 0x7;
++ printk( KERN_DEBUG "LED stateIndex is %d", stateIndex );
++ gpio_red = led_register_value[stateIndex].ind_GPIO_red & 0x1;
++ gpio_green = led_register_value[stateIndex].ind_GPIO_green & 0x1;
++ ledr_en = led_register_value[stateIndex].pcap_LEDR_en & 0x1;
++ ledg_en = led_register_value[stateIndex].pcap_LEDG_en & 0x1;
++ ledr_ctrl = led_register_value[stateIndex].pcap_LEDR_CTRL & 0xf;
++ ledg_ctrl = led_register_value[stateIndex].pcap_LEDG_CTRL & 0xf;
++ ledr_i = led_register_value[stateIndex].pcap_LEDR_I & 0x3;
++ ledg_i = led_register_value[stateIndex].pcap_LEDG_I & 0x3;
++ skip = led_register_value[stateIndex].pcap_SKIP_on & 0x1;
++
++ /* disable LEDs */
++ if( ezx_pcap_read(SSP_PCAP_ADJ_PERIPH_REGISTER,&tempValue) != SSP_PCAP_SUCCESS )
++ {
++ printk( KERN_WARNING "LED PCAP Read Failed\n" );
++ return;
++ }
++ tempValue &= (~SSP_PCAP_LED_MASK);
++ if( ezx_pcap_write(SSP_PCAP_ADJ_PERIPH_REGISTER,tempValue) != SSP_PCAP_SUCCESS )
++ {
++ printk( KERN_WARNING "LED PCAP Write Failed (Clear Data)\n" );
++ return;
++ }
++
++ /* configure GPIOs as output */
++ pxa_gpio_mode(IND_CNTL_R_BUL | GPIO_OUT);
++ pxa_gpio_mode(IND_CNTL_G_BUL | GPIO_OUT);
++
++ //FIXME: Simplify this logic
++ if ( (gpio_green && gpio_red) )
++ {
++ /*Disable Red & Green signal*/
++ pxa_gpio_set_value(IND_CNTL_R_BUL, 1); /*IND_CNTL_R_BUL Low active*/
++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) | GPIO_bit(IND_CNTL_R_BUL);
++
++ pxa_gpio_set_value(IND_CNTL_G_BUL, 0); /*IND_CNTL_G_BUL High active*/
++ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) & (~GPIO_bit(IND_CNTL_G_BUL));
++
++ printk( KERN_DEBUG "LED GPIO Green & Red Disable\n");
++ } else if ( gpio_green && !gpio_red )
++ {
++ /*Green Disable, Red Enable*/
++ pxa_gpio_set_value(IND_CNTL_R_BUL, 0);
++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) & (~GPIO_bit(IND_CNTL_R_BUL));
++
++ pxa_gpio_set_value(IND_CNTL_G_BUL, 0);
++ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) & (~GPIO_bit(IND_CNTL_G_BUL));
++
++ printk( KERN_DEBUG "LED GPIO Green Disable, Red Enable\n");
++ } else if (gpio_red && !gpio_green )
++ {
++ /*Red Disable, Green Enable*/
++ pxa_gpio_set_value(IND_CNTL_R_BUL, 1);
++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) | GPIO_bit(IND_CNTL_R_BUL);
++
++ pxa_gpio_set_value(IND_CNTL_G_BUL, 1);
++ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) | GPIO_bit(IND_CNTL_G_BUL);
++ printk( KERN_DEBUG "LED GPIO Red Disable, Green Enable");
++ }else
++ {
++ /*Red & Green enable*/
++ pxa_gpio_set_value(IND_CNTL_R_BUL, 0);
++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) & (~GPIO_bit(IND_CNTL_R_BUL));
++
++ pxa_gpio_set_value(IND_CNTL_G_BUL, 1);
++ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) | GPIO_bit(IND_CNTL_G_BUL);
++ printk( KERN_DEBUG "LED GPIO Red & Green Enable\n");
++ }
++
++ /* Write PCAP LED Peripheral Control Register*/
++ value = ( ledr_en | (ledg_en <<1) | (ledr_ctrl <<2) | (ledg_ctrl <<6) |
++ (ledr_i << 10) | (ledg_i <<12) | (skip <<14) ) & 0x7fff;
++ tempValue |= (value <<SSP_PCAP_LED_SHIFT);
++
++ if ( ezx_pcap_write(SSP_PCAP_ADJ_PERIPH_REGISTER,tempValue) == SSP_PCAP_SUCCESS )
++ {
++ printk( KERN_DEBUG "LED PCAP Write Success (0x%x :0x%x)\n",tempValue,value);
++ old_red = red;
++ old_green = green;
++ old_blue = blue;
++ return;
++ } else {
++ printk( KERN_DEBUG "LED PCAP Write Failed (State Change)\n");
++ return;
++ }
++}
++
++static void e680led_red_set(struct led_classdev *led_cdev, enum led_brightness value)
++{
++ printk( KERN_DEBUG "e680led_red_set: %d\n", value );
++ e680led_led_set( 1 && value, old_green, old_blue );
++}
++
++static void e680led_green_set(struct led_classdev *led_cdev, enum led_brightness value)
++{
++ printk( KERN_DEBUG "e680led_green_set: %d\n", value );
++ e680led_led_set( old_red, 1 && value, old_blue );
++}
++
++static void e680led_blue_set(struct led_classdev *led_cdev, enum led_brightness value)
++{
++ printk( KERN_DEBUG "e680led_blue_set: %d\n", value );
++ e680led_led_set( old_red, old_green, 1 && value );
++}
++
++static void e680led_keypad_set(struct led_classdev *led_cdev, enum led_brightness value)
++{
++ /* this is not working yet, as there is something else missing */
++#if 0
++ printk( KERN_DEBUG "e680led_keypad_set: %d\n", value );
++
++ 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);
++
++ udelay( 100 );
++
++ if ( value ) {
++ GPCR(GPIO_TC_MM_EN) = GPIO_bit(GPIO_TC_MM_EN);
++ PGSR3 &= ~GPIO_bit(GPIO_TC_MM_EN);
++ } else {
++ GPSR(GPIO_TC_MM_EN) = GPIO_bit(GPIO_TC_MM_EN);
++ PGSR3 |= GPIO_bit(GPIO_TC_MM_EN);
++ }
++#endif
++}
++
++static struct led_classdev e680_red_led = {
++ .name = "e680:red",
++ .default_trigger = "none",
++ .brightness_set = e680led_red_set,
++};
++
++static struct led_classdev e680_green_led = {
++ .name = "e680:green",
++ .default_trigger = "none",
++ .brightness_set = e680led_green_set,
++};
++
++static struct led_classdev e680_blue_led = {
++ .name = "e680:blue",
++ .default_trigger = "none",
++ .brightness_set = e680led_blue_set,
++};
++
++static struct led_classdev e680_keypad_led = {
++ .name = "e680:keypad",
++ .default_trigger = "none",
++ .brightness_set = e680led_keypad_set,
++};
++
++#ifdef CONFIG_PM
++static int e680led_suspend(struct platform_device *dev, pm_message_t state)
++{
++ led_classdev_suspend(&e680_red_led);
++ led_classdev_suspend(&e680_green_led);
++ led_classdev_suspend(&e680_blue_led);
++ led_classdev_suspend(&e680_keypad_led);
++ return 0;
++}
++
++static int e680led_resume(struct platform_device *dev)
++{
++ led_classdev_resume(&e680_red_led);
++ led_classdev_resume(&e680_green_led);
++ led_classdev_resume(&e680_blue_led);
++ led_classdev_resume(&e680_keypad_led);
++ return 0;
++}
++#endif
++
++static int e680led_probe(struct platform_device *pdev)
++{
++ int ret;
++
++ ret = led_classdev_register(&pdev->dev, &e680_red_led);
++ if (ret < 0)
++ return ret;
++
++ ret = led_classdev_register(&pdev->dev, &e680_green_led);
++ if (ret < 0)
++ led_classdev_unregister(&e680_red_led);
++
++ ret = led_classdev_register(&pdev->dev, &e680_blue_led);
++ if (ret < 0) {
++ led_classdev_unregister(&e680_red_led);
++ led_classdev_unregister(&e680_green_led);
++ }
++
++ ret = led_classdev_register(&pdev->dev, &e680_keypad_led);
++ if (ret < 0) {
++ led_classdev_unregister(&e680_red_led);
++ led_classdev_unregister(&e680_green_led);
++ led_classdev_unregister(&e680_blue_led);
++ }
++ return ret;
++}
++
++static int e680led_remove(struct platform_device *pdev)
++{
++ led_classdev_unregister(&e680_red_led);
++ led_classdev_unregister(&e680_green_led);
++ led_classdev_unregister(&e680_blue_led);
++ led_classdev_unregister(&e680_keypad_led);
++ return 0;
++}
++
++static struct platform_driver e680led_driver = {
++ .probe = e680led_probe,
++ .remove = e680led_remove,
++#ifdef CONFIG_PM
++ .suspend = e680led_suspend,
++ .resume = e680led_resume,
++#endif
++ .driver = {
++ .name = "e680-led",
++ },
++};
++
++static int __init e680led_init(void)
++{
++ return platform_driver_register(&e680led_driver);
++}
++
++static void __exit e680led_exit(void)
++{
++ e680led_led_set( 0, 0, 0 );
++ platform_driver_unregister(&e680led_driver);
++}
++
++module_init(e680led_init);
++module_exit(e680led_exit);
++
++MODULE_AUTHOR("Michael Lauer <mickey@Vanille.de>");
++MODULE_DESCRIPTION("Motorola E680 LED driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 14:23:29.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 14:31:17.000000000 -0300
+@@ -221,8 +221,14 @@
+ },
+ };
+
++static struct platform_device e680led_device = {
++ .name = "e680-led",
++ .id = -1,
++};
++
+ static struct platform_device *devices[] __initdata = {
+ &e680locksw_device,
++ &e680led_device,
+ };
+
+ static void __init e680_init(void)
diff --git a/packages/linux/linux-ezx-2.6.21/e680-locksw.patch b/packages/linux/linux-ezx-2.6.21/e680-locksw.patch
new file mode 100644
index 0000000000..91fab24d44
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/e680-locksw.patch
@@ -0,0 +1,42 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 14:23:12.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 14:23:29.000000000 -0300
+@@ -16,6 +16,7 @@
+ #include <linux/mmc/host.h>
+ #include <linux/irq.h>
+ #include <linux/input.h>
++#include <linux/gpio_keys.h>
+
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+@@ -199,7 +200,29 @@
+ },
+ };
+
++static struct gpio_keys_button e680locksw_buttons[] = {
++ [0] = {
++ .keycode = KEY_SLEEP,
++ .gpio = GPIO_LOCK_SCREEN_PIN,
++ .desc = "E680 lockscreen sw",
++ },
++};
++
++static struct gpio_keys_platform_data e680locksw_platform_data = {
++ .buttons = e680locksw_buttons,
++ .nbuttons = 1,
++};
++
++static struct platform_device e680locksw_device = {
++ .name = "gpio-keys",
++ .id = -1,
++ .dev = {
++ .platform_data = &e680locksw_platform_data,
++ },
++};
++
+ static struct platform_device *devices[] __initdata = {
++ &e680locksw_device,
+ };
+
+ static void __init e680_init(void)
diff --git a/packages/linux/linux-ezx-2.6.21/e680-mci.patch b/packages/linux/linux-ezx-2.6.21/e680-mci.patch
new file mode 100644
index 0000000000..1bf69176ef
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/e680-mci.patch
@@ -0,0 +1,127 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 03:47:41.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 13:03:53.000000000 -0300
+@@ -13,11 +13,14 @@
+ #include <linux/init.h>
+ #include <linux/platform_device.h>
+ #include <linux/fb.h>
++#include <linux/mmc/host.h>
++#include <linux/irq.h>
+
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/pxafb.h>
++#include <asm/arch/mmc.h>
+
+ #include "generic.h"
+ #include "ezx.h"
+@@ -25,6 +28,99 @@
+ extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
+ extern void ezx_backlight_power(int);
+
++#ifdef CONFIG_EZX_PCAP
++extern int ezx_pcap_mmcsd_power(int);
++extern void ezx_pcap_mmcsd_voltage(u_int32_t);
++#else
++#define ezx_pcap_mmcsd_voltage(x) {}
++#define ezx_pcap_mmcsd_power(x) {}
++#endif
++
++static struct pxamci_platform_data e680_mci_platform_data;
++
++static u_int8_t mmc_voltage[] = {
++ [MMC_VDD_160] = 3,
++ [MMC_VDD_170] = 3,
++ [MMC_VDD_180] = 3,
++ [MMC_VDD_190] = 3,
++ [MMC_VDD_200] = 3,
++ [MMC_VDD_210] = 3,
++ [MMC_VDD_220] = 3,
++ [MMC_VDD_230] = 3,
++ [MMC_VDD_240] = 3,
++ [MMC_VDD_250] = 3,
++ [MMC_VDD_260] = 3,
++ [MMC_VDD_270] = 3,
++ [MMC_VDD_280] = 3,
++ [MMC_VDD_290] = 3,
++ [MMC_VDD_300] = 3,
++ [MMC_VDD_310] = 3,
++ [MMC_VDD_320] = 3,
++ [MMC_VDD_330] = 3,
++ [MMC_VDD_340] = 3,
++ [MMC_VDD_350] = 3,
++ [MMC_VDD_360] = 3,
++};
++
++static int e680_mci_init(struct device *dev,
++ irqreturn_t (*ezx_detect_int)(int, void *),
++ void *data)
++{
++ int err;
++
++ /* Setup GPIO for PXA27x MMC/SD controller */
++ pxa_gpio_mode(GPIO32_MMCCLK_MD);
++ pxa_gpio_mode(GPIO112_MMCCMD_MD);
++ pxa_gpio_mode(GPIO92_MMCDAT0_MD);
++ pxa_gpio_mode(GPIO109_MMCDAT1_MD);
++ pxa_gpio_mode(GPIO110_MMCDAT2_MD);
++ pxa_gpio_mode(GPIO111_MMCDAT3_MD);
++
++ ezx_pcap_mmcsd_power(1);
++
++ e680_mci_platform_data.detect_delay = msecs_to_jiffies(250);
++
++ err = request_irq(0x49, ezx_detect_int, SA_INTERRUPT,
++ "MMC card detect", data);
++ if (err) {
++ printk(KERN_ERR "ezx_mci_detect: MMC/SD: can't request "
++ "MMC card detect IRQ\n");
++ return -1;
++ }
++
++ set_irq_type(0x0b, IRQT_BOTHEDGE);
++
++ return 0;
++}
++
++
++static inline int e680_mci_get_ro(struct device *dev)
++{
++ return (GPLR3 & 0x800);
++}
++
++static void e680_mci_setpower(struct device *dev, unsigned int vdd)
++{
++ if (vdd <= MMC_VDD_360)
++ ezx_pcap_mmcsd_voltage(mmc_voltage[vdd]);
++
++ ezx_pcap_mmcsd_power(1);
++}
++
++static void e680_mci_exit(struct device *dev, void *data)
++{
++ ezx_pcap_mmcsd_power(0);
++ free_irq(0x49, data);
++}
++
++static struct pxamci_platform_data e680_mci_platform_data = {
++ .ocr_mask = MMC_VDD_27_28,
++ .init = e680_mci_init,
++ .get_ro = e680_mci_get_ro,
++ .setpower = e680_mci_setpower,
++ .exit = e680_mci_exit,
++};
++
+ static struct pxafb_mode_info mode_e680 = {
+ .pixclock = 150000,
+ .xres = 240,
+@@ -65,6 +161,7 @@
+ PSLR = 0x05800f00;
+
+ set_pxa_fb_info(&e680_fb_info);
++ pxa_set_mci_info(&e680_mci_platform_data);
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
diff --git a/packages/linux/linux-ezx-2.6.21/ezx-backlight.patch b/packages/linux/linux-ezx-2.6.21/ezx-backlight.patch
new file mode 100644
index 0000000000..ec48d46746
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/ezx-backlight.patch
@@ -0,0 +1,203 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+Index: linux-2.6.21/drivers/video/backlight/Kconfig
+===================================================================
+--- linux-2.6.21.orig/drivers/video/backlight/Kconfig 2007-05-08 14:19:18.000000000 -0300
++++ linux-2.6.21/drivers/video/backlight/Kconfig 2007-05-08 14:22:22.000000000 -0300
+@@ -63,3 +63,12 @@
+ help
+ If you have a Frontpath ProGear say Y to enable the
+ backlight driver.
++
++config BACKLIGHT_EZX
++ tristate "Motorola EXZ Backlight Driver (A780/E680/E680i)"
++ depends on BACKLIGHT_CLASS_DEVICE && PXA_EZX
++ default y
++ help
++ If you have a Motorola A780 or E680(i), say y to enable the
++ backlight driver.
++
+Index: linux-2.6.21/drivers/video/backlight/Makefile
+===================================================================
+--- linux-2.6.21.orig/drivers/video/backlight/Makefile 2007-05-08 14:19:18.000000000 -0300
++++ linux-2.6.21/drivers/video/backlight/Makefile 2007-05-08 14:22:22.000000000 -0300
+@@ -6,3 +6,4 @@
+ obj-$(CONFIG_BACKLIGHT_HP680) += hp680_bl.o
+ obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomolcd.o
+ obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o
++obj-$(CONFIG_BACKLIGHT_EZX) += ezx_bl.o
+Index: linux-2.6.21/drivers/video/backlight/ezx_bl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21/drivers/video/backlight/ezx_bl.c 2007-05-08 14:24:16.000000000 -0300
+@@ -0,0 +1,142 @@
++/*
++ * Backlight Driver for Motorola A780 and E680(i) GSM Phones.
++ *
++ * Copyright 2006 Vanille Media
++ *
++ * Author: Michael Lauer <mickey@Vanille.de>
++ *
++ * 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.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/fb.h>
++#include <linux/backlight.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/ezx.h>
++
++#define EZX_MIN_INTENSITY 0
++#define EZX_MAX_INTENSITY 50
++#define EZX_DEFAULT_INTENSITY 30
++
++static struct backlight_device *ezx_backlight_device;
++static int last_intensity;
++static int suspended;
++
++static int ezxbl_send_intensity(struct backlight_device *bd)
++{
++ int intensity = bd->props.brightness;
++
++ if (suspended || bd->props.power != FB_BLANK_UNBLANK ||
++ bd->props.fb_blank != FB_BLANK_UNBLANK)
++ intensity = 0;
++
++ if ( !last_intensity && intensity ) {
++ PWM_CTRL0 = 2; /* pre-scaler */
++ PWM_PWDUTY0 = intensity; /* duty cycle */
++ PWM_PERVAL0 = 49; /* period */
++ pxa_gpio_mode(GPIO16_PWM0_MD); /* set GPIO16 as alternate function + output */
++ pxa_set_cken(CKEN0_PWM0, 1); /* clock enable */
++ }
++ else if ( last_intensity && !intensity ) {
++ PWM_PWDUTY0 = 0;
++ GAFR0_U &= 0xFFFFFFFC; /* ??? */
++ pxa_set_cken(CKEN0_PWM0, 0); /* clock disable */
++ pxa_gpio_mode(GPIO16_PWM0); /* set GPIO16 as input */
++ } else if ( last_intensity && intensity ) {
++ PWM_PWDUTY0 = intensity; /* duty cycle */
++ }
++ last_intensity = intensity;
++ return 0;
++}
++
++static int ezxbl_get_intensity(struct backlight_device *bd)
++{
++ return last_intensity;
++}
++
++static int ezxbl_set_intensity(struct backlight_device *bd)
++{
++ return ezxbl_send_intensity(ezx_backlight_device);
++}
++
++#ifdef CONFIG_PM
++static int ezxbl_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ suspended = 1;
++ ezxbl_set_intensity(ezx_backlight_device);
++ return 0;
++}
++
++static int ezxbl_resume(struct platform_device *pdev)
++{
++ suspended = 0;
++ ezxbl_set_intensity(ezx_backlight_device);
++ return 0;
++}
++#else
++#define ezxbl_suspend NULL
++#define ezxbl_resume NULL
++#endif
++
++static struct backlight_ops ezxbl_ops = {
++ .get_brightness = ezxbl_get_intensity,
++ .update_status = ezxbl_set_intensity,
++};
++
++static int __init ezxbl_probe(struct platform_device *pdev)
++{
++ ezx_backlight_device = backlight_device_register ("ezx-bl",
++ &pdev->dev, NULL, &ezxbl_ops);
++ if (IS_ERR (ezx_backlight_device))
++ return PTR_ERR (ezx_backlight_device);
++
++ platform_set_drvdata(pdev, ezx_backlight_device);
++
++ ezx_backlight_device->props.power = FB_BLANK_UNBLANK;
++ ezx_backlight_device->props.max_brightness = EZX_MAX_INTENSITY;
++ ezx_backlight_device->props.brightness = EZX_DEFAULT_INTENSITY;
++ ezxbl_set_intensity(ezx_backlight_device);
++ backlight_update_status(ezx_backlight_device);
++
++ return 0;
++}
++
++static int ezxbl_remove(struct platform_device *pdev)
++{
++ backlight_device_unregister(ezx_backlight_device);
++ return 0;
++}
++
++static struct platform_driver ezxbl_driver = {
++ .probe = ezxbl_probe,
++ .remove = ezxbl_remove,
++ .suspend = ezxbl_suspend,
++ .resume = ezxbl_resume,
++ .driver = {
++ .name = "ezx-bl",
++ },
++};
++
++static int __init ezxbl_init(void)
++{
++ return platform_driver_register(&ezxbl_driver);
++}
++
++static void __exit ezxbl_exit(void)
++{
++ platform_driver_unregister(&ezxbl_driver);
++}
++
++module_init(ezxbl_init);
++module_exit(ezxbl_exit);
++
++MODULE_AUTHOR("Michael Lauer <mickey@Vanille.de>");
++MODULE_DESCRIPTION("Backlight Driver for Motorola A780|E680(i)");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-08 14:22:21.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 14:22:22.000000000 -0300
+@@ -67,6 +67,12 @@
+ #endif
+ EXPORT_SYMBOL(ezx_backlight_power);
+
++/* EZX LCD Backlight */
++static struct platform_device ezxbacklight_device = {
++ .name = "ezx-bl",
++ .id = -1,
++};
++
+ /* SSP */
+ struct platform_device ezxssp_device = {
+ .name = "ezx-ssp",
+@@ -204,6 +210,7 @@
+ &ezxpcap_device,
+ &ezxemu_device,
+ &pcap_ts_device,
++ &ezxbacklight_device,
+ };
+
+ /* PM */
diff --git a/packages/linux/linux-ezx-2.6.21/ezx-bp.patch b/packages/linux/linux-ezx-2.6.21/ezx-bp.patch
new file mode 100644
index 0000000000..a8a7e08086
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/ezx-bp.patch
@@ -0,0 +1,327 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-12 20:40:44.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-14 21:12:37.000000000 -0300
+@@ -100,9 +100,41 @@
+ .init = ezx_ohci_init,
+ };
+
++/* BP */
++static struct resource ezxbp_resources[] = {
++ [0] = {
++ .start = IRQ_GPIO(GPIO_BP_RDY),
++ .end = IRQ_GPIO(GPIO_BP_RDY),
++ .flags = IORESOURCE_IRQ,
++ },
++ [1] = {
++ .start = IRQ_GPIO(GPIO_BB_WDI2),
++ .end = IRQ_GPIO(GPIO_BB_WDI2),
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ .start = IRQ_GPIO(GPIO_BB_WDI),
++ .end = IRQ_GPIO(GPIO_BB_WDI),
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct platform_device ezxbp_device = {
++ .name = "ezx-bp",
++ .dev = {
++ //.parent =
++ //.platform_data =
++ },
++ .id = -1,
++ .num_resources = ARRAY_SIZE(ezxbp_resources),
++ .resource = ezxbp_resources,
++};
++
++
+
+ static struct platform_device *devices[] __initdata = {
+ &ezxssp_device,
++ &ezxbp_device,
+ };
+
+ static int __init ezx_init(void)
+Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-12 20:40:44.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-14 21:12:37.000000000 -0300
+@@ -94,6 +94,9 @@
+
+ endchoice
+
++config EZX_BP
++ bool "BP Control code for EZX Platform"
++
+ endif
+
+ endmenu
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-bp.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-bp.c 2007-05-12 21:28:07.000000000 -0300
+@@ -0,0 +1,250 @@
++/*
++ * BP handshake code for Motorola EZX phones
++ *
++ * Copyright (c) 2007 Daniel Ribeiro <drwyrm@gmail.com>
++ *
++ * Based on Motorola's a780.c Copyright (c) 2003-2005 Motorola
++ *
++ * 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.
++ *
++ */
++
++
++#include <linux/kernel.h>
++#include <linux/interrupt.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++
++#include <asm/mach/irq.h>
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++
++#include <asm/arch/ezx.h>
++
++/* BP Handshake */
++#define FIRST_STEP 2
++#define LAST_STEP 3
++#define BP_RDY_TIMEOUT 0x000c0000
++
++#if 1
++#define DEBUGP(x, args ...) printk(x, ##args)
++#else
++#define DEBUGP(x, args ...)
++#endif
++
++struct bp {
++ int irq_wdi;
++ int irq_wdi2;
++ int irq_rdy;
++};
++
++/* check power down condition */
++static inline void check_power_off(void)
++{
++ if (pxa_gpio_get_value(GPIO_BB_WDI2) == 0) {
++ DEBUGP("BP request poweroff!\n");
++ pm_power_off();
++ }
++}
++
++static int step = FIRST_STEP;
++
++inline int bp_handshake_passed(void)
++{
++ return (step > LAST_STEP);
++}
++EXPORT_SYMBOL(bp_handshake_passed);
++
++void handshake(void)
++{
++ /* step 1: check MCU_INT_SW or BP_RDY is low (now it is checked in apboot) */
++ DEBUGP("bp handshake entered!\n");
++ if (step == 1) {
++ int timeout = BP_RDY_TIMEOUT;
++
++ /* config MCU_INT_SW, BP_RDY as input */
++ pxa_gpio_mode(GPIO_MCU_INT_SW | GPIO_IN);
++ pxa_gpio_mode(GPIO_BP_RDY | GPIO_IN);
++
++ while ( timeout -- ) {
++ if (pxa_gpio_get_value(GPIO_MCU_INT_SW) == 0
++ || pxa_gpio_get_value(GPIO_BP_RDY) == 0) {
++ step ++;
++ break;
++ }
++
++ check_power_off();
++ }
++ DEBUGP("ezx-bp: handshake step 1\n");
++ }
++
++ /* step 2: wait BP_RDY is low */
++ if (step == 2) {
++ if (pxa_gpio_get_value(GPIO_BP_RDY) == 0) {
++ /* config MCU_INT_SW as output */
++ pxa_gpio_mode(GPIO_MCU_INT_SW | GPIO_OUT);
++ pxa_gpio_set_value(GPIO_MCU_INT_SW, 0);
++
++ step ++;
++ DEBUGP("ezx-bp: handshake step 2\n");
++ }
++ }
++
++ /* step 3: wait BP_RDY is high */
++ else if (step == 3) {
++ if (pxa_gpio_get_value(GPIO_BP_RDY)) {
++ step ++;
++ //FIXME delay_bklight();
++ pxa_gpio_set_value(GPIO_MCU_INT_SW, 1);
++ printk(KERN_NOTICE "ezx-bp: handshake passed\n");
++ }
++ }
++}
++
++irqreturn_t bp_wdi_handler(int irq, void *dev_id)
++{
++ DEBUGP("BP Lowered WDI line. This is not good :(\n");
++ /*
++ * this means that BP is not responsive.
++ * we could try to reset BP and then handshake again
++ * but i doubt its possible to bring it up again.
++ */
++ return IRQ_HANDLED;
++}
++
++static irqreturn_t bp_rdy_handler(int irq, void *dev_id)
++{
++ struct bp *bp = dev_id;
++ DEBUGP("BP rdy irq\n");
++ if (!bp_handshake_passed()) {
++ handshake();
++ if (bp_handshake_passed()) {
++ disable_irq(bp->irq_wdi2);
++
++ /* set bp_rdy handle for usb ipc */
++ set_irq_type(bp->irq_rdy, IRQT_FALLING);
++ }
++ }
++#ifdef CONFIG_TS0710_MUX_USB
++ else usb_send_readurb();
++#endif
++ return IRQ_HANDLED;
++}
++
++/* BP request for poweroff */
++static irqreturn_t bp_wdi2_handler(int irq, void *dev_id)
++{
++ DEBUGP("BP request poweroff!\n");
++ pm_power_off();
++ return IRQ_HANDLED;
++}
++
++static int __init ezxbp_probe(struct platform_device *dev)
++{
++ int ret;
++ struct bp *bp;
++
++ bp = kzalloc(sizeof(*bp), GFP_KERNEL);
++ if (!bp)
++ return -ENOMEM;
++
++ bp->irq_rdy = platform_get_irq(dev, 0);
++ if(bp->irq_rdy < 0) {
++ ret = bp->irq_rdy;
++ goto fail;
++ }
++
++ bp->irq_wdi2 = platform_get_irq(dev, 1);
++ if(bp->irq_wdi2 < 0) {
++ ret = bp->irq_wdi2;
++ goto fail;
++ }
++
++ bp->irq_wdi = platform_get_irq(dev, 2);
++ if(bp->irq_wdi < 0) {
++ ret = bp->irq_wdi;
++ goto fail;
++ }
++
++ set_irq_type(bp->irq_wdi, IRQT_FALLING);
++ request_irq(bp->irq_wdi, bp_wdi_handler, SA_INTERRUPT,
++ "bp wdi", bp);
++
++ set_irq_type(bp->irq_rdy, IRQT_BOTHEDGE);
++ request_irq(bp->irq_rdy, bp_rdy_handler, SA_INTERRUPT,
++ "bp rdy", bp);
++
++ set_irq_type(bp->irq_wdi2, IRQT_FALLING);
++ request_irq(bp->irq_wdi2, bp_wdi2_handler, SA_INTERRUPT,
++ "bp wdi2", bp);
++
++ /* turn on BP */
++ pxa_gpio_mode(GPIO_BB_RESET|GPIO_OUT);
++ pxa_gpio_set_value(GPIO_BB_RESET, 1);
++
++ check_power_off();
++
++ handshake();
++
++ return 0;
++fail:
++ kfree(bp);
++ return ret;
++}
++
++static int ezxbp_remove(struct platform_device *dev)
++{
++ struct bp *bp = platform_get_drvdata(dev);
++
++ free_irq(bp->irq_wdi, bp);
++ free_irq(bp->irq_wdi2, bp);
++ free_irq(bp->irq_rdy, bp);
++ kfree(bp);
++
++ return 0;
++}
++
++static int ezxbp_suspend(struct platform_device *dev, pm_message_t state)
++{
++ DEBUGP("bp suspend!\n");
++// pxa_gpio_set_value(GPIO_MCU_INT_SW, 0);
++ return 0;
++}
++
++static int ezxbp_resume(struct platform_device *dev)
++{
++ DEBUGP("bp resume!\n");
++// pxa_gpio_set_value(GPIO_MCU_INT_SW, 1);
++ return 0;
++}
++static struct platform_driver ezxbp_driver = {
++ .probe = ezxbp_probe,
++ .remove = ezxbp_remove,
++#warning FIXME: missing suspend/resume support
++ .suspend = ezxbp_suspend,
++ .resume = ezxbp_resume,
++ .driver = {
++ .name = "ezx-bp",
++ .owner = THIS_MODULE,
++ },
++};
++
++int __init ezxbp_init(void)
++{
++ return platform_driver_register(&ezxbp_driver);
++}
++
++void ezxbp_fini(void)
++{
++ return platform_driver_unregister(&ezxbp_driver);
++}
++
++module_init(ezxbp_init);
++module_exit(ezxbp_fini);
++
++MODULE_DESCRIPTION("Motorola BP Control driver");
++MODULE_AUTHOR("Daniel Ribeiro <drwyrm@gmail.com>");
++MODULE_LICENSE("GPL");
++
+Index: linux-2.6.21/arch/arm/mach-pxa/Makefile
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-12 20:40:44.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-14 21:12:37.000000000 -0300
+@@ -22,6 +22,7 @@
+ obj-$(CONFIG_PXA_EZX_A780) += ezx-a780.o
+ obj-$(CONFIG_PXA_EZX_E680) += ezx-e680.o
+ obj-$(CONFIG_PXA_EZX_E2) += ezx-e2.o
++obj-$(CONFIG_EZX_BP) += ezx-bp.o
+
+ # Support for blinky lights
+ led-y := leds.o
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 8e89afff53..d70b685a0f 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-05-03 17:41:57.000000000 -0300
-+++ linux-2.6.21/arch/arm/boot/compressed/head-xscale.S 2007-05-03 17:42:02.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/boot/compressed/head-xscale.S 2007-05-08 03:43:19.000000000 -0300
++++ linux-2.6.21/arch/arm/boot/compressed/head-xscale.S 2007-05-08 03:43:23.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-05-03 17:41:57.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-04 04:17:33.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-08 03:43:19.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-08 03:43:23.000000000 -0300
@@ -37,6 +37,10 @@
bool "Keith und Koep Trizeps4 DIMM-Module"
select PXA27x
@@ -60,82 +60,91 @@ 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-05-03 17:41:57.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-04 04:17:42.000000000 -0300
-@@ -18,6 +18,7 @@
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-08 03:43:19.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-08 03:43:23.000000000 -0300
+@@ -18,6 +18,10 @@
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
++obj-$(CONFIG_PXA_EZX) += ezx.o ezx_ssp.o
++obj-$(CONFIG_PXA_EZX_A780) += ezx-a780.o
++obj-$(CONFIG_PXA_EZX_E680) += ezx-e680.o
++obj-$(CONFIG_PXA_EZX_E2) += ezx-e2.o
# Support for blinky lights
led-y := leds.o
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-05-04 04:17:42.000000000 -0300
-@@ -0,0 +1,378 @@
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 03:43:23.000000000 -0300
+@@ -0,0 +1,141 @@
+/*
-+ * linux/arch/arm/mach-ezx/a780.c
++ * ezx.c - Common code for EZX platform.
+ *
-+ * Support for the Motorola Ezx A780 Development Platform.
-+ *
-+ * Author: Zhuang Xiaofan
-+ * Created: Nov 25, 2003
-+ * Copyright: Motorola Inc.
++ * Copyright (c) 2005-2007 OpenEZX Team (www.openezx.org)
+ *
+ * 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.
++ *
+ */
+
++#include <linux/kernel.h>
+#include <linux/init.h>
-+#include <linux/major.h>
-+#include <linux/fs.h>
-+#include <linux/interrupt.h>
-+#include <linux/sched.h>
-+#include <linux/bitops.h>
-+#include <linux/apm_bios.h>
+#include <linux/platform_device.h>
++#include <linux/fb.h>
++#include <linux/delay.h>
+
-+#include <asm/types.h>
-+#include <asm/setup.h>
-+#include <asm/memory.h>
-+#include <asm/mach-types.h>
-+#include <asm/hardware.h>
-+#include <asm/irq.h>
-+
-+#include <asm/mach/arch.h>
-+#include <asm/mach/map.h>
-+#include <asm/mach/irq.h>
-+
-+#include <asm/arch/ohci.h>
++#include <asm/arch/pxafb.h>
+#include <asm/arch/pxa-regs.h>
++#include <asm/arch/ohci.h>
+
-+#include "ezx.h"
+#include "generic.h"
-+#include <linux/tty.h>
-+#include <linux/apm_bios.h>
-+
++#include "ezx.h"
+
-+extern void usb_send_readurb(void);
+extern int ezx_ssp_set_machinfo(struct ezxssp_machinfo *);
-+//FIXME extern void pm_do_poweroff(void);
+
-+/* BP Handshake */
-+#define FIRST_STEP 2
-+#define LAST_STEP 3
-+#define BP_RDY_TIMEOUT 0x000c0000
++/* EZX PXA Framebuffer */
++void ezx_lcd_power(int on, struct fb_var_screeninfo *var)
++{
++ if (on) {
++ mdelay(1);
++ GPSR3 = 0x00100000;
++ mdelay(10);
++ GPCR3 = 0x00100000;
++ GPDR3 |= 0x00100000;
++ } else {
++ GPSR3 = 0x00100000;
++ PGSR3 |= 0x00100000;
++ mdelay(41);
++ LCCR0 &= ~LCCR0_LDM; /* disable lcd disable done interrupt */
++ LCCR0 |= LCCR0_DIS; /* normal disable lcd */
++ mdelay(18);
++ }
++}
++EXPORT_SYMBOL(ezx_lcd_power);
+
-+/* check power down condition */
-+inline void check_power_off(void)
++/* failsafe if we are not using the backlight platform driver */
++#ifndef CONFIG_BACKLIGHT_EZX
++void ezx_backlight_power(int on)
+{
-+ if (!(GPIO_is_high(GPIO_BB_WDI2))) {
-+#ifdef CONFIG_PM
-+//FIXME pm_do_poweroff();
-+#endif
-+ }
++ if (on) {
++ pxa_gpio_mode(GPIO16_PWM0_MD);
++ pxa_set_cken(CKEN0_PWM0, 1);
++ PWM_CTRL0 = 0;
++ PWM_PWDUTY0 = 0x3ff;
++ PWM_PERVAL0 = 0x3ff;
++ } else {
++ PWM_CTRL0 = 0;
++ PWM_PWDUTY0 = 0x0;
++ PWM_PERVAL0 = 0x3FF;
++ pxa_set_cken(CKEN0_PWM0, 0);
++ }
+}
++#else
++void ezx_backlight_power(int on){}
++#endif
++EXPORT_SYMBOL(ezx_backlight_power);
+
+/* SSP */
+struct platform_device ezxssp_device = {
@@ -149,9 +158,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+ .clk_pcap = 1,
+};
+
-+
+/* OHCI Controller */
-+
+static int ezx_ohci_init(struct device *dev)
+{
+ /* for A780 support (connected with Neptune) */
@@ -173,219 +180,17 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+ .init = ezx_ohci_init,
+};
+
-+static int step = FIRST_STEP;
-+void handshake(void)
-+{
-+ /* step 1: check MCU_INT_SW or BP_RDY is low (now it is checked in apboot) */
-+ if (step == 1) {
-+ int timeout = BP_RDY_TIMEOUT;
-+
-+ /* config MCU_INT_SW, BP_RDY as input */
-+ GPDR(GPIO_MCU_INT_SW) &= ~GPIO_bit(GPIO_MCU_INT_SW);
-+ GPDR(GPIO_BP_RDY) &= ~GPIO_bit(GPIO_BP_RDY);
-+
-+ while ( timeout -- ) {
-+ if ( (!(GPIO_is_high(GPIO_MCU_INT_SW)))
-+ || (!(GPIO_is_high(GPIO_BP_RDY))) ) {
-+ step ++;
-+ break;
-+ }
-+
-+ check_power_off();
-+ }
-+ }
-+
-+ /* step 2: wait BP_RDY is low */
-+ if (step == 2) {
-+ if (!(GPIO_is_high(GPIO_BP_RDY))) {
-+
-+ /* config MCU_INT_SW as output */
-+ pxa_gpio_mode(GPIO_MCU_INT_SW | GPIO_OUT);
-+ clr_GPIO(GPIO_MCU_INT_SW);
-+
-+ step ++;
-+ }
-+ }
-+
-+ /* step 3: wait BP_RDY is high */
-+ if (step == 3) {
-+ if (GPIO_is_high(GPIO_BP_RDY)) {
-+ step ++;
-+ //FIXME delay_bklight();
-+ set_GPIO(GPIO_MCU_INT_SW);
-+ }
-+ }
-+}
-+
-+#ifdef CONFIG_APM
-+static unsigned long idle_limit = 0;
-+int pm_handle_irq(int irq)
-+{
-+
-+ //FIXME: extern unsigned long idle_limit;
-+ //FIXME: extern int can_idle, can_sleep;
-+ static unsigned long tmp_jiffy; /* for temporary store of jiffies */
-+
-+ /*
-+ * if idle_limit is zero, never enter idle.
-+ * if not OS timer, reset idle timer count
-+ */
-+ if (idle_limit == 0) {
-+ tmp_jiffy = jiffies;
-+ return irq;
-+ }
-+#if 0
-+ if (irq != IRQ_OST0) {
-+ tmp_jiffy = jiffies;
-+ can_idle = 0;
-+ can_sleep = 0;
-+ } else if (jiffies > tmp_jiffy + idle_limit) {
-+
-+ /*
-+ * I think this is enough to prevent from reentering here
-+ * due to jiffies will be stoped
-+ */
-+ tmp_jiffy = jiffies;
-+
-+ /* if pm idle timer expired, queue event */
-+ apm_queue_event(KRNL_PROC_INACT);
-+ can_idle = 1;
-+ }
-+#endif
-+
-+ return irq;
-+}
-+
-+irqreturn_t bp_wdi_intr(int irq, void *dev_id)
-+{
-+//FIXME apm_queue_event(KRNL_BP_WDI);
-+ return IRQ_HANDLED;
-+}
-+
-+static struct irqaction bp_wdi_irq = {
-+ .name = "BP wdi",
-+ .handler = &bp_wdi_intr,
-+};
-+#endif
-+
-+int handshake_pass(void)
-+{
-+ return (step > LAST_STEP);
-+}
-+
-+static irqreturn_t bp_rdy_intr(int irq, void *dev_id)
-+{
-+ static int usbipc_ready = 0;
-+
-+ if (!usbipc_ready) {
-+ handshake();
-+ if (handshake_pass()) {
-+ disable_irq(IRQ_GPIO(GPIO_BB_WDI2));
-+
-+ /* set bp_rdy handle for usb ipc */
-+ set_irq_type(GPIO_BP_RDY, IRQT_FALLING);
-+ usbipc_ready = 1;
-+ }
-+ } else
-+ // FIXME usb_send_readurb();
-+ {}
-+
-+ return IRQ_HANDLED;
-+}
-+
-+static struct irqaction bp_rdy_irq = {
-+ .name = "BP rdy",
-+ .handler = bp_rdy_intr,
-+};
-+
-+static irqreturn_t bp_wdi2_intr(int irq, void *dev_id)
-+{
-+#ifdef CONFIG_PM
-+//FIXME pm_do_poweroff();
-+#endif
-+ return IRQ_HANDLED;
-+}
-+
-+static struct irqaction bp_wdi2_irq = {
-+ .name = "BP wdi2",
-+ .handler = bp_wdi2_intr,
-+};
-+
-+
-+static struct resource ezx_bp_resources[] = {
-+ [0] = {
-+ .start = GPIO_BP_RDY,
-+ .end = GPIO_BP_RDY,
-+ .flags = IORESOURCE_IRQ,
-+ },
-+ [1] = {
-+ .start = GPIO_BB_WDI2,
-+ .end = GPIO_BB_WDI2,
-+ .flags = IORESOURCE_IRQ,
-+ },
-+#ifdef CONFIG_APM
-+ [2] = {
-+ .start = GPIO_BB_WDI,
-+ .end = GPIO_BB_WDI,
-+ .flags = IORESOURCE_IRQ,
-+ },
-+#endif
-+};
-+
-+static struct platform_device ezx_bp_device = {
-+ .name = "ezx-bp",
-+ .dev = {
-+ //.parent =
-+ //.platform_data =
-+ },
-+ .id = -1,
-+ .num_resources = ARRAY_SIZE(ezx_bp_resources),
-+ .resource = ezx_bp_resources,
-+};
-+
-+static void __init ezx_init_gpio_irq(void)
-+{
-+#ifdef CONFIG_APM
-+ set_irq_type(GPIO_BB_WDI, IRQT_FALLING);
-+ setup_irq(IRQ_GPIO(GPIO_BB_WDI), &bp_wdi_irq);
-+#endif
-+ set_irq_type(GPIO_BP_RDY, IRQT_BOTHEDGE);
-+ setup_irq(IRQ_GPIO(GPIO_BP_RDY), &bp_rdy_irq);
-+
-+ set_irq_type(GPIO_BB_WDI2, IRQT_FALLING);
-+ setup_irq(IRQ_GPIO(GPIO_BB_WDI2), &bp_wdi2_irq);
-+}
-+
-+static void __init a780_init_irq(void)
-+{
-+ pxa_init_irq();
-+
-+ /* init ezx specfic gpio irq */
-+ ezx_init_gpio_irq();
-+
-+ check_power_off();
-+ handshake();
-+ if (handshake_pass()) {
-+ disable_irq(IRQ_GPIO(GPIO_BP_RDY));
-+ disable_irq(IRQ_GPIO(GPIO_BB_WDI2));
-+ }
-+}
+
+static struct platform_device *devices[] __initdata = {
+ &ezxssp_device,
-+ &ezx_bp_device,
+};
+
-+static void __init a780_init(void)
++static int __init ezx_init(void)
+{
+ CKEN = CKEN9_OSTIMER | CKEN22_MEMC;
+
+ ezx_ssp_set_machinfo(&ezx_ssp_machinfo);
+
-+ /* set BB_RESET PIN out put high */
-+ pxa_gpio_mode(GPIO_BB_RESET|GPIO_OUT);
-+ set_GPIO(GPIO_BB_RESET);
-+
+ pxa_gpio_mode(GPIO_ICL_FFRXD_MD);
+ pxa_gpio_mode(GPIO_ICL_FFTXD_MD);
+ pxa_gpio_mode(GPIO_ICL_FFCTS_MD);
@@ -402,61 +207,22 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+ pxa_gpio_mode(GPIO_EMU_MUX2|GPIO_OUT);
+ clr_GPIO(GPIO_EMU_MUX2);
+
-+#if defined(CONFIG_PXA_EZX_E680)
-+ pxa_gpio_mode(GPIO46_STRXD_MD);
-+ pxa_gpio_mode(GPIO47_STTXD_MD);
-+
-+ /* setup sleep mode values */
-+ PWER = 0xc000f803; // disable usb 0xdc00f803;
-+ PFER = 0x0000f803;
-+ PRER = 0x00001802;
-+ // keypad wakeup (PKWR,PGSR3) should be in keypad.c
-+ PGSR0 = 0x00000010;
-+ PGSR1 = 0x02800000;
-+ PGSR2 = 0x00040000;
-+ PGSR3 = 0x00000000;
-+ PCFR = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE;
-+ PSLR = 0x05800f00;
-+
-+#elif defined(CONFIG_PXA_EZX_A780)
-+
+ /* Standard UART */
+ pxa_gpio_mode(GPIO46_STRXD_MD);
+ pxa_gpio_mode(GPIO47_STTXD_MD);
+
-+ /* setup sleep mode values */
-+ PWER = 0xc0007803; // disable usb, GPIO15 NC
-+ PFER = 0x00007803;
-+ PRER = 0x00001802;
-+ // keypad wakeup (PKWR,PGSR3) should be in keypad.c
-+ PGSR0 = 0x00000010;
-+ PGSR1 = 0x02800000;
-+ PGSR2 = 0x00040000;
-+ PGSR3 = 0x00000008;
-+ PCFR = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE;
-+ PSLR = 0x05800f00;
-+
-+#endif
+ pxa_set_ohci_info(&ezx_ohci_platform_data);
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+
++ return 0;
+}
+
-+MACHINE_START(EZX, "Motorola Ezx Platform")
-+ /* Maintainer: Harald Welte <laforge@gnumonks.org> */
-+ .phys_io = 0x40000000,
-+ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
-+ .boot_params = 0xa0000100,
-+ .map_io = pxa_map_io,
-+ .init_irq = a780_init_irq,
-+ .timer = &pxa_timer,
-+ .init_machine = a780_init,
-+MACHINE_END
++subsys_initcall(ezx_init);
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-05-03 17:42:02.000000000 -0300
++++ linux-2.6.21/include/asm-arm/arch-pxa/ezx.h 2007-05-08 03:43:23.000000000 -0300
@@ -0,0 +1,225 @@
+/*
+ * linux/include/asm-arm/arch-pxa/ezx.h
@@ -685,8 +451,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-05-03 17:41:57.000000000 -0300
-+++ linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h 2007-05-04 04:17:32.000000000 -0300
+--- linux-2.6.21.orig/include/asm-arm/arch-pxa/pxa-regs.h 2007-05-08 03:43:19.000000000 -0300
++++ linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h 2007-05-08 03:43:23.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 */
@@ -802,8 +568,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-05-03 17:41:57.000000000 -0300
-+++ linux-2.6.21/arch/arm/boot/compressed/head.S 2007-05-03 17:42:02.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/boot/compressed/head.S 2007-05-08 03:43:19.000000000 -0300
++++ linux-2.6.21/arch/arm/boot/compressed/head.S 2007-05-08 03:43:23.000000000 -0300
@@ -117,6 +117,9 @@
mov r0, r0
.endr
@@ -816,8 +582,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-05-03 17:41:57.000000000 -0300
-+++ linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h 2007-05-03 17:42:02.000000000 -0300
+--- linux-2.6.21.orig/include/asm-arm/arch-pxa/uncompress.h 2007-05-08 03:43:19.000000000 -0300
++++ linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h 2007-05-08 03:43:23.000000000 -0300
@@ -14,14 +14,14 @@
#define STUART ((volatile unsigned long *)0x40700000)
#define HWUART ((volatile unsigned long *)0x41600000)
@@ -839,7 +605,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-05-03 17:42:02.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx_ssp.c 2007-05-08 03:43:23.000000000 -0300
@@ -0,0 +1,126 @@
+/*
+ * SSP control code for Motorola EZX phones
@@ -970,7 +736,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-05-03 17:42:02.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.h 2007-05-08 03:43:23.000000000 -0300
@@ -0,0 +1,9 @@
+#include <asm/arch/ezx.h>
+
@@ -981,70 +747,141 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.h
+ int clk_pcap;
+};
+
-Index: linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c
+Index: linux-2.6.21/arch/arm/mm/init.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mm/init.c 2007-05-08 03:43:19.000000000 -0300
++++ linux-2.6.21/arch/arm/mm/init.c 2007-05-08 03:43:23.000000000 -0300
+@@ -241,6 +241,10 @@
+ */
+ reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT,
+ boot_pages << PAGE_SHIFT);
++#ifdef CONFIG_PXA_EZX
++ /* reserve the first page memory for exiting sleep and user off */
++ reserve_bootmem_node(pgdat, PHYS_OFFSET, PAGE_SIZE);
++#endif
+
+ #ifdef CONFIG_BLK_DEV_INITRD
+ /*
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c 2007-05-03 17:42:02.000000000 -0300
-@@ -0,0 +1,113 @@
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 03:46:17.000000000 -0300
+@@ -0,0 +1,82 @@
+/*
-+ * linux/arch/arm/mach-ezx/a780.c
-+ *
-+ * Support for the Motorola Ezx A780 Development Platform.
++ * ezx-a780.c - Code specific to A780 GSM Phone.
+ *
-+ * Author: Zhuang Xiaofan
-+ * Created: Nov 25, 2003
-+ * Copyright: Motorola Inc.
++ * Copyright (c) 2007 OpenEZX Team (www.openezx.org)
+ *
+ * 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.
++ *
+ */
+
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
+#include <linux/fb.h>
-+#include <linux/delay.h>
-+#include <asm/arch/pxafb.h>
++
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
+#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxafb.h>
+
-+/*
-+ * EZX PXA Framebuffer
-+ */
++#include "generic.h"
++#include "ezx.h"
+
-+static void pxafb_lcd_power(int on, struct fb_var_screeninfo *var)
-+{
-+ if (on) {
-+// mdelay(1);
-+ GPSR3 = 0x00100000;
-+ mdelay(10);
-+ GPCR3 = 0x00100000;
-+ GPDR3 |= 0x00100000;
-+ } else {
-+ GPSR3 = 0x00100000;
-+ PGSR3 |= 0x00100000;
-+ mdelay(41);
-+ LCCR0 &= ~LCCR0_LDM; /* disable lcd disable done interrupt */
-+ LCCR0 |= LCCR0_DIS; /* normal disable lcd */
-+ mdelay(18);
-+ }
-+}
++extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
++extern void ezx_backlight_power(int);
+
-+static void ezx_backlight_power(int on)
++static struct pxafb_mode_info mode_a780 = {
++ .pixclock = 150000,
++ .xres = 240,
++ .yres = 320,
++ .bpp = 16,
++ .hsync_len = 10,
++ .left_margin = 20,
++ .right_margin = 10,
++ .vsync_len = 2,
++ .upper_margin = 3,
++ .lower_margin = 2,
++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
++};
++
++static struct pxafb_mach_info a780_fb_info = {
++ .modes = &mode_a780,
++ .num_modes = 1,
++ .lccr0 = 0x002008F8,
++ .lccr3 = 0x0430FF09,
++ .pxafb_backlight_power = &ezx_backlight_power,
++ .pxafb_lcd_power = &ezx_lcd_power,
++};
++
++static struct platform_device *devices[] __initdata = {
++};
++
++static void __init a780_init(void)
+{
-+ if (on) {
-+ pxa_gpio_mode(GPIO16_PWM0_MD);
-+ pxa_set_cken(CKEN0_PWM0, 1);
-+ PWM_CTRL0 = 0;
-+ PWM_PWDUTY0 = 0x3ff;
-+ PWM_PERVAL0 = 0x3ff;
-+ } else {
-+ PWM_CTRL0 = 0;
-+ PWM_PWDUTY0 = 0x0;
-+ PWM_PERVAL0 = 0x3FF;
-+ pxa_set_cken(CKEN0_PWM0, 0);
-+ }
++ /* setup sleep mode values */
++ PWER = 0xc0007803; // disable usb, GPIO15 NC
++ PFER = 0x00007803;
++ PRER = 0x00001802;
++ PGSR0 = 0x00000010;
++ PGSR1 = 0x02800000;
++ PGSR2 = 0x00040000;
++ PGSR3 = 0x00000008;
++ PCFR = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE;
++ PSLR = 0x05800f00;
++
++ set_pxa_fb_info(&a780_fb_info);
++
++ platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
-+#ifdef CONFIG_PXA_E2
-+static struct pxafb_mode_info mode_ezx = {
++MACHINE_START(EZX, "Motorola Ezx Platform")
++ /* Maintainer: OpenEZX Team (www.openezx.org) */
++ .phys_io = 0x40000000,
++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
++ .boot_params = 0xa0000100,
++ .map_io = pxa_map_io,
++ .init_irq = pxa_init_irq,
++ .timer = &pxa_timer,
++ .init_machine = a780_init,
++MACHINE_END
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e2.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e2.c 2007-05-08 03:47:56.000000000 -0300
+@@ -0,0 +1,70 @@
++/*
++ * ezx-e2.c - Code specific to E2 GSM Phone.
++ *
++ * Copyright (c) 2007 OpenEZX Team (www.openezx.org)
++ *
++ * 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.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/fb.h>
++
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxafb.h>
++
++#include "generic.h"
++#include "ezx.h"
++
++extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
++extern void ezx_backlight_power(int);
++
++static struct pxafb_mode_info mode_e2 = {
+ .pixclock = 192308,
+ .xres = 240,
+ .yres = 320,
@@ -1058,8 +895,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c
+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
+
-+static struct pxafb_mach_info ezx_fb_info = {
-+ .modes = &mode_ezx,
++static struct pxafb_mach_info e2_fb_info = {
++ .modes = &mode_e2,
+ .num_modes = 1,
+ .lccr0 = 0x022008B8,
+ .lccr3 = 0xC130FF13,
@@ -1067,8 +904,59 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c
+ .pxafb_lcd_power = &pxafb_lcd_power,
+};
+
-+#else
-+static struct pxafb_mode_info mode_ezx = {
++static struct platform_device *devices[] __initdata = {
++};
++
++static void __init e2_init(void)
++{
++ set_pxa_fb_info(&e2_fb_info);
++
++ platform_add_devices(devices, ARRAY_SIZE(devices));
++}
++
++MACHINE_START(EZX, "Motorola Ezx Platform")
++ /* Maintainer: OpenEZX Team (www.openezx.org) */
++ .phys_io = 0x40000000,
++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
++ .boot_params = 0xa0000100,
++ .map_io = pxa_map_io,
++ .init_irq = pxa_init_irq,
++ .timer = &pxa_timer,
++ .init_machine = e2_init,
++MACHINE_END
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 03:47:41.000000000 -0300
+@@ -0,0 +1,81 @@
++/*
++ * ezx-e680.c - Code specific to E680 GSM Phone.
++ *
++ * Copyright (c) 2007 OpenEZX Team (www.openezx.org)
++ *
++ * 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.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/fb.h>
++
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxafb.h>
++
++#include "generic.h"
++#include "ezx.h"
++
++extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
++extern void ezx_backlight_power(int);
++
++static struct pxafb_mode_info mode_e680 = {
+ .pixclock = 150000,
+ .xres = 240,
+ .yres = 320,
@@ -1082,35 +970,43 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx_lcd.c
+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
+
-+static struct pxafb_mach_info ezx_fb_info = {
-+ .modes = &mode_ezx,
++static struct pxafb_mach_info e680_fb_info = {
++ .modes = &mode_e680,
+ .num_modes = 1,
+ .lccr0 = 0x002008F8,
+ .lccr3 = 0x0430FF09,
-+ .pxafb_backlight_power = ezx_backlight_power,
-+ .pxafb_lcd_power = &pxafb_lcd_power,
++ .pxafb_backlight_power = &ezx_backlight_power,
++ .pxafb_lcd_power = &ezx_lcd_power,
+};
-+#endif
+
-+int __init __ezx_lcd_init (void)
++static struct platform_device *devices[] __initdata = {
++};
++
++static void __init e680_init(void)
+{
-+ set_pxa_fb_info(&ezx_fb_info);
-+ return 0;
++ /* setup sleep mode values */
++ PWER = 0xc000f803; // disable usb 0xdc00f803;
++ PFER = 0x0000f803;
++ PRER = 0x00001802;
++ PGSR0 = 0x00000010;
++ PGSR1 = 0x02800000;
++ PGSR2 = 0x00040000;
++ PGSR3 = 0x00000000;
++ PCFR = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE;
++ PSLR = 0x05800f00;
++
++ set_pxa_fb_info(&e680_fb_info);
++
++ platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
-+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-05-03 17:41:57.000000000 -0300
-+++ linux-2.6.21/arch/arm/mm/init.c 2007-05-04 03:48:30.000000000 -0300
-@@ -241,6 +241,10 @@
- */
- reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT,
- boot_pages << PAGE_SHIFT);
-+#ifdef CONFIG_PXA_EZX
-+ /* reserve the first page memory for exiting sleep and user off */
-+ reserve_bootmem_node(pgdat, PHYS_OFFSET, PAGE_SIZE);
-+#endif
-
- #ifdef CONFIG_BLK_DEV_INITRD
- /*
++MACHINE_START(EZX, "Motorola Ezx Platform")
++ /* Maintainer: OpenEZX Team (www.openezx.org) */
++ .phys_io = 0x40000000,
++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
++ .boot_params = 0xa0000100,
++ .map_io = pxa_map_io,
++ .init_irq = pxa_init_irq,
++ .timer = &pxa_timer,
++ .init_machine = e680_init,
++MACHINE_END
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 91d99ee17b..7f089315a5 100644
--- a/packages/linux/linux-ezx-2.6.21/ezx-emu.patch
+++ b/packages/linux/linux-ezx-2.6.21/ezx-emu.patch
@@ -1,7 +1,7 @@
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.21/arch/arm/mach-pxa/ezx-emu.c 2007-05-02 23:30:15.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-emu.c 2007-05-08 02:31:16.000000000 -0300
@@ -0,0 +1,215 @@
+/*
+ * EMU Driver for Motorola EZX phones
@@ -28,9 +28,9 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-emu.c
+extern int ezx_pcap_bit_set(u_int32_t, u_int8_t);
+extern int ezx_pcap_read_bit(u_int32_t);
+
-+#if defined CONFIG_PXA_EZX_EMU_USB
++#if defined CONFIG_EZX_EMU_USB
+#define emu_switch_to_default() emu_switch_to_usb()
-+#elif defined CONFIG_PXA_EZX_EMU_UART
++#elif defined CONFIG_EZX_EMU_UART
+#define emu_switch_to_default() emu_switch_to_uart()
+#else
+#define emu_switch_to_default() emu_switch_to_nothing()
@@ -220,27 +220,36 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-emu.c
+MODULE_LICENSE("GPL");
Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-02 21:31:22.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-02 23:26:53.000000000 -0300
-@@ -94,6 +94,27 @@
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-08 02:28:47.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-08 02:31:16.000000000 -0300
+@@ -73,6 +73,7 @@
endchoice
-+config PXA_EZX_EMU
++
+ endif
+
+ if PXA_EZX
+@@ -100,6 +101,28 @@
+ config EZX_PCAP
+ bool "PCAP Support"
+
++config EZX_EMU
+ bool "Motorola Enchanced Mini Usb"
++ depends on EZX_PCAP
+
-+if PXA_EZX_EMU
++if EZX_EMU
+
+choice
+ prompt "Select default EMU mode"
+
-+config PXA_EZX_EMU_USB
++config EZX_EMU_USB
+ bool "USB"
+
-+config PXA_EZX_EMU_UART
++config EZX_EMU_UART
+ bool "UART"
+
-+config PXA_EZX_EMU_NOTHING
++config EZX_EMU_NOTHING
+ bool "nothing"
+
+endchoice
@@ -250,31 +259,11 @@ Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig
endif
endmenu
-Index: linux-2.6.21/arch/arm/mach-pxa/Makefile
-===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-02 23:26:52.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-03 17:41:40.000000000 -0300
-@@ -19,6 +19,7 @@
- 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_EMU) += ezx-emu.o
-
- # Support for blinky lights
- led-y := leds.o
Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-02 23:26:52.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-03 17:25:08.000000000 -0300
-@@ -35,6 +35,7 @@
- #include <asm/arch/ohci.h>
- #include <asm/arch/pxa-regs.h>
-
-+
- #include "ezx.h"
- #include "generic.h"
- #include <linux/tty.h>
-@@ -91,6 +92,30 @@
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-08 02:28:47.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 02:31:16.000000000 -0300
+@@ -150,11 +150,35 @@
.resource = ezxpcap_resources,
};
@@ -301,15 +290,24 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+ .num_resources = ARRAY_SIZE(ezxemu_resources),
+ .resource = ezxemu_resources,
+};
-+
- /* OHCI Controller */
- static int ezx_ohci_init(struct device *dev)
-@@ -316,6 +341,7 @@
+ static struct platform_device *devices[] __initdata = {
&ezxssp_device,
- &ezxpcap_device,
&ezxbp_device,
+ &ezxpcap_device,
+ &ezxemu_device,
};
- static void __init a780_init(void)
+ /* PM */
+Index: linux-2.6.21/arch/arm/mach-pxa/Makefile
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-08 02:28:47.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-08 02:31:16.000000000 -0300
+@@ -24,6 +24,7 @@
+ obj-$(CONFIG_PXA_EZX_E2) += ezx-e2.o
+ obj-$(CONFIG_EZX_BP) += ezx-bp.o
+ obj-$(CONFIG_EZX_PCAP) += ezx-pcap.o
++obj-$(CONFIG_EZX_EMU) += ezx-emu.o
+
+ # Support for blinky lights
+ led-y := leds.o
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 a077ad5ffb..41903260e6 100644
--- a/packages/linux/linux-ezx-2.6.21/ezx-pcap.patch
+++ b/packages/linux/linux-ezx-2.6.21/ezx-pcap.patch
@@ -1,8 +1,8 @@
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.21/arch/arm/mach-pxa/ezx-pcap.c 2007-05-04 03:07:37.000000000 -0300
-@@ -0,0 +1,425 @@
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c 2007-05-08 16:13:29.000000000 -0300
+@@ -0,0 +1,428 @@
+/* Driver for Motorola PCAP2 as present in EZX phones
+ *
+ * This is both a SPI device driver for PCAP itself, as well as
@@ -41,6 +41,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c
+
+extern unsigned long ezx_ssp_pcap_putget(ulong);
+
++
+int ezx_pcap_write(u_int8_t reg_num, u_int32_t value)
+{
+ value &= SSP_PCAP_REGISTER_VALUE_MASK;
@@ -51,7 +52,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c
+ ezx_ssp_pcap_putget(value);
+ local_irq_enable();
+
-+// DEBUGP("pcap write r%x: 0x%08x\n", reg_num, value);
++ DEBUGP("pcap write r%x: 0x%08x\n", reg_num, value);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(ezx_pcap_write);
@@ -65,7 +66,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c
+ *value = ezx_ssp_pcap_putget(frame);
+ local_irq_enable();
+
-+// DEBUGP("pcap read r%x: 0x%08x\n", reg_num, *value);
++ DEBUGP("pcap read r%x: 0x%08x\n", reg_num, *value);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(ezx_pcap_read);
@@ -107,32 +108,30 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c
+EXPORT_SYMBOL_GPL(ezx_pcap_read_bit);
+
+
-+static int ezx_pcap_vibrator_level(u_int32_t bit)
++void ezx_pcap_vibrator_level(u_int32_t value)
+{
-+ /* FIXME */
-+ return 0;
++ u_int32_t tmp;
++
++ ezx_pcap_read(SSP_PCAP_ADJ_AUX_VREG_REGISTER, &tmp);
++
++ tmp &= (~SSP_PCAP_VIBRATOR_VOLTAGE_LEVEL_MASK);
++ tmp |= value;
++
++ ezx_pcap_write(SSP_PCAP_ADJ_AUX_VREG_REGISTER, tmp);
+}
+EXPORT_SYMBOL_GPL(ezx_pcap_vibrator_level);
+
-+
-+static int pcap_init(void)
++static int __init pcap_init(void)
+{
+ /* initialize registers */
-+ /* FIXME: this should be board-level, not chip-level */
++#warning FIXME: pcap_init still chip level
+ /* implement a per board pcap init reg array? */
+
-+// ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ISR_USB4VI, 1);
-+// ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_USB4VM, 0);
-+// ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ISR_USB1VI, 1);
-+// ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_USB1VM, 0);
-+ // disable all interrupts
+ ezx_pcap_write(SSP_PCAP_ADJ_MSR_REGISTER, PCAP_MASK_ALL_INTERRUPT);
-+ // clear all interrupts
-+ ezx_pcap_write(SSP_PCAP_ADJ_ISR_REGISTER, PCAP_MASK_ALL_INTERRUPT);
++ ezx_pcap_write(SSP_PCAP_ADJ_ISR_REGISTER, PCAP_CLEAR_INTERRUPT_REGISTER);
+
+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A1CTRL, 1);
+ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL3);
-+ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL3);
+
+ /* set SW1 sleep to keep SW1 1.3v in sync mode */
+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE10, 0);
@@ -217,8 +216,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c
+ [0] = EZX_IRQ_ADCDONE,
+ [1] = EZX_IRQ_TS,
+ [2] = 0, /* 1HZ */
-+ [3] = 0, /* WI */
-+ [4] = 0, /* WI */
++ [3] = 0, /* WH */
++ [4] = 0, /* WL */
+ [5] = 0, /* TODA */
+ [6] = EZX_IRQ_USB4V,
+ [7] = 0, /* ONOFF */
@@ -232,21 +231,21 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c
+ [15] = 0, /* WARM */
+ [16] = 0, /* EOL */
+ [17] = 0, /* CLK */
-+ [18] = 0, /* SYS_RST */
++ [18] = 0, /* SYSRST */
+ [19] = 0,
+ [20] = EZX_IRQ_ADCDONE2,
-+ [21] = 0, /* SOFT_RESET */
++ [21] = 0, /* SOFTRESET */
+ [22] = 0, /* MNEXB */
+};
+
+/* Array indexed by IRQ NUMBER, returns PCAP absolute value */
+static unsigned int irq2pcap[] = {
-+ [EZX_IRQ_ADCDONE] = SSP_PCAP_ADJ_BIT_ISR_ADCDONEI,
-+ [EZX_IRQ_TS] = SSP_PCAP_ADJ_BIT_ISR_TSI,
+ [EZX_IRQ_USB4V] = SSP_PCAP_ADJ_BIT_ISR_USB4VI,
+ [EZX_IRQ_USB1V] = SSP_PCAP_ADJ_BIT_ISR_USB1VI,
+ [EZX_IRQ_HEADJACK] = SSP_PCAP_ADJ_BIT_ISR_A1I,
+ [EZX_IRQ_MIC] = SSP_PCAP_ADJ_BIT_ISR_MB2I,
++ [EZX_IRQ_ADCDONE] = SSP_PCAP_ADJ_BIT_ISR_ADCDONEI,
++ [EZX_IRQ_TS] = SSP_PCAP_ADJ_BIT_ISR_TSI,
+ [EZX_IRQ_ADCDONE2] = SSP_PCAP_ADJ_BIT_ISR_ADCDONE2I,
+};
+
@@ -334,6 +333,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c
+ struct irq_desc *subdesc;
+ DEBUGP("found irq %u\n", pirq);
+ subdesc = irq_desc + pirq;
++
++ kstat_cpu(cpu).irqs[pirq]++;
+ subdesc->chip->ack(pirq);
+
+ spin_unlock(&desc->lock);
@@ -382,7 +383,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c
+ }
+ set_irq_chained_handler(IRQ_GPIO1, pcap_irq_demux_handler);
+
-+ printk("PCAP2 SSP driver registered.\n");
++ printk("ezx-pcap: ssp driver registered\n");
+
+ return 0;
+}
@@ -396,6 +397,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c
+static int ezx_pcap_resume(struct platform_device *dev)
+{
+ DEBUGP("pcap resume!\n");
++ /* ack all irqs */
++ ezx_pcap_write(SSP_PCAP_ADJ_ISR_REGISTER, PCAP_CLEAR_INTERRUPT_REGISTER);
+ return 0;
+}
+
@@ -431,7 +434,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c
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.21/include/asm-arm/arch-pxa/ezx-pcap.h 2007-05-03 17:43:48.000000000 -0300
++++ linux-2.6.21/include/asm-arm/arch-pxa/ezx-pcap.h 2007-05-08 04:03:42.000000000 -0300
@@ -0,0 +1,665 @@
+/* (c) Copyright Motorola Beijing 2002 all rights reserved.
+
@@ -1100,8 +1103,8 @@ Index: linux-2.6.21/include/asm-arm/arch-pxa/ezx-pcap.h
+#endif
Index: linux-2.6.21/include/asm-arm/arch-pxa/irqs.h
===================================================================
---- linux-2.6.21.orig/include/asm-arm/arch-pxa/irqs.h 2007-05-03 17:41:55.000000000 -0300
-+++ linux-2.6.21/include/asm-arm/arch-pxa/irqs.h 2007-05-03 17:43:48.000000000 -0300
+--- linux-2.6.21.orig/include/asm-arm/arch-pxa/irqs.h 2007-05-08 03:43:19.000000000 -0300
++++ linux-2.6.21/include/asm-arm/arch-pxa/irqs.h 2007-05-08 04:03:42.000000000 -0300
@@ -176,7 +176,8 @@
#define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1)
#elif defined(CONFIG_ARCH_LUBBOCK) || \
@@ -1112,42 +1115,26 @@ Index: linux-2.6.21/include/asm-arm/arch-pxa/irqs.h
#define NR_IRQS (IRQ_BOARD_END)
#else
#define NR_IRQS (IRQ_BOARD_START)
-@@ -222,3 +223,16 @@
+@@ -222,3 +223,13 @@
#define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1)
#define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2)
#define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3)
+
+/* EZX Interrupts (CONFIG_EZX) */
+#define EZX_IRQ(x) (IRQ_BOARD_START + (x))
-+#define EZX_IRQ_ADCDONE EZX_IRQ(0) /* PCAP */
-+#define EZX_IRQ_TS EZX_IRQ(1) /* PCAP */
-+#define EZX_IRQ_USB4V EZX_IRQ(2) /* PCAP */
-+#define EZX_IRQ_USB1V EZX_IRQ(3) /* PCAP */
-+#define EZX_IRQ_HEADJACK EZX_IRQ(4) /* PCAP */
-+#define EZX_IRQ_MIC EZX_IRQ(5) /* PCAP */
-+#define EZX_IRQ_ADCDONE2 EZX_IRQ(6) /* PCAP */
-+#define EZX_IRQ_ONOFF EZX_IRQ(7)
-+#define EZX_IRQ_ONOFF2 EZX_IRQ(8)
-+
-Index: linux-2.6.21/arch/arm/mach-pxa/Makefile
-===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-03 17:42:02.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-04 04:17:33.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
-+obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o ezx-pcap.o
-
- # Support for blinky lights
- led-y := leds.o
++#define EZX_IRQ_USB4V EZX_IRQ(0) /* EMU */
++#define EZX_IRQ_USB1V EZX_IRQ(1) /* EMU */
++#define EZX_IRQ_HEADJACK EZX_IRQ(2) /* Audio connector */
++#define EZX_IRQ_MIC EZX_IRQ(3) /* Audio connector */
++#define EZX_IRQ_ADCDONE EZX_IRQ(4)
++#define EZX_IRQ_TS EZX_IRQ(5) /* TS touch */
++#define EZX_IRQ_ADCDONE2 EZX_IRQ(6) /* TS x/y ADC ready */
Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-03 17:42:02.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-04 04:17:33.000000000 -0300
-@@ -72,6 +72,24 @@
- .clk_pcap = 1,
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-08 04:03:40.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 16:29:06.000000000 -0300
+@@ -131,11 +131,30 @@
+ .resource = ezxbp_resources,
};
+/* PCAP */
@@ -1169,43 +1156,37 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+ .resource = ezxpcap_resources,
+};
- /* OHCI Controller */
-
-@@ -235,7 +253,7 @@
- };
-
-
--static struct resource ezx_bp_resources[] = {
-+static struct resource ezxbp_resources[] = {
- [0] = {
- .start = GPIO_BP_RDY,
- .end = GPIO_BP_RDY,
-@@ -255,15 +273,15 @@
- #endif
- };
-
--static struct platform_device ezx_bp_device = {
-+static struct platform_device ezxbp_device = {
- .name = "ezx-bp",
- .dev = {
- //.parent =
- //.platform_data =
- },
- .id = -1,
-- .num_resources = ARRAY_SIZE(ezx_bp_resources),
-- .resource = ezx_bp_resources,
-+ .num_resources = ARRAY_SIZE(ezxbp_resources),
-+ .resource = ezxbp_resources,
- };
-
- static void __init ezx_init_gpio_irq(void)
-@@ -296,7 +314,8 @@
static struct platform_device *devices[] __initdata = {
&ezxssp_device,
-- &ezx_bp_device,
+ &ezxbp_device,
+ &ezxpcap_device,
-+ &ezxbp_device,
};
- static void __init a780_init(void)
+ /* PM */
+Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-08 04:03:37.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-08 16:29:06.000000000 -0300
+@@ -97,6 +97,9 @@
+ config EZX_BP
+ bool "BP Control code for EZX Platform"
+
++config EZX_PCAP
++ bool "PCAP Support"
++
+ endif
+
+ endmenu
+Index: linux-2.6.21/arch/arm/mach-pxa/Makefile
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-08 04:03:37.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-08 16:29:06.000000000 -0300
+@@ -23,6 +23,7 @@
+ obj-$(CONFIG_PXA_EZX_E680) += ezx-e680.o
+ obj-$(CONFIG_PXA_EZX_E2) += ezx-e2.o
+ obj-$(CONFIG_EZX_BP) += ezx-bp.o
++obj-$(CONFIG_EZX_PCAP) += ezx-pcap.o
+
+ # Support for blinky lights
+ led-y := leds.o
diff --git a/packages/linux/linux-ezx-2.6.21/ezx-pm.patch b/packages/linux/linux-ezx-2.6.21/ezx-pm.patch
index 4ad66936c9..85b6f5c15d 100644
--- a/packages/linux/linux-ezx-2.6.21/ezx-pm.patch
+++ b/packages/linux/linux-ezx-2.6.21/ezx-pm.patch
@@ -1,7 +1,7 @@
Index: linux-2.6.21/arch/arm/mach-pxa/pxa27x.c
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/pxa27x.c 2007-05-03 17:41:39.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/pxa27x.c 2007-05-03 17:43:42.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/pxa27x.c 2007-05-08 16:29:23.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/pxa27x.c 2007-05-08 16:29:36.000000000 -0300
@@ -22,6 +22,10 @@
#include <asm/arch/pxa-regs.h>
#include <asm/arch/ohci.h>
@@ -29,8 +29,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/pxa27x.c
}
Index: linux-2.6.21/arch/arm/mach-pxa/pm.c
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/pm.c 2007-05-03 17:41:39.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/pm.c 2007-05-04 03:51:15.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/pm.c 2007-05-08 16:29:23.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/pm.c 2007-05-08 16:29:36.000000000 -0300
@@ -24,6 +24,10 @@
#include <asm/arch/lubbock.h>
#include <asm/mach/time.h>
@@ -56,3 +56,85 @@ Index: linux-2.6.21/arch/arm/mach-pxa/pm.c
/* restore registers */
RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2);
RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2);
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-08 16:29:36.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 16:32:56.000000000 -0300
+@@ -18,6 +18,7 @@
+ #include <asm/arch/pxafb.h>
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/ohci.h>
++#include <asm/arch/system.h>
+
+ #include "generic.h"
+ #include "ezx.h"
+@@ -137,8 +138,69 @@
+ &ezxbp_device,
+ };
+
++/* PM */
++extern int bp_handshake_passed(void);
++
++#define POWER_OFF_TIMEOUT (2*60*HZ)
++
++static void ezx_reboot_poweroff(char mode)
++{
++#ifdef CONFIG_EZX_BP
++ unsigned long start = jiffies;
++
++ printk("Waiting for BP to turn off. This can take some time...\n");
++ *(unsigned long *)(phys_to_virt(BPSIG_ADDR)) = NO_FLAG;
++ cpu_proc_fin();
++
++ do {
++ /*
++ * Turn off gracefully. Wait BP turn off first, and then
++ * properly turn off.
++ */
++ if (pxa_gpio_get_value(GPIO_BB_WDI) == 0) {
++ *(unsigned long *)(phys_to_virt(BPSIG_ADDR)) = WDI_FLAG;
++
++ /* reset BP */
++ pxa_gpio_set_value(GPIO_BB_RESET, 0);
++ mdelay(1);
++ pxa_gpio_set_value(GPIO_BB_RESET, 1);
++
++ if (mode == 'z')
++ arch_reset('h');
++ break;
++ }
++ /* Just turn it off! */
++ if (!bp_handshake_passed() || !pxa_gpio_get_value(GPIO_BB_WDI2)
++ || (jiffies - start) >= POWER_OFF_TIMEOUT) {
++ break;
++ }
++ } while(1);
++#endif
++
++ if (mode == 'z')
++ /* Panic! Ask PCAP to turn both processors off */
++ pxa_gpio_set_value(GPIO_WDI_AP, 0);
++ else
++ arm_machine_restart(mode);
++
++ while(1);
++}
++
++static inline void ezx_poweroff(void)
++{
++ ezx_reboot_poweroff('z');
++}
++
++static inline void ezx_restart(char mode)
++{
++ ezx_reboot_poweroff(mode);
++}
++
+ static int __init ezx_init(void)
+ {
++ pm_power_off = ezx_poweroff;
++ arm_pm_restart = ezx_restart;
++
+ CKEN = CKEN9_OSTIMER | CKEN22_MEMC;
+
+ ezx_ssp_set_machinfo(&ezx_ssp_machinfo);
diff --git a/packages/linux/linux-ezx-2.6.21/mux_cli.patch b/packages/linux/linux-ezx-2.6.21/mux_cli.patch
index 2964f24fd2..b3974a5996 100644
--- a/packages/linux/linux-ezx-2.6.21/mux_cli.patch
+++ b/packages/linux/linux-ezx-2.6.21/mux_cli.patch
@@ -1,13 +1,14 @@
Index: linux-2.6.21/drivers/char/Kconfig
===================================================================
---- linux-2.6.21.orig/drivers/char/Kconfig 2007-04-26 20:07:19.000000000 +0200
-+++ linux-2.6.21/drivers/char/Kconfig 2007-04-26 20:09:29.000000000 +0200
-@@ -1071,5 +1071,17 @@
+--- linux-2.6.21.orig/drivers/char/Kconfig 2007-05-06 17:07:33.000000000 -0300
++++ linux-2.6.21/drivers/char/Kconfig 2007-05-06 17:10:53.000000000 -0300
+@@ -1071,5 +1071,18 @@
/sys/devices/platform/telco_clock, with a number of files for
controlling the behavior of this hardware.
+config TS0710_MUX
+ tristate "GSM TS 07.10 Multiplex driver"
++ depends on EZX_BP
+ help
+ This implements the GSM 07.10 multiplex.
+
@@ -22,8 +23,8 @@ Index: linux-2.6.21/drivers/char/Kconfig
Index: linux-2.6.21/drivers/char/Makefile
===================================================================
---- linux-2.6.21.orig/drivers/char/Makefile 2007-04-26 20:07:19.000000000 +0200
-+++ linux-2.6.21/drivers/char/Makefile 2007-04-26 20:09:29.000000000 +0200
+--- linux-2.6.21.orig/drivers/char/Makefile 2007-05-06 17:07:33.000000000 -0300
++++ linux-2.6.21/drivers/char/Makefile 2007-05-06 17:10:21.000000000 -0300
@@ -104,6 +104,9 @@
obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o
obj-$(CONFIG_TCG_TPM) += tpm/
@@ -37,7 +38,7 @@ Index: linux-2.6.21/drivers/char/Makefile
Index: linux-2.6.21/drivers/char/ts0710.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/drivers/char/ts0710.h 2007-04-26 20:09:29.000000000 +0200
++++ linux-2.6.21/drivers/char/ts0710.h 2007-05-06 17:10:21.000000000 -0300
@@ -0,0 +1,368 @@
+/*
+ * File: ts0710.h
@@ -410,7 +411,7 @@ Index: linux-2.6.21/drivers/char/ts0710.h
Index: linux-2.6.21/drivers/char/ts0710_mux.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/drivers/char/ts0710_mux.c 2007-04-26 20:09:29.000000000 +0200
++++ linux-2.6.21/drivers/char/ts0710_mux.c 2007-05-06 17:10:21.000000000 -0300
@@ -0,0 +1,3966 @@
+/*
+ * File: mux_driver.c
@@ -4381,7 +4382,7 @@ Index: linux-2.6.21/drivers/char/ts0710_mux.c
Index: linux-2.6.21/drivers/char/ts0710_mux.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/drivers/char/ts0710_mux.h 2007-04-26 20:09:29.000000000 +0200
++++ linux-2.6.21/drivers/char/ts0710_mux.h 2007-05-06 17:10:21.000000000 -0300
@@ -0,0 +1,103 @@
+/*
+ * mux_macro.h
@@ -4489,7 +4490,7 @@ Index: linux-2.6.21/drivers/char/ts0710_mux.h
Index: linux-2.6.21/drivers/char/ts0710_mux_usb.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/drivers/char/ts0710_mux_usb.c 2007-04-26 20:09:29.000000000 +0200
++++ linux-2.6.21/drivers/char/ts0710_mux_usb.c 2007-05-06 17:10:21.000000000 -0300
@@ -0,0 +1,868 @@
+/*
+ * linux/drivers/usb/ipcusb.c
@@ -5362,7 +5363,7 @@ Index: linux-2.6.21/drivers/char/ts0710_mux_usb.c
Index: linux-2.6.21/drivers/char/ts0710_mux_usb.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/drivers/char/ts0710_mux_usb.h 2007-04-26 20:09:29.000000000 +0200
++++ linux-2.6.21/drivers/char/ts0710_mux_usb.h 2007-05-06 17:10:21.000000000 -0300
@@ -0,0 +1,29 @@
+/*
+ * linux/drivers/usb/ipcusb.h
diff --git a/packages/linux/linux-ezx-2.6.21/pcap-ts.patch b/packages/linux/linux-ezx-2.6.21/pcap-ts.patch
index a07ec1abe9..d2b44b3c9a 100644
--- a/packages/linux/linux-ezx-2.6.21/pcap-ts.patch
+++ b/packages/linux/linux-ezx-2.6.21/pcap-ts.patch
@@ -1,14 +1,14 @@
Index: linux-2.6.21/drivers/input/touchscreen/Kconfig
===================================================================
---- linux-2.6.21.orig/drivers/input/touchscreen/Kconfig 2007-05-03 17:39:18.000000000 -0300
-+++ linux-2.6.21/drivers/input/touchscreen/Kconfig 2007-05-03 17:44:12.000000000 -0300
+--- linux-2.6.21.orig/drivers/input/touchscreen/Kconfig 2007-05-08 14:19:21.000000000 -0300
++++ linux-2.6.21/drivers/input/touchscreen/Kconfig 2007-05-08 14:22:21.000000000 -0300
@@ -164,4 +164,13 @@
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
++ depends on EZX_PCAP
+ help
+ Say Y here if you have a Motorola EZX telephone and
+ want to support the built-in touchscreen.
@@ -19,8 +19,8 @@ Index: linux-2.6.21/drivers/input/touchscreen/Kconfig
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-05-04 04:17:22.000000000 -0300
-@@ -0,0 +1,372 @@
++++ linux-2.6.21/drivers/input/touchscreen/pcap_ts.c 2007-05-08 14:28:43.000000000 -0300
+@@ -0,0 +1,375 @@
+/*
+ * pcap_ts.c - Touchscreen driver for Motorola PCAP2 based touchscreen as found
+ * in the EZX phone platform.
@@ -47,7 +47,6 @@ Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c
+#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>
@@ -66,6 +65,10 @@ Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c
+#define COORDINATE 2
+#define STANDBY 3
+
++extern int ezx_pcap_read(u_int8_t, u_int32_t *);
++extern int ezx_pcap_write(u_int8_t, u_int32_t);
++extern int ezx_pcap_bit_set(u_int32_t, u_int8_t);
++
+struct pcap_ts {
+ int irq_xy;
+ int irq_touch;
@@ -279,7 +282,7 @@ Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c
+ return ret;
+
+ err = request_irq(pcap_ts->irq_xy, pcap_ts_irq_xy, SA_INTERRUPT,
-+ "PCAP Touchscreen XY", pcap_ts);
++ "pcap-ts X/Y", pcap_ts);
+ if (err < 0) {
+ printk(KERN_ERR "pcap_ts: can't grab xy irq %d: %d\n",
+ pcap_ts->irq_xy, err);
@@ -287,7 +290,7 @@ Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c
+ }
+
+ err = request_irq(pcap_ts->irq_touch, pcap_ts_irq_touch, SA_INTERRUPT,
-+ "PCAP Touchscreen Touch", pcap_ts);
++ "pcap-ts touch", pcap_ts);
+ if (err < 0) {
+ printk(KERN_ERR "pcap_ts: can't grab touch irq %d: %d\n",
+ pcap_ts->irq_touch, err);
@@ -307,7 +310,7 @@ Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c
+ /* enable pressure interrupt */
+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0);
+
-+ input_dev->name = "EZX PCAP2 Touchscreen";
++ input_dev->name = "pcap-touchscreen";
+ input_dev->phys = "ezxts/input0";
+ input_dev->id.bustype = BUS_HOST;
+ input_dev->id.vendor = 0x0001;
@@ -395,13 +398,12 @@ Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c
+MODULE_LICENSE("GPL");
Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-03 19:09:25.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-03 19:15:57.000000000 -0300
-@@ -116,8 +116,32 @@
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-08 14:19:21.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 14:52:47.000000000 -0300
+@@ -174,11 +174,36 @@
.resource = ezxemu_resources,
};
--/* OHCI Controller */
+/* PCAP_TS */
+struct resource pcap_ts_resources[] = {
+ [0] = {
@@ -415,7 +417,7 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+ .flags = IORESOURCE_IRQ,
+ }
+};
-
++
+struct platform_device pcap_ts_device = {
+ .name = "pcap-ts",
+ .id = -1,
@@ -426,23 +428,19 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
+ .resource = pcap_ts_resources,
+};
+
-+
-+/* OHCI Controller */
- static int ezx_ohci_init(struct device *dev)
- {
- /* for A780 support (connected with Neptune) */
-@@ -342,6 +366,7 @@
- &ezxpcap_device,
+ static struct platform_device *devices[] __initdata = {
+ &ezxssp_device,
&ezxbp_device,
+ &ezxpcap_device,
&ezxemu_device,
+ &pcap_ts_device,
};
- static void __init a780_init(void)
+ /* PM */
Index: linux-2.6.21/drivers/input/touchscreen/Makefile
===================================================================
---- linux-2.6.21.orig/drivers/input/touchscreen/Makefile 2007-05-03 18:50:12.000000000 -0300
-+++ linux-2.6.21/drivers/input/touchscreen/Makefile 2007-05-03 18:50:59.000000000 -0300
+--- linux-2.6.21.orig/drivers/input/touchscreen/Makefile 2007-05-08 14:19:21.000000000 -0300
++++ linux-2.6.21/drivers/input/touchscreen/Makefile 2007-05-08 14:22:21.000000000 -0300
@@ -16,3 +16,4 @@
obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o
obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
diff --git a/packages/linux/linux-ezx-2.6.21/pxa-kbd.patch b/packages/linux/linux-ezx-2.6.21/pxa-kbd.patch
index 9bc6be656a..83a3585ba2 100644
--- a/packages/linux/linux-ezx-2.6.21/pxa-kbd.patch
+++ b/packages/linux/linux-ezx-2.6.21/pxa-kbd.patch
@@ -1,7 +1,7 @@
Index: linux-2.6.21/arch/arm/mach-pxa/generic.c
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/generic.c 2007-04-30 19:19:58.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/generic.c 2007-04-30 19:45:20.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/generic.c 2007-05-17 20:04:53.000000000 +0200
++++ linux-2.6.21/arch/arm/mach-pxa/generic.c 2007-05-17 20:06:02.000000000 +0200
@@ -42,6 +42,7 @@
#include <asm/arch/mmc.h>
#include <asm/arch/irda.h>
@@ -51,8 +51,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/generic.c
static int __init pxa_init(void)
Index: linux-2.6.21/drivers/input/keyboard/Kconfig
===================================================================
---- linux-2.6.21.orig/drivers/input/keyboard/Kconfig 2007-04-30 19:15:26.000000000 -0300
-+++ linux-2.6.21/drivers/input/keyboard/Kconfig 2007-04-30 19:43:53.000000000 -0300
+--- linux-2.6.21.orig/drivers/input/keyboard/Kconfig 2007-05-17 20:04:53.000000000 +0200
++++ linux-2.6.21/drivers/input/keyboard/Kconfig 2007-05-17 20:06:02.000000000 +0200
@@ -229,4 +229,11 @@
To compile this driver as a module, choose M here: the
module will be called gpio-keys.
@@ -67,8 +67,8 @@ Index: linux-2.6.21/drivers/input/keyboard/Kconfig
endif
Index: linux-2.6.21/drivers/input/keyboard/Makefile
===================================================================
---- linux-2.6.21.orig/drivers/input/keyboard/Makefile 2007-04-30 19:17:25.000000000 -0300
-+++ linux-2.6.21/drivers/input/keyboard/Makefile 2007-04-30 19:46:54.000000000 -0300
+--- linux-2.6.21.orig/drivers/input/keyboard/Makefile 2007-05-17 20:04:53.000000000 +0200
++++ linux-2.6.21/drivers/input/keyboard/Makefile 2007-05-17 20:06:02.000000000 +0200
@@ -19,4 +19,4 @@
obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o
obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o
@@ -78,7 +78,7 @@ Index: linux-2.6.21/drivers/input/keyboard/Makefile
Index: linux-2.6.21/include/asm-arm/arch-pxa/kbd.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/include/asm-arm/arch-pxa/kbd.h 2007-04-30 19:27:58.000000000 -0300
++++ linux-2.6.21/include/asm-arm/arch-pxa/kbd.h 2007-05-17 20:06:02.000000000 +0200
@@ -0,0 +1,28 @@
+/*
+ * kbd_pxa.h
@@ -111,12 +111,15 @@ Index: linux-2.6.21/include/asm-arm/arch-pxa/kbd.h
Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.21/drivers/input/keyboard/pxakbd.c 2007-04-30 19:48:13.000000000 -0300
-@@ -0,0 +1,332 @@
++++ linux-2.6.21/drivers/input/keyboard/pxakbd.c 2007-05-18 16:59:36.000000000 +0200
+@@ -0,0 +1,385 @@
+/*
+ * Driver for Motorola EZX phone "keyboard"
+ *
+ * (C) 2006 by Harald Welte <laforge@openezx.org>
++ *
++ * May, 2007 - Daniel Ribeiro <drwyrm@gmail.com>
++ * pm callbacks
+ */
+
+#include <linux/kernel.h>
@@ -134,7 +137,7 @@ Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c
+#include <asm/arch/irqs.h>
+#include <asm/arch/pxa-regs.h>
+
-+#if 1
++#if 0
+#define DEBUGP(x, args ...) printk(x, ## args)
+#else
+#define DEBUGP(x, args ...)
@@ -148,6 +151,8 @@ Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c
+
+ struct resource *res;
+ unsigned int irq;
++ u_int32_t kpc;
++ u_int32_t kpkdi;
+
+ struct pxakbd_platform_data *pd;
+};
@@ -320,6 +325,8 @@ Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c
+ int i;
+ int ret = -ENOMEM;
+
++ int rows, cols, n_direct;
++
+ pxakbd = kzalloc(sizeof(*pxakbd), GFP_KERNEL);
+ if (!pxakbd)
+ goto out;
@@ -328,6 +335,7 @@ Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c
+ 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) {
@@ -343,7 +351,11 @@ Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c
+ pxakbd->pd = pdev->dev.platform_data;
+ pxakbd->res = r;
+
-+ input_dev->name = "PXA Keyboard";
++ rows = pxakbd->pd->matrix.rows;
++ cols = pxakbd->pd->matrix.cols;
++ n_direct = pxakbd->pd->direct.num;
++
++ input_dev->name = "pxa-keyboard";
+ input_dev->phys = "pxakbd/input0";
+ input_dev->id.bustype = BUS_HOST;
+ input_dev->id.vendor = 0x0001;
@@ -353,13 +365,28 @@ Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c
+ input_dev->private = pxakbd;
+
+ input_dev->evbit[0] = BIT(EV_KEY)|BIT(EV_REP);
-+ input_dev->keycode = pxakbd->pd->matrix.keycode;
++
+ input_dev->keycodesize = sizeof(unsigned char);
-+ input_dev->keycodemax = pxakbd->pd->matrix.rows
-+ *pxakbd->pd->matrix.cols;
++ input_dev->keycodemax = (rows*cols)+n_direct;
++ input_dev->keycode = kmalloc(input_dev->keycodemax*input_dev->keycodesize,
++ GFP_KERNEL);
++ if (!input_dev->keycode){
++ ret = -ENOMEM;
++ goto out_idev;
++ }
+
-+ for (i = 0; i < input_dev->keycodemax; i++)
++ memcpy(input_dev->keycode, pxakbd->pd->matrix.keycode, rows*cols);
++
++ memcpy(input_dev->keycode+(rows*cols),
++ pxakbd->pd->direct.keycode,
++ n_direct);
++
++ for (i = 0; i < rows*cols; i++)
+ set_bit(pxakbd->pd->matrix.keycode[i], input_dev->keybit);
++
++ for (i = 0; i < n_direct; i++)
++ set_bit(pxakbd->pd->direct.keycode[i], input_dev->keybit);
++
+ clear_bit(0, input_dev->keybit);
+
+ if (request_irq(pxakbd->irq, pxakbd_interrupt, 0, "pxakbd", pxakbd)) {
@@ -403,6 +430,7 @@ Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c
+out_irq:
+ free_irq(pxakbd->irq, pxakbd);
+out_idev:
++ kfree(input_dev->keycode);
+ input_free_device(input_dev);
+out_pxa:
+ kfree(pxakbd);
@@ -413,17 +441,42 @@ Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c
+static int pxakbd_remove(struct platform_device *pdev)
+{
+ struct pxakbd *pxakbd = platform_get_drvdata(pdev);
++
++ kfree(pxakbd->input->keycode);
+ input_unregister_device(pxakbd->input);
+ platform_set_drvdata(pdev, NULL);
+ release_resource(pxakbd->res);
+ free_irq(pxakbd->irq, pxakbd);
+ kfree(pxakbd);
++
+ return 0;
+}
+
++static int pxakbd_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct pxakbd *pxakbd = platform_get_drvdata(pdev);
++
++ pxakbd->kpc = KPC;
++ pxakbd->kpkdi = KPKDI;
++
++ return 0;
++}
++
++static int pxakbd_resume(struct platform_device *pdev)
++{
++ struct pxakbd *pxakbd = platform_get_drvdata(pdev);
++
++ KPC = pxakbd->kpc;
++ KPKDI = pxakbd->kpkdi;
++
++ return 0;
++}
++
+static struct platform_driver pxakbd_driver = {
+ .probe = &pxakbd_probe,
+ .remove = &pxakbd_remove,
++ .suspend = &pxakbd_suspend,
++ .resume = &pxakbd_resume,
+ .driver = {
+ .name = "pxa-keyboard",
+ },
@@ -447,8 +500,8 @@ Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c
+MODULE_LICENSE("GPL");
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-30 19:39:30.000000000 -0300
-+++ linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h 2007-04-30 19:42:34.000000000 -0300
+--- linux-2.6.21.orig/include/asm-arm/arch-pxa/pxa-regs.h 2007-05-17 20:06:01.000000000 +0200
++++ linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h 2007-05-17 20:06:02.000000000 +0200
@@ -2165,6 +2165,11 @@
#define KPMK_MKP (0x1 << 31)
#define KPAS_SO (0x1 << 31)
diff --git a/packages/linux/linux-ezx_2.6.21.bb b/packages/linux/linux-ezx_2.6.21.bb
index 35dc2dff5d..15f5771415 100644
--- a/packages/linux/linux-ezx_2.6.21.bb
+++ b/packages/linux/linux-ezx_2.6.21.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.openezx.org"
LICENSE = "GPL"
DEPENDS += "quilt-native"
EZX = "ezx0"
-PR = "${EZX}-r4"
+PR = "${EZX}-r5"
inherit kernel
@@ -18,16 +18,25 @@ RPSRC = "http://www.rpsys.net/openzaurus/patches/archive"
SRC_URI = " \
${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
file://ezx-core.patch;patch=1 \
+ file://ezx-bp.patch;patch=1 \
file://ezx-pm.patch;patch=1 \
file://ezx-pcap.patch;patch=1 \
- file://ezx-mci.patch;patch=1 \
- file://pxa27x-udc-support.2.patch;patch=1 \
+ file://a780-mci.patch;patch=1 \
+ file://e680-mci.patch;patch=1 \
+ file://pxa27x-udc-support.2.patch;patch=1 \
file://ezx-emu.patch;patch=1 \
file://ezx-mtd-map.patch;patch=1 \
file://ezx-serial-bug-workaround.patch;patch=1 \
file://pxa-kbd.patch;patch=1 \
- file://ezx-kbd.patch;patch=1 \
+ file://a780-kbd.patch;patch=1 \
+ file://e680-kbd.patch;patch=1 \
file://pcap-ts.patch;patch=1 \
+ file://ezx-backlight.patch;patch=1 \
+ file://a780-flip.patch;patch=1 \
+ file://e680-locksw.patch;patch=1 \
+ file://a780-leds.patch;patch=1 \
+ file://e680-leds.patch;patch=1 \
+ file://a780-vibrator.patch;patch=1 \
file://mux_cli.patch;patch=1 \
file://mux-fix.patch;patch=1 \
file://mux-fix-init-errorpath.patch;patch=1 \
@@ -37,8 +46,6 @@ SRC_URI = " \
file://mux-fix-makefile.patch;patch=1 \
file://mux-fix-tty-driver.patch;patch=1 \
file://mux-linux-2.6.21-fix.patch;patch=1 \
- file://mux-ifdef-ezx-features.patch;patch=1 \
- file://mux_debug.patch;patch=1 \
file://logo_linux_clut224.ppm \
file://defconfig-a780 \
file://defconfig-e680 \