From patchwork Fri Oct 3 15:55:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 5023641 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 AC6F2C11AB for ; Fri, 3 Oct 2014 15:59:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D1E4D201BB for ; Fri, 3 Oct 2014 15:59:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E43062017E for ; Fri, 3 Oct 2014 15:59:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754471AbaJCP6C (ORCPT ); Fri, 3 Oct 2014 11:58:02 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:54499 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754107AbaJCPz6 (ORCPT ); Fri, 3 Oct 2014 11:55:58 -0400 Received: by mail-wi0-f174.google.com with SMTP id cc10so7637968wib.13 for ; Fri, 03 Oct 2014 08:55:57 -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; bh=aQgpT+xaQNs+EmQOr1k4Igbd6nmiujbBoKFSizlaE8U=; b=oxrUk7fAXMYQ6T1a4R0wrJUQ6y6sqHrWz/Egnkoi9D7QWLHgboFMvBdqzTawCryZxZ UcbFRMH/A0eASJgibBXALnO30eIYl06mRradsD1E9ACFupgvr+P15o9m1gR3Tuq4VG0e 65kd/vHp6zqcX3pmKWwnevTYqIjojnYKp+nenvi29CFxUACrXLvX7KoYREV/yu2Sgnmy zg8CxlPnnXr9TZorb8D+/66tEOIN07ioq2aAIcTiY9aNCjh6VgfYDDzXLNdzZRifyhoH XsVuFMBT4BeHf2vLMVvFGo0fC+yKUZw+QENHsJ5dTwz5TpB/ai1TPUojR47oPZ8JEd7+ eW2A== X-Received: by 10.194.21.230 with SMTP id y6mr8608401wje.42.1412351757305; Fri, 03 Oct 2014 08:55:57 -0700 (PDT) Received: from topkick.lan (f051009242.adsl.alicedsl.de. [78.51.9.242]) by mx.google.com with ESMTPSA id gg18sm2479091wic.21.2014.10.03.08.55.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Oct 2014 08:55:56 -0700 (PDT) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Cc: Chris Ball , Ulf Hansson , Antoine Tenart , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/12] mmc: sdhci-pxav3: Try to get named I/O clock first Date: Fri, 3 Oct 2014 17:55:42 +0200 Message-Id: <1412351747-4188-8-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1412351747-4188-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1412351747-4188-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=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Tenart Cc: linux-mmc@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);