cns3xxx: use proper macros for defining partition regions
authorKoen Vandeputte <koen.vandeputte@ncentric.com>
Fri, 22 Nov 2019 08:58:50 +0000 (09:58 +0100)
committerKoen Vandeputte <koen.vandeputte@ncentric.com>
Fri, 22 Nov 2019 15:56:46 +0000 (16:56 +0100)
While at it, also reorder the items for
improved readability.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c

index eade8f683d1b29ee74c0b3286ecafe5d6b905a18..bee7348266eba1a52796e60936135ca7302c70ec 100644 (file)
@@ -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,
        },
 };