summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-08-25 19:50:29 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-09-05 10:15:48 +0200
commitb11fae5c779cde36f901e9bd3d1723ad152972ac (patch)
tree9011c27b1629e0f2b9c5b8dda5e3916dd612498b
parent19b33cd0b93d1359d18d7a899c91d4747542be24 (diff)
downloadbarebox-b11fae5c779cde36f901e9bd3d1723ad152972ac.tar.gz
barebox-b11fae5c779cde36f901e9bd3d1723ad152972ac.tar.xz
ARM: beaglebone: register sd/emmc with persistent name
To get persistent names for the sd/emmc cards register them with a name in platform_data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/boards/beaglebone/board.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/arm/boards/beaglebone/board.c b/arch/arm/boards/beaglebone/board.c
index 3a2395e7de..2264c08af7 100644
--- a/arch/arm/boards/beaglebone/board.c
+++ b/arch/arm/boards/beaglebone/board.c
@@ -32,6 +32,7 @@
#include <io.h>
#include <ns16550.h>
#include <net.h>
+#include <bootsource.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <mach/am33xx-silicon.h>
@@ -124,14 +125,29 @@ static const __maybe_unused struct module_pin_mux mmc1_pin_mux[] = {
{-1},
};
+static struct omap_hsmmc_platform_data beaglebone_sd = {
+ .devname = "sd",
+};
+
+static struct omap_hsmmc_platform_data beaglebone_emmc = {
+ .devname = "emmc",
+};
+
static int beaglebone_devices_init(void)
{
am33xx_enable_mmc0_pin_mux();
- am33xx_add_mmc0(NULL);
+ am33xx_add_mmc0(&beaglebone_sd);
if (is_beaglebone_black()) {
configure_module_pin_mux(mmc1_pin_mux);
- am33xx_add_mmc1(NULL);
+ am33xx_add_mmc1(&beaglebone_emmc);
+ }
+
+ if (bootsource_get() == BOOTSOURCE_MMC) {
+ if (bootsource_get_instance() == 0)
+ omap_set_bootmmc_devname("sd");
+ else
+ omap_set_bootmmc_devname("emmc");
}
am33xx_enable_i2c0_pin_mux();