1 diff -urpN linux-2.6.11.12/arch/arm/boot/compressed/Makefile linux-2.6.11.12-le2/arch/arm/boot/compressed/Makefile
2 --- linux-2.6.11.12/arch/arm/boot/compressed/Makefile 2005-06-12 04:45:37.000000000 +0200
3 +++ linux-2.6.11.12-le2/arch/arm/boot/compressed/Makefile 2005-07-17 12:13:55.000000000 +0200
4 @@ -56,6 +56,8 @@ endif
6 ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
9 +OBJS += little-endian.o
13 diff -urpN linux-2.6.11.12/arch/arm/boot/compressed/little-endian.S linux-2.6.11.12-le2/arch/arm/boot/compressed/little-endian.S
14 --- linux-2.6.11.12/arch/arm/boot/compressed/little-endian.S 1970-01-01 01:00:00.000000000 +0100
15 +++ linux-2.6.11.12-le2/arch/arm/boot/compressed/little-endian.S 2005-07-17 12:13:55.000000000 +0200
18 + * linux/arch/arm/boot/compressed/little-endian.S
20 + * Switch CPU into little endian mode.
21 + * Author: Nicolas Pitre
24 + .section ".start", #alloc, #execinstr
26 + mrc p15, 0, r0, c1, c0, 0 @ read control reg
27 + bic r0, r0, #(1 << 7) @ enable little endian mode
28 + mcr p15, 0, r0, c1, c0, 0 @ write control reg
30 diff -urpN linux-2.6.11.12/arch/arm/mach-ixp4xx/common-pci.c linux-2.6.11.12-le2/arch/arm/mach-ixp4xx/common-pci.c
31 --- linux-2.6.11.12/arch/arm/mach-ixp4xx/common-pci.c 2005-06-12 04:45:37.000000000 +0200
32 +++ linux-2.6.11.12-le2/arch/arm/mach-ixp4xx/common-pci.c 2005-07-17 12:13:55.000000000 +0200
33 @@ -427,7 +427,7 @@ void __init ixp4xx_pci_preinit(void)
35 *PCI_CSR = PCI_CSR_IC | PCI_CSR_ABE | PCI_CSR_PDS | PCI_CSR_ADS;
37 - *PCI_CSR = PCI_CSR_IC;
38 + *PCI_CSR = PCI_CSR_IC | PCI_CSR_ABE;
42 diff -urpN linux-2.6.11.12/drivers/mtd/maps/ixp4xx.c linux-2.6.11.12-le2/drivers/mtd/maps/ixp4xx.c
43 --- linux-2.6.11.12/drivers/mtd/maps/ixp4xx.c 2005-07-17 12:13:05.000000000 +0200
44 +++ linux-2.6.11.12-le2/drivers/mtd/maps/ixp4xx.c 2005-07-17 12:13:55.000000000 +0200
47 #include <asm/mach-types.h>
48 #include <asm/mach/flash.h>
50 +#include <asm/byteorder.h>
51 #include <asm/unaligned.h>
53 #include <linux/reboot.h>
56 +#if !defined(__ARMEB__) && !defined(CONFIG_ARCH_NSLU2)
57 #define BYTE0(h) ((h) & 0xFF)
58 #define BYTE1(h) (((h) >> 8) & 0xFF)
61 static map_word ixp4xx_read16(struct map_info *map, unsigned long ofs)
68 val.x[0] = *(__u16 *) (map->map_priv_1 + ofs);
71 @@ -53,6 +57,21 @@ static map_word ixp4xx_read16(struct map
72 * when attached to a 16-bit wide device (such as the 28F128J3A),
73 * so we can't just memcpy_fromio().
76 +#if !defined(__ARMEB__) && defined(CONFIG_MTD_REDBOOT_PARTS)
77 +struct fis_image_desc {
78 + unsigned char name[16]; // Null terminated name
79 + unsigned long flash_base; // Address within FLASH of image
80 + unsigned long mem_base; // Address in memory where it executes
81 + unsigned long size; // Length of image
82 + unsigned long entry_point; // Execution entry point
83 + unsigned long data_length; // Length of actual data
84 + unsigned char _pad[256-(16+7*sizeof(unsigned long))];
85 + unsigned long desc_cksum; // Checksum over image descriptor
86 + unsigned long file_cksum; // Checksum over image data
90 static void ixp4xx_copy_from(struct map_info *map, void *to,
91 unsigned long from, ssize_t len)
93 @@ -62,13 +81,34 @@ static void ixp4xx_copy_from(struct map_
96 for (i = 0; i < (len / 2); i++) {
97 - data = get_unaligned((u16*)(src + i));
102 + data = get_unaligned((u16*)(src + j));
103 dest[i * 2] = BYTE0(data);
104 dest[i * 2 + 1] = BYTE1(data);
112 dest[len - 1] = BYTE0(get_unaligned((u16*)(src + i)));
114 + /* Hack: Last sector contains RedBoot FIS table in big-endian format.
115 + Convert into little endian format so we can use RedBoot parser */
116 +#if !defined(__ARMEB__) && defined(CONFIG_MTD_REDBOOT_PARTS)
117 + if (from == 0x7e0000) {
118 + struct fis_image_desc *desc = (struct fis_image_desc *)to;
119 + for (i=0; i < (len/sizeof(struct fis_image_desc)); i++) {
120 + desc[i].flash_base = be32_to_cpu(desc[i].flash_base);
121 + desc[i].mem_base = be32_to_cpu(desc[i].mem_base);
122 + desc[i].size = be32_to_cpu(desc[i].size);
129 @@ -77,6 +117,9 @@ static void ixp4xx_copy_from(struct map_
131 static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long adr)
137 *(__u16 *) (map->map_priv_1 + adr) = d.x[0];
139 @@ -86,6 +129,9 @@ static void ixp4xx_probe_write16(struct
141 static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr)
146 *(__u16 *) (map->map_priv_1 + adr) = d.x[0];