Changeset 20272


Ignore:
Timestamp:
2010-03-18T14:54:22+01:00 (8 years ago)
Author:
blogic
Message:

[ifxmips] make mtd handel 128k sectors properly, based on patch by Ithamar R. Adema

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ifxmips/patches-2.6.30/140-mtd.patch

    r18082 r20272  
    1 Index: linux-2.6.30.8/drivers/mtd/maps/Makefile 
     1Index: linux-2.6.30.10/drivers/mtd/maps/Makefile 
    22=================================================================== 
    3 --- linux-2.6.30.8.orig/drivers/mtd/maps/Makefile       2009-09-24 17:28:02.000000000 +0200 
    4 +++ linux-2.6.30.8/drivers/mtd/maps/Makefile    2009-10-19 21:31:32.000000000 +0200 
     3--- linux-2.6.30.10.orig/drivers/mtd/maps/Makefile      2010-03-18 14:27:04.000000000 +0100 
     4+++ linux-2.6.30.10/drivers/mtd/maps/Makefile   2010-03-18 14:27:07.000000000 +0100 
    55@@ -62,3 +62,4 @@ 
    66 obj-$(CONFIG_MTD_BFIN_ASYNC)   += bfin-async-flash.o 
     
    88 obj-$(CONFIG_MTD_VMU)          += vmu-flash.o 
    99+obj-$(CONFIG_MTD_IFXMIPS)  += ifxmips.o 
    10 Index: linux-2.6.30.8/drivers/mtd/maps/ifxmips.c 
     10Index: linux-2.6.30.10/drivers/mtd/maps/ifxmips.c 
    1111=================================================================== 
    1212--- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    13 +++ linux-2.6.30.8/drivers/mtd/maps/ifxmips.c   2009-10-19 21:40:44.000000000 +0200 
    14 @@ -0,0 +1,277 @@ 
     13+++ linux-2.6.30.10/drivers/mtd/maps/ifxmips.c  2010-03-18 14:27:17.000000000 +0100 
     14@@ -0,0 +1,281 @@ 
    1515+/* 
    1616+ * This program is free software; you can redistribute it and/or modify 
     
    117117+               .name = "uboot_env", 
    118118+               .offset = 0x00020000, 
    119 +               .size = 0x00010000, 
     119+               .size = 0x0, 
    120120+       }, 
    121121+       { 
    122122+               .name = "kernel", 
    123 +               .offset = 0x00030000, 
     123+               .offset = 0x0, 
    124124+               .size = 0x0, 
    125125+       }, 
     
    223223+               } 
    224224+       } else { 
     225+               /* if the flash is 64k sectors, the kernel will reside at 0xb0030000 
     226+                  if the flash is 128k sectors, the kernel will reside at 0xb0040000 */ 
     227+               ifxmips_partitions[1].size = ifxmips_mtd->erasesize; 
     228+               ifxmips_partitions[2].offset = ifxmips_partitions[1].offset + ifxmips_mtd->erasesize; 
    225229+               parts = &ifxmips_partitions[0]; 
    226230+       } 
     
    233237+                       printk(KERN_INFO "ifxmips_mtd: found a squashfs following the uImage\n"); 
    234238+               } else { 
    235 +                       uimage_size &= ~0xffff; 
    236 +                       uimage_size += 0x10000; 
     239+                       uimage_size &= ~(ifxmips_mtd->erasesize -1); 
     240+                       uimage_size += ifxmips_mtd->erasesize; 
    237241+               } 
    238242+ 
Note: See TracChangeset for help on using the changeset viewer.