diff options
author | John Bowler <jbowler@nslu2-linux.org> | 2005-09-28 00:55:32 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-09-28 00:55:32 +0000 |
commit | 9aee9f0e7ff475cbad9d1c35f48fdb0a3e9b7f30 (patch) | |
tree | 52c2171cc5b6d3da4ee44dc7289c460fcfa1959f /packages/linux/nslu2-kernel/2.6.14/90-mtd-ixp4xx.patch | |
parent | b5067af0bfa30f894bc4fed805aaee5f5c529b2b (diff) |
nslu2-kernel 2.6.14: latest patch set, includes LE patches
Diffstat (limited to 'packages/linux/nslu2-kernel/2.6.14/90-mtd-ixp4xx.patch')
-rw-r--r-- | packages/linux/nslu2-kernel/2.6.14/90-mtd-ixp4xx.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/packages/linux/nslu2-kernel/2.6.14/90-mtd-ixp4xx.patch b/packages/linux/nslu2-kernel/2.6.14/90-mtd-ixp4xx.patch new file mode 100644 index 0000000000..6d93a09a9f --- /dev/null +++ b/packages/linux/nslu2-kernel/2.6.14/90-mtd-ixp4xx.patch @@ -0,0 +1,75 @@ +--- /tmp/ixp4xx.c 2005-09-24 18:12:25.000000000 +0200 ++++ test4/drivers/mtd/maps/ixp4xx.c 2005-09-24 19:02:24.000000000 +0200 +@@ -42,6 +42,10 @@ + static map_word ixp4xx_read16(struct map_info *map, unsigned long ofs) + { + map_word val; ++ ++#ifndef __ARMEB__ ++ ofs ^= 2; ++#endif + val.x[0] = *(__u16 *) (map->map_priv_1 + ofs); + return val; + } +@@ -51,6 +55,21 @@ + * when attached to a 16-bit wide device (such as the 28F128J3A), + * so we can't just memcpy_fromio(). + */ ++ ++#if !defined(__ARMEB__) && defined(CONFIG_MTD_REDBOOT_PARTS) ++struct fis_image_desc { ++ unsigned char name[16]; // Null terminated name ++ unsigned long flash_base; // Address within FLASH of image ++ unsigned long mem_base; // Address in memory where it executes ++ unsigned long size; // Length of image ++ unsigned long entry_point; // Execution entry point ++ unsigned long data_length; // Length of actual data ++ unsigned char _pad[256-(16+7*sizeof(unsigned long))]; ++ unsigned long desc_cksum; // Checksum over image descriptor ++ unsigned long file_cksum; // Checksum over image data ++}; ++#endif ++ + static void ixp4xx_copy_from(struct map_info *map, void *to, + unsigned long from, ssize_t len) + { +@@ -71,6 +90,19 @@ + + if (len > 0) + *dest++ = BYTE0(*(u16 *)src); ++ ++#if !defined(__ARMEB__) && defined(CONFIG_MTD_REDBOOT_PARTS) ++ if (from == 0x7e0000) { ++ int i; ++ struct fis_image_desc *desc = (struct fis_image_desc *)to; ++ ++ for (i=0; i < (len/sizeof(struct fis_image_desc)); i++) { ++ desc[i].flash_base = be32_to_cpu(desc[i].flash_base); ++ desc[i].mem_base = be32_to_cpu(desc[i].mem_base); ++ desc[i].size = be32_to_cpu(desc[i].size); ++ } ++ } ++#endif + } + + /* +@@ -79,6 +111,9 @@ + */ + static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long adr) + { ++#ifndef __ARMEB__ ++ adr ^= 2; ++#endif + if (!(adr & 1)) + *(__u16 *) (map->map_priv_1 + adr) = d.x[0]; + } +@@ -88,6 +123,9 @@ + */ + static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr) + { ++#ifndef __ARMEB__ ++ adr ^= 2; ++#endif + *(__u16 *) (map->map_priv_1 + adr) = d.x[0]; + } + |