summaryrefslogtreecommitdiff
path: root/packages/linux
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2006-06-05 16:53:15 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-06-05 16:53:15 +0000
commitffa79e271b7c5526d37329bb9b547d3bfab62bf0 (patch)
tree418ce9de57af14030f0f7396ea34e75c2ae76fb7 /packages/linux
parentaeba6e600acc9f4187b395e2fcbcbc77387947d3 (diff)
linux-ezx: add LED drivers for A780 and E680
Diffstat (limited to 'packages/linux')
-rw-r--r--packages/linux/linux-ezx/a780-leds-r0.patch185
-rw-r--r--packages/linux/linux-ezx/defconfig-a78039
-rw-r--r--packages/linux/linux-ezx/defconfig-e68036
-rw-r--r--packages/linux/linux-ezx/e680-leds-r0.patch336
-rw-r--r--packages/linux/linux-ezx/led_ezx-r0.patch174
-rw-r--r--packages/linux/linux-ezx_2.6.16.13.bb12
6 files changed, 577 insertions, 205 deletions
diff --git a/packages/linux/linux-ezx/a780-leds-r0.patch b/packages/linux/linux-ezx/a780-leds-r0.patch
new file mode 100644
index 0000000000..31fdfc635b
--- /dev/null
+++ b/packages/linux/linux-ezx/a780-leds-r0.patch
@@ -0,0 +1,185 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- linux-2.6.16/drivers/leds/Kconfig~a780-leds-r0.patch 2006-06-05 18:05:32.000000000 +0200
++++ linux-2.6.16/drivers/leds/Kconfig 2006-06-05 18:05:32.000000000 +0200
+@@ -66,6 +66,13 @@
+ This options enables support for the LEDs on the
+ Motorola E680(i) GSM Phone.
+
++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 LEDS_TRIGGERS
+--- linux-2.6.16/drivers/leds/Makefile~a780-leds-r0.patch 2006-06-05 18:05:32.000000000 +0200
++++ linux-2.6.16/drivers/leds/Makefile 2006-06-05 18:05:32.000000000 +0200
+@@ -11,6 +11,7 @@
+ obj-$(CONFIG_LEDS_IXP4XX) += leds-ixp4xx-gpio.o
+ obj-$(CONFIG_LEDS_TOSA) += leds-tosa.o
+ obj-$(CONFIG_LEDS_E680) += leds-e680.o
++obj-$(CONFIG_LEDS_A780) += leds-a780.o
+
+ # LED Triggers
+ obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
+--- linux-2.6.16/arch/arm/mach-pxa/ezx.c~a780-leds-r0.patch 2006-06-05 18:05:32.000000000 +0200
++++ linux-2.6.16/arch/arm/mach-pxa/ezx.c 2006-06-05 18:05:32.000000000 +0200
+@@ -367,6 +367,15 @@
+ };
+ #endif
+
++#ifdef CONFIG_PXA_EZX_A780
++/*
++ * A780 LEDs
++ */
++static struct platform_device a780led_device = {
++ .name = "a780-led",
++ .id = -1,
++};
++#endif
+
+ /* keyboard */
+
+@@ -780,6 +789,9 @@
+ #ifdef CONFIG_PXA_EZX_E680
+ &e680led_device,
+ #endif
++#ifdef CONFIG_PXA_EZX_A780
++ &a780led_device,
++#endif
+ };
+
+ static void __init
+--- /dev/null 2006-06-05 13:59:28.329930680 +0200
++++ linux-2.6.16/drivers/leds/leds-a780.c 2006-06-05 18:27:13.000000000 +0200
+@@ -0,0 +1,123 @@
++/*
++ * 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/config.h>
++#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");
diff --git a/packages/linux/linux-ezx/defconfig-a780 b/packages/linux/linux-ezx/defconfig-a780
index bc94f511c9..e1aa2db375 100644
--- a/packages/linux/linux-ezx/defconfig-a780
+++ b/packages/linux/linux-ezx/defconfig-a780
@@ -14,6 +14,7 @@ CONFIG_ARCH_MTD_XIP=y
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
#
@@ -152,8 +153,8 @@ CONFIG_XSCALE_PMU=y
#
# Kernel Features
#
-CONFIG_PREEMPT=y
-CONFIG_NO_IDLE_HZ=y
+# CONFIG_PREEMPT is not set
+# CONFIG_NO_IDLE_HZ is not set
# CONFIG_AEABI is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
CONFIG_SELECT_MEMORY_MODEL=y
@@ -220,7 +221,10 @@ CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
-# CONFIG_IP_PNP is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# 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
@@ -847,6 +851,16 @@ CONFIG_SPI_BITBANG=m
#
#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_TRIGGERS=y
+# CONFIG_LEDS_E680 is not set
+CONFIG_LEDS_A780=m
+CONFIG_LEDS_TRIGGER_TIMER=y
+
+#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
@@ -1120,7 +1134,7 @@ CONFIG_CONFIGFS_FS=m
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
# CONFIG_JFFS2_FS is not set
-CONFIG_CRAMFS=y
+CONFIG_CRAMFS=m
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
@@ -1130,7 +1144,7 @@ CONFIG_CRAMFS=y
#
# Network File Systems
#
-CONFIG_NFS_FS=m
+CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
CONFIG_NFS_V4=y
@@ -1140,13 +1154,14 @@ CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
@@ -1250,13 +1265,13 @@ CONFIG_CRYPTO=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_NULL=m
CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_SERPENT=m
@@ -1283,7 +1298,7 @@ CONFIG_CRC_CCITT=m
CONFIG_CRC16=m
CONFIG_CRC32=y
CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_INFLATE=m
CONFIG_ZLIB_DEFLATE=m
CONFIG_REED_SOLOMON=m
CONFIG_REED_SOLOMON_DEC16=y
diff --git a/packages/linux/linux-ezx/defconfig-e680 b/packages/linux/linux-ezx/defconfig-e680
index 9f57ea29f8..4ecdfc9220 100644
--- a/packages/linux/linux-ezx/defconfig-e680
+++ b/packages/linux/linux-ezx/defconfig-e680
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.16.13
-# Fri Jun 2 15:01:31 2006
+# Thu May 18 19:40:25 2006
#
CONFIG_ARM=y
CONFIG_MMU=y
@@ -153,8 +153,8 @@ CONFIG_XSCALE_PMU=y
#
# Kernel Features
#
-CONFIG_PREEMPT=y
-CONFIG_NO_IDLE_HZ=y
+# CONFIG_PREEMPT is not set
+# CONFIG_NO_IDLE_HZ is not set
# CONFIG_AEABI is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
CONFIG_SELECT_MEMORY_MODEL=y
@@ -172,7 +172,7 @@ CONFIG_ALIGNMENT_TRAP=y
#
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="console=ttyS2,115200n8 console=tty1 noinitrd root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=5 ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off debug"
+CONFIG_CMDLINE="mem=32M root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=1 ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off console=ttyS2,115200n8 console=tty0"
# CONFIG_XIP_KERNEL is not set
#
@@ -221,7 +221,10 @@ CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
-# CONFIG_IP_PNP is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# 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
@@ -853,7 +856,8 @@ CONFIG_SPI_BITBANG=m
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_EZX=m
+CONFIG_LEDS_E680=m
+# CONFIG_LEDS_A780 is not set
CONFIG_LEDS_TRIGGER_TIMER=y
#
@@ -1130,7 +1134,7 @@ CONFIG_CONFIGFS_FS=m
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
# CONFIG_JFFS2_FS is not set
-CONFIG_CRAMFS=y
+CONFIG_CRAMFS=m
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
@@ -1140,7 +1144,7 @@ CONFIG_CRAMFS=y
#
# Network File Systems
#
-CONFIG_NFS_FS=m
+CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
CONFIG_NFS_V4=y
@@ -1150,13 +1154,14 @@ CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
@@ -1230,7 +1235,6 @@ CONFIG_LOG_BUF_SHIFT=14
# CONFIG_DETECT_SOFTLOCKUP is not set
# CONFIG_SCHEDSTATS is not set
# CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_PREEMPT=y
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
@@ -1261,13 +1265,13 @@ CONFIG_CRYPTO=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_NULL=m
CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_SERPENT=m
@@ -1294,7 +1298,7 @@ CONFIG_CRC_CCITT=m
CONFIG_CRC16=m
CONFIG_CRC32=y
CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_INFLATE=m
CONFIG_ZLIB_DEFLATE=m
CONFIG_REED_SOLOMON=m
CONFIG_REED_SOLOMON_DEC16=y
diff --git a/packages/linux/linux-ezx/e680-leds-r0.patch b/packages/linux/linux-ezx/e680-leds-r0.patch
new file mode 100644
index 0000000000..b6d2413dc1
--- /dev/null
+++ b/packages/linux/linux-ezx/e680-leds-r0.patch
@@ -0,0 +1,336 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- linux-2.6.16/arch/arm/mach-pxa/ezx.c~led_ezx-r0.patch 2006-06-03 15:17:43.000000000 +0200
++++ linux-2.6.16/arch/arm/mach-pxa/ezx.c 2006-06-05 15:14:59.000000000 +0200
+@@ -357,6 +357,17 @@
+ .num_resources = ARRAY_SIZE(ezx_backlight_resources),
+ };
+
++#ifdef CONFIG_PXA_EZX_E680
++/*
++ * E680 LEDs
++ */
++static struct platform_device e680led_device = {
++ .name = "e680-led",
++ .id = -1,
++};
++#endif
++
++
+ /* keyboard */
+
+ #if defined(CONFIG_PXA_EZX_V700)
+@@ -770,6 +781,9 @@
+
+ static struct platform_device *devices[] __initdata = {
+ &ezx_bp_device,
++#ifdef CONFIG_PXA_EZX_E680
++ &e680led_device,
++#endif
+ };
+
+ static void __init
+--- linux-2.6.16/drivers/leds/Kconfig~led_ezx-r0.patch 2006-06-03 15:17:47.000000000 +0200
++++ linux-2.6.16/drivers/leds/Kconfig 2006-06-03 15:17:47.000000000 +0200
+@@ -59,6 +59,13 @@
+ This option enables support for the LEDs on Sharp Zaurus
+ SL-6000 series.
+
++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 LEDS_TRIGGERS
+--- linux-2.6.16/drivers/leds/Makefile~led_ezx-r0.patch 2006-06-03 15:17:47.000000000 +0200
++++ linux-2.6.16/drivers/leds/Makefile 2006-06-03 15:17:47.000000000 +0200
+@@ -10,7 +10,8 @@
+ obj-$(CONFIG_LEDS_SPITZ) += leds-spitz.o
+ obj-$(CONFIG_LEDS_IXP4XX) += leds-ixp4xx-gpio.o
+ obj-$(CONFIG_LEDS_TOSA) += leds-tosa.o
++obj-$(CONFIG_LEDS_E680) += leds-e680.o
+
+ # LED Triggers
+ obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
+-obj-$(CONFIG_LEDS_TRIGGER_IDE_DISK) += ledtrig-ide-disk.o
+\ Kein Zeilenumbruch am Dateiende.
++obj-$(CONFIG_LEDS_TRIGGER_IDE_DISK) += ledtrig-ide-disk.o
+--- /dev/null 2006-06-05 13:59:28.329930680 +0200
++++ linux-2.6.16/drivers/leds/leds-e680.c 2006-06-05 15:11:42.000000000 +0200
+@@ -0,0 +1,269 @@
++/*
++ * 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/config.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>
++//FIXME this belongs to somewhere else, please
++// adjust when ssp_pcap.h reached its final destination
++#include "../misc/ezx/ssp_pcap.h"
++
++//FIXME move defines to 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
++
++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 )
++{
++ printk( KERN_DEBUG "e680led_led_set: red=%d, green=%d, blue=%d", red, green, 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;
++
++ 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*/
++ set_GPIO(IND_CNTL_R_BUL); /*IND_CNTL_R_BUL Low active*/
++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) | GPIO_bit(IND_CNTL_R_BUL);
++
++ clr_GPIO(IND_CNTL_G_BUL); /*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*/
++ clr_GPIO(IND_CNTL_R_BUL);
++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) & (~GPIO_bit(IND_CNTL_R_BUL));
++
++ clr_GPIO(IND_CNTL_G_BUL);
++ 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*/
++ set_GPIO(IND_CNTL_R_BUL);
++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) | GPIO_bit(IND_CNTL_R_BUL);
++
++ set_GPIO(IND_CNTL_G_BUL);
++ 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*/
++ clr_GPIO(IND_CNTL_R_BUL);
++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) & (~GPIO_bit(IND_CNTL_R_BUL));
++
++ set_GPIO(IND_CNTL_G_BUL);
++ 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 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,
++};
++
++#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);
++ 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);
++ 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);
++ }
++ 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);
++ 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");
diff --git a/packages/linux/linux-ezx/led_ezx-r0.patch b/packages/linux/linux-ezx/led_ezx-r0.patch
deleted file mode 100644
index 6fc2031d86..0000000000
--- a/packages/linux/linux-ezx/led_ezx-r0.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
---- linux-2.6.16/arch/arm/mach-pxa/ezx.c~led_ezx-r0.patch
-+++ linux-2.6.16/arch/arm/mach-pxa/ezx.c
-@@ -357,6 +357,15 @@
- .num_resources = ARRAY_SIZE(ezx_backlight_resources),
- };
-
-+/*
-+ * EZX LEDs
-+ */
-+static struct platform_device ezxled_device = {
-+ .name = "ezx-led",
-+ .id = -1,
-+};
-+
-+
- /* keyboard */
-
- #if defined(CONFIG_PXA_EZX_V700)
-@@ -770,6 +779,7 @@
-
- static struct platform_device *devices[] __initdata = {
- &ezx_bp_device,
-+ &ezxled_device,
- };
-
- static void __init
---- linux-2.6.16/drivers/leds/Kconfig~led_ezx-r0.patch
-+++ linux-2.6.16/drivers/leds/Kconfig
-@@ -59,6 +59,13 @@
- This option enables support for the LEDs on Sharp Zaurus
- SL-6000 series.
-
-+config LEDS_EZX
-+ tristate "LED Support for the Motorola EZX Platform"
-+ depends LEDS_CLASS && PXA_EZX && PXA_EZX_E680
-+ help
-+ This options enables support for the LEDs on Motorola EZX
-+ A780 and E680(i) GSM Phones.
-+
- config LEDS_TRIGGER_TIMER
- tristate "LED Timer Trigger"
- depends LEDS_TRIGGERS
---- linux-2.6.16/drivers/leds/Makefile~led_ezx-r0.patch
-+++ linux-2.6.16/drivers/leds/Makefile
-@@ -10,7 +10,8 @@
- obj-$(CONFIG_LEDS_SPITZ) += leds-spitz.o
- obj-$(CONFIG_LEDS_IXP4XX) += leds-ixp4xx-gpio.o
- obj-$(CONFIG_LEDS_TOSA) += leds-tosa.o
-+obj-$(CONFIG_LEDS_EZX) += leds-ezx.o
-
- # LED Triggers
- obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
--obj-$(CONFIG_LEDS_TRIGGER_IDE_DISK) += ledtrig-ide-disk.o
-\ Kein Zeilenumbruch am Dateiende.
-+obj-$(CONFIG_LEDS_TRIGGER_IDE_DISK) += ledtrig-ide-disk.o
---- /dev/null
-+++ linux-2.6.16/drivers/leds/leds-ezx.c
-@@ -0,0 +1,111 @@
-+/*
-+ * EZX Platform LED Driver
-+ *
-+ * 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/config.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 "../misc/ezx/ssp_pcap.h"
-+
-+static void ezxled_red_set(struct led_classdev *led_cdev, enum led_brightness value)
-+{
-+ printk( KERN_DEBUG "exzled_red_set: %d", value );
-+}
-+
-+static void ezxled_green_set(struct led_classdev *led_cdev, enum led_brightness value)
-+{
-+ printk( KERN_DEBUG "exzled_green_set: %d", value );
-+}
-+
-+static struct led_classdev ezx_red_led = {
-+ .name = "ezx:red",
-+ .default_trigger = "timer",
-+ .brightness_set = ezxled_red_set,
-+};
-+
-+static struct led_classdev ezx_green_led = {
-+ .name = "ezx:green",
-+ .default_trigger = "timer",
-+ .brightness_set = ezxled_green_set,
-+};
-+
-+#ifdef CONFIG_PM
-+static int ezxled_suspend(struct platform_device *dev, pm_message_t state)
-+{
-+ led_classdev_suspend(&ezx_red_led);
-+ led_classdev_suspend(&ezx_green_led);
-+ return 0;
-+}
-+
-+static int ezxled_resume(struct platform_device *dev)
-+{
-+ led_classdev_resume(&ezx_red_led);
-+ led_classdev_resume(&ezx_green_led);
-+ return 0;
-+}
-+#endif
-+
-+static int ezxled_probe(struct platform_device *pdev)
-+{
-+ int ret;
-+
-+ ret = led_classdev_register(&pdev->dev, &ezx_red_led);
-+ if (ret < 0)
-+ return ret;
-+
-+ ret = led_classdev_register(&pdev->dev, &ezx_green_led);
-+ if (ret < 0)
-+ led_classdev_unregister(&ezx_red_led);
-+
-+ return ret;
-+}
-+
-+static int ezxled_remove(struct platform_device *pdev)
-+{
-+ led_classdev_unregister(&ezx_red_led);
-+ led_classdev_unregister(&ezx_green_led);
-+ return 0;
-+}
-+
-+static struct platform_driver ezxled_driver = {
-+ .probe = ezxled_probe,
-+ .remove = ezxled_remove,
-+#ifdef CONFIG_PM
-+ .suspend = ezxled_suspend,
-+ .resume = ezxled_resume,
-+#endif
-+ .driver = {
-+ .name = "ezx-led",
-+ },
-+};
-+
-+static int __init ezxled_init(void)
-+{
-+ return platform_driver_register(&ezxled_driver);
-+}
-+
-+static void __exit ezxled_exit(void)
-+{
-+ platform_driver_unregister(&ezxled_driver);
-+}
-+
-+module_init(ezxled_init);
-+module_exit(ezxled_exit);
-+
-+MODULE_AUTHOR("Michael Lauer <mickey@Vanille.de>");
-+MODULE_DESCRIPTION("EZX LED driver");
-+MODULE_LICENSE("GPL");
diff --git a/packages/linux/linux-ezx_2.6.16.13.bb b/packages/linux/linux-ezx_2.6.16.13.bb
index eb92b221a1..e1ff1687e9 100644
--- a/packages/linux/linux-ezx_2.6.16.13.bb
+++ b/packages/linux/linux-ezx_2.6.16.13.bb
@@ -30,11 +30,14 @@ SRC_URI = "http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.tar.bz2 \
${RPSRC}/led_ide-r6.patch;patch=1 \
${RPSRC}/led_nand-r3.patch;patch=1 \
\
- file://led_ezx-r0.patch;patch=1 \
file://touchscreen-fix-r0.patch;patch=1 \
\
file://e680-keypad-compile-HACK.patch;patch=1 \
file://e680-disable-boomer-HACK.patch;patch=1 \
+ \
+ file://e680-leds-r0.patch;patch=1 \
+ file://a780-leds-r0.patch;patch=1 \
+ \
file://defconfig-a780 \
file://defconfig-e680"
S = "${WORKDIR}/linux-2.6.16"
@@ -50,10 +53,13 @@ COMPATIBLE_MACHINE = '(a780|e680)'
CMDLINE_CON = "console=ttyS2,115200n8 console=tty1 noinitrd"
CMDLINE_ROOT = "root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=5"
-# CMDLINE_OTHER = "dyntick=enable"
+# uncomment if you want to boot over NFS
+#CMDLINE_ROOT = "root=/dev/nfs nfsroot=192.168.1.10:/export/opie-image rootdelay=5 3"
+# uncomment to enable dyntick
+#CMDLINE_OTHER = "dyntick=enable"
CMDLINE_DEBUG = '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug",d)}'
CMDLINE_IP = "ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off"
-CMDLINE = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDLINE_OTHER} ${CMDLINE_DEBUG}"
+CMDLINE = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDLINE_OTHER} ${CMDLINE_DEBUG} mem=32M"
###############################################################
# module configs specific to this kernel