diff options
author | Wu Zhangjin <wuzj@lemote.com> | 2009-07-02 23:22:36 +0800 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-09-17 20:07:46 +0200 |
commit | bd92aa013e8fcd17328ec8e060477761cf3380d9 (patch) | |
tree | 0435f611a87d8be266c44629c80a2fd7459ef026 /arch/mips/lemote/lm2e/setup.c | |
parent | f54a40ee6b3cb4da638d7705e433bc80aa4f49f6 (diff) | |
download | linux-bd92aa013e8fcd17328ec8e060477761cf3380d9.tar.gz linux-bd92aa013e8fcd17328ec8e060477761cf3380d9.tar.bz2 linux-bd92aa013e8fcd17328ec8e060477761cf3380d9.zip |
MIPS: Loongson: Split the implementation of prom and setup parts
This patch split the old initilization and setup implementation to
several file, one file one logic function.
the other main changes include:
1. as the script/checkpatch.pl suggests, use strict_strtol instead
of simple_strtol in arch/mips/lemote/lm2e/cmdline.c
2. use the existed macros in asm/mips-boards/bonito64.h as the
arguments of set_io_port_base() and remove the un-needed ones in
asm/mach-lemote/pci.h
Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lemote/lm2e/setup.c')
-rw-r--r-- | arch/mips/lemote/lm2e/setup.c | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/arch/mips/lemote/lm2e/setup.c b/arch/mips/lemote/lm2e/setup.c index 79dae630611a..03578cf0ee7e 100644 --- a/arch/mips/lemote/lm2e/setup.c +++ b/arch/mips/lemote/lm2e/setup.c @@ -26,37 +26,16 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. * */ -#include <linux/bootmem.h> #include <linux/init.h> -#include <linux/irq.h> +#include <linux/module.h> -#include <asm/bootinfo.h> -#include <asm/mc146818-time.h> -#include <asm/time.h> #include <asm/wbflush.h> -#include <asm/mach-lemote/pci.h> #ifdef CONFIG_VT #include <linux/console.h> #include <linux/screen_info.h> #endif -unsigned long cpu_clock_freq; -unsigned long bus_clock; -unsigned int memsize; -unsigned int highmemsize = 0; - -void __init plat_time_init(void) -{ - /* setup mips r4k timer */ - mips_hpt_frequency = cpu_clock_freq / 2; -} - -unsigned long read_persistent_clock(void) -{ - return mc146818_get_cmos_time(); -} - void (*__wbflush)(void); EXPORT_SYMBOL(__wbflush); @@ -73,18 +52,8 @@ static void wbflush_loongson2e(void) void __init plat_mem_setup(void) { - set_io_port_base((unsigned long)ioremap(LOONGSON2E_IO_PORT_BASE, - IO_SPACE_LIMIT - LOONGSON2E_PCI_IO_START + 1)); - __wbflush = wbflush_loongson2e; - add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM); -#ifdef CONFIG_64BIT - if (highmemsize > 0) { - add_memory_region(0x20000000, highmemsize << 20, BOOT_MEM_RAM); - } -#endif - #ifdef CONFIG_VT #if defined(CONFIG_VGA_CONSOLE) conswitchp = &vga_con; @@ -104,5 +73,4 @@ void __init plat_mem_setup(void) conswitchp = &dummy_con; #endif #endif - } |