-Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/fsg-pci.c
+Index: linux-2.6.23.17/arch/arm/mach-ixp4xx/fsg-pci.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/fsg-pci.c 2008-01-09 12:49:07.000000000 +1030
+--- /dev/null
++++ linux-2.6.23.17/arch/arm/mach-ixp4xx/fsg-pci.c
@@ -0,0 +1,71 @@
+/*
+ * arch/arch/mach-ixp4xx/fsg-pci.c
+}
+
+subsys_initcall(fsg_pci_init);
-Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/fsg-setup.c
+Index: linux-2.6.23.17/arch/arm/mach-ixp4xx/fsg-setup.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/fsg-setup.c 2008-01-09 12:49:07.000000000 +1030
+--- /dev/null
++++ linux-2.6.23.17/arch/arm/mach-ixp4xx/fsg-setup.c
@@ -0,0 +1,220 @@
+/*
+ * arch/arm/mach-ixp4xx/fsg-setup.c
+ .init_machine = fsg_init,
+MACHINE_END
+
-Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/Kconfig
+Index: linux-2.6.23.17/arch/arm/mach-ixp4xx/Kconfig
===================================================================
---- linux-2.6.23.12-armeb.orig/arch/arm/mach-ixp4xx/Kconfig 2008-01-09 12:49:04.000000000 +1030
-+++ linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/Kconfig 2008-01-11 13:24:01.000000000 +1030
-@@ -125,6 +125,15 @@
+--- linux-2.6.23.17.orig/arch/arm/mach-ixp4xx/Kconfig
++++ linux-2.6.23.17/arch/arm/mach-ixp4xx/Kconfig
+@@ -125,6 +125,15 @@ config ARCH_IXDP4XX
depends on ARCH_IXDP425 || MACH_IXDP465 || MACH_KIXRP435
default y
#
# Certain registers and IRQs are only enabled if supporting IXP465 CPUs
#
-Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/Makefile
+Index: linux-2.6.23.17/arch/arm/mach-ixp4xx/Makefile
===================================================================
---- linux-2.6.23.12-armeb.orig/arch/arm/mach-ixp4xx/Makefile 2008-01-09 12:49:04.000000000 +1030
-+++ linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/Makefile 2008-01-09 12:49:07.000000000 +1030
-@@ -15,6 +15,7 @@
+--- linux-2.6.23.17.orig/arch/arm/mach-ixp4xx/Makefile
++++ linux-2.6.23.17/arch/arm/mach-ixp4xx/Makefile
+@@ -15,6 +15,7 @@ obj-pci-$(CONFIG_MACH_NAS100D) += nas10
obj-pci-$(CONFIG_MACH_DSMG600) += dsmg600-pci.o
obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
obj-y += common.o
-@@ -28,6 +29,7 @@
+@@ -28,5 +29,6 @@ obj-$(CONFIG_MACH_NAS100D) += nas100d-se
obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o
obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
+obj-$(CONFIG_MACH_FSG) += fsg-setup.o fsg-power.o
obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
- obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
-Index: linux-2.6.23.12-armeb/include/asm-arm/arch-ixp4xx/fsg.h
+Index: linux-2.6.23.17/include/asm-arm/arch-ixp4xx/fsg.h
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23.12-armeb/include/asm-arm/arch-ixp4xx/fsg.h 2008-01-11 13:29:42.000000000 +1030
-@@ -0,0 +1,58 @@
+--- /dev/null
++++ linux-2.6.23.17/include/asm-arm/arch-ixp4xx/fsg.h
+@@ -0,0 +1,50 @@
+/*
+ * include/asm-arm/arch-ixp4xx/fsg.h
+ *
+
+/* Buttons */
+
-+#define FSG_SB_GPIO 4
-+#define FSG_RB_GPIO 9
-+#define FSG_UB_GPIO 10
-+
-+#define FSG_SB_IRQ IRQ_IXP4XX_GPIO4
-+#define FSG_RB_IRQ IRQ_IXP4XX_GPIO9
-+#define FSG_UB_IRQ IRQ_IXP4XX_GPIO10
-+
-+#define FSG_SB_BM (1L << FSG_SB_GPIO)
-+#define FSG_RB_BM (1L << FSG_RB_GPIO)
-+#define FSG_UB_BM (1L << FSG_UB_GPIO)
++#define FSG_SB_GPIO 4 /* sync button */
++#define FSG_RB_GPIO 9 /* reset button */
++#define FSG_UB_GPIO 10 /* usb button */
+
+/* LEDs */
+
+#define FSG_LED_USB_BIT 4
+#define FSG_LED_RING_BIT 5
+#define FSG_LED_SYNC_BIT 7
-Index: linux-2.6.23.12-armeb/include/asm-arm/arch-ixp4xx/hardware.h
+Index: linux-2.6.23.17/include/asm-arm/arch-ixp4xx/hardware.h
===================================================================
---- linux-2.6.23.12-armeb.orig/include/asm-arm/arch-ixp4xx/hardware.h 2008-01-09 12:49:04.000000000 +1030
-+++ linux-2.6.23.12-armeb/include/asm-arm/arch-ixp4xx/hardware.h 2008-01-09 12:49:07.000000000 +1030
+--- linux-2.6.23.17.orig/include/asm-arm/arch-ixp4xx/hardware.h
++++ linux-2.6.23.17/include/asm-arm/arch-ixp4xx/hardware.h
@@ -45,5 +45,6 @@
#include "nslu2.h"
#include "nas100d.h"
+#include "fsg.h"
#endif /* _ASM_ARCH_HARDWARE_H */
-Index: linux-2.6.23.12-armeb/include/asm-arm/arch-ixp4xx/irqs.h
+Index: linux-2.6.23.17/include/asm-arm/arch-ixp4xx/irqs.h
===================================================================
---- linux-2.6.23.12-armeb.orig/include/asm-arm/arch-ixp4xx/irqs.h 2008-01-09 12:49:04.000000000 +1030
-+++ linux-2.6.23.12-armeb/include/asm-arm/arch-ixp4xx/irqs.h 2008-01-11 13:30:09.000000000 +1030
+--- linux-2.6.23.17.orig/include/asm-arm/arch-ixp4xx/irqs.h
++++ linux-2.6.23.17/include/asm-arm/arch-ixp4xx/irqs.h
@@ -128,4 +128,11 @@
#define IRQ_DSMG600_PCI_INTE IRQ_IXP4XX_GPIO7
#define IRQ_DSMG600_PCI_INTF IRQ_IXP4XX_GPIO6
+#define IRQ_FSG_PCI_INTC IRQ_IXP4XX_GPIO5
+
#endif
-Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/fsg-power.c
+Index: linux-2.6.23.17/arch/arm/mach-ixp4xx/fsg-power.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/fsg-power.c 2008-01-11 12:47:50.000000000 +1030
-@@ -0,0 +1,88 @@
+--- /dev/null
++++ linux-2.6.23.17/arch/arm/mach-ixp4xx/fsg-power.c
+@@ -0,0 +1,89 @@
+/*
+ * arch/arm/mach-ixp4xx/fsg-power.c
+ *
+#include <linux/jiffies.h>
+#include <linux/timer.h>
+
++#include <asm/gpio.h>
+#include <asm/mach-types.h>
+
+static irqreturn_t fsg_power_handler(int irq, void *dev_id)
+ if (!(machine_is_fsg()))
+ return 0;
+
-+ set_irq_type(FSG_RB_IRQ, IRQT_LOW);
-+ set_irq_type(FSG_SB_IRQ, IRQT_LOW);
++ set_irq_type(gpio_to_irq(FSG_RB_GPIO), IRQT_LOW);
++ set_irq_type(gpio_to_irq(FSG_SB_GPIO), IRQT_LOW);
+
-+ if (request_irq(FSG_RB_IRQ, &fsg_reset_handler,
++ if (request_irq(gpio_to_irq(FSG_RB_GPIO), &fsg_reset_handler,
+ IRQF_DISABLED, "FSG reset button", NULL) < 0) {
+
+ printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
-+ FSG_RB_IRQ);
++ gpio_to_irq(FSG_RB_GPIO));
+
+ return -EIO;
+ }
+
-+ if (request_irq(FSG_SB_IRQ, &fsg_power_handler,
++ if (request_irq(gpio_to_irq(FSG_SB_GPIO), &fsg_power_handler,
+ IRQF_DISABLED, "FSG power button", NULL) < 0) {
+
+ printk(KERN_DEBUG "Power Button IRQ %d not available\n",
-+ FSG_SB_IRQ);
++ gpio_to_irq(FSG_SB_GPIO));
+
+ return -EIO;
+ }
+ if (!(machine_is_fsg()))
+ return;
+
-+ free_irq(FSG_SB_IRQ, NULL);
-+ free_irq(FSG_RB_IRQ, NULL);
++ free_irq(gpio_to_irq(FSG_SB_GPIO), NULL);
++ free_irq(gpio_to_irq(FSG_RB_GPIO), NULL);
+}
+
+module_init(fsg_power_init);
+MODULE_AUTHOR("Rod Whitby <rod@whitby.id.au>");
+MODULE_DESCRIPTION("FSG Power/Reset driver");
+MODULE_LICENSE("GPL");
-Index: linux-2.6.23.12-armeb/drivers/leds/Kconfig
+Index: linux-2.6.23.17/drivers/leds/Kconfig
===================================================================
---- linux-2.6.23.12-armeb.orig/drivers/leds/Kconfig 2008-01-11 13:30:47.000000000 +1030
-+++ linux-2.6.23.12-armeb/drivers/leds/Kconfig 2008-01-11 13:34:34.000000000 +1030
-@@ -48,6 +48,12 @@
+--- linux-2.6.23.17.orig/drivers/leds/Kconfig
++++ linux-2.6.23.17/drivers/leds/Kconfig
+@@ -48,6 +48,12 @@ config LEDS_IXP4XX
particular board must have LEDs and they must be connected
to the GPIO lines. If unsure, say Y.
config LEDS_TOSA
tristate "LED Support for the Sharp SL-6000 series"
depends on LEDS_CLASS && PXA_SHARPSL
-Index: linux-2.6.23.12-armeb/drivers/leds/Makefile
+Index: linux-2.6.23.17/drivers/leds/Makefile
===================================================================
---- linux-2.6.23.12-armeb.orig/drivers/leds/Makefile 2008-01-11 13:30:50.000000000 +1030
-+++ linux-2.6.23.12-armeb/drivers/leds/Makefile 2008-01-11 13:34:34.000000000 +1030
-@@ -9,6 +9,7 @@
+--- linux-2.6.23.17.orig/drivers/leds/Makefile
++++ linux-2.6.23.17/drivers/leds/Makefile
+@@ -9,6 +9,7 @@ obj-$(CONFIG_LEDS_CORGI) += leds-corgi.
obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o
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_S3C24XX) += leds-s3c24xx.o
obj-$(CONFIG_LEDS_AMS_DELTA) += leds-ams-delta.o
-Index: linux-2.6.23.12-armeb/drivers/leds/leds-fsg.c
+Index: linux-2.6.23.17/drivers/leds/leds-fsg.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23.12-armeb/drivers/leds/leds-fsg.c 2008-01-11 13:34:34.000000000 +1030
+--- /dev/null
++++ linux-2.6.23.17/drivers/leds/leds-fsg.c
@@ -0,0 +1,243 @@
+/*
+ * LED Driver for the Freecom FSG-3