2009-07-02 15:22:36 +00:00
|
|
|
/*
|
2009-11-06 10:35:34 +00:00
|
|
|
* Copyright (C) 2009 Lemote Inc.
|
2010-01-04 09:16:51 +00:00
|
|
|
* Author: Wu Zhangjin, wuzhangjin@gmail.com
|
2009-07-02 15:22:36 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
|
|
* option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/bootmem.h>
|
|
|
|
|
2009-07-02 15:23:03 +00:00
|
|
|
#include <loongson.h>
|
2009-07-02 15:22:36 +00:00
|
|
|
|
2009-11-06 10:45:05 +00:00
|
|
|
/* Loongson CPU address windows config space base address */
|
|
|
|
unsigned long __maybe_unused _loongson_addrwincfg_base;
|
|
|
|
|
2009-07-02 15:22:36 +00:00
|
|
|
void __init prom_init(void)
|
|
|
|
{
|
2009-11-06 10:35:34 +00:00
|
|
|
/* init base address of io space */
|
2009-07-02 15:22:36 +00:00
|
|
|
set_io_port_base((unsigned long)
|
2009-10-16 06:17:19 +00:00
|
|
|
ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE));
|
2009-07-02 15:22:36 +00:00
|
|
|
|
2009-11-11 05:39:12 +00:00
|
|
|
#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
|
2009-11-06 10:45:05 +00:00
|
|
|
_loongson_addrwincfg_base = (unsigned long)
|
|
|
|
ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE);
|
|
|
|
#endif
|
|
|
|
|
2009-07-02 15:22:36 +00:00
|
|
|
prom_init_cmdline();
|
|
|
|
prom_init_env();
|
|
|
|
prom_init_memory();
|
2009-11-06 10:35:34 +00:00
|
|
|
|
|
|
|
/*init the uart base address */
|
|
|
|
prom_init_uart_base();
|
2009-07-02 15:22:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void __init prom_free_prom_memory(void)
|
|
|
|
{
|
|
|
|
}
|