mirror of
https://github.com/torvalds/linux
synced 2024-10-06 19:34:19 +00:00
MIPS: SGI-IP27: reduce ARC usage to a minimum
IP27 uses ARC prom only for parsing prom arguments and has a hack for IP27 to make the ARC code behave. By introducing config symbol ARC_CMDLINE_ONLY IP27 only drags in ARC cmdline parsing and does everything else in IP27 specific code. Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by: Paul Burton <paulburton@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Burton <paul.burton@mips.com> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org
This commit is contained in:
parent
7b16831d1e
commit
e942242784
|
@ -675,6 +675,7 @@ config SGI_IP27
|
||||||
select ARCH_SPARSEMEM_ENABLE
|
select ARCH_SPARSEMEM_ENABLE
|
||||||
select FW_ARC
|
select FW_ARC
|
||||||
select FW_ARC64
|
select FW_ARC64
|
||||||
|
select ARC_CMDLINE_ONLY
|
||||||
select BOOT_ELF64
|
select BOOT_ELF64
|
||||||
select DEFAULT_SGI_PARTITION
|
select DEFAULT_SGI_PARTITION
|
||||||
select SYS_HAS_EARLY_PRINTK
|
select SYS_HAS_EARLY_PRINTK
|
||||||
|
@ -1351,6 +1352,9 @@ config MIPS_L1_CACHE_SHIFT
|
||||||
config HAVE_STD_PC_SERIAL_PORT
|
config HAVE_STD_PC_SERIAL_PORT
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
config ARC_CMDLINE_ONLY
|
||||||
|
bool
|
||||||
|
|
||||||
config ARC_CONSOLE
|
config ARC_CONSOLE
|
||||||
bool "ARC console support"
|
bool "ARC console support"
|
||||||
depends on SGI_IP22 || SGI_IP28 || (SNI_RM && CPU_LITTLE_ENDIAN)
|
depends on SGI_IP22 || SGI_IP28 || (SNI_RM && CPU_LITTLE_ENDIAN)
|
||||||
|
|
|
@ -3,8 +3,12 @@
|
||||||
# Makefile for the ARC prom monitor library routines under Linux.
|
# Makefile for the ARC prom monitor library routines under Linux.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
ifdef CONFIG_ARC_CMDLINE_ONLY
|
||||||
|
lib-y += cmdline.o
|
||||||
|
else
|
||||||
lib-y += cmdline.o env.o file.o identify.o init.o \
|
lib-y += cmdline.o env.o file.o identify.o init.o \
|
||||||
misc.o
|
misc.o
|
||||||
|
endif
|
||||||
|
|
||||||
lib-$(CONFIG_ARC_MEMORY) += memory.o
|
lib-$(CONFIG_ARC_MEMORY) += memory.o
|
||||||
lib-$(CONFIG_ARC_CONSOLE) += arc_con.o
|
lib-$(CONFIG_ARC_CONSOLE) += arc_con.o
|
||||||
|
|
|
@ -31,10 +31,6 @@ static struct smatch mach_table[] = {
|
||||||
.arcname = "SGI-IP22",
|
.arcname = "SGI-IP22",
|
||||||
.liname = "SGI Indy",
|
.liname = "SGI Indy",
|
||||||
.flags = PROM_FLAG_ARCS,
|
.flags = PROM_FLAG_ARCS,
|
||||||
}, {
|
|
||||||
.arcname = "SGI-IP27",
|
|
||||||
.liname = "SGI Origin",
|
|
||||||
.flags = PROM_FLAG_ARCS,
|
|
||||||
}, {
|
}, {
|
||||||
.arcname = "SGI-IP28",
|
.arcname = "SGI-IP28",
|
||||||
.liname = "SGI IP28",
|
.liname = "SGI IP28",
|
||||||
|
@ -103,13 +99,7 @@ void __init prom_identify_arch(void)
|
||||||
*/
|
*/
|
||||||
p = ArcGetChild(PROM_NULL_COMPONENT);
|
p = ArcGetChild(PROM_NULL_COMPONENT);
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
#ifdef CONFIG_SGI_IP27
|
|
||||||
/* IP27 PROM misbehaves, seems to not implement ARC
|
|
||||||
GetChild(). So we just assume it's an IP27. */
|
|
||||||
iname = "SGI-IP27";
|
|
||||||
#else
|
|
||||||
iname = "Unknown";
|
iname = "Unknown";
|
||||||
#endif
|
|
||||||
} else
|
} else
|
||||||
iname = (char *) (long) p->iname;
|
iname = (char *) (long) p->iname;
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,11 @@
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
#include <linux/cpumask.h>
|
#include <linux/cpumask.h>
|
||||||
|
#include <asm/bootinfo.h>
|
||||||
#include <asm/cpu.h>
|
#include <asm/cpu.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
|
#include <asm/sgialib.h>
|
||||||
#include <asm/time.h>
|
#include <asm/time.h>
|
||||||
#include <asm/sn/types.h>
|
#include <asm/sn/types.h>
|
||||||
#include <asm/sn/sn0/addrs.h>
|
#include <asm/sn/sn0/addrs.h>
|
||||||
|
@ -160,3 +162,15 @@ void __init plat_mem_setup(void)
|
||||||
ioport_resource.end = ~0UL;
|
ioport_resource.end = ~0UL;
|
||||||
set_io_port_base(IO_BASE);
|
set_io_port_base(IO_BASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *get_system_type(void)
|
||||||
|
{
|
||||||
|
return "SGI Origin";
|
||||||
|
}
|
||||||
|
|
||||||
|
void __init prom_init(void)
|
||||||
|
{
|
||||||
|
prom_init_cmdline(fw_arg0, (LONG *)fw_arg1);
|
||||||
|
prom_meminit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue