aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/cns3xxx
diff options
context:
space:
mode:
authorKoen Vandeputte <koen.vandeputte@ncentric.com>2019-11-22 09:58:50 +0100
committerKoen Vandeputte <koen.vandeputte@ncentric.com>2019-11-22 16:58:21 +0100
commit3685f86ceface9ca2fc5ef795319e29d95d89795 (patch)
tree2cc868f65eb05f0dc1f9a5837942b5aaa0c66c4e /target/linux/cns3xxx
parentdb345220b485ce3e20642bd1fbf9b65d5f1cd4f1 (diff)
downloadupstream-3685f86ceface9ca2fc5ef795319e29d95d89795.tar.gz
upstream-3685f86ceface9ca2fc5ef795319e29d95d89795.tar.bz2
upstream-3685f86ceface9ca2fc5ef795319e29d95d89795.zip
cns3xxx: use proper macros for defining partition regions
While at it, also reorder the items for improved readability. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> (cherry picked from commit 6b2f953db346cfb4ddf05654efa3ad7eb84ed99f)
Diffstat (limited to 'target/linux/cns3xxx')
-rw-r--r--target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
index eade8f683d..bee7348266 100644
--- a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
+++ b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
@@ -114,16 +114,17 @@ static struct laguna_board_info laguna_info __initdata;
static struct mtd_partition laguna_nor_partitions[] = {
{
.name = "uboot",
- .size = SZ_256K,
.offset = 0,
+ .size = SZ_256K,
.mask_flags = MTD_WRITEABLE,
}, {
.name = "params",
+ .offset = MTDPART_OFS_APPEND,
.size = SZ_128K,
- .offset = SZ_256K,
}, {
.name = "firmware",
- .offset = SZ_256K + SZ_128K,
+ .offset = MTDPART_OFS_APPEND,
+ .size = MTDPART_SIZ_FULL,
},
};
@@ -155,16 +156,17 @@ static struct platform_device laguna_nor_pdev = {
static struct mtd_partition laguna_spi_partitions[] = {
{
.name = "uboot",
- .size = SZ_256K,
.offset = 0,
+ .size = SZ_256K,
.mask_flags = MTD_WRITEABLE,
}, {
.name = "params",
+ .offset = MTDPART_OFS_APPEND,
.size = SZ_256K,
- .offset = SZ_256K,
}, {
.name = "firmware",
- .offset = SZ_512K,
+ .offset = MTDPART_OFS_APPEND,
+ .size = MTDPART_SIZ_FULL,
},
};