This patch adds support for Gabor's mips_machine patch. Signed-off-by: John Crispin <blogic@xxxxxxxxxxx> Signed-off-by: Ralph Hempel <ralph.hempel@xxxxxxxxxx> Cc: Gabor Juhos <juhosg@xxxxxxxxxxx> Cc: linux-mips@xxxxxxxxxxxxxx --- arch/mips/Kconfig | 1 + arch/mips/lantiq/machtypes.h | 18 ++++++++++++++++++ arch/mips/lantiq/setup.c | 25 +++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 arch/mips/lantiq/machtypes.h diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 756e67a..90f405c 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -226,6 +226,7 @@ config LANTIQ select SWAP_IO_SPACE select BOOT_RAW select HAVE_CLK + select MIPS_MACHINE config LASAT bool "LASAT Networks platforms" diff --git a/arch/mips/lantiq/machtypes.h b/arch/mips/lantiq/machtypes.h new file mode 100644 index 0000000..ffcacfc --- /dev/null +++ b/arch/mips/lantiq/machtypes.h @@ -0,0 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + * Copyright (C) 2010 John Crispin <blogic@xxxxxxxxxxx> + */ + +#ifndef _LANTIQ_MACH_H__ +#define _LANTIQ_MACH_H__ + +#include <asm/mips_machine.h> + +enum lantiq_mach_type { + LTQ_MACH_GENERIC = 0, +}; + +#endif diff --git a/arch/mips/lantiq/setup.c b/arch/mips/lantiq/setup.c index edeb076..bf35435 100644 --- a/arch/mips/lantiq/setup.c +++ b/arch/mips/lantiq/setup.c @@ -14,6 +14,9 @@ #include <lantiq_soc.h> +#include "machtypes.h" +#include "devices.h" + void __init plat_mem_setup(void) { @@ -45,3 +48,25 @@ plat_mem_setup(void) memsize *= 1024 * 1024; add_memory_region(0x00000000, memsize, BOOT_MEM_RAM); } + +static int __init +lantiq_setup(void) +{ + ltq_register_asc(0); + ltq_register_asc(1); + mips_machine_setup(); + return 0; +} + +arch_initcall(lantiq_setup); + +static void __init +lantiq_generic_init(void) +{ + /* Nothing to do */ +} + +MIPS_MACHINE(LTQ_MACH_GENERIC, + "Generic", + "Generic Lantiq based board", + lantiq_generic_init); -- 1.7.2.3