From patchwork Tue Jun 5 06:02:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 163015 X-Patchwork-Delegate: twarren@nvidia.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id E45EDB6F77 for ; Tue, 5 Jun 2012 16:03:23 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5540E280C1; Tue, 5 Jun 2012 08:03:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mPw0D64+rwgy; Tue, 5 Jun 2012 08:03:07 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8568628096; Tue, 5 Jun 2012 08:02:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C47AA2807B for ; Tue, 5 Jun 2012 08:02:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SUGlW5OFtTb9 for ; Tue, 5 Jun 2012 08:02:42 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by theia.denx.de (Postfix) with ESMTP id 557E428077 for ; Tue, 5 Jun 2012 08:02:41 +0200 (CEST) Received: from benhur.adnet.avionic-design.de (p548E0438.dip0.t-ipconnect.de [84.142.4.56]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0Md090-1SKoCE0rtS-00Hbso; Tue, 05 Jun 2012 08:02:36 +0200 Received: from mailbox.adnet.avionic-design.de (add-virt-zarafa.adnet.avionic-design.de [172.20.129.9]) by benhur.adnet.avionic-design.de (Postfix) with ESMTP id 805572C4124; Tue, 5 Jun 2012 08:02:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mailbox.adnet.avionic-design.de (Postfix) with ESMTP id B5CF62A28213; Tue, 5 Jun 2012 08:02:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at avionic-design.de Received: from mailbox.adnet.avionic-design.de ([127.0.0.1]) by localhost (mailbox.avionic-design.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vytoGYgLEWcf; Tue, 5 Jun 2012 08:02:34 +0200 (CEST) Received: from localhost (avionic-0098.adnet.avionic-design.de [172.20.31.233]) (Authenticated sender: thierry.reding) by mailbox.adnet.avionic-design.de (Postfix) with ESMTPA id C398F2A2819B; Tue, 5 Jun 2012 08:02:33 +0200 (CEST) From: Thierry Reding To: u-boot@lists.denx.de Date: Tue, 5 Jun 2012 08:02:29 +0200 Message-Id: <1338876150-8170-6-git-send-email-thierry.reding@avionic-design.de> X-Mailer: git-send-email 1.7.10.3 In-Reply-To: <1338876150-8170-1-git-send-email-thierry.reding@avionic-design.de> References: <1338876150-8170-1-git-send-email-thierry.reding@avionic-design.de> X-Provags-ID: V02:K0:3sszAaDbHhLVigP5b7tZpux2e2m6W//ITzLMl6s9PcX zEn87GQaqXX9d4kCWIuEJ2fA+9ObVlE0LoOQjhmlxHItnRxNlR 1gpodJJ2zr4WuUmiflXVLDyx4/IIeB89ZywA4GgRmn1ond6G96 KLjwjXiwb4avqqeZ8sF0xAesnmxRH3NUIhw2WjBewSzvXRgseT UvBFDbI4aGRHW1YEyfMEH11gEQzo3+NVnc3epVt/KifFYgbRPq ex6vjwjlTF8lbBwx/TT71CmbCNsNJyA1i9huBvdli9hkc5iou5 sL2YjPD6yhUJgKj70oq00AoptIPmEF7/+tyn9RNMzpRwNRMN2Z z19IX2XclUrHDLFImXaVd2495OtZZM+QHW4yTCSPWfWGSJ5HB2 fUYthvqbhys3sAvPl1jNGnHEwqaKAjipWtbikOfQsQL8aegyjG DzDKR Cc: Tom Warren Subject: [U-Boot] [PATCH v3 6/7] tegra: Use SD write-protect GPIO on Tamonten X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de GPIO PI6 can be used to obtain the write-protect status of an SD card inserted into the SD slot. Signed-off-by: Thierry Reding Acked-by: Stephen Warren --- Changes in v3: - none Changes in v2: - new patch board/avionic-design/common/tamonten.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/board/avionic-design/common/tamonten.c b/board/avionic-design/common/tamonten.c index 915247c..610f188 100644 --- a/board/avionic-design/common/tamonten.c +++ b/board/avionic-design/common/tamonten.c @@ -65,6 +65,8 @@ void gpio_early_init(void) static void pin_mux_mmc(void) { funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT); + /* for write-protect GPIO PI6 */ + pinmux_tristate_disable(PINGRP_ATA); /* for CD GPIO PH2 */ pinmux_tristate_disable(PINGRP_ATD); } @@ -76,7 +78,7 @@ int board_mmc_init(bd_t *bd) pin_mux_mmc(); /* init dev 0, SD slot, with 4-bit bus */ - tegra2_mmc_init(0, 4, -1, GPIO_PH2); + tegra2_mmc_init(0, 4, GPIO_PI6, GPIO_PH2); return 0; }