The Efikasb has a m25p80 SPI NOR flash. Add support for putting the environment on it. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- arch/arm/boards/efika-mx-smartbook/board.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/boards/efika-mx-smartbook/board.c b/arch/arm/boards/efika-mx-smartbook/board.c index 98f9dcd..58600e3 100644 --- a/arch/arm/boards/efika-mx-smartbook/board.c +++ b/arch/arm/boards/efika-mx-smartbook/board.c @@ -475,11 +475,20 @@ device_initcall(efikamx_devices_init); static int efikamx_part_init(void) { - if (bootsource_get() == BOOTSOURCE_MMC) { + enum bootsource bootsource = bootsource_get(); + + switch (bootsource) { + case BOOTSOURCE_MMC: devfs_add_partition("mmc_left", 0x00000, 0x80000, DEVFS_PARTITION_FIXED, "self0"); devfs_add_partition("mmc_left", 0x80000, 0x80000, DEVFS_PARTITION_FIXED, "env0"); + break; + case BOOTSOURCE_SPI: + default: + devfs_add_partition("m25p0", 0x80000, 0x20000, + DEVFS_PARTITION_FIXED, "env0"); + break; } return 0; -- 1.8.3.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox