From patchwork Sun Jan 17 14:59:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 8050721 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 74918BEEED for ; Sun, 17 Jan 2016 15:00:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D16E2015E for ; Sun, 17 Jan 2016 15:00:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44AAC20268 for ; Sun, 17 Jan 2016 15:00:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752811AbcAQPAh (ORCPT ); Sun, 17 Jan 2016 10:00:37 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:53804 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752663AbcAQPAP (ORCPT ); Sun, 17 Jan 2016 10:00:15 -0500 Received: from localhost.localdomain ([95.91.39.67]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0Ltifl-1aCjoZ0uX7-011EUR; Sun, 17 Jan 2016 15:59:34 +0100 From: Stefan Wahren To: Scott Branden , Ray Jui , Jon Mason , Stephen Warren , Lee Jones , Eric Anholt Cc: Rob Herring , Mark Rutland , Arnd Bergmann , Ulf Hansson , kernel@martin.sperl.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Stefan Wahren Subject: [PATCH 2/5 RFC] mmc: sdhci-iproc: Actually enable the clock Date: Sun, 17 Jan 2016 14:59:01 +0000 Message-Id: <1453042744-16196-3-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1453042744-16196-1-git-send-email-stefan.wahren@i2se.com> References: <1453042744-16196-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K0:uQvu3NV1MQG4gQLGU6leWyqXxogLEw5svEeqWijPLY0Q1qjtoJc T8WHtD1cFvL0VDC5WmnRblKPS9nzDvqGEDrYpvujw3woDFe4UaL9jZI7lwckI4wsK57xlcW 5UMKKjP/gdvf3ruymS73PhDo23GVevKGE7lDdY701841/sUSQjiLgCrj8ry3dr54AIQUgIe pbWoXprVYH7iDOXkyWn8A== X-UI-Out-Filterresults: notjunk:1; V01:K0:mKQA5LXxfO8=:vxkW2rp8Su+t3ZN5E+eVWL gTbnrKol6rrzL0iO19NOzRMFSy+Qake8nCRDchsSPwZbxqKZ+F5MHPaJUKMsrt5/NJdaVYjlt Hx5je7Ml3GkSgzSLwG2NxygVWIAfQzhDQBNkd7pHIJ1WzN+u9hy+k+YXp49TDS+oZPyPUs9Lm SOoZ90irzycHye+LvzW73TZ5afoHYvrJ2S1oJ8DvSfuafPQY4mpRDZRTeOjxdpA+994HdEKKL Cu+H8ok8RWBl8PbvDjlY4Ybmd2I4q6s7/NRZz6PGHu7CRjUjuO2J2/HUGAnA5IbjrYz9TxKAo qwepl3aY7u33bZEjTGB+9A4fCMO+WYVcbMxHmEZSbJY8FBE5DsmxlI34vNSa0cbkqbjcUs+Ik wXBDFoVvVEW31H/xCMuagkpCI85KRMVbRkFLwois3EN4jt++T0krLCinK2veaw1ZLSxxzg8WO xkk9TjyyMu0SFumycOLfgzh1fPF2wxDacoM41Mt/f4uf6rRheWvcCyluEw12xk0FMwBc9Wxml EAY8FiRH+5T/srZgxdHuPA4a6tk/CqkSAemtiLKs6wzu8CmZ4d5RjfynBvACn2d3FkYb3+nuW RTRE+PufKY3Kd7s6RX8NI3cQv6B8HkNdNyHN4hnjv0NlYqtSV9k6O7n6y9kUCXZm0uyMZ1uN6 GQ964T/S11T8ZzdfuiDg/yvXCvTSBicoUOERw7AcvKPZfHvIdjdr1JTFFEGANYAZJPvI= 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 The RPi firmware-based clocks driver can actually disable unused clocks, so when switching to use it we ended up losing our MMC clock once all devices were probed. This patch adopts the changes from 1e5a0a9a58e2 ("mmc: sdhci-bcm2835: Actually enable the clock") to sdhci-iproc. Signed-off-by: Stefan Wahren Acked-by: Scott Branden --- drivers/mmc/host/sdhci-iproc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index e22060a..55bc348 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -207,6 +207,11 @@ static int sdhci_iproc_probe(struct platform_device *pdev) ret = PTR_ERR(pltfm_host->clk); goto err; } + ret = clk_prepare_enable(pltfm_host->clk); + if (ret) { + dev_err(&pdev->dev, "failed to enable host clk\n"); + goto err; + } if (iproc_host->data->pdata->quirks & SDHCI_QUIRK_MISSING_CAPS) { host->caps = iproc_host->data->caps; @@ -215,10 +220,12 @@ static int sdhci_iproc_probe(struct platform_device *pdev) ret = sdhci_add_host(host); if (ret) - goto err; + goto err_clk; return 0; +err_clk: + clk_disable_unprepare(pltfm_host->clk); err: sdhci_pltfm_free(pdev); return ret;