nslu2-kernel: working 2.6.14-rc2 kernel
authorJohn Bowler <jbowler@nslu2-linux.org>
Sun, 25 Sep 2005 21:48:39 +0000 (21:48 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sun, 25 Sep 2005 21:48:39 +0000 (21:48 +0000)
packages/linux/nslu2-kernel/2.6.14/10-ixp4xx-ticks.patch [deleted file]
packages/linux/nslu2-kernel/2.6.14/15-ixp4xx-set-irq-type-return.patch [new file with mode: 0644]
packages/linux/nslu2-kernel/2.6.14/20-timer.patch [new file with mode: 0644]
packages/linux/nslu2-kernel/2.6.14/50-nslu2-general.patch
packages/linux/nslu2-kernel/2.6.14/50-nslu2-include.patch
packages/linux/nslu2-kernel_2.6.14-rc2.bb

diff --git a/packages/linux/nslu2-kernel/2.6.14/10-ixp4xx-ticks.patch b/packages/linux/nslu2-kernel/2.6.14/10-ixp4xx-ticks.patch
deleted file mode 100644 (file)
index bd32719..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
---- linux-2.6.14-rc2/include/asm-arm/arch-ixp4xx/timex.h       2005-09-17 12:42:45.000000000 +0200
-+++ test3/include/asm-arm/arch-ixp4xx/timex.h  2005-09-24 14:51:41.000000000 +0200
-@@ -12,4 +12,7 @@
-  */
- #define FREQ 66666666
- #define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
-+#define CLOCK_TICKS_PER_USEC ((CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC)
-+
-+extern u32 ixp4xx_ticks_per_usec;
---- linux-2.6.14-rc2/arch/arm/mach-ixp4xx/common.c     2005-09-24 13:16:59.000000000 +0200
-+++ test3/arch/arm/mach-ixp4xx/common.c        2005-09-24 17:16:11.000000000 +0200
-@@ -239,7 +239,7 @@
- static unsigned volatile last_jiffy_time;
--#define CLOCK_TICKS_PER_USEC  ((CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC)
-+u32 ixp4xx_ticks_per_usec = CLOCK_TICKS_PER_USEC;
- /* IRQs are disabled before entering here from do_gettimeofday() */
- static unsigned long ixp4xx_gettimeoffset(void)
-@@ -248,7 +248,7 @@
-       elapsed = *IXP4XX_OSTS - last_jiffy_time;
--      return elapsed / CLOCK_TICKS_PER_USEC;
-+      return elapsed / ixp4xx_ticks_per_usec;
- }
- static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-@@ -328,6 +328,10 @@
- void __init ixp4xx_sys_init(void)
- {
-+      printk(KERN_INFO "%s: ticks_per_usec, std: %ld, this: %u\n",
-+              __FUNCTION__,
-+              CLOCK_TICKS_PER_USEC, ixp4xx_ticks_per_usec);
-+
-       if (cpu_is_ixp46x()) {
-               platform_add_devices(ixp46x_devices,
-                               ARRAY_SIZE(ixp46x_devices));
diff --git a/packages/linux/nslu2-kernel/2.6.14/15-ixp4xx-set-irq-type-return.patch b/packages/linux/nslu2-kernel/2.6.14/15-ixp4xx-set-irq-type-return.patch
new file mode 100644 (file)
index 0000000..a4130a3
--- /dev/null
@@ -0,0 +1,24 @@
+# The ixp4xx_set_irq_type API is missing return statements which causes
+# the result to be unusable and the error detection non existent.
+#
+--- linux-2.6.13/arch/arm/mach-ixp4xx/orig/common.c    2005-09-25 09:52:57.658059680 -0700
++++ linux-2.6.13/arch/arm/mach-ixp4xx/common.c 2005-09-25 09:53:02.354355199 -0700
+@@ -125,7 +125,8 @@
+       } else if (type & IRQT_LOW) {
+               int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW;
+               irq_type = IXP4XX_IRQ_LEVEL;
+-      }
++      } else
++              return -EINVAL;
+       ixp4xx_config_irq(irq, irq_type);
+@@ -142,6 +143,8 @@
+       /* Set the new style */
+       *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE));
++
++      return 0;
+ }
+ static void ixp4xx_irq_mask(unsigned int irq)
diff --git a/packages/linux/nslu2-kernel/2.6.14/20-timer.patch b/packages/linux/nslu2-kernel/2.6.14/20-timer.patch
new file mode 100644 (file)
index 0000000..5d78ce2
--- /dev/null
@@ -0,0 +1,16 @@
+diff -urN linux-2.6.13.1/include/asm-arm/arch-ixp4xx/timex.h nslu2-2.6.13.1/include/asm-arm/arch-ixp4xx/timex.h
+--- linux-2.6.13.1/include/asm-arm/arch-ixp4xx/timex.h 2005-09-17 12:42:45.000000000 +0200
++++ nslu2-2.6.13.1/include/asm-arm/arch-ixp4xx/timex.h 2005-09-17 12:15:31.000000000 +0200
+@@ -9,7 +9,12 @@
+  * We use IXP425 General purpose timer for our timer needs, it runs at 
+  * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
+  * timer register ignores the bottom 2 bits of the LATCH value.
++ * The NSLU2 has a 33.00MHz crystal, so a different FREQ is required.
+  */
++#ifdef CONFIG_MACH_NSLU2
++#define FREQ 66000000
++#else
+ #define FREQ 66666666
++#endif
+ #define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
index b973414..4f473e5 100644 (file)
@@ -1160,7 +1160,7 @@ diff -urN linux-2.6.14-rc2/arch/arm/mach-ixp4xx/nslu2-setup.c test3/arch/arm/mac
 +static void __init nslu2_init(void)
 +{
 +      /* NSLU2 has a 33.00 MHZ crystal, we need to cope with that */
-+      ixp4xx_ticks_per_usec = NSLU2_CLOCK_TICKS_PER_USEC;
++/*    ixp4xx_ticks_per_usec = NSLU2_CLOCK_TICKS_PER_USEC;*/
 +
 +      ixp4xx_sys_init();
 +
index ab6ac36..afd395b 100644 (file)
 +#define NSLU2_PCI_INTA_PIN    11
 +#define NSLU2_PCI_INTB_PIN    10
 +#define NSLU2_PCI_INTC_PIN    9
-+#define NSLU2_PCI_INTD_PIN    8
++//#define NSLU2_PCI_INTD_PIN  8
 +
 +
 +/* NSLU2 Timer */
-+#define NSLU2_FREQ 66000000
-+#define NSLU2_CLOCK_TICK_RATE (((NSLU2_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
-+#define NSLU2_CLOCK_TICKS_PER_USEC ((NSLU2_CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC)
++//#define NSLU2_FREQ 66000000
++//#define NSLU2_CLOCK_TICK_RATE (((NSLU2_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
++//#define NSLU2_CLOCK_TICKS_PER_USEC ((NSLU2_CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC)
 +
index 6430abc..a7769ed 100644 (file)
@@ -8,7 +8,7 @@ PR_CONFIG = "0"
 # Increment the number below (i.e. the digits after PR) when
 # making changes within this file or for changes to the patches
 # applied to the kernel.
-PR = "r0.${PR_CONFIG}"
+PR = "r1.${PR_CONFIG}"
 
 include nslu2-kernel.inc
 
@@ -26,8 +26,9 @@ N2K_FILES = ""
 N2K_PATCHES = "\
        file://10-ixp4xx-copy-from.patch;patch=1 \
        file://10-ixp4xx-gpio.patch;patch=1 \
-       file://10-ixp4xx-ticks.patch;patch=1 \
+       file://15-ixp4xx-set-irq-type-return.patch;patch=1 \
        file://15-ixp4xx-writesb-l-w.patch;patch=1 \
+       file://20-timer.patch;patch=1 \
        file://30-i2c-x1205.patch;patch=1 \
        file://50-nslu2-arch.patch;patch=1 \
        file://50-nslu2-general.patch;patch=1 \
@@ -39,4 +40,4 @@ N2K_PATCHES = "\
 # specific to the bootstrap of *this* kernel in here - DISTRO specfic
 # config must be in CMDLINE_ROOT (see the full definition of CMDLINE
 # in nslu2-kernel.inc)
-CMDLINE_KERNEL_OPTIONS = "x1205.hctosys=1"
+CMDLINE_KERNEL_OPTIONS = ""