From patchwork Mon Feb 24 10:25:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerhard Sittig X-Patchwork-Id: 3708471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7CC989F2F7 for ; Mon, 24 Feb 2014 10:27:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D83520136 for ; Mon, 24 Feb 2014 10:27:46 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C29F20131 for ; Mon, 24 Feb 2014 10:27:45 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WHska-0006Wu-SR; Mon, 24 Feb 2014 10:27:05 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WHskS-0007QQ-3T; Mon, 24 Feb 2014 10:26:56 +0000 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WHsk9-0007Mg-7n for linux-arm-kernel@lists.infradead.org; Mon, 24 Feb 2014 10:26:39 +0000 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3fXfZ73Mrpz3hlcP; Mon, 24 Feb 2014 11:26:07 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3fXfZ71yF2zbbhD; Mon, 24 Feb 2014 11:26:07 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id 8xiuX0Zuhrow; Mon, 24 Feb 2014 11:26:05 +0100 (CET) X-Auth-Info: JmoHfnDKGH5xQ9bfw9NSHFaw02G0yFzcEHyTvpcXLUg= Received: from localhost (kons-4d03d85b.pool.mediaWays.net [77.3.216.91]) by mail.mnet-online.de (Postfix) with ESMTPA; Mon, 24 Feb 2014 11:26:05 +0100 (CET) From: Gerhard Sittig To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 1/3] fs_enet: update clock names to comply with FEC binding Date: Mon, 24 Feb 2014 11:25:55 +0100 Message-Id: <1393237557-31406-1-git-send-email-gsi@denx.de> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140224_052637_788430_014D6D72 X-CRM114-Status: GOOD ( 11.74 ) X-Spam-Score: 1.2 (+) Cc: Mark Rutland , Anatolij Gustschin , Mike Turquette , Pawel Moll , Ian Campbell , Gerhard Sittig , Rob Herring , Shawn Guo X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 a recent FEC binding document update that was motivated by i.MX development revealed that ARM and PowerPC implementations in Linux did not agree on the clock names to use for the FEC nodes change the OF clock lookup to prefer "ipg" over "per", which improves compliance with the binding, and keeps compatibility with former device trees Signed-off-by: Gerhard Sittig --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c index 62f042d4aaa9..ce20184b96cb 100644 --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c @@ -1037,11 +1037,20 @@ static int fs_enet_probe(struct platform_device *ofdev) fpi->use_rmii = 1; } - /* make clock lookup non-fatal (the driver is shared among platforms), + /* the driver is shared across several PowerPC platforms, not all + * of them provide COMMON_CLK support, and newer kernels are supposed + * to keep working with older DT blobs, so clock lookup is non-fatal + * * but require enable to succeed when a clock was specified/found, * keep a reference to the clock upon successful acquisition + * + * the FEC binding is shared with ARM platforms, so we lookup several + * clock names to prefer the common naming convention yet support + * names that were used before unification */ - clk = devm_clk_get(&ofdev->dev, "per"); + clk = devm_clk_get(&ofdev->dev, "ipg"); + if (IS_ERR(clk)) + clk = devm_clk_get(&ofdev->dev, "per"); if (!IS_ERR(clk)) { err = clk_prepare_enable(clk); if (err) {