Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> --- arch/arm/boards/freescale-mx35-3-stack/3stack.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm/boards/freescale-mx35-3-stack/3stack.c b/arch/arm/boards/freescale-mx35-3-stack/3stack.c index dbd1c7adcb10..ec4a95a08e50 100644 --- a/arch/arm/boards/freescale-mx35-3-stack/3stack.c +++ b/arch/arm/boards/freescale-mx35-3-stack/3stack.c @@ -132,6 +132,7 @@ static void set_board_rev(int rev) static int f3s_devices_init(void) { uint32_t reg; + loff_t offset = 0; /* CS0: Nor Flash */ imx35_setup_weimcs(0, 0x0000cf03, 0x10000d03, 0x00720900); @@ -151,15 +152,19 @@ static int f3s_devices_init(void) switch ((reg >> 25) & 0x3) { case 0x01: /* NAND is the source */ - devfs_add_partition("nand0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self_raw"); + devfs_append_partition("nand0", &offset, 0x40000, + DEVFS_PARTITION_FIXED, "self_raw"); dev_add_bb_dev("self_raw", "self0"); - devfs_add_partition("nand0", 0x40000, 0x80000, DEVFS_PARTITION_FIXED, "env_raw"); + devfs_append_partition("nand0", &offset, 0x80000, + DEVFS_PARTITION_FIXED, "env_raw"); dev_add_bb_dev("env_raw", "env0"); break; case 0x00: /* NOR is the source */ - devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self0"); - devfs_add_partition("nor0", 0x40000, 0x80000, DEVFS_PARTITION_FIXED, "env0"); + devfs_append_partition("nor0", &offset, 0x40000, + DEVFS_PARTITION_FIXED, "self0"); + devfs_append_partition("nor0", &offset, 0x80000, + DEVFS_PARTITION_FIXED, "env0"); protect_file("/dev/env0", 1); break; } -- 1.8.5.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox