From patchwork Mon Dec 4 14:30:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 10090547 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8574C6056E for ; Mon, 4 Dec 2017 14:42:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D15628D85 for ; Mon, 4 Dec 2017 14:42:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81FAB28D8A; Mon, 4 Dec 2017 14:42:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D09C328D85 for ; Mon, 4 Dec 2017 14:42:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753922AbdLDOmO (ORCPT ); Mon, 4 Dec 2017 09:42:14 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:55963 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753915AbdLDOmL (ORCPT ); Mon, 4 Dec 2017 09:42:11 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 90EC2206A6; Mon, 4 Dec 2017 15:42:09 +0100 (CET) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 647B52036E; Mon, 4 Dec 2017 15:41:59 +0100 (CET) From: Thomas Petazzoni To: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Cc: Thomas Petazzoni Subject: [PATCH] arch/sh: fix Ethernet clock for SH7786 Date: Mon, 4 Dec 2017 15:30:49 +0100 Message-Id: <20171204143049.20244-1-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.13.6 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The sh_eth driver (used for the Ethernet controller on SH7786) uses devm_clk_get(&pdev->dev, NULL) to get its clock. It means that con_id = NULL, and therefore a clock lookup made on the con_id doesn't work. In order to make sure that the sh_eth driver is able to find its clock on SH7786, we switch from using a con_id to a dev_id in the clock lookup table for this SoC. Signed-off-by: Thomas Petazzoni Reviewed-by: Geert Uytterhoeven --- arch/sh/kernel/cpu/sh4a/clock-sh7786.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c index ac3dcfe5d303..fa183280a62c 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c @@ -170,7 +170,7 @@ static struct clk_lookup lookups[] = { CLKDEV_CON_ID("dmac_11_6_fck", &mstp_clks[MSTP105]), CLKDEV_CON_ID("dmac_5_0_fck", &mstp_clks[MSTP104]), CLKDEV_CON_ID("du_fck", &mstp_clks[MSTP103]), - CLKDEV_CON_ID("ether_fck", &mstp_clks[MSTP102]), + CLKDEV_DEV_ID("sh7786-ether.0", &mstp_clks[MSTP102]), }; int __init arch_clk_init(void)