This source file includes following definitions.
- mips_nmi_setup
- prom_init
- prom_free_prom_memory
1
2
3
4
5
6
7 #include <linux/memblock.h>
8 #include <asm/bootinfo.h>
9 #include <asm/traps.h>
10 #include <asm/smp-ops.h>
11 #include <asm/cacheflush.h>
12
13 #include <loongson.h>
14
15
16 unsigned long __maybe_unused _loongson_addrwincfg_base;
17
18 static void __init mips_nmi_setup(void)
19 {
20 void *base;
21 extern char except_vec_nmi;
22
23 base = (void *)(CAC_BASE + 0x380);
24 memcpy(base, &except_vec_nmi, 0x80);
25 flush_icache_range((unsigned long)base, (unsigned long)base + 0x80);
26 }
27
28 void __init prom_init(void)
29 {
30 #ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
31 _loongson_addrwincfg_base = (unsigned long)
32 ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE);
33 #endif
34
35 prom_init_cmdline();
36 prom_init_env();
37
38
39 set_io_port_base((unsigned long)
40 ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE));
41
42 #ifdef CONFIG_NUMA
43 prom_init_numa_memory();
44 #else
45 prom_init_memory();
46 #endif
47
48
49 prom_init_uart_base();
50 register_smp_ops(&loongson3_smp_ops);
51 board_nmi_handler_setup = mips_nmi_setup;
52 }
53
54 void __init prom_free_prom_memory(void)
55 {
56 }