From patchwork Wed Dec 19 18:29:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 1896691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 48BEA3FC64 for ; Wed, 19 Dec 2012 18:40:31 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TlOWQ-0006PJ-Ad; Wed, 19 Dec 2012 18:37:39 +0000 Received: from kmf.trabucayre.com ([91.121.117.161] helo=mail) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TlOWM-0006Nf-91 for linux-arm-kernel@lists.infradead.org; Wed, 19 Dec 2012 18:37:35 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by mail (Postfix) with ESMTP id 6901039841; Wed, 19 Dec 2012 19:29:38 +0100 (CET) From: Gwenhael Goavec-Merou To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] mxc: enable EHCI PER clock Date: Wed, 19 Dec 2012 19:29:37 +0100 Message-Id: <1355941777-99352-2-git-send-email-gwenhael.goavec-merou@armadeus.com> X-Mailer: git-send-email 1.6.4.2 In-Reply-To: <1355941777-99352-1-git-send-email-gwenhael.goavec-merou@armadeus.com> References: <1355941777-99352-1-git-send-email-gwenhael.goavec-merou@armadeus.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121219_133734_515759_856DA2B0 X-CRM114-Status: GOOD ( 10.49 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: marex@denx.de, s.hauer@pengutronix.de, Gwenhael Goavec-Merou 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 EHCI PER clock (aka usb_div) must be enabled to have EHCI driver working. Signed-off-by: Gwenhael Goavec-Merou --- drivers/usb/host/ehci-mxc.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index ec7f5d2..8050631 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c @@ -31,7 +31,7 @@ #define ULPI_VIEWPORT_OFFSET 0x170 struct ehci_mxc_priv { - struct clk *usbclk, *ahbclk, *phyclk; + struct clk *usbclk, *ahbclk, *perclk, *phyclk; struct usb_hcd *hcd; }; @@ -150,6 +150,13 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev) } clk_prepare_enable(priv->ahbclk); + priv->perclk = devm_clk_get(&pdev->dev, "per"); + if (IS_ERR(priv->perclk)) { + ret = PTR_ERR(priv->perclk); + goto err_clk_per; + } + clk_prepare_enable(priv->perclk); + /* "dr" device has its own clock on i.MX51 */ priv->phyclk = devm_clk_get(&pdev->dev, "phy"); if (IS_ERR(priv->phyclk)) @@ -233,6 +240,8 @@ err_init: if (priv->phyclk) clk_disable_unprepare(priv->phyclk); + clk_disable_unprepare(priv->perclk); +err_clk_per: clk_disable_unprepare(priv->ahbclk); err_clk_ahb: clk_disable_unprepare(priv->usbclk); @@ -259,6 +268,7 @@ static int __exit ehci_mxc_drv_remove(struct platform_device *pdev) clk_disable_unprepare(priv->usbclk); clk_disable_unprepare(priv->ahbclk); + clk_disable_unprepare(priv->perclk); if (priv->phyclk) clk_disable_unprepare(priv->phyclk);