diff options
15 files changed, 0 insertions, 1318 deletions
diff --git a/packages/linux/linux-2.6.22+2.6.23-rc5/.mtn2git_empty b/packages/linux/linux-2.6.22+2.6.23-rc5/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/linux/linux-2.6.22+2.6.23-rc5/.mtn2git_empty +++ /dev/null diff --git a/packages/linux/linux-2.6.22.6/ts72xx/.mtn2git_empty b/packages/linux/linux-2.6.22.6/ts72xx/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/.mtn2git_empty +++ /dev/null diff --git a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-gpio-interrupt-debounce.diff b/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-gpio-interrupt-debounce.diff deleted file mode 100644 index 27146c30f1..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-gpio-interrupt-debounce.diff +++ /dev/null @@ -1,87 +0,0 @@ - -Implement GPIO interrupt debouncing on ep93xx. - -Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> - -Index: linux-2.6.22/arch/arm/mach-ep93xx/core.c -=================================================================== ---- linux-2.6.22.orig/arch/arm/mach-ep93xx/core.c -+++ linux-2.6.22/arch/arm/mach-ep93xx/core.c -@@ -154,6 +154,7 @@ struct sys_timer ep93xx_timer = { - *************************************************************************/ - static unsigned char gpio_int_unmasked[3]; - static unsigned char gpio_int_enabled[3]; -+static unsigned char gpio_int_debounce[3]; - static unsigned char gpio_int_type1[3]; - static unsigned char gpio_int_type2[3]; - -@@ -161,16 +162,19 @@ static void update_gpio_int_params(int a - { - if (abf == 0) { - __raw_writeb(0, EP93XX_GPIO_A_INT_ENABLE); -+ __raw_writeb(gpio_int_debounce[0], EP93XX_GPIO_A_INT_DEBOUNCE); - __raw_writeb(gpio_int_type2[0], EP93XX_GPIO_A_INT_TYPE2); - __raw_writeb(gpio_int_type1[0], EP93XX_GPIO_A_INT_TYPE1); - __raw_writeb(gpio_int_unmasked[0] & gpio_int_enabled[0], EP93XX_GPIO_A_INT_ENABLE); - } else if (abf == 1) { - __raw_writeb(0, EP93XX_GPIO_B_INT_ENABLE); -+ __raw_writeb(gpio_int_debounce[1], EP93XX_GPIO_B_INT_DEBOUNCE); - __raw_writeb(gpio_int_type2[1], EP93XX_GPIO_B_INT_TYPE2); - __raw_writeb(gpio_int_type1[1], EP93XX_GPIO_B_INT_TYPE1); - __raw_writeb(gpio_int_unmasked[1] & gpio_int_enabled[1], EP93XX_GPIO_B_INT_ENABLE); - } else if (abf == 2) { - __raw_writeb(0, EP93XX_GPIO_F_INT_ENABLE); -+ __raw_writeb(gpio_int_debounce[2], EP93XX_GPIO_F_INT_DEBOUNCE); - __raw_writeb(gpio_int_type2[2], EP93XX_GPIO_F_INT_TYPE2); - __raw_writeb(gpio_int_type1[2], EP93XX_GPIO_F_INT_TYPE1); - __raw_writeb(gpio_int_unmasked[2] & gpio_int_enabled[2], EP93XX_GPIO_F_INT_ENABLE); -@@ -361,6 +365,13 @@ static int ep93xx_gpio_irq_type(unsigned - } else { - gpio_int_enabled[port] &= ~(1 << line); - } -+ -+ if (type & IRQ_TYPE_DEBOUNCE) { -+ gpio_int_debounce[port] |= 1 << line; -+ } else { -+ gpio_int_debounce[port] &= ~(1 << line); -+ } -+ - update_gpio_int_params(port); - - return 0; -Index: linux-2.6.22/include/asm-arm/arch-ep93xx/ep93xx-regs.h -=================================================================== ---- linux-2.6.22.orig/include/asm-arm/arch-ep93xx/ep93xx-regs.h -+++ linux-2.6.22/include/asm-arm/arch-ep93xx/ep93xx-regs.h -@@ -78,16 +78,19 @@ - #define EP93XX_GPIO_F_INT_ACK EP93XX_GPIO_REG(0x54) - #define EP93XX_GPIO_F_INT_ENABLE EP93XX_GPIO_REG(0x58) - #define EP93XX_GPIO_F_INT_STATUS EP93XX_GPIO_REG(0x5c) -+#define EP93XX_GPIO_F_INT_DEBOUNCE EP93XX_GPIO_REG(0x64) - #define EP93XX_GPIO_A_INT_TYPE1 EP93XX_GPIO_REG(0x90) - #define EP93XX_GPIO_A_INT_TYPE2 EP93XX_GPIO_REG(0x94) - #define EP93XX_GPIO_A_INT_ACK EP93XX_GPIO_REG(0x98) - #define EP93XX_GPIO_A_INT_ENABLE EP93XX_GPIO_REG(0x9c) - #define EP93XX_GPIO_A_INT_STATUS EP93XX_GPIO_REG(0xa0) -+#define EP93XX_GPIO_A_INT_DEBOUNCE EP93XX_GPIO_REG(0xa8) - #define EP93XX_GPIO_B_INT_TYPE1 EP93XX_GPIO_REG(0xac) - #define EP93XX_GPIO_B_INT_TYPE2 EP93XX_GPIO_REG(0xb0) - #define EP93XX_GPIO_B_INT_ACK EP93XX_GPIO_REG(0xb4) - #define EP93XX_GPIO_B_INT_ENABLE EP93XX_GPIO_REG(0xb8) - #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) -+#define EP93XX_GPIO_B_INT_DEBOUNCE EP93XX_GPIO_REG(0xc4) - - #define EP93XX_AAC_BASE (EP93XX_APB_VIRT_BASE + 0x00080000) - -Index: linux-2.6.22/include/linux/irq.h -=================================================================== ---- linux-2.6.22.orig/include/linux/irq.h -+++ linux-2.6.22/include/linux/irq.h -@@ -44,6 +44,7 @@ typedef void fastcall (*irq_flow_handler - #define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */ - #define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */ - #define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */ -+#define IRQ_TYPE_DEBOUNCE 0x00000020 /* Enable HW debounce */ - - /* Internal flags */ - #define IRQ_INPROGRESS 0x00000100 /* IRQ handler active - do not enter! */ diff --git a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-i2c-bus.diff b/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-i2c-bus.diff deleted file mode 100644 index d3c66940de..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-i2c-bus.diff +++ /dev/null @@ -1,220 +0,0 @@ - -I2C bus driver using ep93xx GPIOs. - -Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> - -Index: linux-2.6.22/drivers/i2c/busses/Kconfig -=================================================================== ---- linux-2.6.22.orig/drivers/i2c/busses/Kconfig 2007-08-30 00:42:45.000000000 +0200 -+++ linux-2.6.22/drivers/i2c/busses/Kconfig 2007-08-30 00:42:52.000000000 +0200 -@@ -635,4 +635,16 @@ - This driver can also be built as a module. If so, the module - will be called i2c-pnx. - -+config I2C_EP93XX -+ tristate "Cirrus Logic EP93XX GPIO-based I2C interface" -+ depends on I2C && ARCH_EP93XX -+ select I2C_ALGOBIT -+ help -+ Say Y here if you have an Cirrus Logic EP93XX based -+ system and are using GPIO lines for an I2C bus. -+ -+ This support is also available as a module. If so, the module -+ will be called i2c-ep93xx. -+ -+ - endmenu -Index: linux-2.6.22/drivers/i2c/busses/Makefile -=================================================================== ---- linux-2.6.22.orig/drivers/i2c/busses/Makefile 2007-08-30 00:42:45.000000000 +0200 -+++ linux-2.6.22/drivers/i2c/busses/Makefile 2007-08-30 00:42:52.000000000 +0200 -@@ -52,6 +52,7 @@ - obj-$(CONFIG_I2C_VOODOO3) += i2c-voodoo3.o - obj-$(CONFIG_SCx200_ACB) += scx200_acb.o - obj-$(CONFIG_SCx200_I2C) += scx200_i2c.o -+obj-$(CONFIG_I2C_EP93XX) += i2c-ep93xx.o - - ifeq ($(CONFIG_I2C_DEBUG_BUS),y) - EXTRA_CFLAGS += -DDEBUG -Index: linux-2.6.22/drivers/i2c/busses/i2c-ep93xx.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.22/drivers/i2c/busses/i2c-ep93xx.c 2007-08-30 00:42:52.000000000 +0200 -@@ -0,0 +1,159 @@ -+/* -+ * EP93XX I2C bus driver. -+ * Copyright (C) 2007 Lennert Buytenhek <buytenh@wantstofly.org> -+ * -+ * An I2C bus driver for the Cirrus Logic EP93xx SoC. -+ * -+ * Based on an earlier version by Alessandro Zummo. -+ */ -+ -+#include <linux/kernel.h> -+#include <linux/platform_device.h> -+#include <linux/module.h> -+#include <linux/i2c.h> -+#include <linux/i2c-algo-bit.h> -+#include <asm/hardware.h> -+#include <asm/arch/gpio.h> -+ -+struct ep93xx_i2c_priv { -+ struct ep93xx_i2c_data *data; -+ struct i2c_adapter adapter; -+ struct i2c_algo_bit_data algo_data; -+ int sda; -+ int scl; -+}; -+ -+ -+static void ep93xx_bit_setsda(void *cookie, int val) -+{ -+ struct ep93xx_i2c_priv *priv = cookie; -+ -+ if (val) { -+ gpio_line_config(priv->data->sda_pin, GPIO_IN); -+ if (priv->scl && !priv->sda && priv->data->stop != NULL) -+ priv->data->stop(priv->data->cookie); -+ priv->sda = 1; -+ } else { -+ if (priv->scl && priv->sda && priv->data->start != NULL) -+ priv->data->start(priv->data->cookie); -+ gpio_line_config(priv->data->sda_pin, GPIO_OUT); -+ gpio_line_set(priv->data->sda_pin, 0); -+ priv->sda = 0; -+ } -+} -+ -+static void ep93xx_bit_setscl(void *cookie, int val) -+{ -+ struct ep93xx_i2c_priv *priv = cookie; -+ -+ if (val) { -+ gpio_line_config(priv->data->scl_pin, GPIO_IN); -+ priv->scl = 1; -+ } else { -+ gpio_line_config(priv->data->scl_pin, GPIO_OUT); -+ gpio_line_set(priv->data->scl_pin, 0); -+ priv->scl = 0; -+ } -+} -+ -+static int ep93xx_bit_getsda(void *cookie) -+{ -+ struct ep93xx_i2c_priv *priv = cookie; -+ -+ if (priv->sda == 0) -+ BUG(); -+ -+ return gpio_line_get(priv->data->sda_pin); -+} -+ -+static int ep93xx_bit_getscl(void *cookie) -+{ -+ struct ep93xx_i2c_priv *priv = cookie; -+ -+ if (priv->scl == 0) -+ BUG(); -+ -+ return gpio_line_get(priv->data->scl_pin); -+} -+ -+ -+static int ep93xx_i2c_probe(struct platform_device *pdev) -+{ -+ struct ep93xx_i2c_priv *priv; -+ int err; -+ -+ priv = kzalloc(sizeof(struct ep93xx_i2c_priv), GFP_KERNEL); -+ if (priv == NULL) -+ return -ENOMEM; -+ -+ priv->data = pdev->dev.platform_data; -+ -+ strlcpy(priv->adapter.name, pdev->dev.driver->name, I2C_NAME_SIZE); -+ priv->adapter.algo_data = &priv->algo_data; -+ priv->adapter.class = I2C_CLASS_ALL; -+ priv->adapter.dev.parent = &pdev->dev; -+ -+ priv->algo_data.data = priv; -+ priv->algo_data.setsda = ep93xx_bit_setsda; -+ priv->algo_data.setscl = ep93xx_bit_setscl; -+ priv->algo_data.getsda = ep93xx_bit_getsda; -+ priv->algo_data.getscl = ep93xx_bit_getscl; -+ priv->algo_data.udelay = 10; -+ priv->algo_data.timeout = 100; -+ -+ priv->sda = 1; -+ gpio_line_config(priv->data->sda_pin, GPIO_IN); -+ -+ priv->scl = 1; -+ gpio_line_config(priv->data->scl_pin, GPIO_IN); -+ -+ err = i2c_bit_add_bus(&priv->adapter); -+ if (err) { -+ printk(KERN_ERR "ERROR: Could not install %s\n", -+ pdev->dev.bus_id); -+ kfree(priv); -+ return err; -+ } -+ -+ platform_set_drvdata(pdev, priv); -+ -+ return 0; -+} -+ -+static int ep93xx_i2c_remove(struct platform_device *pdev) -+{ -+ struct ep93xx_i2c_priv *priv; -+ -+ priv = platform_get_drvdata(pdev); -+ i2c_del_adapter(&priv->adapter); -+ platform_set_drvdata(pdev, NULL); -+ kfree(priv); -+ -+ return 0; -+} -+ -+static struct platform_driver ep93xx_i2c_driver = { -+ .probe = ep93xx_i2c_probe, -+ .remove = ep93xx_i2c_remove, -+ .driver = { -+ .name = "ep93xx-i2c", -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+static int __init ep93xx_i2c_init(void) -+{ -+ return platform_driver_register(&ep93xx_i2c_driver); -+} -+ -+static void __exit ep93xx_i2c_exit(void) -+{ -+ platform_driver_unregister(&ep93xx_i2c_driver); -+} -+ -+module_init(ep93xx_i2c_init); -+module_exit(ep93xx_i2c_exit); -+ -+MODULE_AUTHOR("Lennert Buytenhek <buytenh@wantstofly.org>"); -+MODULE_DESCRIPTION("GPIO-based I2C adapter for EP93XX systems"); -+MODULE_LICENSE("GPL"); -Index: linux-2.6.22/include/asm-arm/arch-ep93xx/platform.h -=================================================================== ---- linux-2.6.22.orig/include/asm-arm/arch-ep93xx/platform.h 2007-08-30 00:42:45.000000000 +0200 -+++ linux-2.6.22/include/asm-arm/arch-ep93xx/platform.h 2007-08-30 00:42:52.000000000 +0200 -@@ -16,5 +16,13 @@ - unsigned char phy_id; - }; - -+struct ep93xx_i2c_data { -+ int sda_pin; -+ int scl_pin; -+ void *cookie; -+ void (*start)(void *); -+ void (*stop)(void *); -+}; -+ - - #endif diff --git a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-i2c.diff b/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-i2c.diff deleted file mode 100644 index b68fb14e2e..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-i2c.diff +++ /dev/null @@ -1,110 +0,0 @@ - -Instantiate the ep93xx gpio i2c bus driver in the generic ep93xx -code. - -Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> - -Index: linux-2.6.22/arch/arm/mach-ep93xx/core.c -=================================================================== ---- linux-2.6.22.orig/arch/arm/mach-ep93xx/core.c 2007-08-30 00:42:49.000000000 +0200 -+++ linux-2.6.22/arch/arm/mach-ep93xx/core.c 2007-08-30 00:43:00.000000000 +0200 -@@ -509,6 +509,52 @@ - }; - - -+static DEFINE_MUTEX(eeclk_eedat_mutex); -+static int i2c_transaction_in_progress; -+ -+static void ep93xx_i2c_start_condition(void *cookie) -+{ -+ if (!i2c_transaction_in_progress) { -+ mutex_lock(&eeclk_eedat_mutex); -+ i2c_transaction_in_progress = 1; -+ } -+} -+ -+static void ep93xx_i2c_stop_condition(void *cookie) -+{ -+ if (i2c_transaction_in_progress) { -+ mutex_unlock(&eeclk_eedat_mutex); -+ i2c_transaction_in_progress = 0; -+ } else { -+ printk(KERN_WARNING "ep93xx: i2c stop without start??\n"); -+ } -+} -+ -+static struct ep93xx_i2c_data ep93xx_i2c_gpio_data = { -+ .sda_pin = EP93XX_GPIO_LINE_EEDAT, -+ .scl_pin = EP93XX_GPIO_LINE_EECLK, -+ .start = ep93xx_i2c_start_condition, -+ .stop = ep93xx_i2c_stop_condition, -+}; -+ -+static struct platform_device ep93xx_i2c_device = { -+ .name = "ep93xx-i2c", -+ .id = 0, -+ .dev.platform_data = &ep93xx_i2c_gpio_data, -+ .num_resources = 0, -+}; -+ -+void eeclk_eedat_claim(void) -+{ -+ mutex_lock(&eeclk_eedat_mutex); -+} -+ -+void eeclk_eedat_release(void) -+{ -+ mutex_unlock(&eeclk_eedat_mutex); -+} -+ -+ - void __init ep93xx_init_devices(void) - { - unsigned int v; -@@ -521,10 +567,20 @@ - __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); - __raw_writel(v, EP93XX_SYSCON_DEVICE_CONFIG); - -+ /* -+ * When EECLK/EEDAT are in open drain mode (EEDRIVE=0b11), -+ * writing a 1 to their Data Register bits causes subsequent -+ * reads from the Data Direction Register to return 'input', -+ * which confuses gpio_line_config(). So, we use CMOS drive -+ * mode instead. -+ */ -+ __raw_writel(0, EP93XX_GPIO_EEDRIVE); -+ - amba_device_register(&uart1_device, &iomem_resource); - amba_device_register(&uart2_device, &iomem_resource); - amba_device_register(&uart3_device, &iomem_resource); - - platform_device_register(&ep93xx_rtc_device); - platform_device_register(&ep93xx_ohci_device); -+ platform_device_register(&ep93xx_i2c_device); - } -Index: linux-2.6.22/include/asm-arm/arch-ep93xx/ep93xx-regs.h -=================================================================== ---- linux-2.6.22.orig/include/asm-arm/arch-ep93xx/ep93xx-regs.h 2007-08-30 00:42:49.000000000 +0200 -+++ linux-2.6.22/include/asm-arm/arch-ep93xx/ep93xx-regs.h 2007-08-30 00:43:00.000000000 +0200 -@@ -91,6 +91,7 @@ - #define EP93XX_GPIO_B_INT_ENABLE EP93XX_GPIO_REG(0xb8) - #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) - #define EP93XX_GPIO_B_INT_DEBOUNCE EP93XX_GPIO_REG(0xc4) -+#define EP93XX_GPIO_EEDRIVE EP93XX_GPIO_REG(0xc8) - - #define EP93XX_AAC_BASE (EP93XX_APB_VIRT_BASE + 0x00080000) - -Index: linux-2.6.22/include/asm-arm/arch-ep93xx/platform.h -=================================================================== ---- linux-2.6.22.orig/include/asm-arm/arch-ep93xx/platform.h 2007-08-30 00:42:52.000000000 +0200 -+++ linux-2.6.22/include/asm-arm/arch-ep93xx/platform.h 2007-08-30 00:43:00.000000000 +0200 -@@ -10,6 +10,9 @@ - void ep93xx_init_devices(void); - extern struct sys_timer ep93xx_timer; - -+void eeclk_eedat_claim(void); -+void eeclk_eedat_release(void); -+ - struct ep93xx_eth_data - { - unsigned char dev_addr[6]; diff --git a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-leds.diff b/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-leds.diff deleted file mode 100644 index 0d11311d10..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-leds.diff +++ /dev/null @@ -1,181 +0,0 @@ - -EP93xx leds driver - -Signed-off-by: Petr Stetiar <ynezz@true.cz> - -Index: linux-2.6.22/arch/arm/mach-ep93xx/core.c -=================================================================== ---- linux-2.6.22.orig/arch/arm/mach-ep93xx/core.c -+++ linux-2.6.22/arch/arm/mach-ep93xx/core.c -@@ -555,6 +555,12 @@ void eeclk_eedat_release(void) - } - - -+static struct platform_device ep93xx_led_device = { -+ .name = "ep93xx-led", -+ .id = -1, -+}; -+ -+ - void __init ep93xx_init_devices(void) - { - unsigned int v; -@@ -583,4 +589,5 @@ void __init ep93xx_init_devices(void) - platform_device_register(&ep93xx_rtc_device); - platform_device_register(&ep93xx_ohci_device); - platform_device_register(&ep93xx_i2c_device); -+ platform_device_register(&ep93xx_led_device); - } -Index: linux-2.6.22/drivers/leds/Kconfig -=================================================================== ---- linux-2.6.22.orig/drivers/leds/Kconfig -+++ linux-2.6.22/drivers/leds/Kconfig -@@ -95,6 +95,12 @@ config LEDS_COBALT - help - This option enables support for the front LED on Cobalt Server - -+config LEDS_EP93XX -+ tristate "LED Support for Cirrus Logic EP93xx" -+ depends on LEDS_CLASS && ARCH_EP93XX -+ help -+ This option enables support for the Cirrus Logic EP93xx based boards. -+ - comment "LED Triggers" - - config LEDS_TRIGGERS -Index: linux-2.6.22/drivers/leds/Makefile -=================================================================== ---- linux-2.6.22.orig/drivers/leds/Makefile -+++ linux-2.6.22/drivers/leds/Makefile -@@ -16,6 +16,7 @@ obj-$(CONFIG_LEDS_NET48XX) += leds-net4 - obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o - obj-$(CONFIG_LEDS_H1940) += leds-h1940.o - obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o -+obj-$(CONFIG_LEDS_EP93XX) += leds-ep93xx.o - - # LED Triggers - obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o -Index: linux-2.6.22/drivers/leds/leds-ep93xx.c -=================================================================== ---- /dev/null -+++ linux-2.6.22/drivers/leds/leds-ep93xx.c -@@ -0,0 +1,119 @@ -+/* -+ * LEDs driver for Cirrus Logic EP93xx -+ * -+ * Author: Petr Stetiar <ynezz@true.cz> -+ * -+ * Based on 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/init.h> -+#include <linux/platform_device.h> -+#include <linux/leds.h> -+#include <asm/mach-types.h> -+#include <asm/arch/hardware.h> -+#include <asm/arch/gpio.h> -+ -+static void ep93xx_green_led_set(struct led_classdev *led_cdev, enum led_brightness value) -+{ -+ if (value) -+ gpio_line_set(EP93XX_GPIO_LINE_GRLED, EP93XX_GPIO_HIGH); -+ else -+ gpio_line_set(EP93XX_GPIO_LINE_GRLED, EP93XX_GPIO_LOW); -+} -+ -+static void ep93xx_red_led_set(struct led_classdev *led_cdev, enum led_brightness value) -+{ -+ if (value) -+ gpio_line_set(EP93XX_GPIO_LINE_RDLED, EP93XX_GPIO_HIGH); -+ else -+ gpio_line_set(EP93XX_GPIO_LINE_RDLED, EP93XX_GPIO_LOW); -+} -+ -+ -+static struct led_classdev ep93xx_green_led = { -+ .name = "ep93xx:green", -+ .default_trigger = "none", -+ .brightness_set = ep93xx_green_led_set, -+}; -+ -+static struct led_classdev ep93xx_red_led = { -+ .name = "ep93xx:red", -+ .default_trigger = "heartbeat", -+ .brightness_set = ep93xx_red_led_set, -+}; -+ -+#ifdef CONFIG_PM -+static int ep93xx_led_suspend(struct platform_device *dev, pm_message_t state) -+{ -+ led_classdev_suspend(&ep93xx_green_led); -+ led_classdev_suspend(&ep93xx_red_led); -+ return 0; -+} -+ -+static int ep93xx_led_resume(struct platform_device *dev) -+{ -+ led_classdev_resume(&ep93xx_red_led); -+ led_classdev_resume(&ep93xx_green_led); -+ return 0; -+} -+#endif -+ -+static int ep93xx_led_probe(struct platform_device *pdev) -+{ -+ int ret; -+ -+ gpio_line_config(EP93XX_GPIO_LINE_GRLED, GPIO_OUT); -+ gpio_line_config(EP93XX_GPIO_LINE_RDLED, GPIO_OUT); -+ -+ ret = led_classdev_register(&pdev->dev, &ep93xx_green_led); -+ if (ret < 0) -+ return ret; -+ -+ ret = led_classdev_register(&pdev->dev, &ep93xx_red_led); -+ if (ret < 0) -+ led_classdev_unregister(&ep93xx_green_led); -+ -+ return ret; -+} -+ -+static int ep93xx_led_remove(struct platform_device *pdev) -+{ -+ led_classdev_unregister(&ep93xx_green_led); -+ led_classdev_unregister(&ep93xx_red_led); -+ return 0; -+} -+ -+static struct platform_driver ep93xx_led_driver = { -+ .probe = ep93xx_led_probe, -+ .remove = ep93xx_led_remove, -+#ifdef CONFIG_PM -+ .suspend = ep93xx_led_suspend, -+ .resume = ep93xx_led_resume, -+#endif -+ .driver = { -+ .name = "ep93xx-led", -+ }, -+}; -+ -+static int __init ep93xx_led_init(void) -+{ -+ return platform_driver_register(&ep93xx_led_driver); -+} -+ -+static void __exit ep93xx_led_exit(void) -+{ -+ platform_driver_unregister(&ep93xx_led_driver); -+} -+ -+module_init(ep93xx_led_init); -+module_exit(ep93xx_led_exit); -+ -+MODULE_AUTHOR("Petr Stetiar <ynezz@true.cz>"); -+MODULE_DESCRIPTION("Cirrus Logic EP93xx LED driver"); -+MODULE_LICENSE("GPL"); diff --git a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-maverick-uniqid.patch b/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-maverick-uniqid.patch deleted file mode 100644 index fb6c8cfe18..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-maverick-uniqid.patch +++ /dev/null @@ -1,38 +0,0 @@ - -Adds support for SoC's unique ID (Maverick Key) in /proc/cpuinfo - -Signed-off-by: Petr Stetiar <ynezz@true.cz> - -Index: linux-2.6.22/arch/arm/kernel/setup.c -=================================================================== ---- linux-2.6.22.orig/arch/arm/kernel/setup.c 2007-09-02 23:08:51.000000000 +0200 -+++ linux-2.6.22/arch/arm/kernel/setup.c 2007-09-02 23:10:24.000000000 +0200 -@@ -959,8 +959,15 @@ - - seq_printf(m, "Hardware\t: %s\n", machine_name); - seq_printf(m, "Revision\t: %04x\n", system_rev); -+ -+#if defined(CONFIG_ARCH_EP93XX) -+#include <asm/arch/ep93xx-regs.h> -+ seq_printf(m, "Serial\t\t: %016x\n", -+ *((unsigned int *)EP93XX_SECURITY_UNIQID)); -+#else - seq_printf(m, "Serial\t\t: %08x%08x\n", - system_serial_high, system_serial_low); -+#endif - - return 0; - } -Index: linux-2.6.22/include/asm-arm/arch-ep93xx/ep93xx-regs.h -=================================================================== ---- linux-2.6.22.orig/include/asm-arm/arch-ep93xx/ep93xx-regs.h 2007-09-02 23:06:45.000000000 +0200 -+++ linux-2.6.22/include/asm-arm/arch-ep93xx/ep93xx-regs.h 2007-09-02 23:08:34.000000000 +0200 -@@ -70,6 +70,8 @@ - #define EP93XX_I2S_BASE (EP93XX_APB_VIRT_BASE + 0x00020000) - - #define EP93XX_SECURITY_BASE (EP93XX_APB_VIRT_BASE + 0x00030000) -+#define EP93XX_SECURITY_REG(x) (EP93XX_SECURITY_BASE + (x)) -+#define EP93XX_SECURITY_UNIQID EP93XX_SECURITY_REG(0x2440) - - #define EP93XX_GPIO_BASE (EP93XX_APB_VIRT_BASE + 0x00040000) - #define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x)) diff --git a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-serial-clocks.diff b/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-serial-clocks.diff deleted file mode 100644 index 9eb2d9de98..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-serial-clocks.diff +++ /dev/null @@ -1,42 +0,0 @@ - -Hackishly enable all UART clocks before uncompressing the kernel, -so that using ttyAM1 or ttyAM2 as console can work. - -Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> - -Index: linux-2.6.22/include/asm-arm/arch-ep93xx/uncompress.h -=================================================================== ---- linux-2.6.22.orig/include/asm-arm/arch-ep93xx/uncompress.h -+++ linux-2.6.22/include/asm-arm/arch-ep93xx/uncompress.h -@@ -78,6 +78,23 @@ static void ethernet_reset(void) - - - /* -+ * We don't have clock management for the UARTs (amba-pl010) -+ * yet, so hackily enable all UART clocks here for now. -+ */ -+#define PHYS_SYSCON_DEVICE_CONFIG 0x80930080 -+#define PHYS_SYSCON_SWLOCK 0x809300c0 -+ -+static void enable_all_uart_clocks(void) -+{ -+ unsigned int v; -+ -+ v = __raw_readl(PHYS_SYSCON_DEVICE_CONFIG); -+ __raw_writel(0xaa, PHYS_SYSCON_SWLOCK); -+ __raw_writel(v | 0x01140000, PHYS_SYSCON_DEVICE_CONFIG); -+} -+ -+ -+/* - * Some bootloaders don't turn on the UARTBAUD bit, which means that - * the UARTs will be running off a divided 7.3728 MHz clock instead of - * the 14.7456 MHz peripheral clock when linux boots. -@@ -126,6 +143,7 @@ static void fix_uart_base(void) - static void arch_decomp_setup(void) - { - ethernet_reset(); -+ enable_all_uart_clocks(); - fix_uart_base(); - } - diff --git a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-serial-uartbaud.diff b/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-serial-uartbaud.diff deleted file mode 100644 index 7183ab626e..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-serial-uartbaud.diff +++ /dev/null @@ -1,66 +0,0 @@ - -Force UARTBAUD on before uncompressing. - -Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> - -Index: linux-2.6.22/include/asm-arm/arch-ep93xx/uncompress.h -=================================================================== ---- linux-2.6.22.orig/include/asm-arm/arch-ep93xx/uncompress.h -+++ linux-2.6.22/include/asm-arm/arch-ep93xx/uncompress.h -@@ -77,9 +77,56 @@ static void ethernet_reset(void) - } - - -+/* -+ * Some bootloaders don't turn on the UARTBAUD bit, which means that -+ * the UARTs will be running off a divided 7.3728 MHz clock instead of -+ * the 14.7456 MHz peripheral clock when linux boots. -+ * -+ * We detect that condition here and fix it by turning on UARTBAUD, and -+ * then reprogramming the divisors on all enabled UARTs to twice what -+ * they were before we turned UARTBAUD on, to preserve the programmed -+ * baud rate. -+ */ -+#define PHYS_SYSCON_CLOCK_CONTROL 0x80930004 -+#define SYSCON_CLOCK_UARTBAUD 0x20000000 -+#define PHYS_UART1_BASE 0x808c0000 -+#define PHYS_UART2_BASE 0x808d0000 -+#define PHYS_UART3_BASE 0x808e0000 -+ -+static void uart_divisor_times_two(unsigned int base) -+{ -+ u16 divisor; -+ -+ divisor = __raw_readb(base + 0x0c) << 8; -+ divisor |= __raw_readb(base + 0x10); -+ if (divisor) { -+ divisor = (2 * (divisor + 1)) - 1; -+ __raw_writeb(divisor >> 8, base + 0x0c); -+ __raw_writeb(divisor & 0xff, base + 0x10); -+ __raw_writeb(__raw_readb(base + 0x08), base + 0x08); -+ } -+} -+ -+static void fix_uart_base(void) -+{ -+ unsigned int v; -+ -+ v = __raw_readl(PHYS_SYSCON_CLOCK_CONTROL); -+ if ((v & SYSCON_CLOCK_UARTBAUD) == 0) { -+ v |= SYSCON_CLOCK_UARTBAUD; -+ __raw_writel(v, PHYS_SYSCON_CLOCK_CONTROL); -+ -+ uart_divisor_times_two(PHYS_UART1_BASE); -+ uart_divisor_times_two(PHYS_UART2_BASE); -+ uart_divisor_times_two(PHYS_UART3_BASE); -+ } -+} -+ -+ - static void arch_decomp_setup(void) - { - ethernet_reset(); -+ fix_uart_base(); - } - - #define arch_decomp_wdog() diff --git a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-timer-accuracy.diff b/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-timer-accuracy.diff deleted file mode 100644 index 8254153b69..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/ep93xx-timer-accuracy.diff +++ /dev/null @@ -1,59 +0,0 @@ - -The ep93xx has a weird timer tick base (983.04 kHz.) This experimental -patch tries to increase time of day accuracy by keeping the number of -ticks until the next jiffy in a fractional value representation. - -Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> - -Index: linux-2.6.22/arch/arm/mach-ep93xx/core.c -=================================================================== ---- linux-2.6.22.orig/arch/arm/mach-ep93xx/core.c -+++ linux-2.6.22/arch/arm/mach-ep93xx/core.c -@@ -94,19 +94,32 @@ void __init ep93xx_map_io(void) - * track of lost jiffies. - */ - static unsigned int last_jiffy_time; -+static unsigned int next_jiffy_time; -+static unsigned int accumulator; - --#define TIMER4_TICKS_PER_JIFFY ((CLOCK_TICK_RATE + (HZ/2)) / HZ) -+#define TIMER4_TICKS_PER_JIFFY (983040 / HZ) -+#define TIMER4_TICKS_MOD_JIFFY (983040 % HZ) -+ -+static int after_eq(unsigned long a, unsigned long b) -+{ -+ return ((signed long)(a - b)) >= 0; -+} - - static int ep93xx_timer_interrupt(int irq, void *dev_id) - { - write_seqlock(&xtime_lock); - - __raw_writel(1, EP93XX_TIMER1_CLEAR); -- while ((signed long) -- (__raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time) -- >= TIMER4_TICKS_PER_JIFFY) { -- last_jiffy_time += TIMER4_TICKS_PER_JIFFY; -+ while (after_eq(__raw_readl(EP93XX_TIMER4_VALUE_LOW), next_jiffy_time)) { - timer_tick(); -+ -+ last_jiffy_time = next_jiffy_time; -+ next_jiffy_time += TIMER4_TICKS_PER_JIFFY; -+ accumulator += TIMER4_TICKS_MOD_JIFFY; -+ if (accumulator >= HZ) { -+ next_jiffy_time++; -+ accumulator -= HZ; -+ } - } - - write_sequnlock(&xtime_lock); -Index: linux-2.6.22/include/asm-arm/arch-ep93xx/timex.h -=================================================================== ---- linux-2.6.22.orig/include/asm-arm/arch-ep93xx/timex.h -+++ linux-2.6.22/include/asm-arm/arch-ep93xx/timex.h -@@ -2,4 +2,4 @@ - * linux/include/asm-arm/arch-ep93xx/timex.h - */ - --#define CLOCK_TICK_RATE 983040 -+#define CLOCK_TICK_RATE (1000 * HZ) diff --git a/packages/linux/linux-2.6.22.6/ts72xx/series b/packages/linux/linux-2.6.22.6/ts72xx/series deleted file mode 100644 index e5455efd3c..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/series +++ /dev/null @@ -1,12 +0,0 @@ -ep93xx-gpio-interrupt-debounce.diff -ep93xx-i2c-bus.diff -ep93xx-i2c.diff -ep93xx-leds.diff -ep93xx-serial-uartbaud.diff -ep93xx-serial-clocks.diff -ep93xx-timer-accuracy.diff -ep93xx-maverick-uniqid.patch -ts72xx-machine-id-fix.patch -ts72xx-nfbit-fix.patch -ts72xx-watchdog.patch -ts72xx-use-cpld-reset.patch diff --git a/packages/linux/linux-2.6.22.6/ts72xx/ts72xx-machine-id-fix.patch b/packages/linux/linux-2.6.22.6/ts72xx/ts72xx-machine-id-fix.patch deleted file mode 100644 index 64c38398db..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/ts72xx-machine-id-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ - -Fix wrong machine ID passed from RedBoot - -Signed-off-by: Petr Stetiar <ynezz@true.cz> - -Index: linux-2.6.22/arch/arm/kernel/head.S -=================================================================== ---- linux-2.6.22.orig/arch/arm/kernel/head.S 2007-08-30 00:42:45.000000000 +0200 -+++ linux-2.6.22/arch/arm/kernel/head.S 2007-08-30 00:43:13.000000000 +0200 -@@ -82,6 +82,7 @@ - bl __lookup_processor_type @ r5=procinfo r9=cpuid - movs r10, r5 @ invalid processor (r5=0)? - beq __error_p @ yes, error 'p' -+ ldr r1, =0x000002a1 @ mach-type = TS-7250 - bl __lookup_machine_type @ r5=machinfo - movs r8, r5 @ invalid machine (r5=0)? - beq __error_a @ yes, error 'a' diff --git a/packages/linux/linux-2.6.22.6/ts72xx/ts72xx-nfbit-fix.patch b/packages/linux/linux-2.6.22.6/ts72xx/ts72xx-nfbit-fix.patch deleted file mode 100644 index eab73154a8..0000000000 --- a/packages/linux/linux-2.6.22.6/ts72xx/ts72xx-nfbit-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ - -Force the nF bit on. Usually this is set by the bootrom. If it is not set, -then the CPU core will run from HCLK instead of FCLK, and performance will -suffer. If you see BogoMIPS of about 1/4 of your CPU clock, try turning this -on; your performance should double. - ---- linux-2.6.21.4/arch/arm/mm/proc-arm920.S 2007-06-07 23:27:31.000000000 +0200 -+++ linux-2.6.21.4-arm/arch/arm/mm/proc-arm920.S 2007-06-08 22:59:48.000000000 +0200 -@@ -395,6 +395,7 @@ - mrc p15, 0, r0, c1, c0 @ get control register v4 - bic r0, r0, r5 - orr r0, r0, r6< |
