9
0
Fork 0

ARM: i.MX51 efikasb: add flash environment support

The Efikasb has a m25p80 SPI NOR flash. Add support for putting
the environment on it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-06-10 15:02:50 +02:00
parent d9760dc26b
commit fa65404a58
1 changed files with 10 additions and 1 deletions

View File

@ -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;