diff options
author | Huacai Chen <chenhc@lemote.com> | 2014-03-21 06:44:02 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-31 12:17:12 -0400 |
commit | 1a08f1524d2ee4d4239e56ee1b3f6da0df929563 (patch) | |
tree | 35e14776ea58a8a99c491479dcd12e0a07cbe256 /arch/mips/loongson/common/init.c | |
parent | 5f6d693ebb4993c49a0d150da1c5fff15867fec0 (diff) |
MIPS: Loongson: Add UEFI-like firmware interface (LEFI) support
The new UEFI-like firmware interface (LEFI, i.e. Loongson Unified
Firmware Interface) has 3 advantages:
1, Firmware export a physical memory map which is similar to X86's
E820 map, so prom_init_memory() will be more elegant that #ifdef
clauses can be removed.
2, Firmware export a pci irq routing table, we no longer need pci
irq routing fixup in kernel's code.
3, Firmware has a built-in vga bios, and its address is exported,
the linux kernel no longer need an embedded blob.
With the LEFI interface, Loongson-3A/2G and all their successors can use
a unified kernel. All Loongson-based machines support this new interface
except 2E/2F series.
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Hongliang Tao <taohl@lemote.com>
Signed-off-by: Hua Yan <yanh@lemote.com>
Tested-by: Alex Smith <alex.smith@imgtec.com>
Reviewed-by: Alex Smith <alex.smith@imgtec.com>
Cc: John Crispin <john@phrozen.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/6632
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/loongson/common/init.c')
-rw-r--r-- | arch/mips/loongson/common/init.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/loongson/common/init.c b/arch/mips/loongson/common/init.c index ae7af1fd5d59..81ba3b4a8f30 100644 --- a/arch/mips/loongson/common/init.c +++ b/arch/mips/loongson/common/init.c | |||
@@ -17,10 +17,6 @@ unsigned long __maybe_unused _loongson_addrwincfg_base; | |||
17 | 17 | ||
18 | void __init prom_init(void) | 18 | void __init prom_init(void) |
19 | { | 19 | { |
20 | /* init base address of io space */ | ||
21 | set_io_port_base((unsigned long) | ||
22 | ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE)); | ||
23 | |||
24 | #ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG | 20 | #ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG |
25 | _loongson_addrwincfg_base = (unsigned long) | 21 | _loongson_addrwincfg_base = (unsigned long) |
26 | ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE); | 22 | ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE); |
@@ -28,6 +24,11 @@ void __init prom_init(void) | |||
28 | 24 | ||
29 | prom_init_cmdline(); | 25 | prom_init_cmdline(); |
30 | prom_init_env(); | 26 | prom_init_env(); |
27 | |||
28 | /* init base address of io space */ | ||
29 | set_io_port_base((unsigned long) | ||
30 | ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE)); | ||
31 | |||
31 | prom_init_memory(); | 32 | prom_init_memory(); |
32 | 33 | ||
33 | /*init the uart base address */ | 34 | /*init the uart base address */ |