1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * init.c, Common initialization routines for NEC VR4100 series.
5 * Copyright (C) 2003-2009 Yoichi Yuasa <yuasa@linux-mips.org>
7 #include <linux/init.h>
8 #include <linux/ioport.h>
10 #include <linux/string.h>
12 #include <asm/bootinfo.h>
14 #include <asm/vr41xx/irq.h>
15 #include <asm/vr41xx/vr41xx.h>
17 #define IO_MEM_RESOURCE_START 0UL
18 #define IO_MEM_RESOURCE_END 0x1fffffffUL
20 static void __init
iomem_resource_init(void)
22 iomem_resource
.start
= IO_MEM_RESOURCE_START
;
23 iomem_resource
.end
= IO_MEM_RESOURCE_END
;
26 void __init
plat_time_init(void)
30 vr41xx_calculate_clock_frequency();
32 tclock
= vr41xx_get_tclock_frequency();
33 if (current_cpu_data
.processor_id
== PRID_VR4131_REV2_0
||
34 current_cpu_data
.processor_id
== PRID_VR4131_REV2_1
)
35 mips_hpt_frequency
= tclock
/ 2;
37 mips_hpt_frequency
= tclock
/ 4;
40 void __init
plat_mem_setup(void)
42 iomem_resource_init();
47 void __init
prom_init(void)
53 argv
= (char **)fw_arg1
;
55 for (i
= 1; i
< argc
; i
++) {
56 strlcat(arcs_cmdline
, argv
[i
], COMMAND_LINE_SIZE
);
58 strlcat(arcs_cmdline
, " ", COMMAND_LINE_SIZE
);
62 void __init
prom_free_prom_memory(void)