Linux 3.15-rc1
[linux/fpc-iii.git] / arch / mips / loongson / common / init.c
blobf37fe5413b7305d17c38bcc057e66686948b53b5
1 /*
2 * Copyright (C) 2009 Lemote Inc.
3 * Author: Wu Zhangjin, wuzhangjin@gmail.com
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
11 #include <linux/bootmem.h>
12 #include <asm/smp-ops.h>
14 #include <loongson.h>
16 /* Loongson CPU address windows config space base address */
17 unsigned long __maybe_unused _loongson_addrwincfg_base;
19 void __init prom_init(void)
21 #ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
22 _loongson_addrwincfg_base = (unsigned long)
23 ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE);
24 #endif
26 prom_init_cmdline();
27 prom_init_env();
29 /* init base address of io space */
30 set_io_port_base((unsigned long)
31 ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE));
33 prom_init_memory();
35 /*init the uart base address */
36 prom_init_uart_base();
37 register_smp_ops(&loongson3_smp_ops);
40 void __init prom_free_prom_memory(void)