blob: 3b1dbc1ca242e8004924c8a2c3c3cfb7e0de7b5a [file] [log] [blame]
Wu Zhangjinbd92aa02009-07-02 23:22:36 +08001/*
Wu Zhangjina3ed4952009-11-06 18:35:34 +08002 * Copyright (C) 2009 Lemote Inc.
Wu Zhangjinbd92aa02009-07-02 23:22:36 +08003 * 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
Wu Zhangjinbd92aa02009-07-02 23:22:36 +080011#include <linux/bootmem.h>
12
Wu Zhangjin5e983ff2009-07-02 23:23:03 +080013#include <loongson.h>
Wu Zhangjinbd92aa02009-07-02 23:22:36 +080014
15void __init prom_init(void)
16{
Wu Zhangjina3ed4952009-11-06 18:35:34 +080017 /* init base address of io space */
Wu Zhangjinbd92aa02009-07-02 23:22:36 +080018 set_io_port_base((unsigned long)
Wu Zhangjine2fee572009-10-16 14:17:19 +080019 ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE));
Wu Zhangjinbd92aa02009-07-02 23:22:36 +080020
21 prom_init_cmdline();
22 prom_init_env();
23 prom_init_memory();
Wu Zhangjina3ed4952009-11-06 18:35:34 +080024
25 /*init the uart base address */
26#if defined(CONFIG_EARLY_PRINTK) || defined(CONFIG_SERIAL_8250)
27 prom_init_uart_base();
28#endif
Wu Zhangjinbd92aa02009-07-02 23:22:36 +080029}
30
31void __init prom_free_prom_memory(void)
32{
33}