From patchwork Mon Nov 26 00:16:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 1799811 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 2094BDF264 for ; Mon, 26 Nov 2012 00:20:18 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TcmNp-0006Vu-IP; Mon, 26 Nov 2012 00:17:09 +0000 Received: from kirsty.vergenet.net ([202.4.237.240]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TcmNl-0006Tm-CM for linux-arm-kernel@lists.infradead.org; Mon, 26 Nov 2012 00:17:06 +0000 Received: from ayumi.akashicho.tokyo.vergenet.net (p4024-ipbfp1903kobeminato.hyogo.ocn.ne.jp [114.172.131.24]) by kirsty.vergenet.net (Postfix) with ESMTP id AE11F25BF79; Mon, 26 Nov 2012 11:17:00 +1100 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 55DF3EDE05D; Mon, 26 Nov 2012 09:16:59 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/7] mmc: sh-mmcif: provide default allowed voltage Date: Mon, 26 Nov 2012 09:16:48 +0900 Message-Id: <1353889014-17142-2-git-send-email-horms@verge.net.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1353889014-17142-1-git-send-email-horms@verge.net.au> References: <1353889014-17142-1-git-send-email-horms@verge.net.au> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121125_191705_797809_E772C582 X-CRM114-Status: GOOD ( 12.37 ) X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [202.4.237.240 listed in list.dnswl.org] -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Paul Mundt , Magnus Damm , Guennadi Liakhovetski , Simon Horman X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Use MMC_VDD_165_195 as the allowed voltages in the absence of platform data. This should allow device tree to initialise MMCIF for a number of boards. A more complete solution would be to provide either MMCIF or MMC device try bindings to set the allowed voltages. Tested on the KZM-A9-GT board Cc: Guennadi Liakhovetski Signed-off-by: Simon Horman --- drivers/mmc/host/sh_mmcif.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 11d2bc3..88d6866 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1293,12 +1293,9 @@ static void sh_mmcif_init_ocr(struct sh_mmcif_host *host) mmc_regulator_get_supply(mmc); - if (!pd) - return; - if (!mmc->ocr_avail) - mmc->ocr_avail = pd->ocr; - else if (pd->ocr) + mmc->ocr_avail = pd ? pd->ocr : MMC_VDD_165_195; + else if (pd && pd->ocr) dev_warn(mmc_dev(mmc), "Platform OCR mask is ignored\n"); }