summaryrefslogtreecommitdiff
path: root/packages/linux/openslug-kernel-2.6.9
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/linux/openslug-kernel-2.6.9
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/linux/openslug-kernel-2.6.9')
-rw-r--r--packages/linux/openslug-kernel-2.6.9/.mtn2git_empty0
-rw-r--r--packages/linux/openslug-kernel-2.6.9/alignment.patch85
-rw-r--r--packages/linux/openslug-kernel-2.6.9/double_cpdo.patch27
-rw-r--r--packages/linux/openslug-kernel-2.6.9/nslu2-part.c120
-rw-r--r--packages/linux/openslug-kernel-2.6.9/nslu2-pci.c87
-rw-r--r--packages/linux/openslug-kernel-2.6.9/nslu2-setup.c132
-rw-r--r--packages/linux/openslug-kernel-2.6.9/nslu2.h43
-rw-r--r--packages/linux/openslug-kernel-2.6.9/nslu2_2.6.9.patch312
-rw-r--r--packages/linux/openslug-kernel-2.6.9/usbnet.patch17
9 files changed, 823 insertions, 0 deletions
diff --git a/packages/linux/openslug-kernel-2.6.9/.mtn2git_empty b/packages/linux/openslug-kernel-2.6.9/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/openslug-kernel-2.6.9/.mtn2git_empty
diff --git a/packages/linux/openslug-kernel-2.6.9/alignment.patch b/packages/linux/openslug-kernel-2.6.9/alignment.patch
index e69de29bb2..19abca18f5 100644
--- a/packages/linux/openslug-kernel-2.6.9/alignment.patch
+++ b/packages/linux/openslug-kernel-2.6.9/alignment.patch
@@ -0,0 +1,85 @@
+--- linux-2.6.10/arch/arm/mm/alignment.c.broken 2005-02-11 20:57:58.353668651 +0100
++++ linux-2.6.10/arch/arm/mm/alignment.c 2005-02-11 20:58:02.141660877 +0100
+@@ -130,6 +130,18 @@
+ #define TYPE_LDST 2
+ #define TYPE_DONE 3
+
++#ifdef __ARMEB__
++#define BE 1
++#define FIRST_BYTE_16 "mov %1, %1, ror #8\n"
++#define FIRST_BYTE_32 "mov %1, %1, ror #24\n"
++#define NEXT_BYTE "ror #24"
++#else
++#define BE 0
++#define FIRST_BYTE_16
++#define FIRST_BYTE_32
++#define NEXT_BYTE "lsr #8"
++#endif
++
+ #define __get8_unaligned_check(ins,val,addr,err) \
+ __asm__( \
+ "1: "ins" %1, [%2], #1\n" \
+@@ -149,9 +161,10 @@
+ #define __get16_unaligned_check(ins,val,addr) \
+ do { \
+ unsigned int err = 0, v, a = addr; \
+- __get8_unaligned_check(ins,val,a,err); \
+ __get8_unaligned_check(ins,v,a,err); \
+- val |= v << 8; \
++ val = v << ((BE) ? 8 : 0); \
++ __get8_unaligned_check(ins,v,a,err); \
++ val |= v << ((BE) ? 0 : 8); \
+ if (err) \
+ goto fault; \
+ } while (0)
+@@ -165,13 +178,14 @@
+ #define __get32_unaligned_check(ins,val,addr) \
+ do { \
+ unsigned int err = 0, v, a = addr; \
+- __get8_unaligned_check(ins,val,a,err); \
+ __get8_unaligned_check(ins,v,a,err); \
+- val |= v << 8; \
++ val = v << ((BE) ? 24 : 0); \
++ __get8_unaligned_check(ins,v,a,err); \
++ val |= v << ((BE) ? 16 : 8); \
+ __get8_unaligned_check(ins,v,a,err); \
+- val |= v << 16; \
++ val |= v << ((BE) ? 8 : 16); \
+ __get8_unaligned_check(ins,v,a,err); \
+- val |= v << 24; \
++ val |= v << ((BE) ? 0 : 24); \
+ if (err) \
+ goto fault; \
+ } while (0)
+@@ -185,9 +199,9 @@
+ #define __put16_unaligned_check(ins,val,addr) \
+ do { \
+ unsigned int err = 0, v = val, a = addr; \
+- __asm__( \
++ __asm__( FIRST_BYTE_16 \
+ "1: "ins" %1, [%2], #1\n" \
+- " mov %1, %1, lsr #8\n" \
++ " mov %1, %1, "NEXT_BYTE"\n" \
+ "2: "ins" %1, [%2]\n" \
+ "3:\n" \
+ " .section .fixup,\"ax\"\n" \
+@@ -215,13 +229,13 @@
+ #define __put32_unaligned_check(ins,val,addr) \
+ do { \
+ unsigned int err = 0, v = val, a = addr; \
+- __asm__( \
++ __asm__( FIRST_BYTE_32 \
+ "1: "ins" %1, [%2], #1\n" \
+- " mov %1, %1, lsr #8\n" \
++ " mov %1, %1, "NEXT_BYTE"\n" \
+ "2: "ins" %1, [%2], #1\n" \
+- " mov %1, %1, lsr #8\n" \
++ " mov %1, %1, "NEXT_BYTE"\n" \
+ "3: "ins" %1, [%2], #1\n" \
+- " mov %1, %1, lsr #8\n" \
++ " mov %1, %1, "NEXT_BYTE"\n" \
+ "4: "ins" %1, [%2]\n" \
+ "5:\n" \
+ " .section .fixup,\"ax\"\n" \
+
+
diff --git a/packages/linux/openslug-kernel-2.6.9/double_cpdo.patch b/packages/linux/openslug-kernel-2.6.9/double_cpdo.patch
index e69de29bb2..4069358db8 100644
--- a/packages/linux/openslug-kernel-2.6.9/double_cpdo.patch
+++ b/packages/linux/openslug-kernel-2.6.9/double_cpdo.patch
@@ -0,0 +1,27 @@
+--- linux-2.6.9-rc3-ds1.commit/arch/arm/nwfpe/double_cpdo.c 2004-08-14 07:36:11.000000000 +0200
++++ linux-2.6.9-rc3-ds1.snap/arch/arm/nwfpe/double_cpdo.c 2004-10-10 20:29:15.514512796 +0200
+@@ -75,7 +75,11 @@
+ union float64_components u;
+
+ u.f64 = rFm;
++#ifdef __ARMEB__
++ u.i[0] ^= 0x80000000;
++#else
+ u.i[1] ^= 0x80000000;
++#endif
+
+ return u.f64;
+ }
+@@ -85,7 +89,11 @@
+ union float64_components u;
+
+ u.f64 = rFm;
++#ifdef __ARMEB__
++ u.i[0] &= 0x7fffffff;
++#else
+ u.i[1] &= 0x7fffffff;
++#endif
+
+ return u.f64;
+ }
+
diff --git a/packages/linux/openslug-kernel-2.6.9/nslu2-part.c b/packages/linux/openslug-kernel-2.6.9/nslu2-part.c
index e69de29bb2..6fbf952e2a 100644
--- a/packages/linux/openslug-kernel-2.6.9/nslu2-part.c
+++ b/packages/linux/openslug-kernel-2.6.9/nslu2-part.c
@@ -0,0 +1,120 @@
+/*
+ * nslu2-part.c
+ *
+ * Maintainers: http://www.nslu2-linux.org/
+ * Initial port: Mark Rakes <mrakes AT mac.com>
+ *
+ * "Parse" the fixed partition table of the Linksys NSLU2 and
+ * produce a Linux partition array to match.
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/vmalloc.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+
+/* info we know about the NSLU2's flash setup:
+ *
+ * Num Partition offset size
+ * --- --------- ---------- -----------
+ * 0 RedBoot 0x00000000 0x00040000
+ * 1 System Configuration 0x00040000 0x00020000
+ * 2 Kernel 0x00060000 0x00100000
+ * 3 Ramdisk 0x00160000 0x006a0000
+ */
+ #define NSLU2_NUM_FLASH_PARTITIONS 4
+ #define NSLU2_FLASH_PART0_NAME "RedBoot"
+ #define NSLU2_FLASH_PART0_OFFSET 0x00000000
+ #define NSLU2_FLASH_PART0_SIZE 0x00040000
+ #define NSLU2_FLASH_PART1_NAME "System Configuration"
+ #define NSLU2_FLASH_PART1_OFFSET (NSLU2_FLASH_PART0_OFFSET + NSLU2_FLASH_PART0_SIZE)
+ #define NSLU2_FLASH_PART1_SIZE 0x00020000
+ #define NSLU2_FLASH_PART2_NAME "Kernel"
+ #define NSLU2_FLASH_PART2_OFFSET (NSLU2_FLASH_PART1_OFFSET + NSLU2_FLASH_PART1_SIZE)
+ #define NSLU2_FLASH_PART2_SIZE 0x00100000
+ #define NSLU2_FLASH_PART3_NAME "Ramdisk"
+ #define NSLU2_FLASH_PART3_OFFSET (NSLU2_FLASH_PART2_OFFSET + NSLU2_FLASH_PART2_SIZE)
+ #define NSLU2_FLASH_PART3_SIZE 0x006a0000
+
+static int parse_nslu2_partitions(struct mtd_info *master,
+ struct mtd_partition **pparts,
+ unsigned long flash_start)
+{
+ struct mtd_partition *parts;
+ int ret = 0, namelen = 0;
+ char *names;
+
+ namelen = strlen(NSLU2_FLASH_PART0_NAME) +
+ strlen(NSLU2_FLASH_PART1_NAME) +
+ strlen(NSLU2_FLASH_PART2_NAME) +
+ strlen(NSLU2_FLASH_PART3_NAME) +
+ NSLU2_NUM_FLASH_PARTITIONS; /*4 strings + each terminator */
+
+ parts = kmalloc(sizeof(*parts)*NSLU2_NUM_FLASH_PARTITIONS + namelen, GFP_KERNEL);
+ if (!parts) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ memset(parts, 0, sizeof(*parts)*NSLU2_NUM_FLASH_PARTITIONS + namelen);
+ names = (char *)&parts[NSLU2_NUM_FLASH_PARTITIONS];
+
+ /* RedBoot partition */
+ parts[0].size = NSLU2_FLASH_PART0_SIZE;
+ parts[0].offset = NSLU2_FLASH_PART0_OFFSET;
+ parts[0].name = NSLU2_FLASH_PART0_NAME;
+ parts[0].mask_flags = MTD_WRITEABLE; /* readonly */
+ strcpy(names, NSLU2_FLASH_PART0_NAME);
+ names += strlen(names)+1;
+ /* System Configuration */
+ parts[1].size = NSLU2_FLASH_PART1_SIZE;
+ parts[1].offset = NSLU2_FLASH_PART1_OFFSET;
+ parts[1].name = NSLU2_FLASH_PART1_NAME;
+ parts[1].mask_flags = MTD_WRITEABLE; /* readonly */
+ strcpy(names, NSLU2_FLASH_PART1_NAME);
+ names += strlen(names)+1;
+ /* Kernel */
+ parts[2].size = NSLU2_FLASH_PART2_SIZE;
+ parts[2].offset = NSLU2_FLASH_PART2_OFFSET;
+ parts[2].name = NSLU2_FLASH_PART2_NAME;
+ parts[2].mask_flags = MTD_WRITEABLE; /* readonly */
+ strcpy(names, NSLU2_FLASH_PART2_NAME);
+ names += strlen(names)+1;
+ /* Ramdisk */
+ parts[3].size = NSLU2_FLASH_PART3_SIZE;
+ parts[3].offset = NSLU2_FLASH_PART3_OFFSET;
+ parts[3].name = NSLU2_FLASH_PART3_NAME;
+ parts[3].mask_flags = MTD_WRITEABLE; /* readonly */
+ strcpy(names, NSLU2_FLASH_PART3_NAME);
+ names += strlen(names)+1;
+
+ ret = NSLU2_NUM_FLASH_PARTITIONS;
+ *pparts = parts;
+ out:
+ return ret;
+}
+
+static struct mtd_part_parser nslu2_parser = {
+ .owner = THIS_MODULE,
+ .parse_fn = parse_nslu2_partitions,
+ .name = "NSLU2",
+};
+
+static int __init nslu2_parser_init(void)
+{
+ return register_mtd_parser(&nslu2_parser);
+}
+
+static void __exit nslu2_parser_exit(void)
+{
+ deregister_mtd_parser(&nslu2_parser);
+}
+
+module_init(nslu2_parser_init);
+module_exit(nslu2_parser_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mark Rakes");
+MODULE_DESCRIPTION("Parsing code for NSLU2 flash tables");
diff --git a/packages/linux/openslug-kernel-2.6.9/nslu2-pci.c b/packages/linux/openslug-kernel-2.6.9/nslu2-pci.c
index e69de29bb2..7327c65a4f 100644
--- a/packages/linux/openslug-kernel-2.6.9/nslu2-pci.c
+++ b/packages/linux/openslug-kernel-2.6.9/nslu2-pci.c
@@ -0,0 +1,87 @@
+/*
+ * arch/arm/mach-ixp4xx/nslu2-pci.c
+ *
+ * NSLU2 board-level PCI initialization
+ *
+ * based on ixdp425-pci.c:
+ * Copyright (C) 2002 Intel Corporation.
+ * Copyright (C) 2003-2004 MontaVista Software, Inc.
+ *
+ * Maintainer: 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.
+ *
+ */
+// GPIO 8 is used as the power input so is not free for use as a PCI IRQ
+// However, all the common PCI setup code presumes the standard 4 PCI
+// interrupts are available. So we compromise...we don't enable the
+// IRQ on Pin 8 but we let
+
+#include <linux/config.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+
+#include <asm/mach/pci.h>
+#include <asm/irq.h>
+#include <asm/hardware.h>
+#include <asm/mach-types.h>
+
+void __init nslu2_pci_preinit(void)
+{
+ gpio_line_config(NSLU2_PCI_INTA_PIN,
+ IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
+ gpio_line_config(NSLU2_PCI_INTB_PIN,
+ IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
+ gpio_line_config(NSLU2_PCI_INTC_PIN,
+ IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
+// gpio_line_config(NSLU2_PCI_INTD_PIN,
+// IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW);
+
+ gpio_line_isr_clear(NSLU2_PCI_INTA_PIN);
+ gpio_line_isr_clear(NSLU2_PCI_INTB_PIN);
+ gpio_line_isr_clear(NSLU2_PCI_INTC_PIN);
+// gpio_line_isr_clear(NSLU2_PCI_INTD_PIN);
+
+ ixp4xx_pci_preinit();
+}
+
+static int __init nslu2_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+ static int pci_irq_table[NSLU2_PCI_IRQ_LINES] = {
+ IRQ_NSLU2_PCI_INTA,
+ IRQ_NSLU2_PCI_INTB,
+ IRQ_NSLU2_PCI_INTC,
+// IRQ_NSLU2_PCI_INTD
+ };
+
+ int irq = -1;
+
+ if (slot >= 1 && slot <= NSLU2_PCI_MAX_DEV &&
+ pin >= 1 && pin <= NSLU2_PCI_IRQ_LINES) {
+ irq = pci_irq_table[(slot + pin - 2) % 3]; // ! % 4 kas11
+ }
+
+ return irq;
+}
+
+struct hw_pci __initdata nslu2_pci = {
+ .nr_controllers = 1,
+ .preinit = nslu2_pci_preinit,
+ .swizzle = pci_std_swizzle,
+ .setup = ixp4xx_setup,
+ .scan = ixp4xx_scan_bus,
+ .map_irq = nslu2_map_irq,
+};
+
+int __init nslu2_pci_init(void) //monkey see, monkey do
+{
+ if (machine_is_nslu2())
+ pci_common_init(&nslu2_pci);
+ return 0;
+}
+
+subsys_initcall(nslu2_pci_init);
+
diff --git a/packages/linux/openslug-kernel-2.6.9/nslu2-setup.c b/packages/linux/openslug-kernel-2.6.9/nslu2-setup.c
index e69de29bb2..5698ea9813 100644
--- a/packages/linux/openslug-kernel-2.6.9/nslu2-setup.c
+++ b/packages/linux/openslug-kernel-2.6.9/nslu2-setup.c
@@ -0,0 +1,132 @@
+/*
+ * arch/arm/mach-ixp4xx/nslu2-setup.c
+ *
+ * NSLU2 board-setup
+ *
+ * based ixdp425-setup.c:
+ * Copyright (C) 2003-2004 MontaVista Software, Inc.
+ *
+ * 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/init.h>
+#include <linux/device.h>
+#include <linux/serial.h>
+#include <linux/tty.h>
+#include <linux/serial_core.h>
+
+#include <asm/types.h>
+#include <asm/setup.h>
+#include <asm/memory.h>
+#include <asm/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/irq.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/flash.h>
+
+#ifdef __ARMEB__
+#define REG_OFFSET 3
+#else
+#define REG_OFFSET 0
+#endif
+
+/*
+ * NSLU2 uses only one serial port
+ */
+static struct uart_port nslu2_serial_ports[] = {
+ {
+ .membase = (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET),
+ .mapbase = (IXP4XX_UART1_BASE_PHYS),
+ .irq = IRQ_IXP4XX_UART1,
+ .flags = UPF_SKIP_TEST,
+ .iotype = UPIO_MEM,
+ .regshift = 2,
+ .uartclk = IXP4XX_UART_XTAL,
+ .line = 0,
+ .type = PORT_XSCALE,
+ .fifosize = 32
+ }
+#if 0
+ , {
+ .membase = (char*)(IXP4XX_UART2_BASE_VIRT + REG_OFFSET),
+ .mapbase = (IXP4XX_UART2_BASE_PHYS),
+ .irq = IRQ_IXP4XX_UART2,
+ .flags = UPF_SKIP_TEST,
+ .iotype = UPIO_MEM,
+ .regshift = 2,
+ .uartclk = IXP4XX_UART_XTAL,
+ .line = 1,
+ .type = PORT_XSCALE,
+ .fifosize = 32
+ }
+#endif
+};
+
+void __init nslu2_map_io(void)
+{
+ early_serial_setup(&nslu2_serial_ports[0]);
+#if 0
+ early_serial_setup(&nslu2_serial_ports[1]);
+#endif
+ ixp4xx_map_io();
+}
+
+static struct flash_platform_data nslu2_flash_data = {
+ .map_name = "cfi_probe",
+ .width = 2,
+};
+
+static struct resource nslu2_flash_resource = {
+ .start = NSLU2_FLASH_BASE,
+ .end = NSLU2_FLASH_BASE + NSLU2_FLASH_SIZE,
+ .flags = IORESOURCE_MEM,
+};
+
+static struct platform_device nslu2_flash = {
+ .name = "IXP4XX-Flash",
+ .id = 0,
+ .dev = {
+ .platform_data = &nslu2_flash_data,
+ },
+ .num_resources = 1,
+ .resource = &nslu2_flash_resource,
+};
+
+static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = {
+ .sda_pin = NSLU2_SDA_PIN,
+ .scl_pin = NSLU2_SCL_PIN,
+};
+
+static struct platform_device nslu2_i2c_controller = {
+ .name = "IXP4XX-I2C",
+ .id = 0,
+ .dev = {
+ .platform_data = &nslu2_i2c_gpio_pins,
+ },
+ .num_resources = 0
+};
+
+static struct platform_device *nslu2_devices[] __initdata = {
+ &nslu2_i2c_controller,
+ &nslu2_flash
+};
+
+static void __init nslu2_init(void)
+{
+ platform_add_devices(&nslu2_devices, ARRAY_SIZE(nslu2_devices));
+}
+
+MACHINE_START(NSLU2, "Linksys NSLU2")
+ MAINTAINER("www.nslu2-linux.org")
+ BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS,
+ IXP4XX_PERIPHERAL_BASE_VIRT)
+ MAPIO(nslu2_map_io)
+ INITIRQ(ixp4xx_init_irq) //FIXME: all irq are off here
+ INITTIME(ixp4xx_init_time) //this was missing in 2.6.7 code ...soft reboot needed?
+ BOOT_PARAMS(0x0100)
+ INIT_MACHINE(nslu2_init)
+MACHINE_END
diff --git a/packages/linux/openslug-kernel-2.6.9/nslu2.h b/packages/linux/openslug-kernel-2.6.9/nslu2.h
index e69de29bb2..bb79aaa007 100644
--- a/packages/linux/openslug-kernel-2.6.9/nslu2.h
+++ b/packages/linux/openslug-kernel-2.6.9/nslu2.h
@@ -0,0 +1,43 @@
+/*
+ * include/asm-arm/arch-ixp4xx/nslu2.h
+ *
+ * NSLU2 platform specific definitions
+ *
+ * Author: Mark Rakes <mrakes AT mac.com>
+ * Maintainers: http://www.nslu2-linux.org
+ *
+ * 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
+ * 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
+
+#define NSLU2_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
+#define NSLU2_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE
+
+#define NSLU2_SDA_PIN 7
+#define NSLU2_SCL_PIN 6
+
+/*
+ * NSLU2 PCI IRQs
+ */
+#define NSLU2_PCI_MAX_DEV 3
+#define NSLU2_PCI_IRQ_LINES 3
+
+
+/* PCI controller GPIO to IRQ pin mappings */
+#define NSLU2_PCI_INTA_PIN 11
+#define NSLU2_PCI_INTB_PIN 10
+#define NSLU2_PCI_INTC_PIN 9
+//#define NSLU2_PCI_INTD_PIN 8
+
+
diff --git a/packages/linux/openslug-kernel-2.6.9/nslu2_2.6.9.patch b/packages/linux/openslug-kernel-2.6.9/nslu2_2.6.9.patch
index e69de29bb2..9f569baabf 100644
--- a/packages/linux/openslug-kernel-2.6.9/nslu2_2.6.9.patch
+++ b/packages/linux/openslug-kernel-2.6.9/nslu2_2.6.9.patch
@@ -0,0 +1,312 @@
+diff -purN linux-2.6.9/arch/arm/mach-ixp4xx/Kconfig linux-2.6.9-new/arch/arm/mach-ixp4xx/Kconfig
+--- linux-2.6.9/arch/arm/mach-ixp4xx/Kconfig 2004-06-15 22:19:01.000000000 -0700
++++ linux-2.6.9-new/arch/arm/mach-ixp4xx/Kconfig 2004-09-14 03:59:28.000000000 -0700
+@@ -29,6 +29,13 @@ config ARCH_IXDP425
+ IXDP425 Development Platform (Also known as Richfield).
+ For more information on this platform, see Documentation/arm/IXP4xx.
+
++config ARCH_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
+ # number from the bootloader due to marketing monkeys, so we just enable it
+--- linux-2.6.9.orig/arch/arm/mach-ixp4xx/Makefile 2004-06-16 01:18:59.000000000 -0400
++++ linux-2.6.9/arch/arm/mach-ixp4xx/Makefile 2004-09-24 01:35:22.051627330 -0400
+@@ -4,7 +4,6 @@
+
+ obj-y += common.o common-pci.o
+
+-obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o ixdp425-setup.o
+ obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o coyote-setup.o
+ obj-$(CONFIG_ARCH_PRPMC1100) += prpmc1100-pci.o prpmc1100-setup.o
+-
++obj-$(CONFIG_ARCH_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-part.o nslu2-io.o
+diff -purN linux-2.6.9/drivers/mtd/maps/ixp4xx.c linux-2.6.9-new/drivers/mtd/maps/ixp4xx.c
+--- linux-2.6.9/drivers/mtd/maps/ixp4xx.c 2004-06-15 22:18:38.000000000 -0700
++++ linux-2.6.9-new/drivers/mtd/maps/ixp4xx.c 2004-09-14 03:59:28.000000000 -0700
+@@ -82,7 +82,11 @@ struct ixp4xx_flash_info {
+ struct resource *res;
+ };
+
++#ifdef CONFIG_ARCH_NSLU2
++static const char *probes[] = { "cmdlinepart", "RedBoot", "NSLU2", NULL };
++#else
+ static const char *probes[] = { "RedBoot", "cmdlinepart", NULL };
++#endif
+
+ static int
+ ixp4xx_flash_remove(struct device *_dev)
+diff -purN linux-2.6.9/include/asm-arm/arch-ixp4xx/hardware.h linux-2.6.9-new/include/asm-arm/arch-ixp4xx/hardware.h
+--- linux-2.6.9/include/asm-arm/arch-ixp4xx/hardware.h 2004-06-15 22:19:02.000000000 -0700
++++ linux-2.6.9-new/include/asm-arm/arch-ixp4xx/hardware.h 2004-09-14 03:59:28.000000000 -0700
+@@ -37,5 +37,6 @@
+ #include "ixdp425.h"
+ #include "coyote.h"
+ #include "prpmc1100.h"
++#include "nslu2.h"
+
+ #endif /* _ASM_ARCH_HARDWARE_H */
+diff -purN linux-2.6.9/include/asm-arm/arch-ixp4xx/irqs.h linux-2.6.9-new/include/asm-arm/arch-ixp4xx/irqs.h
+--- linux-2.6.9/include/asm-arm/arch-ixp4xx/irqs.h 2004-06-15 22:19:37.000000000 -0700
++++ linux-2.6.9-new/include/asm-arm/arch-ixp4xx/irqs.h 2004-09-14 03:59:28.000000000 -0700
+@@ -75,4 +75,12 @@
+ #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
+diff -Nru linux-2.6.9/arch/arm/mach-ixp4xx/common-pci.c linux-2.6.9/arch/arm/mach-ixp4xx/common-pci.c
+--- linux-2.6.9/arch/arm/mach-ixp4xx/common-pci.c 2004-10-08 13:59:23 -07:00
++++ linux-2.6.9/arch/arm/mach-ixp4xx/common-pci.c 2004-10-08 13:59:23 -07:00
+@@ -239,9 +239,10 @@
+ return 0xffffffff;
+ }
+
+-static int read_config(u8 bus_num, u16 devfn, int where, int size, u32 *value)
++static int ixp4xx_pci_read_config(struct pci_bus *bus, u16 devfn, int where, int size, u32 *value)
+ {
+ u32 n, byte_enables, addr, data;
++ u8 bus_num = bus->number;
+
+ pr_debug("read_config from %d size %d dev %d:%d:%d\n", where, size,
+ bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn));
+@@ -261,9 +262,10 @@
+ return PCIBIOS_SUCCESSFUL;
+ }
+
+-static int write_config(u8 bus_num, u16 devfn, int where, int size, u32 value)
++static int ixp4xx_pci_write_config(struct pci_bus *bus, u16 devfn, int where, int size, u32 value)
+ {
+ u32 n, byte_enables, addr, data;
++ u8 bus_num = bus->number;
+
+ pr_debug("write_config_byte %#x to %d size %d dev %d:%d:%d\n", value, where,
+ size, bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn));
+@@ -281,30 +283,10 @@
+ return PCIBIOS_SUCCESSFUL;
+ }
+
+-/*
+- * Generalized PCI config access functions.
+- */
+-static int ixp4xx_read_config(struct pci_bus *bus, unsigned int devfn,
+- int where, int size, u32 *value)
+-{
+- if (bus->number && !PCI_SLOT(devfn))
+- return local_read_config(where, size, value);
+- return read_config(bus->number, devfn, where, size, value);
+-}
+-
+-static int ixp4xx_write_config(struct pci_bus *bus, unsigned int devfn,
+- int where, int size, u32 value)
+-{
+- if (bus->number && !PCI_SLOT(devfn))
+- return local_write_config(where, size, value);
+- return write_config(bus->number, devfn, where, size, value);
+-}
+-
+ struct pci_ops ixp4xx_ops = {
+- .read = ixp4xx_read_config,
+- .write = ixp4xx_write_config,
++ .read = ixp4xx_pci_read_config,
++ .write = ixp4xx_pci_write_config,
+ };
+-
+
+ /*
+ * PCI abort handler
+diff -Nru linux-2.6.9/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h linux-2.6.9/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+--- linux-2.6.9/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2004-10-08 13:59:23 -07:00
++++ linux-2.6.9/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2004-10-08 13:59:23 -07:00
+@@ -55,7 +55,7 @@
+ * PCI Config registers
+ */
+ #define IXP4XX_PCI_CFG_BASE_PHYS (0xC0000000)
+-#define IXP4XX_PCI_CFG_BASE_VIRT (0xFFBFD000)
++#define IXP4XX_PCI_CFG_BASE_VIRT (0xFFBFE000)
+ #define IXP4XX_PCI_CFG_REGION_SIZE (0x00001000)
+
+ /*
+--- linux-2.6.9/drivers/i2c/chips/Kconfig.orig 2004-06-16 01:19:35.000000000 -0400
++++ linux-2.6.9/drivers/i2c/chips/Kconfig 2004-09-22 18:09:48.454794342 -0400
+@@ -240,6 +240,16 @@
+ This driver can also be built as a module. If so, the module
+ will be called pcf8591.
+
++config SENSORS_X1205
++ tristate "Xicor X1205 RTC chip"
++ depends on I2C && EXPERIMENTAL
++ select I2C_SENSOR
++ help
++ If you say yes here you get support for the Xicor x1205 RTC chip.
++
++ This driver can also be built as a module. If so, the module
++ will be called x1205-rtc
++
+ config SENSORS_RTC8564
+ tristate "Epson 8564 RTC chip"
+ depends on I2C && EXPERIMENTA
+--- linux-2.6.9/drivers/i2c/chips/Makefile.old 2004-06-16 01:20:26.000000000 -0400
++++ linux-2.6.9/drivers/i2c/chips/Makefile 2004-09-22 16:48:06.435580334 -0400
+@@ -25,6 +25,7 @@
+ obj-$(CONFIG_SENSORS_RTC8564) += rtc8564.o
+ obj-$(CONFIG_SENSORS_VIA686A) += via686a.o
+ obj-$(CONFIG_SENSORS_W83L785TS) += w83l785ts.o
++obj-$(CONFIG_SENSORS_X1205) += x1205-rtc.o
+ obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
+
+ ifeq ($(CONFIG_I2C_DEBUG_CHIP),y)
+
+--- linux-2.6.9/arch/arm/mach-ixp4xx/common.c.orig 2004-10-18 17:54:25.000000000 -0400
++++ linux-2.6.9/arch/arm/mach-ixp4xx/common.c 2004-10-21 14:22:40.766271419 -0400
+@@ -227,10 +227,10 @@
+ /*
+ * Catch up with the real idea of time
+ */
+- do {
++ while((*IXP4XX_OSTS - last_jiffy_time) > LATCH) {
+ timer_tick(regs);
+ last_jiffy_time += LATCH;
+- } while((*IXP4XX_OSTS - last_jiffy_time) > LATCH);
++ };
+
+ return IRQ_HANDLED;
+ }
+--- linux-2.6.9/include/linux/i2c-id.h.orig 2004-10-18 17:53:10.000000000 -0400
++++ linux-2.6.9/include/linux/i2c-id.h 2004-10-21 14:14:17.115262597 -0400
+@@ -109,7 +109,7 @@
+ #define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */
+ #define I2C_DRIVERID_TDA7313 62 /* TDA7313 audio processor */
+ #define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */
+-
++#define I2C_DRIVERID_X1205 0xF0
+
+ #define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */
+ #define I2C_DRIVERID_EXP1 0xF1
+diff -Nru a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
+--- a/arch/arm/kernel/entry-header.S 2004-10-08 13:59:23 -07:00
++++ b/arch/arm/kernel/entry-header.S 2004-10-08 13:59:23 -07:00
+@@ -4,8 +4,9 @@
+ #include <asm/assembler.h>
+ #include <asm/constants.h>
+ #include <asm/errno.h>
+ #include <asm/hardware.h>
+ #include <asm/arch/irqs.h>
++#include <asm/arch/entry-macro.S>
+
+ #ifndef MODE_SVC
+ #define MODE_SVC 0x13
+diff -Nru a/include/asm-arm/arch-ixp4xx/entry-macro.S b/include/asm-arm/arch-ixp4xx/entry-macro.S
+--- /dev/null Wed Dec 31 16:00:00 1969
++++ b/include/asm-arm/arch-ixp4xx/entry-macro.S Thu Sep 16 13:15:46 2004
+@@ -0,0 +1,25 @@
++/*
++ * include/asm-arm/arch-ixp4xx/entry-macro.S
++ *
++ * Low-level IRQ helper macros for IXP4xx-based platforms
++ *
++ * 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.
++ */
++
++ .macro disable_fiq
++ .endm
++
++ .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
++
++ ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET)
++ ldr \irqstat, [\irqstat] @ get interrupts
++ cmp \irqstat, #0
++ beq 1001f
++ clz \irqnr, \irqstat
++ mov \base, #31
++ subs \irqnr, \base, \irqnr
++
++1001:
++ .endm
+
+diff -purN linux-2.6.9.orig/arch/arm/boot/compressed/head.S linux-2.6.9/arch/arm/boot/compressed/head.S
+--- linux-2.6.9.orig/arch/arm/boot/compressed/head.S 2004-10-18 17:55:07.000000000 -0400
++++ linux-2.6.9/arch/arm/boot/compressed/head.S 2004-10-31 03:05:25.011878371 -0500
+@@ -79,6 +79,7 @@
+ .endm
+ .macro writeb, rb
+ str \rb, [r3, #0]
++ .endm
+ #elif defined(CONFIG_ARCH_IXP2000)
+ .macro loadsp, rb
+ mov \rb, #0xc0000000
+diff -purN linux-2.6.9.orig/arch/arm/boot/compressed/head-xscale.S linux-2.6.9/arch/arm/boot/compressed/head-xscale.S
+--- linux-2.6.9.orig/arch/arm/boot/compressed/head-xscale.S 2004-10-18 17:53:45.000000000 -0400
++++ linux-2.6.9/arch/arm/boot/compressed/head-xscale.S 2004-10-31 03:05:25.013878040 -0500
+@@ -56,3 +56,7 @@ __XScale_start:
+ mov r7, #MACH_TYPE_COTULLA_IDP
+ #endif
+
++#ifdef CONFIG_ARCH_NSLU2
++ mov r7, #(MACH_TYPE_NSLU2 & 0xff)
++ orr r7, r7, #(MACH_TYPE_NSLU2 & 0xff00)
++#endif
+--- linux-2.6.9.orig/arch/arm/tools/mach-types 2004-10-18 17:54:08.000000000 -0400
++++ linux-2.6.9/arch/arm/tools/mach-types 2004-10-31 03:05:25.006879199 -0500
+@@ -6,7 +6,7 @@
+ # To add an entry into this database, please see Documentation/arm/README,
+ # or contact rmk@arm.linux.org.uk
+ #
+-# Last update: Thu Sep 30 15:23:21 2004
++# Last update: Mon Oct 25 04:14:24 2004
+ #
+ # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
+ #
+@@ -595,8 +595,8 @@ pxa_dnp2110 MACH_PXA_DNP2110 PXA_DNP211
+ xaeniax MACH_XAENIAX XAENIAX 585
+ somn4250 MACH_SOMN4250 SOMN4250 586
+ pleb2 MACH_PLEB2 PLEB2 587
+-cwl MACH_CWL CWL 588
+-gd MACH_GD GD 589
++cornwallis MACH_CORNWALLIS CORNWALLIS 588
++gurney_drv MACH_GURNEY_DRV GURNEY_DRV 589
+ chaffee MACH_CHAFFEE CHAFFEE 590
+ rms101 MACH_RMS101 RMS101 591
+ rx3715 MACH_RX3715 RX3715 592
+@@ -604,7 +604,7 @@ swift MACH_SWIFT SWIFT 593
+ roverp7 MACH_ROVERP7 ROVERP7 594
+ pr818s MACH_PR818S PR818S 595
+ trxpro MACH_TRXPRO TRXPRO 596
+-nslu2 MACH_NSLU2 NSLU2 597
++nslu2 ARCH_NSLU2 NSLU2 597
+ e400 MACH_E400 E400 598
+ trab MACH_TRAB TRAB 599
+ cmc_pu2 MACH_CMC_PU2 CMC_PU2 600
+@@ -615,3 +615,18 @@ ixdpg425 MACH_IXDPG425 IXDPG425 604
+ tomtomgo MACH_TOMTOMGO TOMTOMGO 605
+ versatile_ab MACH_VERSATILE_AB VERSATILE_AB 606
+ edb9307 MACH_EDB9307 EDB9307 607
++sg565 MACH_SG565 SG565 608
++lpd79524 MACH_LPD79524 LPD79524 609
++lpd79525 MACH_LPD79525 LPD79525 610
++rms100 MACH_RMS100 RMS100 611
++kb9200 MACH_KB9200 KB9200 612
++sx1 MACH_SX1 SX1 613
++hms39c7092 MACH_HMS39C7092 HMS39C7092 614
++armadillo MACH_ARMADILLO ARMADILLO 615
++ipcu MACH_IPCU IPCU 616
++loox720 MACH_LOOX720 LOOX720 617
++ixdp465 MACH_IXDP465 IXDP465 618
++ixdp2351 MACH_IXDP2351 IXDP2351 619
++adsvix MACH_ADSVIX ADSVIX 620
++dm270 MACH_DM270 DM270 621
++
diff --git a/packages/linux/openslug-kernel-2.6.9/usbnet.patch b/packages/linux/openslug-kernel-2.6.9/usbnet.patch
index e69de29bb2..a89c392f47 100644
--- a/packages/linux/openslug-kernel-2.6.9/usbnet.patch
+++ b/packages/linux/openslug-kernel-2.6.9/usbnet.patch
@@ -0,0 +1,17 @@
+--- linux-2.6.9/drivers/usb/net/usbnet_orig.c 2005-02-11 19:14:59.455525200 -0500
++++ linux-2.6.9/drivers/usb/net/usbnet.c 2005-02-11 19:17:29.751676712 -0500
+@@ -2374,12 +2374,13 @@
+ #endif
+ size = (sizeof (struct ethhdr) + dev->net->mtu);
+
+- if ((skb = alloc_skb (size, flags)) == 0) {
++ if ((skb = alloc_skb (size + NET_IP_ALIGN, flags)) == NULL) {
+ devdbg (dev, "no rx skb");
+ defer_kevent (dev, EVENT_RX_MEMORY);
+ usb_free_urb (urb);
+ return;
+ }
++ skb_reserve (skb, NET_IP_ALIGN);
+
+ entry = (struct skb_data *) skb->cb;
+ entry->urb = urb;