summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/efika-mx-smartbook
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-08-05 12:50:06 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-08-05 12:50:06 +0200
commitfbf082b56540b4f3853015f3686c8f106a91707a (patch)
treee5901744625d45ca075a55eff3c9fc1e2c05a134 /arch/arm/boards/efika-mx-smartbook
parent8c5a1c0c81aade3546a18b12e2eeff0b38e79e99 (diff)
parent6a37488917b22fcf24d99c695ed1755198a9393b (diff)
downloadbarebox-fbf082b56540b4f3853015f3686c8f106a91707a.tar.gz
barebox-fbf082b56540b4f3853015f3686c8f106a91707a.tar.xz
Merge branch 'for-next/of'
Conflicts: arch/arm/boards/freescale-mx53-loco/board.c drivers/of/Makefile
Diffstat (limited to 'arch/arm/boards/efika-mx-smartbook')
-rw-r--r--arch/arm/boards/efika-mx-smartbook/board.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/arch/arm/boards/efika-mx-smartbook/board.c b/arch/arm/boards/efika-mx-smartbook/board.c
index 1735c3e088..85ff466127 100644
--- a/arch/arm/boards/efika-mx-smartbook/board.c
+++ b/arch/arm/boards/efika-mx-smartbook/board.c
@@ -210,6 +210,16 @@ static int efikamx_usb_init(void)
mxc_iomux_v3_setup_pad(MX51_PAD_EIM_A26__USBH2_STP);
}
+ switch (bootsource_get()) {
+ case BOOTSOURCE_MMC:
+ of_device_enable_path("/chosen/environment-sd");
+ break;
+ case BOOTSOURCE_SPI:
+ default:
+ of_device_enable_path("/chosen/environment-spi");
+ break;
+ }
+
return 0;
}
console_initcall(efikamx_usb_init);
@@ -230,7 +240,6 @@ extern char flash_header_imx51_genesi_efikasb_end[];
static int efikamx_late_init(void)
{
- enum bootsource bootsource;
int i;
if (!of_machine_is_compatible("genesi,imx51-sb"))
@@ -255,24 +264,6 @@ static int efikamx_late_init(void)
armlinux_set_architecture(2370);
armlinux_set_revision(0x5100 | imx_silicon_revision());
- bootsource = bootsource_get();
-
- switch (bootsource) {
- case BOOTSOURCE_MMC:
- device_detect_by_name("mmc1");
-
- devfs_add_partition("mmc1", 0x00000, 0x80000,
- DEVFS_PARTITION_FIXED, "self0");
- devfs_add_partition("mmc1", 0x80000, 0x80000,
- DEVFS_PARTITION_FIXED, "env0");
- break;
- case BOOTSOURCE_SPI:
- default:
- devfs_add_partition("m25p0", 0x80000, 0x20000,
- DEVFS_PARTITION_FIXED, "env0");
- break;
- }
-
return 0;
}
late_initcall(efikamx_late_init);