Commit edf05641 authored by Mike Frysinger's avatar Mike Frysinger Committed by Bryan Wu

[Blackfin] arch: fix bug - set right partition size in the board files

 - set default u-boot partition size to 256k
 - modify the offset with the size change
 - use mtd defines (append for offset and full for size)
   where applicable rather than churning constants when we dont have to
Signed-off-by: default avatarGrace Pan <grace.pan@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 32320ea0
...@@ -180,8 +180,8 @@ static struct mtd_partition partition_info[] = { ...@@ -180,8 +180,8 @@ static struct mtd_partition partition_info[] = {
}, },
{ {
.name = "File System", .name = "File System",
.offset = 4 * SIZE_1M, .offset = MTDPART_OFS_APPEND,
.size = (256 - 4) * SIZE_1M, .size = MTDPART_SIZ_FULL,
}, },
}; };
...@@ -422,11 +422,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { ...@@ -422,11 +422,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
}, { }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = MTDPART_OFS_APPEND,
}, { }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = MTDPART_SIZ_FULL,
.offset = 0x00100000, .offset = MTDPART_OFS_APPEND,
} }
}; };
......
...@@ -99,11 +99,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { ...@@ -99,11 +99,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
}, { }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = MTDPART_OFS_APPEND,
}, { }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = MTDPART_SIZ_FULL,
.offset = 0x00100000, .offset = MTDPART_OFS_APPEND,
} }
}; };
......
...@@ -112,7 +112,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -112,7 +112,7 @@ static struct platform_device net2272_bfin_device = {
static struct mtd_partition stamp_partitions[] = { static struct mtd_partition stamp_partitions[] = {
{ {
.name = "Bootloader", .name = "Bootloader",
.size = 0x20000, .size = 0x40000,
.offset = 0, .offset = 0,
}, { }, {
.name = "Kernel", .name = "Kernel",
...@@ -160,17 +160,17 @@ static struct platform_device stamp_flash_device = { ...@@ -160,17 +160,17 @@ static struct platform_device stamp_flash_device = {
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader", .name = "bootloader",
.size = 0x00020000, .size = 0x00040000,
.offset = 0, .offset = 0,
.mask_flags = MTD_CAP_ROM .mask_flags = MTD_CAP_ROM
}, { }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = MTDPART_OFS_APPEND,
}, { }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = MTDPART_SIZ_FULL,
.offset = 0x00100000, .offset = MTDPART_OFS_APPEND,
} }
}; };
......
...@@ -343,7 +343,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -343,7 +343,7 @@ static struct platform_device net2272_bfin_device = {
static struct mtd_partition stamp_partitions[] = { static struct mtd_partition stamp_partitions[] = {
{ {
.name = "Bootloader", .name = "Bootloader",
.size = 0x20000, .size = 0x40000,
.offset = 0, .offset = 0,
}, { }, {
.name = "Kernel", .name = "Kernel",
...@@ -351,7 +351,7 @@ static struct mtd_partition stamp_partitions[] = { ...@@ -351,7 +351,7 @@ static struct mtd_partition stamp_partitions[] = {
.offset = MTDPART_OFS_APPEND, .offset = MTDPART_OFS_APPEND,
}, { }, {
.name = "RootFS", .name = "RootFS",
.size = 0x400000 - 0x20000 - 0xE0000 - 0x10000, .size = 0x400000 - 0x40000 - 0xE0000 - 0x10000,
.offset = MTDPART_OFS_APPEND, .offset = MTDPART_OFS_APPEND,
}, { }, {
.name = "MAC Address", .name = "MAC Address",
...@@ -391,17 +391,17 @@ static struct platform_device stamp_flash_device = { ...@@ -391,17 +391,17 @@ static struct platform_device stamp_flash_device = {
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader", .name = "bootloader",
.size = 0x00020000, .size = 0x00040000,
.offset = 0, .offset = 0,
.mask_flags = MTD_CAP_ROM .mask_flags = MTD_CAP_ROM
}, { }, {
.name = "kernel", .name = "kernel",
.size = 0xe0000, .size = 0xe0000,
.offset = 0x20000 .offset = MTDPART_OFS_APPEND,
}, { }, {
.name = "file system", .name = "file system",
.size = 0x700000, .size = MTDPART_SIZ_FULL,
.offset = 0x00100000, .offset = MTDPART_OFS_APPEND,
} }
}; };
......
...@@ -285,8 +285,8 @@ static struct mtd_partition partition_info[] = { ...@@ -285,8 +285,8 @@ static struct mtd_partition partition_info[] = {
}, },
{ {
.name = "File System", .name = "File System",
.offset = 4 * SIZE_1M, .offset = MTDPART_OFS_APPEND,
.size = (256 - 4) * SIZE_1M, .size = MTDPART_SIZ_FULL,
}, },
}; };
...@@ -333,7 +333,7 @@ static struct platform_device bf54x_sdh_device = { ...@@ -333,7 +333,7 @@ static struct platform_device bf54x_sdh_device = {
static struct mtd_partition ezkit_partitions[] = { static struct mtd_partition ezkit_partitions[] = {
{ {
.name = "Bootloader", .name = "Bootloader",
.size = 0x20000, .size = 0x40000,
.offset = 0, .offset = 0,
}, { }, {
.name = "Kernel", .name = "Kernel",
...@@ -381,8 +381,8 @@ static struct mtd_partition bfin_spi_flash_partitions[] = { ...@@ -381,8 +381,8 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
.mask_flags = MTD_CAP_ROM .mask_flags = MTD_CAP_ROM
}, { }, {
.name = "linux kernel", .name = "linux kernel",
.size = 0x1c0000, .size = MTDPART_SIZ_FULL,
.offset = 0x40000 .offset = MTDPART_OFS_APPEND,
} }
}; };
......
...@@ -223,7 +223,7 @@ static struct platform_device bfin_uart_device = { ...@@ -223,7 +223,7 @@ static struct platform_device bfin_uart_device = {
static struct mtd_partition ezkit_partitions[] = { static struct mtd_partition ezkit_partitions[] = {
{ {
.name = "Bootloader", .name = "Bootloader",
.size = 0x20000, .size = 0x40000,
.offset = 0, .offset = 0,
}, { }, {
.name = "Kernel", .name = "Kernel",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment