mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Shiyan <shc_work@mail.ru>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] ARM: ccmx51js: Add WP-pin definition for SDHC3
Date: Mon, 10 Jun 2013 11:13:19 +0400	[thread overview]
Message-ID: <1370848400-10380-2-git-send-email-shc_work@mail.ru> (raw)
In-Reply-To: <1370848400-10380-1-git-send-email-shc_work@mail.ru>


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/boards/ccxmx51/ccxmx51js.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boards/ccxmx51/ccxmx51js.c b/arch/arm/boards/ccxmx51/ccxmx51js.c
index 7d269c3..1cf7d53 100644
--- a/arch/arm/boards/ccxmx51/ccxmx51js.c
+++ b/arch/arm/boards/ccxmx51/ccxmx51js.c
@@ -29,7 +29,8 @@
 
 #include "ccxmx51.h"
 
-#define CCXMX51JS_USBHOST1_RESET	IMX_GPIO_NR(3, 8)
+#define CCXMX51JS_USBH1_RESET	IMX_GPIO_NR(3, 8)
+#define CCXMX51JS_SD3_WP	IMX_GPIO_NR(3, 17)
 
 static iomux_v3_cfg_t ccxmx51js_pads[] = {
 	/* SD1 */
@@ -73,7 +74,8 @@ static struct esdhc_platform_data sdhc1_pdata = {
 
 static struct esdhc_platform_data sdhc3_pdata = {
 	.cd_type	= ESDHC_CD_NONE,
-	.wp_type	= ESDHC_WP_NONE,
+	.wp_type	= ESDHC_WP_GPIO,
+	.wp_gpio	= CCXMX51JS_SD3_WP,
 	.caps		= MMC_MODE_4BIT | MMC_MODE_8BIT,
 };
 
@@ -91,9 +93,9 @@ static int ccxmx51js_init(void)
 		imx51_add_mmc2(&sdhc3_pdata);
 	}
 
-	gpio_direction_output(CCXMX51JS_USBHOST1_RESET, 0);
+	gpio_direction_output(CCXMX51JS_USBH1_RESET, 0);
 	mdelay(10);
-	gpio_set_value(CCXMX51JS_USBHOST1_RESET, 1);
+	gpio_set_value(CCXMX51JS_USBH1_RESET, 1);
 	mdelay(10);
 	imx51_add_usbh1(&ccxmx51js_usbhost1_pdata);
 
-- 
1.8.1.5


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

  reply	other threads:[~2013-06-10  7:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-10  7:13 [PATCH 1/3] ARM: ccmx51: Export available module GPIOs to barebox userspace Alexander Shiyan
2013-06-10  7:13 ` Alexander Shiyan [this message]
2013-06-10  7:13 ` [PATCH 3/3] ARM: ccmx51: Return error if module is not detected Alexander Shiyan
2013-06-11 15:33 ` [PATCH 1/3] ARM: ccmx51: Export available module GPIOs to barebox userspace 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=1370848400-10380-2-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --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