diff options
5 files changed, 100 insertions, 102 deletions
diff --git a/packages/linux/nas100d-kernel/2.6.14/50-nas100d-arch.patch b/packages/linux/nas100d-kernel/2.6.14/50-nas100d-arch.patch index d6a69e3583..51ab586010 100644 --- a/packages/linux/nas100d-kernel/2.6.14/50-nas100d-arch.patch +++ b/packages/linux/nas100d-kernel/2.6.14/50-nas100d-arch.patch @@ -1,6 +1,13 @@ ---- linux-2.6.14-git.orig/arch/arm/mach-ixp4xx/Kconfig 2005-11-09 23:23:28.000000000 +0100 -+++ linux-2.6.14-git/arch/arm/mach-ixp4xx/Kconfig 2005-11-09 23:24:48.000000000 +0100 -@@ -61,6 +61,14 @@ + arch/arm/mach-ixp4xx/Kconfig | 8 ++++++++ + arch/arm/mach-ixp4xx/Makefile | 1 + + arch/arm/tools/mach-types | 1 + + include/asm-arm/arch-ixp4xx/hardware.h | 1 + + include/asm-arm/arch-ixp4xx/irqs.h | 9 +++++++++ + 5 files changed, 20 insertions(+) + +--- linux-2.6.14.orig/arch/arm/mach-ixp4xx/Kconfig 2005-11-09 00:58:58.000000000 +0100 ++++ linux-2.6.14/arch/arm/mach-ixp4xx/Kconfig 2005-11-11 22:23:08.000000000 +0100 +@@ -61,6 +61,14 @@ config ARCH_PRPMC1100 PrPCM1100 Processor Mezanine Module. For more information on this platform, see <file:Documentation/arm/IXP4xx>. @@ -15,26 +22,26 @@ # # Avila and IXDP share the same source for now. Will change in future # ---- linux-2.6.14-git.orig/arch/arm/mach-ixp4xx/Makefile 2005-11-09 23:23:28.000000000 +0100 -+++ linux-2.6.14-git/arch/arm/mach-ixp4xx/Makefile 2005-11-09 23:24:48.000000000 +0100 -@@ -8,4 +8,5 @@ +--- linux-2.6.14.orig/arch/arm/mach-ixp4xx/Makefile 2005-11-09 00:58:58.000000000 +0100 ++++ linux-2.6.14/arch/arm/mach-ixp4xx/Makefile 2005-11-11 22:23:08.000000000 +0100 +@@ -8,4 +8,5 @@ obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pc 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_NAS100D) += nas100d-pci.o nas100d-setup.o nas100d-power.o ---- linux-2.6.14-git.orig/include/asm-arm/arch-ixp4xx/hardware.h 2005-11-09 23:23:28.000000000 +0100 -+++ linux-2.6.14-git/include/asm-arm/arch-ixp4xx/hardware.h 2005-11-09 23:24:48.000000000 +0100 -@@ -44,5 +44,6 @@ +--- linux-2.6.14.orig/include/asm-arm/arch-ixp4xx/hardware.h 2005-11-09 00:59:41.000000000 +0100 ++++ linux-2.6.14/include/asm-arm/arch-ixp4xx/hardware.h 2005-11-11 22:23:08.000000000 +0100 +@@ -44,5 +44,6 @@ extern unsigned int processor_id; #include "ixdp425.h" #include "coyote.h" #include "prpmc1100.h" +#include "nas100d.h" #endif /* _ASM_ARCH_HARDWARE_H */ ---- linux-2.6.14-git.orig/include/asm-arm/arch-ixp4xx/irqs.h 2005-11-09 23:23:28.000000000 +0100 -+++ linux-2.6.14-git/include/asm-arm/arch-ixp4xx/irqs.h 2005-11-09 23:24:48.000000000 +0100 -@@ -93,4 +93,11 @@ +--- linux-2.6.14.orig/include/asm-arm/arch-ixp4xx/irqs.h 2005-11-09 00:59:41.000000000 +0100 ++++ linux-2.6.14/include/asm-arm/arch-ixp4xx/irqs.h 2005-11-11 23:01:50.000000000 +0100 +@@ -93,4 +93,13 @@ #define IRQ_COYOTE_PCI_SLOT1 IRQ_IXP4XX_GPIO11 #define IRQ_COYOTE_IDE IRQ_IXP4XX_GPIO5 @@ -44,11 +51,13 @@ +#define IRQ_NAS100D_PCI_INTA IRQ_IXP4XX_GPIO11 +#define IRQ_NAS100D_PCI_INTB IRQ_IXP4XX_GPIO10 +#define IRQ_NAS100D_PCI_INTC IRQ_IXP4XX_GPIO9 ++#define IRQ_NAS100D_PCI_INTD IRQ_IXP4XX_GPIO8 ++#define IRQ_NAS100D_PCI_INTE IRQ_IXP4XX_GPIO7 + #endif ---- linux-2.6.14/arch/arm/tools/mach-types~ 2005-10-28 09:32:08.000000000 +0930 -+++ linux-2.6.14/arch/arm/tools/mach-types 2005-11-10 19:58:03.534106856 +1030 -@@ -869,3 +869,4 @@ +--- linux-2.6.14.orig/arch/arm/tools/mach-types 2005-11-09 00:58:59.000000000 +0100 ++++ linux-2.6.14/arch/arm/tools/mach-types 2005-11-11 22:23:08.000000000 +0100 +@@ -869,3 +869,4 @@ davinci_dvdp MACH_DAVINCI_DVDP DAVINCI_ htcuniversal MACH_HTCUNIVERSAL HTCUNIVERSAL 855 tpad MACH_TPAD TPAD 856 roverp3 MACH_ROVERP3 ROVERP3 857 diff --git a/packages/linux/nas100d-kernel/2.6.14/nas100d-pci.c b/packages/linux/nas100d-kernel/2.6.14/nas100d-pci.c index 7a319179c3..8a8e472ed5 100644 --- a/packages/linux/nas100d-kernel/2.6.14/nas100d-pci.c +++ b/packages/linux/nas100d-kernel/2.6.14/nas100d-pci.c @@ -27,34 +27,44 @@ void __init nas100d_pci_preinit(void) set_irq_type(IRQ_NAS100D_PCI_INTA, IRQT_LOW); set_irq_type(IRQ_NAS100D_PCI_INTB, IRQT_LOW); set_irq_type(IRQ_NAS100D_PCI_INTC, IRQT_LOW); + set_irq_type(IRQ_NAS100D_PCI_INTD, IRQT_LOW); + set_irq_type(IRQ_NAS100D_PCI_INTE, IRQT_LOW); gpio_line_isr_clear(NAS100D_PCI_INTA_PIN); gpio_line_isr_clear(NAS100D_PCI_INTB_PIN); gpio_line_isr_clear(NAS100D_PCI_INTC_PIN); - - /* INTD is not configured as GPIO is used - * for the power input button. - */ + gpio_line_isr_clear(NAS100D_PCI_INTD_PIN); + gpio_line_isr_clear(NAS100D_PCI_INTE_PIN); ixp4xx_pci_preinit(); } static int __init nas100d_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { - static int pci_irq_table[NAS100D_PCI_IRQ_LINES] = { - IRQ_NAS100D_PCI_INTA, - IRQ_NAS100D_PCI_INTB, - IRQ_NAS100D_PCI_INTC, - }; - - int irq = -1; + if (slot < 1 || slot > 3 || pin < 1 || pin > 3) + return -1; - if (slot >= 1 && slot <= NAS100D_PCI_MAX_DEV && - pin >= 1 && pin <= NAS100D_PCI_IRQ_LINES) { - irq = pci_irq_table[(slot + pin - 2) % NAS100D_PCI_IRQ_LINES]; + switch (slot) + { + case 1: + if (pin == 1) + return IRQ_NAS100D_PCI_INTA; + break; + case 2: + if (pin == 1) + return IRQ_NAS100D_PCI_INTB; + break; + case 3: + if (pin == 1) + return IRQ_NAS100D_PCI_INTB; + if (pin == 2) + return IRQ_NAS100D_PCI_INTC; + if (pin == 3) + return IRQ_NAS100D_PCI_INTD; + break; } - return irq; + return -1; } struct hw_pci __initdata nas100d_pci = { @@ -66,7 +76,7 @@ struct hw_pci __initdata nas100d_pci = { .map_irq = nas100d_map_irq, }; -int __init nas100d_pci_init(void) /* monkey see, monkey do */ +int __init nas100d_pci_init(void) { if (machine_is_nas100d()) pci_common_init(&nas100d_pci); diff --git a/packages/linux/nas100d-kernel/2.6.14/nas100d-power.c b/packages/linux/nas100d-kernel/2.6.14/nas100d-power.c index 008e6d5490..94ce5d1b46 100644 --- a/packages/linux/nas100d-kernel/2.6.14/nas100d-power.c +++ b/packages/linux/nas100d-kernel/2.6.14/nas100d-power.c @@ -49,13 +49,13 @@ static int __init nas100d_power_init(void) if (!(machine_is_nas100d())) return 0; - *IXP4XX_GPIO_GPISR = 0x20400000; /* read the 2 irqs to clr */ + // *IXP4XX_GPIO_GPISR = 0x20400000; /* read the 2 irqs to clr */ set_irq_type(NAS100D_RB_IRQ, IRQT_LOW); - set_irq_type(NAS100D_PB_IRQ, IRQT_HIGH); +// set_irq_type(NAS100D_PB_IRQ, IRQT_HIGH); gpio_line_isr_clear(NAS100D_RB_GPIO); - gpio_line_isr_clear(NAS100D_PB_GPIO); +// gpio_line_isr_clear(NAS100D_PB_GPIO); if (request_irq(NAS100D_RB_IRQ, &nas100d_reset_handler, SA_INTERRUPT, "NAS100D reset button", NULL) < 0) { @@ -65,7 +65,7 @@ static int __init nas100d_power_init(void) return -EIO; } - +/* if (request_irq(NAS100D_PB_IRQ, &nas100d_power_handler, SA_INTERRUPT, "NAS100D power button", NULL) < 0) { @@ -74,14 +74,14 @@ static int __init nas100d_power_init(void) return -EIO; } - +*/ return 0; } static void __exit nas100d_power_exit(void) { free_irq(NAS100D_RB_IRQ, NULL); - free_irq(NAS100D_PB_IRQ, NULL); +// free_irq(NAS100D_PB_IRQ, NULL); } module_init(nas100d_power_init); diff --git a/packages/linux/nas100d-kernel/2.6.14/nas100d-setup.c b/packages/linux/nas100d-kernel/2.6.14/nas100d-setup.c index 572c8ce639..0dbb0b4e69 100644 --- a/packages/linux/nas100d-kernel/2.6.14/nas100d-setup.c +++ b/packages/linux/nas100d-kernel/2.6.14/nas100d-setup.c @@ -9,8 +9,6 @@ * Author: Mark Rakes <mrakes at mac.com> * Maintainers: http://www.nslu2-linux.org/ * - * Fixed missing init_time in MACHINE_START kas11 10/22/04 - * Changed to conform to new style __init ixdp425 kas11 10/22/04 */ #include <linux/kernel.h> diff --git a/packages/linux/nas100d-kernel/2.6.14/nas100d.h b/packages/linux/nas100d-kernel/2.6.14/nas100d.h index 22f827d4bb..498174128c 100644 --- a/packages/linux/nas100d-kernel/2.6.14/nas100d.h +++ b/packages/linux/nas100d-kernel/2.6.14/nas100d.h @@ -1,16 +1,17 @@ /* * include/asm-arm/arch-ixp4xx/nas100d.h * - * NAS 100d platform specific definitions + * NAS100D platform specific definitions * - * Author: Mark Rakes <mrakes AT mac.com> - * Maintainers: http://www.nslu2-linux.org + * Copyright (c) 2005 Tower Technologies * + * Author: Alessandro Zummo <a.zummo@towertech.it> + * * based on ixdp425.h: - * Copyright 2004 (c) MontaVista, Software, Inc. - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any + * Copyright 2004 (c) MontaVista, Software, Inc. + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ @@ -18,77 +19,57 @@ #error "Do not include this directly, instead #include <asm/hardware.h>" #endif -#define NAS100D_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS -#define NAS100D_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE +#define NAS100D_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS +#define NAS100D_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE -#define NAS100D_SDA_PIN 7 -#define NAS100D_SCL_PIN 6 +#define NAS100D_SDA_PIN 6 +#define NAS100D_SCL_PIN 5 /* * NAS100D PCI IRQs */ -#define NAS100D_PCI_MAX_DEV 3 -#define NAS100D_PCI_IRQ_LINES 3 +#define NAS100D_PCI_MAX_DEV 5 +#define NAS100D_PCI_IRQ_LINES 5 /* PCI controller GPIO to IRQ pin mappings */ #define NAS100D_PCI_INTA_PIN 11 #define NAS100D_PCI_INTB_PIN 10 -#define NAS100D_PCI_INTC_PIN 9 -#define NAS100D_PCI_INTD_PIN 8 - - -/* NAS100D Timer */ -#define NAS100D_FREQ 66000000 -#define NAS100D_CLOCK_TICK_RATE (((NAS100D_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) -#define NAS100D_CLOCK_TICKS_PER_USEC ((NAS100D_CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC) +#define NAS100D_PCI_INTC_PIN 9 +#define NAS100D_PCI_INTD_PIN 8 +#define NAS100D_PCI_INTE_PIN 7 /* GPIO */ -#define NAS100D_GPIO0 0 -#define NAS100D_GPIO1 1 -#define NAS100D_GPIO2 2 -#define NAS100D_GPIO3 3 -#define NAS100D_GPIO4 4 -#define NAS100D_GPIO5 5 -#define NAS100D_GPIO6 6 -#define NAS100D_GPIO7 7 -#define NAS100D_GPIO8 8 -#define NAS100D_GPIO9 9 -#define NAS100D_GPIO10 10 -#define NAS100D_GPIO11 11 -#define NAS100D_GPIO12 12 -#define NAS100D_GPIO13 13 -#define NAS100D_GPIO14 14 -#define NAS100D_GPIO15 15 - -/* Buttons */ - -#define NAS100D_PB_GPIO NAS100D_GPIO5 -#define NAS100D_PO_GPIO NAS100D_GPIO8 /* power off */ -#define NAS100D_RB_GPIO NAS100D_GPIO12 +#define NAS100D_GPIO0 0 +#define NAS100D_GPIO1 1 +#define NAS100D_GPIO2 2 +#define NAS100D_GPIO3 3 +#define NAS100D_GPIO4 4 +#define NAS100D_GPIO5 5 +#define NAS100D_GPIO6 6 +#define NAS100D_GPIO7 7 +#define NAS100D_GPIO8 8 +#define NAS100D_GPIO9 9 +#define NAS100D_GPIO10 10 +#define NAS100D_GPIO11 11 +#define NAS100D_GPIO12 12 +#define NAS100D_GPIO13 13 +#define NAS100D_GPIO14 14 +#define NAS100D_GPIO15 15 -#define NAS100D_PB_IRQ IRQ_IXP4XX_GPIO5 -#define NAS100D_RB_IRQ IRQ_IXP4XX_GPIO12 -#define NAS100D_PB_BM (1L << NAS100D_PB_GPIO) -#define NAS100D_PO_BM (1L << NAS100D_PO_GPIO) -#define NAS100D_RB_BM (1L << NAS100D_RB_GPIO) - -/* Buzzer */ - -#define NAS100D_GPIO_BUZZ 4 -#define NAS100D_BZ_BM (1L << NAS100D_GPIO_BUZZ) -/* LEDs */ - -#define NAS100D_LED_RED NAS100D_GPIO0 -#define NAS100D_LED_GRN NAS100D_GPIO1 +/* Buttons */ -#define NAS100D_LED_RED_BM (1L << NAS100D_LED_RED) -#define NAS100D_LED_GRN_BM (1L << NAS100D_LED_GRN) +#define NAS100D_PB_GPIO NAS100D_GPIO14 +#define NAS100D_RB_GPIO NAS100D_GPIO4 +#define NAS100D_PO_GPIO NAS100D_GPIO12 /* power off */ -#define NAS100D_LED_DISK1 NAS100D_GPIO2 -#define NAS100D_LED_DISK2 NAS100D_GPIO3 +#define NAS100D_PB_IRQ IRQ_IXP4XX_GPIO14 +#define NAS100D_RB_IRQ IRQ_IXP4XX_GPIO4 -#define NAS100D_LED_DISK1_BM (1L << NAS100D_GPIO2) -#define NAS100D_LED_DISK2_BM (1L << NAS100D_GPIO3) +/* +#define NAS100D_PB_BM (1L << NAS100D_PB_GPIO) +#define NAS100D_PO_BM (1L << NAS100D_PO_GPIO) +#define NAS100D_RB_BM (1L << NAS100D_RB_GPIO) +*/ |