mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
LoongArch: Adjust boot & setup for 32BIT/64BIT
Adjust boot & setup for both 32BIT and 64BIT, including: efi header definition, MAX_IO_PICS definition, kernel entry and environment setup routines, etc. Add a fallback path in fdt_cpu_clk_init() to avoid 0MHz in /proc/cpuinfo if there is no valid clock freq from firmware. Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
@@ -72,9 +72,12 @@ static int __init fdt_cpu_clk_init(void)
|
||||
|
||||
clk = of_clk_get(np, 0);
|
||||
of_node_put(np);
|
||||
cpu_clock_freq = 200 * 1000 * 1000;
|
||||
|
||||
if (IS_ERR(clk))
|
||||
if (IS_ERR(clk)) {
|
||||
pr_warn("No valid CPU clock freq, assume 200MHz.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
cpu_clock_freq = clk_get_rate(clk);
|
||||
clk_put(clk);
|
||||
|
||||
Reference in New Issue
Block a user