From patchwork Fri Jun 8 09:21:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 163737 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 8A601B6FD1 for ; Fri, 8 Jun 2012 19:25:25 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934136Ab2FHJVZ (ORCPT ); Fri, 8 Jun 2012 05:21:25 -0400 Received: from mo-p05-ob.rzone.de ([81.169.146.180]:55384 "EHLO mo-p05-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934007Ab2FHJVY (ORCPT ); Fri, 8 Jun 2012 05:21:24 -0400 X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGoheedClaTaNdBkW0QOb9J0FJuBIacwpbVJRw== X-RZG-CLASS-ID: mo05 Received: from kubuntu.fritz.box (p57B94966.dip.t-dialin.net [87.185.73.102]) by smtp.strato.de (joses mo49) (RZmta 29.10 DYNA|AUTH) with ESMTPA id Y074cfo588cwqE ; Fri, 8 Jun 2012 11:21:15 +0200 (CEST) From: Stefan Roese To: netdev@vger.kernel.org Cc: Viresh Kumar , Giuseppe Cavallaro Subject: [PATCH v2] net: stmmac: Fix clock en-/disable calls Date: Fri, 8 Jun 2012 11:21:05 +0200 Message-Id: <1339147265-19188-1-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.7.10.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org clk_{un}prepare is mandatory for platforms using common clock framework. Since these drivers are used by SPEAr platform, which supports common clock framework, add clk_{un}prepare() support for them. Otherwise the clocks are not correctly en-/disabled and ethernet support doesn't work. Signed-off-by: Stefan Roese Cc: Viresh Kumar Cc: Giuseppe Cavallaro --- v2: - Patch description added. Sorry for missing this in the 1st patch revision. drivers/net/ethernet/stmicro/stmmac/stmmac.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 6b5d060..f46d8d0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -109,7 +109,7 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device, static inline int stmmac_clk_enable(struct stmmac_priv *priv) { if (!IS_ERR(priv->stmmac_clk)) - return clk_enable(priv->stmmac_clk); + return clk_prepare_enable(priv->stmmac_clk); return 0; } @@ -119,7 +119,7 @@ static inline void stmmac_clk_disable(struct stmmac_priv *priv) if (IS_ERR(priv->stmmac_clk)) return; - clk_disable(priv->stmmac_clk); + clk_disable_unprepare(priv->stmmac_clk); } static inline int stmmac_clk_get(struct stmmac_priv *priv) {