Skip to content

Commit 427be6a

Browse files
blogicpaulburton
authored andcommitted
MIPS: ath79: drop !OF clock code
With the target now being fully OF based, we can drop the legacy clock registration code. All clocks are now probed via devicetree. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pengutronix Kernel Team <kernel@pengutronix.de> Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: Felix Fietkau <nbd@nbd.name>
1 parent 85b9686 commit 427be6a

File tree

2 files changed

+0
-59
lines changed

2 files changed

+0
-59
lines changed

arch/mips/ath79/clock.c

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -617,60 +617,6 @@ static void __init qca956x_clocks_init(void __iomem *pll_base)
617617
ath79_set_clk(ATH79_CLK_AHB, ahb_rate);
618618
}
619619

620-
void __init ath79_clocks_init(void)
621-
{
622-
const char *wdt;
623-
const char *uart;
624-
625-
if (soc_is_ar71xx())
626-
ar71xx_clocks_init(ath79_pll_base);
627-
else if (soc_is_ar724x() || soc_is_ar913x())
628-
ar724x_clocks_init(ath79_pll_base);
629-
else if (soc_is_ar933x())
630-
ar933x_clocks_init(ath79_pll_base);
631-
else if (soc_is_ar934x())
632-
ar934x_clocks_init(ath79_pll_base);
633-
else if (soc_is_qca953x())
634-
qca953x_clocks_init(ath79_pll_base);
635-
else if (soc_is_qca955x())
636-
qca955x_clocks_init(ath79_pll_base);
637-
else if (soc_is_qca956x() || soc_is_tp9343())
638-
qca956x_clocks_init(ath79_pll_base);
639-
else
640-
BUG();
641-
642-
if (soc_is_ar71xx() || soc_is_ar724x() || soc_is_ar913x()) {
643-
wdt = "ahb";
644-
uart = "ahb";
645-
} else if (soc_is_ar933x()) {
646-
wdt = "ahb";
647-
uart = "ref";
648-
} else {
649-
wdt = "ref";
650-
uart = "ref";
651-
}
652-
653-
clk_add_alias("wdt", NULL, wdt, NULL);
654-
clk_add_alias("uart", NULL, uart, NULL);
655-
}
656-
657-
unsigned long __init
658-
ath79_get_sys_clk_rate(const char *id)
659-
{
660-
struct clk *clk;
661-
unsigned long rate;
662-
663-
clk = clk_get(NULL, id);
664-
if (IS_ERR(clk))
665-
panic("unable to get %s clock, err=%d", id, (int) PTR_ERR(clk));
666-
667-
rate = clk_get_rate(clk);
668-
clk_put(clk);
669-
670-
return rate;
671-
}
672-
673-
#ifdef CONFIG_OF
674620
static void __init ath79_clocks_init_dt(struct device_node *np)
675621
{
676622
struct clk *ref_clk;
@@ -727,5 +673,3 @@ CLK_OF_DECLARE(ar9340_clk, "qca,ar9340-pll", ath79_clocks_init_dt);
727673
CLK_OF_DECLARE(ar9530_clk, "qca,qca9530-pll", ath79_clocks_init_dt);
728674
CLK_OF_DECLARE(ar9550_clk, "qca,qca9550-pll", ath79_clocks_init_dt);
729675
CLK_OF_DECLARE(ar9560_clk, "qca,qca9560-pll", ath79_clocks_init_dt);
730-
731-
#endif

arch/mips/ath79/common.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
#define ATH79_MEM_SIZE_MIN (2 * 1024 * 1024)
2020
#define ATH79_MEM_SIZE_MAX (256 * 1024 * 1024)
2121

22-
void ath79_clocks_init(void);
23-
unsigned long ath79_get_sys_clk_rate(const char *id);
24-
2522
void ath79_ddr_ctrl_init(void);
2623

2724
#endif /* __ATH79_COMMON_H */

0 commit comments

Comments
 (0)