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 3/4] mx53 loco: update sd support
Date: Mon,  5 Dec 2011 16:19:02 +0100	[thread overview]
Message-ID: <1323098343-31863-3-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20111205151439.GC9192@game.jcrosoft.org>

update to use card detect
add sd3 card support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/freescale-mx53-loco/board.c |   36 ++++++++++++++++++++++++++-
 1 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boards/freescale-mx53-loco/board.c b/arch/arm/boards/freescale-mx53-loco/board.c
index 6a5ef37..aec2254 100644
--- a/arch/arm/boards/freescale-mx53-loco/board.c
+++ b/arch/arm/boards/freescale-mx53-loco/board.c
@@ -72,6 +72,22 @@ static struct pad_desc loco_pads[] = {
 	MX53_PAD_SD1_DATA3__ESDHC1_DAT3,
 	/* SD1_CD */
 	MX53_PAD_EIM_DA13__GPIO3_13,
+
+	/* SD3 */
+	MX53_PAD_PATA_DATA8__ESDHC3_DAT0,
+	MX53_PAD_PATA_DATA9__ESDHC3_DAT1,
+	MX53_PAD_PATA_DATA10__ESDHC3_DAT2,
+	MX53_PAD_PATA_DATA11__ESDHC3_DAT3,
+	MX53_PAD_PATA_DATA0__ESDHC3_DAT4,
+	MX53_PAD_PATA_DATA1__ESDHC3_DAT5,
+	MX53_PAD_PATA_DATA2__ESDHC3_DAT6,
+	MX53_PAD_PATA_DATA3__ESDHC3_DAT7,
+	MX53_PAD_PATA_IORDY__ESDHC3_CLK,
+	MX53_PAD_PATA_RESET_B__ESDHC3_CMD,
+	/* SD3_CD */
+	MX53_PAD_EIM_DA11__GPIO3_11,
+	/* SD3_WP */
+	MX53_PAD_EIM_DA12__GPIO3_12,
 };
 
 static int loco_mem_init(void)
@@ -92,11 +108,29 @@ static void loco_fec_reset(void)
 	gpio_set_value(LOCO_FEC_PHY_RST, 1);
 }
 
+#define LOCO_SD3_CD			IMX_GPIO_NR(3, 11)
+#define LOCO_SD3_WP			IMX_GPIO_NR(3, 12)
+#define LOCO_SD1_CD			IMX_GPIO_NR(3, 13)
+
+static struct esdhc_platform_data loco_sd1_data = {
+	.cd_gpio = LOCO_SD1_CD,
+	.cd_type = ESDHC_CD_GPIO,
+	.wp_type = ESDHC_WP_NONE,
+};
+
+static struct esdhc_platform_data loco_sd3_data = {
+	.cd_gpio = LOCO_SD3_CD,
+	.wp_gpio = LOCO_SD3_WP,
+	.cd_type = ESDHC_CD_GPIO,
+	.wp_type = ESDHC_WP_GPIO,
+};
+
 static int loco_devices_init(void)
 {
 	imx51_iim_register_fec_ethaddr();
 	imx53_add_fec(&fec_info);
-	imx53_add_mmc0(NULL);
+	imx53_add_mmc0(&loco_sd1_data);
+	imx53_add_mmc2(&loco_sd3_data);
 
 	loco_fec_reset();
 
-- 
1.7.7


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

  parent reply	other threads:[~2011-12-05 15:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05 15:14 [PATCH] mx53 update Jean-Christophe PLAGNIOL-VILLARD
2011-12-05 15:19 ` [PATCH 1/4] mx53: fix devid for imx53_add_mmc1/2 Jean-Christophe PLAGNIOL-VILLARD
2011-12-05 15:19 ` [PATCH 2/4] imx-esdhc: add support of card detect Jean-Christophe PLAGNIOL-VILLARD
2011-12-05 15:19 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-12-05 15:19 ` [PATCH 4/4] imx: add mx53 SMD board 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=1323098343-31863-3-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