]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/linux/openslug-kernel-2.6.9/nslu2_2.6.9.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / linux / openslug-kernel-2.6.9 / nslu2_2.6.9.patch
1 diff -purN linux-2.6.9/arch/arm/mach-ixp4xx/Kconfig linux-2.6.9-new/arch/arm/mach-ixp4xx/Kconfig
2 --- linux-2.6.9/arch/arm/mach-ixp4xx/Kconfig    2004-06-15 22:19:01.000000000 -0700
3 +++ linux-2.6.9-new/arch/arm/mach-ixp4xx/Kconfig        2004-09-14 03:59:28.000000000 -0700
4 @@ -29,6 +29,13 @@ config ARCH_IXDP425
5           IXDP425 Development Platform (Also known as Richfield).  
6           For more information on this platform, see Documentation/arm/IXP4xx.
7  
8 +config ARCH_NSLU2
9 +       bool "NSLU2"
10 +       help
11 +         Say 'Y' here if you want your kernel to support Linksys's 
12 +         NSLU2 NAS device. For more information on this platform, 
13 +         see http://www.nslu2-linux.org
14 +
15  #
16  # IXCDP1100 is the exact same HW as IXDP425, but with a different machine 
17  # number from the bootloader due to marketing monkeys, so we just enable it
18 --- linux-2.6.9.orig/arch/arm/mach-ixp4xx/Makefile      2004-06-16 01:18:59.000000000 -0400
19 +++ linux-2.6.9/arch/arm/mach-ixp4xx/Makefile   2004-09-24 01:35:22.051627330 -0400
20 @@ -4,7 +4,6 @@
21  
22  obj-y  += common.o common-pci.o 
23  
24 -obj-$(CONFIG_ARCH_IXDP4XX)     += ixdp425-pci.o ixdp425-setup.o
25  obj-$(CONFIG_ARCH_ADI_COYOTE)  += coyote-pci.o coyote-setup.o
26  obj-$(CONFIG_ARCH_PRPMC1100)   += prpmc1100-pci.o prpmc1100-setup.o
27 -
28 +obj-$(CONFIG_ARCH_NSLU2)       += nslu2-pci.o nslu2-setup.o nslu2-part.o nslu2-io.o
29 diff -purN linux-2.6.9/drivers/mtd/maps/ixp4xx.c linux-2.6.9-new/drivers/mtd/maps/ixp4xx.c
30 --- linux-2.6.9/drivers/mtd/maps/ixp4xx.c       2004-06-15 22:18:38.000000000 -0700
31 +++ linux-2.6.9-new/drivers/mtd/maps/ixp4xx.c   2004-09-14 03:59:28.000000000 -0700
32 @@ -82,7 +82,11 @@ struct ixp4xx_flash_info {
33         struct resource *res;
34  };
35  
36 +#ifdef CONFIG_ARCH_NSLU2
37 +static const char *probes[] = { "cmdlinepart", "RedBoot", "NSLU2", NULL };
38 +#else
39  static const char *probes[] = { "RedBoot", "cmdlinepart", NULL };
40 +#endif
41  
42  static int
43  ixp4xx_flash_remove(struct device *_dev)
44 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
45 --- linux-2.6.9/include/asm-arm/arch-ixp4xx/hardware.h  2004-06-15 22:19:02.000000000 -0700
46 +++ linux-2.6.9-new/include/asm-arm/arch-ixp4xx/hardware.h      2004-09-14 03:59:28.000000000 -0700
47 @@ -37,5 +37,6 @@
48  #include "ixdp425.h"
49  #include "coyote.h"
50  #include "prpmc1100.h"
51 +#include "nslu2.h"
52  
53  #endif  /* _ASM_ARCH_HARDWARE_H */
54 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
55 --- linux-2.6.9/include/asm-arm/arch-ixp4xx/irqs.h      2004-06-15 22:19:37.000000000 -0700
56 +++ linux-2.6.9-new/include/asm-arm/arch-ixp4xx/irqs.h  2004-09-14 03:59:28.000000000 -0700
57 @@ -75,4 +75,12 @@
58  #define        IRQ_COYOTE_PCI_SLOT1    IRQ_IXP4XX_GPIO11
59  #define        IRQ_COYOTE_IDE          IRQ_IXP4XX_GPIO5
60  
61 +/*
62 + * NSLU2 board IRQs
63 + */
64 +#define        IRQ_NSLU2_PCI_INTA      IRQ_IXP4XX_GPIO11
65 +#define        IRQ_NSLU2_PCI_INTB      IRQ_IXP4XX_GPIO10
66 +#define        IRQ_NSLU2_PCI_INTC      IRQ_IXP4XX_GPIO9
67 +
68 +
69  #endif
70 diff -Nru linux-2.6.9/arch/arm/mach-ixp4xx/common-pci.c linux-2.6.9/arch/arm/mach-ixp4xx/common-pci.c
71 --- linux-2.6.9/arch/arm/mach-ixp4xx/common-pci.c       2004-10-08 13:59:23 -07:00
72 +++ linux-2.6.9/arch/arm/mach-ixp4xx/common-pci.c       2004-10-08 13:59:23 -07:00
73 @@ -239,9 +239,10 @@
74         return 0xffffffff;
75  }
76  
77 -static int read_config(u8 bus_num, u16 devfn, int where, int size, u32 *value)
78 +static int ixp4xx_pci_read_config(struct pci_bus *bus, u16 devfn, int where, int size, u32 *value)
79  {
80         u32 n, byte_enables, addr, data;
81 +       u8 bus_num = bus->number;
82  
83         pr_debug("read_config from %d size %d dev %d:%d:%d\n", where, size,
84                 bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn));
85 @@ -261,9 +262,10 @@
86         return PCIBIOS_SUCCESSFUL;
87  }
88  
89 -static int write_config(u8 bus_num, u16 devfn, int where, int size, u32 value)
90 +static int ixp4xx_pci_write_config(struct pci_bus *bus,  u16 devfn, int where, int size, u32 value)
91  {
92         u32 n, byte_enables, addr, data;
93 +       u8 bus_num = bus->number;
94  
95         pr_debug("write_config_byte %#x to %d size %d dev %d:%d:%d\n", value, where,
96                 size, bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn));
97 @@ -281,30 +283,10 @@
98         return PCIBIOS_SUCCESSFUL;
99  }
100  
101 -/*
102 - *     Generalized PCI config access functions.
103 - */
104 -static int ixp4xx_read_config(struct pci_bus *bus, unsigned int devfn,
105 -       int where, int size, u32 *value)
106 -{
107 -       if (bus->number && !PCI_SLOT(devfn))
108 -               return local_read_config(where, size, value);
109 -       return read_config(bus->number, devfn, where, size, value);
110 -}
111 -
112 -static int ixp4xx_write_config(struct pci_bus *bus, unsigned int devfn,
113 -       int where, int size, u32 value)
114 -{
115 -       if (bus->number && !PCI_SLOT(devfn))
116 -               return local_write_config(where, size, value);
117 -       return write_config(bus->number, devfn, where, size, value);
118 -}
119 -
120  struct pci_ops ixp4xx_ops = {
121 -       .read =  ixp4xx_read_config,
122 -       .write = ixp4xx_write_config,
123 +       .read =  ixp4xx_pci_read_config,
124 +       .write = ixp4xx_pci_write_config,
125  };
126 -
127  
128  /*
129   * PCI abort handler
130 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
131 --- linux-2.6.9/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h       2004-10-08 13:59:23 -07:00
132 +++ linux-2.6.9/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h       2004-10-08 13:59:23 -07:00
133 @@ -55,7 +55,7 @@
134   * PCI Config registers
135   */
136  #define IXP4XX_PCI_CFG_BASE_PHYS       (0xC0000000)
137 -#define        IXP4XX_PCI_CFG_BASE_VIRT        (0xFFBFD000)
138 +#define        IXP4XX_PCI_CFG_BASE_VIRT        (0xFFBFE000)
139  #define IXP4XX_PCI_CFG_REGION_SIZE     (0x00001000)
140  
141  /*
142 --- linux-2.6.9/drivers/i2c/chips/Kconfig.orig  2004-06-16 01:19:35.000000000 -0400
143 +++ linux-2.6.9/drivers/i2c/chips/Kconfig       2004-09-22 18:09:48.454794342 -0400
144 @@ -240,6 +240,16 @@
145           This driver can also be built as a module.  If so, the module
146           will be called pcf8591.
147  
148 +config SENSORS_X1205
149 +       tristate "Xicor X1205 RTC chip"
150 +       depends on I2C && EXPERIMENTAL
151 +       select I2C_SENSOR
152 +       help
153 +         If you say yes here you get support for the Xicor x1205 RTC chip.
154
155 +         This driver can also be built as a module.  If so, the module
156 +         will be called x1205-rtc
157 +
158  config SENSORS_RTC8564
159         tristate "Epson 8564 RTC chip"
160         depends on I2C && EXPERIMENTA
161 --- linux-2.6.9/drivers/i2c/chips/Makefile.old  2004-06-16 01:20:26.000000000 -0400
162 +++ linux-2.6.9/drivers/i2c/chips/Makefile      2004-09-22 16:48:06.435580334 -0400
163 @@ -25,6 +25,7 @@
164  obj-$(CONFIG_SENSORS_RTC8564)  += rtc8564.o
165  obj-$(CONFIG_SENSORS_VIA686A)  += via686a.o
166  obj-$(CONFIG_SENSORS_W83L785TS)        += w83l785ts.o
167 +obj-$(CONFIG_SENSORS_X1205)     += x1205-rtc.o
168  obj-$(CONFIG_ISP1301_OMAP)     += isp1301_omap.o
169  
170  ifeq ($(CONFIG_I2C_DEBUG_CHIP),y)
171
172 --- linux-2.6.9/arch/arm/mach-ixp4xx/common.c.orig      2004-10-18 17:54:25.000000000 -0400
173 +++ linux-2.6.9/arch/arm/mach-ixp4xx/common.c   2004-10-21 14:22:40.766271419 -0400
174 @@ -227,10 +227,10 @@
175         /*
176          * Catch up with the real idea of time
177          */
178 -       do {    
179 +       while((*IXP4XX_OSTS - last_jiffy_time) > LATCH) {
180                 timer_tick(regs);
181                 last_jiffy_time += LATCH;
182 -       } while((*IXP4XX_OSTS - last_jiffy_time) > LATCH);
183 +       };
184  
185         return IRQ_HANDLED;
186  }
187 --- linux-2.6.9/include/linux/i2c-id.h.orig     2004-10-18 17:53:10.000000000 -0400
188 +++ linux-2.6.9/include/linux/i2c-id.h  2004-10-21 14:14:17.115262597 -0400
189 @@ -109,7 +109,7 @@
190  #define I2C_DRIVERID_OVCAMCHIP 61      /* OmniVision CMOS image sens.  */
191  #define I2C_DRIVERID_TDA7313   62      /* TDA7313 audio processor      */
192  #define I2C_DRIVERID_MAX6900   63      /* MAX6900 real-time clock      */
193 -
194 +#define I2C_DRIVERID_X1205     0xF0
195  
196  #define I2C_DRIVERID_EXP0      0xF0    /* experimental use id's        */
197  #define I2C_DRIVERID_EXP1      0xF1
198 diff -Nru a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
199 --- a/arch/arm/kernel/entry-header.S    2004-10-08 13:59:23 -07:00
200 +++ b/arch/arm/kernel/entry-header.S    2004-10-08 13:59:23 -07:00
201 @@ -4,8 +4,9 @@
202  #include <asm/assembler.h>
203  #include <asm/constants.h>
204  #include <asm/errno.h>
205  #include <asm/hardware.h>
206  #include <asm/arch/irqs.h>
207 +#include <asm/arch/entry-macro.S>
208  
209  #ifndef MODE_SVC
210  #define MODE_SVC 0x13
211 diff -Nru a/include/asm-arm/arch-ixp4xx/entry-macro.S b/include/asm-arm/arch-ixp4xx/entry-macro.S
212 --- /dev/null   Wed Dec 31 16:00:00 1969
213 +++ b/include/asm-arm/arch-ixp4xx/entry-macro.S Thu Sep 16 13:15:46 2004
214 @@ -0,0 +1,25 @@
215 +/*
216 + * include/asm-arm/arch-ixp4xx/entry-macro.S
217 + *
218 + * Low-level IRQ helper macros for IXP4xx-based platforms
219 + * 
220 + * This file is licensed under  the terms of the GNU General Public 
221 + * License version 2. This program is licensed "as is" without any 
222 + * warranty of any kind, whether express or implied.
223 + */
224 +
225 +               .macro  disable_fiq
226 +               .endm
227 +
228 +               .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
229 +
230 +               ldr     \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET)
231 +               ldr     \irqstat, [\irqstat]            @ get interrupts
232 +               cmp     \irqstat, #0
233 +               beq     1001f
234 +               clz     \irqnr, \irqstat
235 +               mov     \base, #31
236 +               subs    \irqnr, \base, \irqnr
237 +               
238 +1001:
239 +               .endm
240
241 diff -purN linux-2.6.9.orig/arch/arm/boot/compressed/head.S linux-2.6.9/arch/arm/boot/compressed/head.S
242 --- linux-2.6.9.orig/arch/arm/boot/compressed/head.S    2004-10-18 17:55:07.000000000 -0400
243 +++ linux-2.6.9/arch/arm/boot/compressed/head.S 2004-10-31 03:05:25.011878371 -0500
244 @@ -79,6 +79,7 @@
245                 .endm
246                 .macro  writeb, rb
247                 str     \rb, [r3, #0]
248 +               .endm
249  #elif defined(CONFIG_ARCH_IXP2000)
250                 .macro  loadsp, rb
251                 mov     \rb, #0xc0000000
252 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
253 --- linux-2.6.9.orig/arch/arm/boot/compressed/head-xscale.S     2004-10-18 17:53:45.000000000 -0400
254 +++ linux-2.6.9/arch/arm/boot/compressed/head-xscale.S  2004-10-31 03:05:25.013878040 -0500
255 @@ -56,3 +56,7 @@ __XScale_start:
256                 mov     r7, #MACH_TYPE_COTULLA_IDP
257  #endif
258  
259 +#ifdef CONFIG_ARCH_NSLU2
260 +               mov     r7, #(MACH_TYPE_NSLU2 & 0xff)
261 +               orr     r7, r7, #(MACH_TYPE_NSLU2 & 0xff00)
262 +#endif
263 --- linux-2.6.9.orig/arch/arm/tools/mach-types  2004-10-18 17:54:08.000000000 -0400
264 +++ linux-2.6.9/arch/arm/tools/mach-types       2004-10-31 03:05:25.006879199 -0500
265 @@ -6,7 +6,7 @@
266  # To add an entry into this database, please see Documentation/arm/README,
267  # or contact rmk@arm.linux.org.uk
268  #
269 -# Last update: Thu Sep 30 15:23:21 2004
270 +# Last update: Mon Oct 25 04:14:24 2004
271  #
272  # machine_is_xxx       CONFIG_xxxx             MACH_TYPE_xxx           number
273  #
274 @@ -595,8 +595,8 @@ pxa_dnp2110         MACH_PXA_DNP2110        PXA_DNP211
275  xaeniax                        MACH_XAENIAX            XAENIAX                 585
276  somn4250               MACH_SOMN4250           SOMN4250                586
277  pleb2                  MACH_PLEB2              PLEB2                   587
278 -cwl                    MACH_CWL                CWL                     588
279 -gd                     MACH_GD                 GD                      589
280 +cornwallis             MACH_CORNWALLIS         CORNWALLIS              588
281 +gurney_drv             MACH_GURNEY_DRV         GURNEY_DRV              589
282  chaffee                        MACH_CHAFFEE            CHAFFEE                 590
283  rms101                 MACH_RMS101             RMS101                  591
284  rx3715                 MACH_RX3715             RX3715                  592
285 @@ -604,7 +604,7 @@ swift                       MACH_SWIFT              SWIFT                   593
286  roverp7                        MACH_ROVERP7            ROVERP7                 594
287  pr818s                 MACH_PR818S             PR818S                  595
288  trxpro                 MACH_TRXPRO             TRXPRO                  596
289 -nslu2                  MACH_NSLU2              NSLU2                   597
290 +nslu2                  ARCH_NSLU2              NSLU2                   597
291  e400                   MACH_E400               E400                    598
292  trab                   MACH_TRAB               TRAB                    599
293  cmc_pu2                        MACH_CMC_PU2            CMC_PU2                 600
294 @@ -615,3 +615,18 @@ ixdpg425           MACH_IXDPG425           IXDPG425                604
295  tomtomgo               MACH_TOMTOMGO           TOMTOMGO                605
296  versatile_ab           MACH_VERSATILE_AB       VERSATILE_AB            606
297  edb9307                        MACH_EDB9307            EDB9307                 607
298 +sg565                  MACH_SG565              SG565                   608
299 +lpd79524               MACH_LPD79524           LPD79524                609
300 +lpd79525               MACH_LPD79525           LPD79525                610
301 +rms100                 MACH_RMS100             RMS100                  611
302 +kb9200                 MACH_KB9200             KB9200                  612
303 +sx1                    MACH_SX1                SX1                     613
304 +hms39c7092             MACH_HMS39C7092         HMS39C7092              614
305 +armadillo              MACH_ARMADILLO          ARMADILLO               615
306 +ipcu                   MACH_IPCU               IPCU                    616
307 +loox720                        MACH_LOOX720            LOOX720                 617
308 +ixdp465                        MACH_IXDP465            IXDP465                 618
309 +ixdp2351               MACH_IXDP2351           IXDP2351                619
310 +adsvix                 MACH_ADSVIX             ADSVIX                  620
311 +dm270                  MACH_DM270              DM270                   621
312 +