Skip to content

Commit 2b0f3d7

Browse files
Aidan MacDonaldbebarino
authored andcommitted
mips: ingenic: Do not manually reference the CPU clock
It isn't necessary to manually walk the device tree and enable the CPU clock anymore. The CPU and other necessary clocks are now flagged as critical in the clock driver, which accomplishes the same thing in a more declarative fashion. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20220428164454.17908-4-aidanmacdonald.0x0@gmail.com Tested-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com> # On X1000 and X1830 Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent ca54d06 commit 2b0f3d7

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

arch/mips/generic/board-ingenic.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -131,36 +131,10 @@ static const struct platform_suspend_ops ingenic_pm_ops __maybe_unused = {
131131

132132
static int __init ingenic_pm_init(void)
133133
{
134-
struct device_node *cpu_node;
135-
struct clk *cpu0_clk;
136-
int ret;
137-
138134
if (boot_cpu_type() == CPU_XBURST) {
139135
if (IS_ENABLED(CONFIG_PM_SLEEP))
140136
suspend_set_ops(&ingenic_pm_ops);
141137
_machine_halt = ingenic_halt;
142-
143-
/*
144-
* Unconditionally enable the clock for the first CPU.
145-
* This makes sure that the PLL that feeds the CPU won't be
146-
* stopped while the kernel is running.
147-
*/
148-
cpu_node = of_get_cpu_node(0, NULL);
149-
if (!cpu_node) {
150-
pr_err("Unable to get CPU node\n");
151-
} else {
152-
cpu0_clk = of_clk_get(cpu_node, 0);
153-
if (IS_ERR(cpu0_clk)) {
154-
pr_err("Unable to get CPU0 clock\n");
155-
return PTR_ERR(cpu0_clk);
156-
}
157-
158-
ret = clk_prepare_enable(cpu0_clk);
159-
if (ret) {
160-
pr_err("Unable to enable CPU0 clock\n");
161-
return ret;
162-
}
163-
}
164138
}
165139

166140
return 0;

0 commit comments

Comments
 (0)