Merge commit 'opendreambox/opendreambox-1.6' into vuplus-1.6
[vuplus_openembedded] / recipes / linux / linux-bm750 / linux_bm750-nand4.patch
1 Index: drivers/mtd/brcmnand/bcm7xxx-nand.c
2 ===================================================================
3 --- drivers/mtd/brcmnand/bcm7xxx-nand.c (revision 1)
4 +++ drivers/mtd/brcmnand/bcm7xxx-nand.c (working copy)
5 @@ -149,20 +149,33 @@
6  
7  static struct mtd_partition bcm7XXX_no_xor_partition[] = 
8  {
9 -       /* XOR disabled: Everything is shifted down 4MB */
10 -       { name: N_ROOTFS,       offset: 0x00400000,                     size: DEFAULT_ROOTFS_SIZE - (DEFAULT_BBT0_SIZE_MB <<20) },      // Less 1MB for BBT
11 -       { name: N_ALL,          offset: 0,                                      size: DEFAULT_ROOTFS_SIZE - (DEFAULT_BBT0_SIZE_MB <<20) },
12 -       { name: N_KERNEL,       offset: 0x00b00000,                     size: 4<<20 }, 
13 -       /* BBT0 1MB not mountable by anyone */
14 -
15 -       /* Following partitions only present on flash with size > 512MB */
16 -       { name: N_DATA,         offset: 0x20000000,                     size: 0 },
17 -       /* BBT1 4MB not mountable by anyone */
18 -       {name: NULL,            offset: 0,                                      size: 0}        /* End marker */
19 +       { name: N_ROOTFS,       offset: 0,                                      size: DEFAULT_ROOTFS_SIZE },    
20 +#ifdef CONFIG_MTD_ECM_PARTITION
21 +       { name: N_AVAIL1,       offset: DEFAULT_ROOTFS_SIZE,    size: DEFAULT_AVAIL1_SIZE },
22 +       { name: N_OCAP,         offset: DEFAULT_ROOTFS_SIZE+DEFAULT_AVAIL1_SIZE,        size: DEFAULT_OCAP_SIZE },
23 +#endif
24 +#ifdef USE_SPLASH
25 +       { name: N_KERNEL,       offset: 0x00200000,                     size: 4<<20 },
26 +       { name: "boot",         offset: 0x00600000,                     size: 4<<20 },
27 +       { name: "bootimg",      offset: 0x00A00000,                     size: 2<<20 },
28 +#else
29 +       { name: N_KERNEL,       offset: 0x00600000,                     size: 2<<20 },
30 +       { name: "boot",         offset: 0x07800000,                     size: 4<<20 },
31 +#endif
32 +       { name: N_CFE,          offset: 0x07C00000,                     size: 1<<20 },
33 +       { name: "mac",          offset: 0x07D00000,                     size: 1<<19 },
34 +       { name: "env",          offset: 0x07D80000,                     size: 1<<19 },
35 +       { name: N_NVM,          offset: 0x07E00000,                     size: 1<<20 },
36 +       /* BBT 1MB not mountable by anyone */
37 +       { name: N_DATA,         offset: 0x20000000,             size: 0 },
38 +/* Add 1 extra place-holder partition for splash, and a safety guard element */
39 +       {name: NULL, offset: 0, size: 0},
40 +       {name: NULL, offset: 0, size: 0}
41  };
42  
43  static struct mtd_partition bcm7XXX_new_partition[] = 
44  {
45 +
46         { name: N_ROOTFS,       offset: 0,                                      size: DEFAULT_ROOTFS_SIZE },    
47         { name: N_ALL,          offset: 0x0,                                    size: DEFAULT_ROOTFS_SIZE - (DEFAULT_BBT0_SIZE_MB <<20) },
48         { name: N_KERNEL,       offset: 0x00800000,                     size: 4<<20 },
49 @@ -267,7 +280,8 @@
50                 if (device_size(mtd) <= (512ULL <<20)) {
51                         bcm7XXX_nand_parts[ALL_PART].size = 
52                                 device_size(mtd) - (uint64_t) (DEFAULT_BBT0_SIZE_MB<<20);
53 -                       *numParts = 3;
54 +//                     *numParts = 3;
55 +                       *numParts = 7;
56                 } 
57                 else {
58                         bcm7XXX_nand_parts[ALL_PART].size = ((512-DEFAULT_BBT1_SIZE_MB)<<20);