MIPS: Loongson: Add basic Loongson 2F support
[linux-2.6-block.git] / arch / mips / loongson / common / init.c
CommitLineData
bd92aa01 1/*
a3ed4951 2 * Copyright (C) 2009 Lemote Inc.
bd92aa01
WZ
3 * Author: Wu Zhangjin, wuzj@lemote.com
4 *
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 */
10
bd92aa01
WZ
11#include <linux/bootmem.h>
12
5e983ff6 13#include <loongson.h>
bd92aa01 14
6f7a251a
WZ
15/* Loongson CPU address windows config space base address */
16unsigned long __maybe_unused _loongson_addrwincfg_base;
17
bd92aa01
WZ
18void __init prom_init(void)
19{
a3ed4951 20 /* init base address of io space */
bd92aa01 21 set_io_port_base((unsigned long)
e2fee572 22 ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE));
bd92aa01 23
6f7a251a
WZ
24#if defined(CONFIG_CPU_LOONGSON2F) && defined(CONFIG_64BIT)
25 _loongson_addrwincfg_base = (unsigned long)
26 ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE);
27#endif
28
bd92aa01
WZ
29 prom_init_cmdline();
30 prom_init_env();
31 prom_init_memory();
a3ed4951
WZ
32
33 /*init the uart base address */
34#if defined(CONFIG_EARLY_PRINTK) || defined(CONFIG_SERIAL_8250)
35 prom_init_uart_base();
36#endif
bd92aa01
WZ
37}
38
39void __init prom_free_prom_memory(void)
40{
41}