From patchwork Thu Dec 15 11:57:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Girish K S X-Patchwork-Id: 5761 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3577723E19 for ; Thu, 15 Dec 2011 11:53:50 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 22942A188B3 for ; Thu, 15 Dec 2011 11:53:50 +0000 (UTC) Received: by eaak10 with SMTP id k10so2014021eaa.11 for ; Thu, 15 Dec 2011 03:53:50 -0800 (PST) Received: by 10.205.120.135 with SMTP id fy7mr697849bkc.54.1323950029903; Thu, 15 Dec 2011 03:53:49 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.129.2 with SMTP id hg2cs38680bkc; Thu, 15 Dec 2011 03:53:49 -0800 (PST) Received: by 10.50.171.5 with SMTP id aq5mr2800187igc.76.1323950027555; Thu, 15 Dec 2011 03:53:47 -0800 (PST) Received: from mail-iy0-f178.google.com (mail-iy0-f178.google.com [209.85.210.178]) by mx.google.com with ESMTPS id m19si1561551ibi.82.2011.12.15.03.53.46 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Dec 2011 03:53:47 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of girish.shivananjappa@linaro.org) client-ip=209.85.210.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of girish.shivananjappa@linaro.org) smtp.mail=girish.shivananjappa@linaro.org Received: by iagf6 with SMTP id f6so3387603iag.37 for ; Thu, 15 Dec 2011 03:53:46 -0800 (PST) Received: by 10.43.49.66 with SMTP id uz2mr2321287icb.9.1323950026728; Thu, 15 Dec 2011 03:53:46 -0800 (PST) Received: from girishks ([115.113.119.130]) by mx.google.com with ESMTPS id mb4sm10220871igc.1.2011.12.15.03.53.43 (version=SSLv3 cipher=OTHER); Thu, 15 Dec 2011 03:53:46 -0800 (PST) From: Girish K S To: linux-mmc@vger.kernel.org Cc: patches@linaro.org, linux-samsung-soc@vger.kernel.org, Girish K S , Philip Rakity , Arindam Nath , Chris Ball Subject: [PATCH] mmc: core: Fix voltage select in DDR mode Date: Thu, 15 Dec 2011 17:27:42 +0530 Message-Id: <1323950262-2160-1-git-send-email-girish.shivananjappa@linaro.org> X-Mailer: git-send-email 1.7.1 This patch fixes the wrong comparison before setting the interface voltage in DDR mode. The assignment to the variable ddr before comaprison is either ddr = MMC_1_2V_DDR_MODE; or ddr == MMC_1_8V_DDR_MODE. But the comparison is done wth the extended csd value if (ddr == EXT_CSD_CARD_TYPE_DDR_1_2V) cc: Philip Rakity cc: Arindam Nath cc: Chris Ball Signed-off-by: Girish K S Acked-by: Subhash Jadavani Acked-by: Philip Rakity --- drivers/mmc/core/mmc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 006e932..f0a9f1f 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1058,7 +1058,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, * * WARNING: eMMC rules are NOT the same as SD DDR */ - if (ddr == EXT_CSD_CARD_TYPE_DDR_1_2V) { + if (ddr == MMC_1_2V_DDR_MODE) { err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120, 0); if (err)