mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 20/22] ARM: beaglebone: register sd/emmc with persistent name
Date: Mon, 26 Aug 2013 08:56:01 +0200	[thread overview]
Message-ID: <1377500163-28962-21-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1377500163-28962-1-git-send-email-s.hauer@pengutronix.de>

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>
---
 arch/arm/boards/beaglebone/board.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/beaglebone/board.c b/arch/arm/boards/beaglebone/board.c
index 9e87afc..dfeb47c 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>
@@ -127,14 +128,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();
-- 
1.8.4.rc3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-08-26  6:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26  6:55 [PATCH] am33xx beaglebone and related Sascha Hauer
2013-08-26  6:55 ` [PATCH 01/22] console: fix console without CONFIG_PARAMETER Sascha Hauer
2013-08-26  6:55 ` [PATCH 02/22] mci: omap: advertise 8 bit support Sascha Hauer
2013-08-26  6:55 ` [PATCH 03/22] mci: omap: implement device detect callback Sascha Hauer
2013-08-26  6:55 ` [PATCH 04/22] mci: omap: Allow to set mmc devname via platformdata Sascha Hauer
2013-08-26  6:55 ` [PATCH 05/22] ARM: omap: Allow to set mmc devname used for booting Sascha Hauer
2013-08-26  6:55 ` [PATCH 06/22] ARM: omap: fix omap_save_bootinfo Sascha Hauer
2013-08-26 12:00   ` Teresa Gamez
2013-08-26  6:55 ` [PATCH 07/22] ARM: omap: rename INIT_LL to omap_uart_lowlevel_init Sascha Hauer
2013-08-26  6:55 ` [PATCH 08/22] ARM: am33xx: Cleanup of lowlevel code Sascha Hauer
2013-08-26  6:55 ` [PATCH 09/22] ARM: pcm051: Clean up " Sascha Hauer
2013-08-26  6:55 ` [PATCH 10/22] ARM: beaglebone: " Sascha Hauer
2013-08-26  6:55 ` [PATCH 11/22] ARM: am33xx: set bootsource instance correctly for MMC1 Sascha Hauer
2013-08-26  6:55 ` [PATCH 12/22] ARM: cpuinfo: display the core name and version Sascha Hauer
2013-08-26  6:55 ` [PATCH 13/22] ARM: am33xx: implement cpu revision decoding Sascha Hauer
2013-08-26  6:55 ` [PATCH 14/22] ARM: am33xx: beaglebone: configure I2C EEPROM Sascha Hauer
2013-08-26  6:55 ` [PATCH 15/22] ARM: am33xx: Add mmc1 registration helper Sascha Hauer
2013-08-26  6:55 ` [PATCH 16/22] ARM: am33xx: make DDR PLL frequency configurable Sascha Hauer
2013-08-26  6:55 ` [PATCH 17/22] rework debug_ll Sascha Hauer
2013-08-26  6:55 ` [PATCH 18/22] ARM: beaglebone: Initialize UART for lowlevel debugging Sascha Hauer
2013-08-26  6:56 ` [PATCH 19/22] ARM: beaglebone: add support for beaglebone black with DDR3 RAM Sascha Hauer
2013-08-26  6:56 ` Sascha Hauer [this message]
2013-08-26  6:56 ` [PATCH 21/22] ARM: beaglebone: update mlo_small defconfig Sascha Hauer
2013-08-26  6:56 ` [PATCH 22/22] ARM: beaglebone: update defconfig Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377500163-28962-21-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox