usb: gadget: udc: pch_udc: Fix a plethora of function documentation related issues
[linux/fpc-iii.git] / arch / mips / loongson2ef / common / init.c
blobce3f02f75e2a8ece3ffc6da98fb88e22eedf4bfb
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (C) 2009 Lemote Inc.
4 * Author: Wu Zhangjin, wuzhangjin@gmail.com
5 */
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 #include <asm/fw/fw.h>
14 #include <loongson.h>
16 /* Loongson CPU address windows config space base address */
17 unsigned long __maybe_unused _loongson_addrwincfg_base;
19 static void __init mips_nmi_setup(void)
21 void *base;
22 extern char except_vec_nmi[];
24 base = (void *)(CAC_BASE + 0x380);
25 memcpy(base, except_vec_nmi, 0x80);
26 flush_icache_range((unsigned long)base, (unsigned long)base + 0x80);
29 void __init prom_init(void)
31 #ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
32 _loongson_addrwincfg_base = (unsigned long)
33 ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE);
34 #endif
36 fw_init_cmdline();
37 prom_init_machtype();
38 prom_init_env();
40 /* init base address of io space */
41 set_io_port_base((unsigned long)
42 ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE));
43 prom_init_memory();
45 /*init the uart base address */
46 prom_init_uart_base();
47 board_nmi_handler_setup = mips_nmi_setup;
50 void __init prom_free_prom_memory(void)