From c95c15c660351f4eea160c95902cd767adb9fa22 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 30 Mar 2011 09:27:54 +0200 Subject: [PATCH] --- yaml --- r: 245287 b: refs/heads/master c: a053ac17024561f3a2fd02424b5f92823282b5ad h: refs/heads/master i: 245285: e92b1ac3b14b5af1014548258b753111a10a29f1 245283: ef6cad6372b0a081ae9370fc8d1cd98b8a057080 245279: fb07fd3d4453f738721b9d18ffd4146043602f49 v: v3 --- [refs] | 2 +- trunk/arch/mips/Kconfig | 1 + trunk/arch/mips/lantiq/machtypes.h | 18 +++++++++++++++++ trunk/arch/mips/lantiq/prom.h | 1 + trunk/arch/mips/lantiq/setup.c | 25 ++++++++++++++++++++++++ trunk/arch/mips/lantiq/xway/Makefile | 4 ++-- trunk/arch/mips/lantiq/xway/setup-ase.c | 19 ++++++++++++++++++ trunk/arch/mips/lantiq/xway/setup-xway.c | 20 +++++++++++++++++++ 8 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 trunk/arch/mips/lantiq/machtypes.h create mode 100644 trunk/arch/mips/lantiq/xway/setup-ase.c create mode 100644 trunk/arch/mips/lantiq/xway/setup-xway.c diff --git a/[refs] b/[refs] index bf6cc088b774..3405b48b8199 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 24aff71fa8df0d6a73dab17f3f2285a24b8f658f +refs/heads/master: a053ac17024561f3a2fd02424b5f92823282b5ad diff --git a/trunk/arch/mips/Kconfig b/trunk/arch/mips/Kconfig index b3b49996462e..2d1cf9740953 100644 --- a/trunk/arch/mips/Kconfig +++ b/trunk/arch/mips/Kconfig @@ -228,6 +228,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/trunk/arch/mips/lantiq/machtypes.h b/trunk/arch/mips/lantiq/machtypes.h new file mode 100644 index 000000000000..ffcacfc0e5ed --- /dev/null +++ b/trunk/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 + */ + +#ifndef _LANTIQ_MACH_H__ +#define _LANTIQ_MACH_H__ + +#include + +enum lantiq_mach_type { + LTQ_MACH_GENERIC = 0, +}; + +#endif diff --git a/trunk/arch/mips/lantiq/prom.h b/trunk/arch/mips/lantiq/prom.h index 4165ad156782..b4229d94280f 100644 --- a/trunk/arch/mips/lantiq/prom.h +++ b/trunk/arch/mips/lantiq/prom.h @@ -20,5 +20,6 @@ struct ltq_soc_info { }; extern void ltq_soc_detect(struct ltq_soc_info *i); +extern void ltq_soc_setup(void); #endif diff --git a/trunk/arch/mips/lantiq/setup.c b/trunk/arch/mips/lantiq/setup.c index 79a2b0c5cc65..9b8af77ed0f9 100644 --- a/trunk/arch/mips/lantiq/setup.c +++ b/trunk/arch/mips/lantiq/setup.c @@ -14,6 +14,10 @@ #include +#include "machtypes.h" +#include "devices.h" +#include "prom.h" + void __init plat_mem_setup(void) { /* assume 16M as default incase uboot fails to pass proper ramsize */ @@ -39,3 +43,24 @@ void __init plat_mem_setup(void) memsize *= 1024 * 1024; add_memory_region(0x00000000, memsize, BOOT_MEM_RAM); } + +static int __init +lantiq_setup(void) +{ + ltq_soc_setup(); + 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); diff --git a/trunk/arch/mips/lantiq/xway/Makefile b/trunk/arch/mips/lantiq/xway/Makefile index 74ce438ad8e7..8c06a97b5ca6 100644 --- a/trunk/arch/mips/lantiq/xway/Makefile +++ b/trunk/arch/mips/lantiq/xway/Makefile @@ -1,4 +1,4 @@ obj-y := pmu.o ebu.o reset.o gpio.o devices.o -obj-$(CONFIG_SOC_XWAY) += clk-xway.o prom-xway.o -obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o prom-ase.o +obj-$(CONFIG_SOC_XWAY) += clk-xway.o prom-xway.o setup-xway.o +obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o prom-ase.o setup-ase.o diff --git a/trunk/arch/mips/lantiq/xway/setup-ase.c b/trunk/arch/mips/lantiq/xway/setup-ase.c new file mode 100644 index 000000000000..f6f326798a39 --- /dev/null +++ b/trunk/arch/mips/lantiq/xway/setup-ase.c @@ -0,0 +1,19 @@ +/* + * 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) 2011 John Crispin + */ + +#include + +#include "../prom.h" +#include "devices.h" + +void __init ltq_soc_setup(void) +{ + ltq_register_ase_asc(); + ltq_register_gpio(); + ltq_register_wdt(); +} diff --git a/trunk/arch/mips/lantiq/xway/setup-xway.c b/trunk/arch/mips/lantiq/xway/setup-xway.c new file mode 100644 index 000000000000..c292f643a858 --- /dev/null +++ b/trunk/arch/mips/lantiq/xway/setup-xway.c @@ -0,0 +1,20 @@ +/* + * 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) 2011 John Crispin + */ + +#include + +#include "../prom.h" +#include "devices.h" + +void __init ltq_soc_setup(void) +{ + ltq_register_asc(0); + ltq_register_asc(1); + ltq_register_gpio(); + ltq_register_wdt(); +}