linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cedric Roux <sed@free.fr>
To: kgene@kernel.org, krzk@kernel.org, linux@armlinux.org.uk,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Cedric Roux <sed@free.fr>
Subject: [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440
Date: Fri,  7 Sep 2018 23:54:46 +0200	[thread overview]
Message-ID: <20180907215446.15160-2-sed@free.fr> (raw)
In-Reply-To: <20180907215446.15160-1-sed@free.fr>

The mini2440 computer uses "active high" to signal that the "write protect"
of the inserted MMC is set. The current code uses the opposite, leading to
a wrong detection of write protection. The solution is simply to use
".wprotect_invert = 1" in the description of the MMC.

Signed-off-by: Cedric Roux <sed@free.fr>
---
 arch/arm/mach-s3c24xx/mach-mini2440.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 4a0bf6abba8c..bfce7971d741 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -234,10 +234,11 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
 /* MMC/SD  */
 
 static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
-	.gpio_detect   = S3C2410_GPG(8),
-	.gpio_wprotect = S3C2410_GPH(8),
-	.set_power     = NULL,
-	.ocr_avail     = MMC_VDD_32_33|MMC_VDD_33_34,
+	.gpio_detect     = S3C2410_GPG(8),
+	.gpio_wprotect   = S3C2410_GPH(8),
+	.wprotect_invert = 1,
+	.set_power       = NULL,
+	.ocr_avail       = MMC_VDD_32_33|MMC_VDD_33_34,
 };
 
 /* NAND Flash on MINI2440 board */
-- 
2.18.0


  reply	other threads:[~2018-09-07 21:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 21:54 [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c Cedric Roux
2018-09-07 21:54 ` Cedric Roux [this message]
2018-09-10 10:23   ` [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440 Krzysztof Kozlowski
2018-09-10 16:55     ` Cedric Roux
2018-09-10 16:57       ` Krzysztof Kozlowski
2018-09-10 17:22   ` Krzysztof Kozlowski
2018-09-10 17:06 ` [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c Krzysztof Kozlowski
2018-09-12 19:21 ` Joe Perches
2018-09-13 20:26   ` Cedric Roux
2018-09-17  8:33     ` Krzysztof Kozlowski

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=20180907215446.15160-2-sed@free.fr \
    --to=sed@free.fr \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).