mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] at91sam9x5ek: add mci support
Date: Thu,  1 Nov 2012 20:36:22 +0100	[thread overview]
Message-ID: <1351798582-22667-4-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1351798582-22667-1-git-send-email-plagnioj@jcrosoft.com>

only add mci0 (microSD slot) as mci1 conflict with spi0

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9x5ek/init.c     |   20 ++++++++++++++++++++
 arch/arm/configs/at91sam9x5ek_defconfig |    5 +++--
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/at91sam9x5ek/init.c b/arch/arm/boards/at91sam9x5ek/init.c
index 8f9fc0f..681be32 100644
--- a/arch/arm/boards/at91sam9x5ek/init.c
+++ b/arch/arm/boards/at91sam9x5ek/init.c
@@ -115,6 +115,25 @@ static void ek_add_device_eth(void)
 	at91_add_device_eth(0, &macb_pdata);
 }
 
+/*
+ * MCI (SD/MMC)
+ */
+/* mci0 detect_pin is revision dependent */
+static struct atmel_mci_platform_data mci0_data = {
+	.bus_width	= 4,
+	.detect_pin	= AT91_PIN_PD15,
+	.wp_pin		= 0,
+};
+
+static void ek_add_device_mci(void)
+{
+	if (at91sam9x5ek_cm_is_vendor(VENDOR_COGENT))
+		mci0_data.detect_pin = 0;
+
+	/* MMC0 */
+	at91_add_device_mci(0, &mci0_data);
+}
+
 static struct i2c_board_info i2c_devices[] = {
 	{
 		I2C_BOARD_INFO("qt1070", 0x1b),
@@ -212,6 +231,7 @@ static int at91sam9x5ek_devices_init(void)
 	ek_add_device_nand();
 	ek_add_device_eth();
 	ek_add_device_spi();
+	ek_add_device_mci();
 	at91_add_device_usbh_ohci(&ek_usbh_data);
 	ek_add_led();
 	ek_add_device_i2c();
diff --git a/arch/arm/configs/at91sam9x5ek_defconfig b/arch/arm/configs/at91sam9x5ek_defconfig
index 5611b95..d097683 100644
--- a/arch/arm/configs/at91sam9x5ek_defconfig
+++ b/arch/arm/configs/at91sam9x5ek_defconfig
@@ -65,8 +65,9 @@ CONFIG_NAND=y
 # CONFIG_NAND_ECC_HW_NONE is not set
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
-CONFIG_DISK=y
-CONFIG_DISK_WRITE=y
+CONFIG_MCI=y
+CONFIG_MCI_STARTUP=y
+CONFIG_MCI_ATMEL=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_LED_TRIGGERS=y
-- 
1.7.10.4


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

  parent reply	other threads:[~2012-11-01 19:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 19:30 [PATCH 0/4] at91sam9x5ek: add spi and " Jean-Christophe PLAGNIOL-VILLARD
2012-11-01 19:36 ` [PATCH 1/4] at91sam9x5: add spi support Jean-Christophe PLAGNIOL-VILLARD
2012-11-01 19:36   ` [PATCH 2/4] at91sam9x5ek: " Jean-Christophe PLAGNIOL-VILLARD
2012-11-01 19:36   ` [PATCH 3/4] at91sam9x5: add mci support Jean-Christophe PLAGNIOL-VILLARD
2012-11-01 19:36   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-11-01 19:50 [PATCH 0/4 v2] at91sam9x5ek: add spi and " Jean-Christophe PLAGNIOL-VILLARD
2012-11-01 21:16 ` [PATCH 1/4] at91sam9x5: add spi support Jean-Christophe PLAGNIOL-VILLARD
2012-11-01 21:16   ` [PATCH 4/4] at91sam9x5ek: add mci support Jean-Christophe PLAGNIOL-VILLARD
2012-11-03 11:34 [PATCH 0/4 v3] at91sam9x5ek: add spi and " Jean-Christophe PLAGNIOL-VILLARD
2012-11-03 11:36 ` [PATCH 1/4] at91sam9x5: add spi support Jean-Christophe PLAGNIOL-VILLARD
2012-11-03 11:36   ` [PATCH 4/4] at91sam9x5ek: add mci support Jean-Christophe PLAGNIOL-VILLARD

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=1351798582-22667-4-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --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