Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753753Ab3JDKOW (ORCPT ); Fri, 4 Oct 2013 06:14:22 -0400 Received: from mail-bk0-f53.google.com ([209.85.214.53]:35090 "EHLO mail-bk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752167Ab3JDKOV (ORCPT ); Fri, 4 Oct 2013 06:14:21 -0400 From: Sebastian Hesselbarth To: Sebastian Hesselbarth Cc: Jason Cooper , Andrew Lunn , Russell King , Grant Likely , Benjamin Herrenschmidt , Jason Gunthorpe , Ezequiel Garcia , Mike Turquette , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] ARM: kirkwood: remove ethernet clock gate workaround Date: Fri, 4 Oct 2013 12:13:50 +0200 Message-Id: <1380881630-24439-1-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1380826568-18587-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1380826568-18587-1-git-send-email-sebastian.hesselbarth@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2440 Lines: 71 With a proper fix for Kirkwood ethernet IP MAC address clock gating issue, we can now remove the clock gating workaround that always enabled ethernet clocks. Signed-off-by: Sebastian Hesselbarth --- Changelog: v2->v3: - make use of new public clk_is_enabled, adds dependency to [1] - add warning about gated clock && missing MAC property (Suggested by Jason Gunthorpe) v1->v2: - check for gated clock before accessing eth registers (Suggested by Andrew Lunn) [1] http://www.spinics.net/lists/arm-kernel/msg277392.html Cc: Jason Cooper Cc: Andrew Lunn Cc: Russell King Cc: Grant Likely Cc: Benjamin Herrenschmidt Cc: Jason Gunthorpe Cc: Ezequiel Garcia Cc: Mike Turquette Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/mach-kirkwood/board-dt.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 28e952b..6925de8 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -41,7 +41,6 @@ static void __init kirkwood_legacy_clk_init(void) struct device_node *np = of_find_compatible_node( NULL, NULL, "marvell,kirkwood-gating-clock"); struct of_phandle_args clkspec; - struct clk *clk; clkspec.np = np; clkspec.args_count = 1; @@ -53,19 +52,6 @@ static void __init kirkwood_legacy_clk_init(void) clkspec.args[0] = CGC_BIT_PEX1; orion_clkdev_add("1", "pcie", of_clk_get_from_provider(&clkspec)); - - /* - * The ethernet interfaces forget the MAC address assigned by - * u-boot if the clocks are turned off. Until proper DT support - * is available we always enable them for now. - */ - clkspec.args[0] = CGC_BIT_GE0; - clk = of_clk_get_from_provider(&clkspec); - clk_prepare_enable(clk); - - clkspec.args[0] = CGC_BIT_GE1; - clk = of_clk_get_from_provider(&clkspec); - clk_prepare_enable(clk); } #define MV643XX_ETH_MAC_ADDR_LOW 0x0414 -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/