From patchwork Tue Oct 21 09:22:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 5111911 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D199EC11AC for ; Tue, 21 Oct 2014 09:24:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C5B420103 for ; Tue, 21 Oct 2014 09:24:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 210CF20123 for ; Tue, 21 Oct 2014 09:24:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754826AbaJUJW6 (ORCPT ); Tue, 21 Oct 2014 05:22:58 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:64110 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754661AbaJUJWz (ORCPT ); Tue, 21 Oct 2014 05:22:55 -0400 Received: by mail-wg0-f47.google.com with SMTP id x13so838453wgg.18 for ; Tue, 21 Oct 2014 02:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :content-type:content-transfer-encoding; bh=YwmkP+keiFXyARLdcf0ZRJmxp3y+NYysVGf7so4ebxo=; b=Ahr0TGPjJxJDbgXplgdkL8z8yztBLUFiFHgbXXAL/ccV0JqCBDHdoX5gIhMd9WaJYU htWYJz+n0SLFYiViWpHbUUAKGB+d3wzDp1uXeCj5DCVs1i/gyR+e7ZY9S2r3n6584UOP RAd7rnAs6/445thIWIDVI/UpNAkP8yA/E5R7U1Py5Lqdv79sz+/lECKnWLRC4V9Pzuta 6GHDVRLrC8t3w+Ap2rP82BTjUsxjjxIi1Pa7Pt8biqRSgrodXGt3OEZjS0J4ne2UNrT0 HbwNgzKdWkSXxirSDrTqDhgdVSl38Cp9fJ0IyKvsWgF4UK58Vy27FrhbwLyxLqD4RtXu tqGg== X-Received: by 10.194.119.72 with SMTP id ks8mr39520082wjb.75.1413883374144; Tue, 21 Oct 2014 02:22:54 -0700 (PDT) Received: from topkick.lan (f052063137.adsl.alicedsl.de. [78.52.63.137]) by mx.google.com with ESMTPSA id yr9sm14718527wjc.31.2014.10.21.02.22.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Oct 2014 02:22:53 -0700 (PDT) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Cc: Chris Ball , Ulf Hansson , =?UTF-8?q?Antoine=20T=C3=A9nart?= , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 07/12] mmc: sdhci-pxav3: Try to get named I/O clock first Date: Tue, 21 Oct 2014 11:22:39 +0200 Message-Id: <1413883364-681-8-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1413883364-681-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1413883364-681-1-git-send-email-sebastian.hesselbarth@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With support for more than one clock, we'll need to distinguish between the clock by name. Change clock probing to first try to get "io" clock before falling back to unnamed clock. Signed-off-by: Sebastian Hesselbarth --- Cc: Chris Ball Cc: Ulf Hansson Cc: "Antoine Ténart" Cc: linux-mmc@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/mmc/host/sdhci-pxav3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index a34a589670e6..3dfd97977515 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -309,7 +309,9 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) pltfm_host = sdhci_priv(host); pltfm_host->priv = pxa; - pxa->clk_io = devm_clk_get(dev, NULL); + pxa->clk_io = devm_clk_get(dev, "io"); + if (IS_ERR(pxa->clk_io)) + pxa->clk_io = devm_clk_get(dev, NULL); if (IS_ERR(pxa->clk_io)) { dev_err(dev, "failed to get io clock\n"); ret = PTR_ERR(pxa->clk_io);