summaryrefslogtreecommitdiff
path: root/packages/linux/nslu2-kernel
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2005-09-30 00:15:35 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-09-30 00:15:35 +0000
commit66fcf193312225852a95654d031e529d9fe1f252 (patch)
tree42d9ab2ec292c2a593f51da4b5ddbc656776333d /packages/linux/nslu2-kernel
parentc7327ecc18f08d4072b222db02b0bd74c6cf3e5c (diff)
nslu2-kernel 2.6.14-rc2: latest patch set
Diffstat (limited to 'packages/linux/nslu2-kernel')
-rw-r--r--packages/linux/nslu2-kernel/2.6.14/50-nslu2-beeper.patch144
-rw-r--r--packages/linux/nslu2-kernel/2.6.14/50-nslu2-general.patch278
-rw-r--r--packages/linux/nslu2-kernel/2.6.14/90-mtd-ixp4xx.patch75
3 files changed, 261 insertions, 236 deletions
diff --git a/packages/linux/nslu2-kernel/2.6.14/50-nslu2-beeper.patch b/packages/linux/nslu2-kernel/2.6.14/50-nslu2-beeper.patch
new file mode 100644
index 0000000000..cf2de14c68
--- /dev/null
+++ b/packages/linux/nslu2-kernel/2.6.14/50-nslu2-beeper.patch
@@ -0,0 +1,144 @@
+diff -urN linux-2.6.14-rc2/drivers/input/misc/Kconfig test6/drivers/input/misc/Kconfig
+--- linux-2.6.14-rc2/drivers/input/misc/Kconfig 2005-09-17 12:42:09.000000000 +0200
++++ test6/drivers/input/misc/Kconfig 2005-09-28 19:24:52.000000000 +0200
+@@ -40,6 +40,18 @@
+ tristate "M68k Beeper support"
+ depends on M68K
+
++config INPUT_NSLU2_BEEPER
++ tristate "NSLU2 Beeper support"
++ depends on MACH_NSLU2
++ help
++ Say Y here if you want the embedded beeper on the LinkSys NSLU2
++ to be used for bells and whistles.
++
++ If unsure, say Y.
++
++ To compile this driver as a module, choose M here: the
++ module will be called nslu2spkr.
++
+ config INPUT_UINPUT
+ tristate "User level driver support"
+ help
+diff -urN linux-2.6.14-rc2/drivers/input/misc/Makefile test6/drivers/input/misc/Makefile
+--- linux-2.6.14-rc2/drivers/input/misc/Makefile 2005-09-17 12:42:09.000000000 +0200
++++ test6/drivers/input/misc/Makefile 2005-09-28 17:01:19.000000000 +0200
+@@ -10,3 +10,4 @@
+ obj-$(CONFIG_INPUT_98SPKR) += 98spkr.o
+ obj-$(CONFIG_INPUT_UINPUT) += uinput.o
+ obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o
++obj-$(CONFIG_INPUT_NSLU2_BEEPER) += nslu2spkr.o
+diff -urN linux-2.6.14-rc2/drivers/input/misc/nslu2spkr.c test6/drivers/input/misc/nslu2spkr.c
+--- linux-2.6.14-rc2/drivers/input/misc/nslu2spkr.c 1970-01-01 01:00:00.000000000 +0100
++++ test6/drivers/input/misc/nslu2spkr.c 2005-09-28 19:23:34.000000000 +0200
+@@ -0,0 +1,110 @@
++/*
++ * drivers/input/misc/nslu2spkr.c
++ *
++ * NSLU2 Beeper driver
++ *
++ * Copyright (C) 2005 Tower Technologies
++ *
++ * based on nslu2-io.c
++ * Copyright (C) 2004 Karen Spearel
++ *
++ * Author: Alessandro Zummo <a.zummo@towertech.it>
++ * Maintainers: http://www.nslu2-linux.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/config.h>
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/input.h>
++
++#include <asm/arch/nslu2.h>
++#include <asm-arm/delay.h>
++
++DEFINE_SPINLOCK(beep_lock);
++
++static int nslu2_spkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
++{
++ unsigned int count = 0;
++ unsigned long flags;
++
++ if (type != EV_SND)
++ return -1;
++
++ switch (code) {
++ case SND_BELL:
++ if (value) value = 5000;
++ case SND_TONE:
++ break;
++ default:
++ return -1;
++ }
++
++ if (value > 20 && value < 32767)
++ count = 1193182 / value;
++
++ spin_lock_irqsave(&beep_lock, flags);
++
++ *IXP4XX_GPIO_GPOER &= ~NSLU2_BZ_BM;
++
++ while (count) {
++ *IXP4XX_GPIO_GPOUTR &= ~NSLU2_BZ_BM;
++ udelay(500);
++
++ *IXP4XX_GPIO_GPOUTR |= NSLU2_BZ_BM;
++ udelay(500);
++
++ count--;
++ }
++
++ *IXP4XX_GPIO_GPOER |= NSLU2_BZ_BM;
++
++ spin_unlock_irqrestore(&beep_lock, flags);
++
++ return 0;
++}
++
++static struct input_dev nslu2_spkr_dev = {
++ .phys = "nslu2/gpio4",
++ .name = "NSLU2 Beeper",
++ .evbit[0] = BIT(EV_SND),
++ .sndbit[0] = BIT(SND_BELL),
++ .event = nslu2_spkr_event,
++ .id = {
++ .bustype = BUS_HOST,
++ .vendor = 0x001f,
++ .product = 0x0001,
++ .version = 0x0100
++ }
++};
++
++
++static int __init nslu2_spkr_init(void)
++{
++ input_register_device(&nslu2_spkr_dev);
++
++ nslu2_spkr_event(NULL, EV_SND, SND_BELL, 1);
++
++ printk(KERN_INFO "input: %s\n", nslu2_spkr_dev.name);
++ return 0;
++}
++
++static void __exit nslu2_spkr_exit(void)
++{
++ input_unregister_device(&nslu2_spkr_dev);
++
++ /* turn it off */
++ nslu2_spkr_event(NULL, EV_SND, SND_BELL, 0);
++}
++
++module_init(nslu2_spkr_init);
++module_exit(nslu2_spkr_exit);
++
++MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
++MODULE_DESCRIPTION("NSLU2 Beeper driver");
++MODULE_LICENSE("GPL");
diff --git a/packages/linux/nslu2-kernel/2.6.14/50-nslu2-general.patch b/packages/linux/nslu2-kernel/2.6.14/50-nslu2-general.patch
index b01b60e941..c5b513c5e1 100644
--- a/packages/linux/nslu2-kernel/2.6.14/50-nslu2-general.patch
+++ b/packages/linux/nslu2-kernel/2.6.14/50-nslu2-general.patch
@@ -1,18 +1,19 @@
--- linux-2.6.14-rc2/arch/arm/mach-ixp4xx/Makefile 2005-09-17 12:42:02.000000000 +0200
-+++ test5/arch/arm/mach-ixp4xx/Makefile 2005-09-27 19:13:04.000000000 +0200
-@@ -8,4 +8,5 @@
++++ test6/arch/arm/mach-ixp4xx/Makefile 2005-09-28 21:58:36.000000000 +0200
+@@ -8,4 +8,6 @@
obj-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o coyote-setup.o
obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o coyote-setup.o
obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o
-+obj-$(CONFIG_MACH_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-io.o nslu2-rtc.o
++obj-$(CONFIG_MACH_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-power.o nslu2-rtc.o nslu2-io.o
++
--- linux-2.6.14-rc2/arch/arm/mach-ixp4xx/nslu2-rtc.c 1970-01-01 01:00:00.000000000 +0100
-+++ test5/arch/arm/mach-ixp4xx/nslu2-rtc.c 2005-09-24 19:07:37.000000000 +0200
++++ test6/arch/arm/mach-ixp4xx/nslu2-rtc.c 2005-09-28 03:02:42.000000000 +0200
@@ -0,0 +1,108 @@
+/*
+ * arch/arm/mach-ixp4xx/nslu2-rtc.c
+ *
-+ * NSL2 RTC driver
++ * NSLU2 RTC driver
+ *
+ * Copyright (C) 2005 Tower Technologies
+ *
@@ -73,7 +74,7 @@
+ return x1205_do_command(X1205_CMD_GETALARM, &alrm->time);
+}
+
-+static inline int rtc_set_alarm(struct rtc_wkalrm *alrm)
++static int rtc_set_alarm(struct rtc_wkalrm *alrm)
+{
+ return x1205_do_command(X1205_CMD_SETALARM, &alrm->time);
+}
@@ -118,8 +119,8 @@
+module_init(nslu2_rtc_init);
+module_exit(nslu2_rtc_exit);
--- linux-2.6.14-rc2/arch/arm/mach-ixp4xx/nslu2-io.c 1970-01-01 01:00:00.000000000 +0100
-+++ test5/arch/arm/mach-ixp4xx/nslu2-io.c 2005-09-27 19:24:44.000000000 +0200
-@@ -0,0 +1,683 @@
++++ test6/arch/arm/mach-ixp4xx/nslu2-io.c 2005-09-28 22:02:12.000000000 +0200
+@@ -0,0 +1,540 @@
+//=============================================================================
+//
+// n2-io.c version 0.1.7
@@ -148,28 +149,14 @@
+#include <linux/config.h>
+#include <linux/version.h>
+#include <linux/module.h>
-+#include <linux/utsname.h>
+#include <linux/kernel.h>
-+#include <linux/major.h>
-+#include <linux/string.h>
+#include <linux/proc_fs.h>
-+#include <linux/slab.h>
-+#include <linux/init.h>
-+#include <linux/errno.h>
-+#include <linux/fs.h>
-+#include <linux/miscdevice.h>
+#include <linux/device.h>
-+#include <linux/interrupt.h>
-+#include <linux/moduleparam.h>
-+#include <linux/timer.h>
+#include <linux/reboot.h>
+
-+#include <asm/system.h>
+#include <asm/uaccess.h>
-+#include <asm/hardware.h>
+#include <asm-arm/irq.h>
+#include <asm-arm/delay.h>
-+#include <asm-arm/signal.h>
+
+/* Set this to 1 to output lots of debug messages. */
+#define NSLU2_IO_DEBUG 0
@@ -182,8 +169,6 @@
+
+#define VERSION "0.1.7"
+
-+#define NSLU2RB_MAJOR 60 //rbuttons
-+#define NSLU2PB_MAJOR 61 //pbuttons
+#define NSLU2BZ_MAJOR 62 //buzzer
+#define NSLU2LM_MAJOR 126
+
@@ -195,10 +180,6 @@
+#define NSLU2_BEEP_PITCH_LOW 1000
+#define NSLU2_LONG_DELAY 30000
+
-+#define RB_DELAY 50
-+#define PB_DELAY 20
-+
-+#define PWR_OFF_STR "poweroff"
+
+
+// ioctls -- 'M" is used for sound cards...we don't got one so it seems safe
@@ -260,23 +241,16 @@
+#define LED_DISK2 3
+#define LED_ALL 4
+
-+static int nslu2_shutdown_in_progress = 0;
-+
+static unsigned long init_jiffy = 0; /* jiffies at init time */
+static unsigned long ontime = 50;
+static unsigned long offtime = 450;
+static unsigned long bz_repeatcnt = 10;
+static unsigned long tone = 1000;
+
-+DECLARE_WAIT_QUEUE_HEAD(n2rb_waitq);
-+DECLARE_WAIT_QUEUE_HEAD(n2pb_waitq);
-+
+static struct timer_list n2lm_rsg_timer; //rs green
+static struct timer_list n2lm_rsr_timer; //rs red
+static struct timer_list n2lm_d1_timer; //drive 1
+static struct timer_list n2lm_d2_timer; //drive 2
-+static struct timer_list n2rb_timer;
-+static struct timer_list n2pb_timer;
+static struct timer_list n2bz_timer; //beeper
+
+// sysfs class
@@ -601,95 +575,14 @@
+ .ioctl = n2bz_ioctl,
+};
+
-+//==================================================================================================
-+
-+static irqreturn_t n2pb_handler (int irq, void *dev_id, struct pt_regs *regs)
-+{
-+ void *ret;
-+ if (!nslu2_shutdown_in_progress++) {
-+ wake_up(&n2pb_waitq);
-+ remove_proc_entry(PWR_OFF_STR, NULL); //no parent
-+ n2_buzz(NSLU2_BEEP_PITCH_HIGH, NSLU2_BEEP_DUR_SHORT); // Short, high-pitched "OK"
-+ ret = create_proc_entry(PWR_OFF_STR, 0, NULL);
-+ nslu2_io_debug((KERN_DEBUG "Powerbutton pressed. Shutting down. cpe ret = %p\n", ret));
-+ kill_proc(1,SIGINT,1); // Signal init to shut down
-+ } else {
-+ n2_buzz(NSLU2_BEEP_PITCH_LOW, NSLU2_BEEP_DUR_MED); // Make a scary noise!
-+ nslu2_io_debug((KERN_DEBUG "Powerbutton pressed while already in shutdown")); // Whine!
-+ }
-+ return IRQ_HANDLED;
-+}
-+
-+struct testr {
-+ int ctl;
-+ long param;
-+};
-+
-+static irqreturn_t n2rb_handler (int irq, void *dev_id, struct pt_regs *regs)
-+{
-+// This doesn't reset the NSLU2. It powers it off. Close enough, since reset is unreliable
-+
-+ wake_up(&n2rb_waitq);
-+ machine_power_off();
-+ return IRQ_HANDLED; // So we don't get a nobody cared error :-P
-+}
-+
-+//==================================================================================================
-+// What to do here is majorly undetermined...
-+
-+static int n2rb_read (struct file *filp, char __user *buffer, size_t count, loff_t *ppos)
-+{
-+ printk(KERN_DEBUG "Reset Button Wait\n");
-+ interruptible_sleep_on(&n2rb_waitq);
-+ return copy_to_user(buffer, "reset", 5) ? -EFAULT : 5;
-+
-+}
-+
-+//==================================================================================================
-+// What to do here is majorly undetermined...
-+
-+static int n2pb_read (struct file *filp, char __user *buffer, size_t count, loff_t *ppos)
-+{
-+ printk(KERN_DEBUG "Power Button Wait\n");
-+ interruptible_sleep_on(&n2pb_waitq);
-+ return copy_to_user(buffer, "poweroff", 8) ? -EFAULT : 8;
-+
-+}
-+
-+//--------------------------------------------------------------------------------------------------
-+
-+static struct file_operations n2rb_fops = {
-+ .owner = THIS_MODULE,
-+ .read = n2rb_read,
-+};
-+
-+//--------------------------------------------------------------------------------------------------
-+
-+static struct file_operations n2pb_fops = {
-+ .owner = THIS_MODULE,
-+ .read = n2pb_read,
-+};
-+
-+//==================================================================================================
-+
+static void n2iom_initarch(void)
+{
+ printk(KERN_DEBUG "setup_interrupts - jiffies=%ld init_jiffy=%ld\n", jiffies, init_jiffy);
+
-+ *IXP4XX_GPIO_GPISR = 0x20400000; // read the 2 irqs to clr
-+ set_irq_type(NSLU2_RB_IRQ, IRQT_LOW);
-+ set_irq_type(NSLU2_PB_IRQ, IRQT_HIGH);
-+
-+ gpio_line_isr_clear(NSLU2_RB_GPIO);
-+ gpio_line_isr_clear(NSLU2_PB_GPIO);
-+
-+
+ init_timer(&n2lm_rsg_timer);
+ init_timer(&n2lm_rsr_timer);
+ init_timer(&n2lm_d1_timer);
+ init_timer(&n2lm_d2_timer);
-+// init_timer(&n2rb_timer);
-+// init_timer(&n2pb_timer);
+ init_timer(&n2bz_timer);
+
+ n2lm_rsr_timer.function = n2lm_rsr_handler;
@@ -723,20 +616,6 @@
+
+ n2lm_class = class_create(THIS_MODULE, "nslu2");
+
-+ if (register_chrdev(NSLU2RB_MAJOR, "n2_rbm", &n2pb_fops) < 0) {
-+ printk(KERN_DEBUG "Reset Button Major %d not available\n", NSLU2RB_MAJOR);
-+ return -EBUSY;
-+ }
-+ else {
-+ class_device_create(n2lm_class, MKDEV(NSLU2RB_MAJOR, 0), NULL, "rbuttons");
-+ }
-+ if (register_chrdev(NSLU2PB_MAJOR, "n2_pbm", &n2rb_fops) < 0) {
-+ printk(KERN_DEBUG "Power Button Major %d not available\n", NSLU2PB_MAJOR);
-+ return -EBUSY;
-+ }
-+ else {
-+ class_device_create(n2lm_class, MKDEV(NSLU2PB_MAJOR, 0), NULL, "pbuttons");
-+ }
+ if (register_chrdev(NSLU2LM_MAJOR, "n2_ledm", &n2lm_fops) < 0) {
+ printk(KERN_DEBUG "Led Manager Major %d not available\n", NSLU2LM_MAJOR);
+ return -EBUSY;
@@ -752,20 +631,6 @@
+ class_device_create(n2lm_class, MKDEV(NSLU2BZ_MAJOR, 0), NULL, "buzzer");
+ }
+
-+ if (request_irq(NSLU2_RB_IRQ, &n2rb_handler,
-+ SA_INTERRUPT, "NSLU2 reset button", NULL) < 0) {
-+ printk(KERN_DEBUG "Reset Button IRQ %d not available\n", NSLU2_RB_IRQ);
-+ return -EIO;
-+ }
-+ if (request_irq(NSLU2_PB_IRQ, &n2pb_handler,
-+ SA_INTERRUPT, "NSLU2 power button", NULL) < 0) {
-+ printk(KERN_DEBUG "Power Button IRQ %d not available\n", NSLU2_PB_IRQ);
-+ return -EIO;
-+ }
-+
-+ enable_irq(NSLU2_PB_IRQ);
-+ enable_irq(NSLU2_RB_IRQ);
-+
+ return 0;
+}
+
@@ -773,23 +638,17 @@
+
+static void __exit n2iom_exit(void)
+{
-+ remove_proc_entry(PWR_OFF_STR, NULL);
-+ del_timer(&n2rb_timer);
-+ free_irq(NSLU2_RB_IRQ,NULL);
-+ unregister_chrdev(NSLU2PB_MAJOR, "n2pb");
-+ class_device_destroy(n2lm_class, MKDEV(NSLU2PB_MAJOR, 0));
-+ del_timer(&n2pb_timer);
-+ free_irq(NSLU2_PB_IRQ, NULL);
-+ unregister_chrdev(NSLU2RB_MAJOR, "n2rb" );
-+ class_device_destroy(n2lm_class, MKDEV(NSLU2RB_MAJOR, 0));
+ del_timer(&n2lm_rsg_timer);
+ del_timer(&n2lm_rsr_timer);
+ del_timer(&n2lm_d1_timer);
+ del_timer(&n2lm_d2_timer);
++
+ unregister_chrdev(NSLU2LM_MAJOR, "n2lm" );
+ class_device_destroy(n2lm_class, MKDEV(NSLU2LM_MAJOR, 0));
++
+ unregister_chrdev(NSLU2BZ_MAJOR, "n2bz");
+ class_device_destroy(n2lm_class, MKDEV(NSLU2BZ_MAJOR, 0));
++
+ class_destroy(n2lm_class);
+}
+
@@ -802,9 +661,8 @@
+static int debug = 7;
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "Debugging enabled = 8");
-+
--- linux-2.6.14-rc2/arch/arm/mach-ixp4xx/nslu2-setup.c 1970-01-01 01:00:00.000000000 +0100
-+++ test5/arch/arm/mach-ixp4xx/nslu2-setup.c 2005-09-27 19:37:02.000000000 +0200
++++ test6/arch/arm/mach-ixp4xx/nslu2-setup.c 2005-09-27 20:19:14.000000000 +0200
@@ -0,0 +1,131 @@
+/*
+ * arch/arm/mach-ixp4xx/nslu2-setup.c
@@ -938,7 +796,7 @@
+ .init_machine = nslu2_init,
+MACHINE_END
--- linux-2.6.14-rc2/arch/arm/mach-ixp4xx/nslu2-pci.c 1970-01-01 01:00:00.000000000 +0100
-+++ test5/arch/arm/mach-ixp4xx/nslu2-pci.c 2005-09-27 19:57:17.000000000 +0200
++++ test6/arch/arm/mach-ixp4xx/nslu2-pci.c 2005-09-27 20:19:14.000000000 +0200
@@ -0,0 +1,78 @@
+/*
+ * arch/arm/mach-ixp4xx/nslu2-pci.c
@@ -1018,9 +876,110 @@
+}
+
+subsys_initcall(nslu2_pci_init);
+--- linux-2.6.14-rc2/arch/arm/mach-ixp4xx/nslu2-power.c 1970-01-01 01:00:00.000000000 +0100
++++ test6/arch/arm/mach-ixp4xx/nslu2-power.c 2005-09-28 03:03:11.000000000 +0200
+@@ -0,0 +1,98 @@
++/*
++ * arch/arm/mach-ixp4xx/nslu2-power.c
++ *
++ * NSLU2 Power/Reset driver
++ *
++ * Copyright (C) 2005 Tower Technologies
++ *
++ * based on nslu2-io.c
++ * Copyright (C) 2004 Karen Spearel
++ *
++ * Author: Alessandro Zummo <a.zummo@towertech.it>
++ * Maintainers: http://www.nslu2-linux.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/module.h>
++#include <linux/reboot.h>
++#include <linux/interrupt.h>
++
++static int nslu2_shutdown_in_progress = 0;
++
++static irqreturn_t nslu2_power_handler(int irq, void *dev_id, struct pt_regs *regs)
++{
++ /* FIXME init will start a shutdown but the machine
++ * will actually reboot at the end
++ */
++
++ if (!nslu2_shutdown_in_progress++) {
++ kill_proc(1, SIGINT, 1); /* Signal init to shut down */
++ }
++
++ return IRQ_HANDLED;
++}
++
++static irqreturn_t nslu2_reset_handler(int irq, void *dev_id, struct pt_regs *regs)
++{
++ /* FIXME This doesn't reset the NSLU2. It powers it off.
++ * Close enough, since reset is unreliable
++ */
++
++ machine_power_off();
++
++ return IRQ_HANDLED;
++}
++
++static int __init nslu2_power_init(void)
++{
++ printk(KERN_INFO "NSLU2 Power/Reset\n");
++
++ *IXP4XX_GPIO_GPISR = 0x20400000; /* read the 2 irqs to clr */
++
++ set_irq_type(NSLU2_RB_IRQ, IRQT_LOW);
++ set_irq_type(NSLU2_PB_IRQ, IRQT_HIGH);
++
++ gpio_line_isr_clear(NSLU2_RB_GPIO);
++ gpio_line_isr_clear(NSLU2_PB_GPIO);
++
++
++ if (request_irq(NSLU2_RB_IRQ, &nslu2_reset_handler,
++ SA_INTERRUPT, "NSLU2 reset button", NULL) < 0) {
++
++ printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
++ NSLU2_RB_IRQ);
++
++ return -EIO;
++ }
++
++ if (request_irq(NSLU2_PB_IRQ, &nslu2_power_handler,
++ SA_INTERRUPT, "NSLU2 power button", NULL) < 0) {
++
++ printk(KERN_DEBUG "Power Button IRQ %d not available\n",
++ NSLU2_PB_IRQ);
++
++ return -EIO;
++ }
++
++ enable_irq(NSLU2_PB_IRQ);
++ enable_irq(NSLU2_RB_IRQ);
++
++ return 0;
++}
++
++static void __exit nslu2_power_exit(void)
++{
++ free_irq(NSLU2_RB_IRQ, NULL);
++ free_irq(NSLU2_PB_IRQ, NULL);
++}
++
++module_init (nslu2_power_init);
++module_exit (nslu2_power_exit);
++
++MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
++MODULE_DESCRIPTION("NSLU2 Power/Reset driver");
++MODULE_LICENSE("GPL");
--- linux-2.6.14-rc2/include/asm-arm/arch-ixp4xx/nslu2.h 1970-01-01 01:00:00.000000000 +0100
-+++ test5/include/asm-arm/arch-ixp4xx/nslu2.h 2005-09-27 20:01:59.000000000 +0200
-@@ -0,0 +1,62 @@
++++ test6/include/asm-arm/arch-ixp4xx/nslu2.h 2005-09-27 20:39:35.000000000 +0200
+@@ -0,0 +1,59 @@
+/*
+ * include/asm-arm/arch-ixp4xx/nslu2.h
+ *
@@ -1037,9 +996,6 @@
+ * warranty of any kind, whether express or implied.
+ */
+
-+// GPIO 8 is used as the power input so is not free for use as a PCI IRQ
-+// kas11 11-2-04
-+
+#ifndef __ASM_ARCH_HARDWARE_H__
+#error "Do not include this directly, instead #include <asm/hardware.h>"
+#endif
diff --git a/packages/linux/nslu2-kernel/2.6.14/90-mtd-ixp4xx.patch b/packages/linux/nslu2-kernel/2.6.14/90-mtd-ixp4xx.patch
deleted file mode 100644
index 6d93a09a9f..0000000000
--- a/packages/linux/nslu2-kernel/2.6.14/90-mtd-ixp4xx.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- /tmp/ixp4xx.c 2005-09-24 18:12:25.000000000 +0200
-+++ test4/drivers/mtd/maps/ixp4xx.c 2005-09-24 19:02:24.000000000 +0200
-@@ -42,6 +42,10 @@
- static map_word ixp4xx_read16(struct map_info *map, unsigned long ofs)
- {
- map_word val;
-+
-+#ifndef __ARMEB__
-+ ofs ^= 2;
-+#endif
- val.x[0] = *(__u16 *) (map->map_priv_1 + ofs);
- return val;
- }
-@@ -51,6 +55,21 @@
- * when attached to a 16-bit wide device (such as the 28F128J3A),
- * so we can't just memcpy_fromio().
- */
-+
-+#if !defined(__ARMEB__) && defined(CONFIG_MTD_REDBOOT_PARTS)
-+struct fis_image_desc {
-+ unsigned char name[16]; // Null terminated name
-+ unsigned long flash_base; // Address within FLASH of image
-+ unsigned long mem_base; // Address in memory where it executes
-+ unsigned long size; // Length of image
-+ unsigned long entry_point; // Execution entry point
-+ unsigned long data_length; // Length of actual data
-+ unsigned char _pad[256-(16+7*sizeof(unsigned long))];
-+ unsigned long desc_cksum; // Checksum over image descriptor
-+ unsigned long file_cksum; // Checksum over image data
-+};
-+#endif
-+
- static void ixp4xx_copy_from(struct map_info *map, void *to,
- unsigned long from, ssize_t len)
- {
-@@ -71,6 +90,19 @@
-
- if (len > 0)
- *dest++ = BYTE0(*(u16 *)src);
-+
-+#if !defined(__ARMEB__) && defined(CONFIG_MTD_REDBOOT_PARTS)
-+ if (from == 0x7e0000) {
-+ int i;
-+ struct fis_image_desc *desc = (struct fis_image_desc *)to;
-+
-+ for (i=0; i < (len/sizeof(struct fis_image_desc)); i++) {
-+ desc[i].flash_base = be32_to_cpu(desc[i].flash_base);
-+ desc[i].mem_base = be32_to_cpu(desc[i].mem_base);
-+ desc[i].size = be32_to_cpu(desc[i].size);
-+ }
-+ }
-+#endif
- }
-
- /*
-@@ -79,6 +111,9 @@
- */
- static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long adr)
- {
-+#ifndef __ARMEB__
-+ adr ^= 2;
-+#endif
- if (!(adr & 1))
- *(__u16 *) (map->map_priv_1 + adr) = d.x[0];
- }
-@@ -88,6 +123,9 @@
- */
- static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr)
- {
-+#ifndef __ARMEB__
-+ adr ^= 2;
-+#endif
- *(__u16 *) (map->map_priv_1 + adr) = d.x[0];
- }
-