]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - arch/mips/loongson/common/init.c
MIPS: Add NUMA support for Loongson-3
[mirror_ubuntu-artful-kernel.git] / arch / mips / loongson / common / init.c
CommitLineData
bd92aa01 1/*
a3ed4951 2 * Copyright (C) 2009 Lemote Inc.
f7a904df 3 * Author: Wu Zhangjin, wuzhangjin@gmail.com
bd92aa01 4 *
70342287
RB
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
bd92aa01
WZ
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
bd92aa01 11#include <linux/bootmem.h>
300459d5 12#include <asm/smp-ops.h>
bd92aa01 13
5e983ff6 14#include <loongson.h>
bd92aa01 15
6f7a251a
WZ
16/* Loongson CPU address windows config space base address */
17unsigned long __maybe_unused _loongson_addrwincfg_base;
18
bd92aa01
WZ
19void __init prom_init(void)
20{
55045ff5 21#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
6f7a251a
WZ
22 _loongson_addrwincfg_base = (unsigned long)
23 ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE);
24#endif
25
bd92aa01
WZ
26 prom_init_cmdline();
27 prom_init_env();
1a08f152
HC
28
29 /* init base address of io space */
30 set_io_port_base((unsigned long)
31 ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE));
32
c4617318
HC
33#ifdef CONFIG_NUMA
34 prom_init_numa_memory();
35#else
bd92aa01 36 prom_init_memory();
c4617318 37#endif
a3ed4951
WZ
38
39 /*init the uart base address */
a3ed4951 40 prom_init_uart_base();
300459d5 41 register_smp_ops(&loongson3_smp_ops);
bd92aa01
WZ
42}
43
44void __init prom_free_prom_memory(void)
45{
46}