linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch/sh: fix Ethernet clock for SH7786
@ 2017-12-04 14:30 Thomas Petazzoni
  2017-12-04 14:58 ` Geert Uytterhoeven
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2017-12-04 14:30 UTC (permalink / raw)
  To: linux-sh

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 <thomas.petazzoni@free-electrons.com>
---
 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)
-- 
2.13.6


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-26 13:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-04 14:30 [PATCH] arch/sh: fix Ethernet clock for SH7786 Thomas Petazzoni
2017-12-04 14:58 ` Geert Uytterhoeven
2017-12-04 15:23 ` Thomas Petazzoni
2017-12-04 15:31 ` Geert Uytterhoeven
2018-01-09 14:57 ` Thomas Petazzoni
2018-02-26 13:50 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).