2.6.14: NSLU2 machine support
PATCH 1/1 2.6.14: NSLU2 machine support
This patch adds support for the LinkSys NSLU2 running with both big and little-endian kernels. The LinkSys NSLU2 is a cost engineered ARM, XScale 420 based system similar to the the Intel IXDP425 evaluation board. It uses the IXP4XX ARCH.
Building a kernel for the NSLU2 also requires the following patches not in 2.6.14:
[PATCH] 2.6.14-rc3 ixp4xx_copy_from little endian/alignment
[PATCH] 2.6.14 include/asm-arm/arch-ixp4xx/timex.h: fix clockfrequency on NSLU2 [PATCH]: 2.6.14-rc5 arch-ixp4xx/system.h: ensure flash is readable before reboot
and for correct operation of little-endian kernels (not required for big-endian):
[PATCH] 2.6.14-rc3 ixp4xx AHB/PCI endianness fix
[PATCH]: 2.6.14-rc3 drives/mtd/redboot.c: recognise a foreign bytesex partition table
This patch is the combined work of nslu2-linux.org
arch/arm/boot/compressed/head.S renamed from .pc/50-nslu2-arch.patch/arch/arm/boot/compressed/head.S +1 -0
@@ -37,6 +37,7 @@ defined(CONFIG_ARCH_INTEGRATOR) || \ defined(CONFIG_ARCH_PXA) || \ defined(CONFIG_ARCH_IXP4XX) || \ + defined(CONFIG_MACH_NSLU2) || \ defined(CONFIG_ARCH_IXP2000) || \ defined(CONFIG_ARCH_LH7A40X) || \ defined(CONFIG_ARCH_OMAP)
arch/arm/mach-ixp4xx/Kconfig renamed from .pc/50-nslu2-arch.patch/arch/arm/mach-ixp4xx/Kconfig +6 -0
@@ -43,6 +43,12 @@ config MACH_IXDP465 IXDP465 Development Platform (Also known as BMP). For more information on this platform, see <file:Documentation/arm/IXP4xx>. +config MACH_NSLU2 + bool "NSLU2" + help + Say 'Y' here if you want your kernel to support Linksys's + NSLU2 NAS device. For more information on this platform, + see http://www.nslu2-linux.org # # IXCDP1100 is the exact same HW as IXDP425, but with a different machine
arch/arm/mach-ixp4xx/Makefile renamed from .pc/50-nslu2-arch.patch/arch/arm/mach-ixp4xx/Makefile +1 -0
@@ -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_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-power.o
arch/arm/mach-ixp4xx/nslu2-pci.c renamed from .pc/50-nslu2-arch.patch/arch/arm/mach-ixp4xx/nslu2-pci.c +78 -0
78 lines not on this page · raw message
arch/arm/mach-ixp4xx/nslu2-power.c renamed from .pc/50-nslu2-arch.patch/arch/arm/mach-ixp4xx/nslu2-power.c +92 -0
92 lines not on this page · raw message
arch/arm/mach-ixp4xx/nslu2-setup.c renamed from .pc/50-nslu2-arch.patch/arch/arm/mach-ixp4xx/nslu2-setup.c +134 -0
134 lines not on this page · raw message
include/asm-arm/arch-ixp4xx/hardware.h renamed from .pc/50-nslu2-arch.patch/include/asm-arm/arch-ixp4xx/hardware.h +1 -0
@@ -44,5 +44,6 @@ extern unsigned int processor_id;#include "ixdp425.h" #include "coyote.h" #include "prpmc1100.h" +#include "nslu2.h" #endif /* _ASM_ARCH_HARDWARE_H */
include/asm-arm/arch-ixp4xx/irqs.h renamed from .pc/50-nslu2-arch.patch/include/asm-arm/arch-ixp4xx/irqs.h +7 -0
@@ -93,4 +93,11 @@#define IRQ_COYOTE_PCI_SLOT1 IRQ_IXP4XX_GPIO11#define IRQ_COYOTE_IDE IRQ_IXP4XX_GPIO5 +/* +* NSLU2 board IRQs +*/ +#define IRQ_NSLU2_PCI_INTA IRQ_IXP4XX_GPIO11 +#define IRQ_NSLU2_PCI_INTB IRQ_IXP4XX_GPIO10 +#define IRQ_NSLU2_PCI_INTC IRQ_IXP4XX_GPIO9 +#endif
include/asm-arm/arch-ixp4xx/nslu2.h renamed from .pc/50-nslu2-arch.patch/include/asm-arm/arch-ixp4xx/nslu2.h +96 -0
96 lines not on this page · raw message
arch/arm/mach-ixp4xx/nslu2-power.c line 29
Quoted 4 lines · John Bowler
arch/arm/mach-ixp4xx/nslu2-power.c renamed from .pc/50-nslu2-arch.patch/arch/arm/mach-ixp4xx/nslu2-power.c +4
-0+static irqreturn_t nslu2_power_handler (int irq,void *dev_id,struct pt_regs *regs) +{ +/* Signal init to do the ctrlaltdel action */ +kill_proc (1 ,SIGINT ,1 );
There is a function in the kernel for doing this. It's called ctrl_alt_del().
arch/arm/mach-ixp4xx/nslu2-setup.c line 65
Quoted 11 lines
arch/arm/mach-ixp4xx/nslu2-setup.c renamed from .pc/50-nslu2-arch.patch/arch/arm/mach-ixp4xx/nslu2-setup.c +11
-0+static struct resource nslu2_uart_resources[] = { + { + .start =IXP4XX_UART1_BASE_PHYS , + .end =IXP4XX_UART1_BASE_PHYS +0x0fff , + .flags =IORESOURCE_MEM + }, + { + .start =IXP4XX_UART2_BASE_PHYS , + .end =IXP4XX_UART2_BASE_PHYS +0x0fff , + .flags =IORESOURCE_MEM + }
Initialisers should generally end with a ',' irrespective of whether you have a following entry or not. It makes maintainence and/or adding new entries easier.
arch/arm/mach-ixp4xx/nslu2-setup.c line 101
Quoted 4 lines
arch/arm/mach-ixp4xx/nslu2-setup.c renamed from .pc/50-nslu2-arch.patch/arch/arm/mach-ixp4xx/nslu2-setup.c +4
-0+static struct platform_device *nslu2_devices[]__initdata = { + &nslu2_i2c_controller, + &nslu2_flash, + &nslu2_uart
Ditto.
arch/arm/mach-ixp4xx/nslu2-setup.c line 131
Quoted 8 lines
arch/arm/mach-ixp4xx/nslu2-setup.c renamed from .pc/50-nslu2-arch.patch/arch/arm/mach-ixp4xx/nslu2-setup.c +8
-0+MACHINE_START (NSLU2 ,"Linksys NSLU2" ) +/* Maintainer: www.nslu2-linux.org */ + .phys_ram = PHYS_OFFSET, + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, + .boot_params = 0x00000100, + .map_io = ixp4xx_map_io, + .init_irq = ixp4xx_init_irq, /* FIXME: all irq are off here */
What's that FIXME about?
arch/arm/mach-ixp4xx/nslu2-setup.c line 133
Quoted 2 lines
arch/arm/mach-ixp4xx/nslu2-setup.c renamed from .pc/50-nslu2-arch.patch/arch/arm/mach-ixp4xx/nslu2-setup.c +2
-0+ .timer = &ixp4xx_timer, + .init_machine = nslu2_init,
Please consistently format the code.
PS, please also send ARM related stuff via the patch system.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
arch/arm/mach-ixp4xx/nslu2-power.c line 38
Quoted 5 lines · John Bowler
arch/arm/mach-ixp4xx/nslu2-power.c renamed from .pc/50-nslu2-arch.patch/arch/arm/mach-ixp4xx/nslu2-power.c +5
-0+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 +*/
Is this comment still valid?
Looks good otherwise!
--L