diff options
author | John Crispin <blogic@openwrt.org> | 2011-03-30 03:27:54 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-05-19 04:55:42 -0400 |
commit | a053ac17024561f3a2fd02424b5f92823282b5ad (patch) | |
tree | 9ba6edcc538061425bf7972b92fd380ca3eb6120 /arch/mips | |
parent | 24aff71fa8df0d6a73dab17f3f2285a24b8f658f (diff) |
MIPS: Lantiq: Add mips_machine support
This patch adds support for Gabor's mips_machine patch.
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Ralph Hempel <ralph.hempel@lantiq.com>
Cc: Gabor Juhos <juhosg@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2251/
Patchwork: https://patchwork.linux-mips.org/patch/2358/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/Kconfig | 1 | ||||
-rw-r--r-- | arch/mips/lantiq/machtypes.h | 18 | ||||
-rw-r--r-- | arch/mips/lantiq/prom.h | 1 | ||||
-rw-r--r-- | arch/mips/lantiq/setup.c | 25 | ||||
-rw-r--r-- | arch/mips/lantiq/xway/Makefile | 4 | ||||
-rw-r--r-- | arch/mips/lantiq/xway/setup-ase.c | 19 | ||||
-rw-r--r-- | arch/mips/lantiq/xway/setup-xway.c | 20 |
7 files changed, 86 insertions, 2 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index b3b49996462e..2d1cf9740953 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -228,6 +228,7 @@ config LANTIQ | |||
228 | select SWAP_IO_SPACE | 228 | select SWAP_IO_SPACE |
229 | select BOOT_RAW | 229 | select BOOT_RAW |
230 | select HAVE_CLK | 230 | select HAVE_CLK |
231 | select MIPS_MACHINE | ||
231 | 232 | ||
232 | config LASAT | 233 | config LASAT |
233 | bool "LASAT Networks platforms" | 234 | bool "LASAT Networks platforms" |
diff --git a/arch/mips/lantiq/machtypes.h b/arch/mips/lantiq/machtypes.h new file mode 100644 index 000000000000..ffcacfc0e5ed --- /dev/null +++ b/arch/mips/lantiq/machtypes.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify it | ||
3 | * under the terms of the GNU General Public License version 2 as published | ||
4 | * by the Free Software Foundation. | ||
5 | * | ||
6 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> | ||
7 | */ | ||
8 | |||
9 | #ifndef _LANTIQ_MACH_H__ | ||
10 | #define _LANTIQ_MACH_H__ | ||
11 | |||
12 | #include <asm/mips_machine.h> | ||
13 | |||
14 | enum lantiq_mach_type { | ||
15 | LTQ_MACH_GENERIC = 0, | ||
16 | }; | ||
17 | |||
18 | #endif | ||
diff --git a/arch/mips/lantiq/prom.h b/arch/mips/lantiq/prom.h index 4165ad156782..b4229d94280f 100644 --- a/arch/mips/lantiq/prom.h +++ b/arch/mips/lantiq/prom.h | |||
@@ -20,5 +20,6 @@ struct ltq_soc_info { | |||
20 | }; | 20 | }; |
21 | 21 | ||
22 | extern void ltq_soc_detect(struct ltq_soc_info *i); | 22 | extern void ltq_soc_detect(struct ltq_soc_info *i); |
23 | extern void ltq_soc_setup(void); | ||
23 | 24 | ||
24 | #endif | 25 | #endif |
diff --git a/arch/mips/lantiq/setup.c b/arch/mips/lantiq/setup.c index 79a2b0c5cc65..9b8af77ed0f9 100644 --- a/arch/mips/lantiq/setup.c +++ b/arch/mips/lantiq/setup.c | |||
@@ -14,6 +14,10 @@ | |||
14 | 14 | ||
15 | #include <lantiq_soc.h> | 15 | #include <lantiq_soc.h> |
16 | 16 | ||
17 | #include "machtypes.h" | ||
18 | #include "devices.h" | ||
19 | #include "prom.h" | ||
20 | |||
17 | void __init plat_mem_setup(void) | 21 | void __init plat_mem_setup(void) |
18 | { | 22 | { |
19 | /* assume 16M as default incase uboot fails to pass proper ramsize */ | 23 | /* assume 16M as default incase uboot fails to pass proper ramsize */ |
@@ -39,3 +43,24 @@ void __init plat_mem_setup(void) | |||
39 | memsize *= 1024 * 1024; | 43 | memsize *= 1024 * 1024; |
40 | add_memory_region(0x00000000, memsize, BOOT_MEM_RAM); | 44 | add_memory_region(0x00000000, memsize, BOOT_MEM_RAM); |
41 | } | 45 | } |
46 | |||
47 | static int __init | ||
48 | lantiq_setup(void) | ||
49 | { | ||
50 | ltq_soc_setup(); | ||
51 | mips_machine_setup(); | ||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | arch_initcall(lantiq_setup); | ||
56 | |||
57 | static void __init | ||
58 | lantiq_generic_init(void) | ||
59 | { | ||
60 | /* Nothing to do */ | ||
61 | } | ||
62 | |||
63 | MIPS_MACHINE(LTQ_MACH_GENERIC, | ||
64 | "Generic", | ||
65 | "Generic Lantiq based board", | ||
66 | lantiq_generic_init); | ||
diff --git a/arch/mips/lantiq/xway/Makefile b/arch/mips/lantiq/xway/Makefile index 74ce438ad8e7..8c06a97b5ca6 100644 --- a/arch/mips/lantiq/xway/Makefile +++ b/arch/mips/lantiq/xway/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-y := pmu.o ebu.o reset.o gpio.o devices.o | 1 | obj-y := pmu.o ebu.o reset.o gpio.o devices.o |
2 | 2 | ||
3 | obj-$(CONFIG_SOC_XWAY) += clk-xway.o prom-xway.o | 3 | obj-$(CONFIG_SOC_XWAY) += clk-xway.o prom-xway.o setup-xway.o |
4 | obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o prom-ase.o | 4 | obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o prom-ase.o setup-ase.o |
diff --git a/arch/mips/lantiq/xway/setup-ase.c b/arch/mips/lantiq/xway/setup-ase.c new file mode 100644 index 000000000000..f6f326798a39 --- /dev/null +++ b/arch/mips/lantiq/xway/setup-ase.c | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify it | ||
3 | * under the terms of the GNU General Public License version 2 as published | ||
4 | * by the Free Software Foundation. | ||
5 | * | ||
6 | * Copyright (C) 2011 John Crispin <blogic@openwrt.org> | ||
7 | */ | ||
8 | |||
9 | #include <lantiq_soc.h> | ||
10 | |||
11 | #include "../prom.h" | ||
12 | #include "devices.h" | ||
13 | |||
14 | void __init ltq_soc_setup(void) | ||
15 | { | ||
16 | ltq_register_ase_asc(); | ||
17 | ltq_register_gpio(); | ||
18 | ltq_register_wdt(); | ||
19 | } | ||
diff --git a/arch/mips/lantiq/xway/setup-xway.c b/arch/mips/lantiq/xway/setup-xway.c new file mode 100644 index 000000000000..c292f643a858 --- /dev/null +++ b/arch/mips/lantiq/xway/setup-xway.c | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify it | ||
3 | * under the terms of the GNU General Public License version 2 as published | ||
4 | * by the Free Software Foundation. | ||
5 | * | ||
6 | * Copyright (C) 2011 John Crispin <blogic@openwrt.org> | ||
7 | */ | ||
8 | |||
9 | #include <lantiq_soc.h> | ||
10 | |||
11 | #include "../prom.h" | ||
12 | #include "devices.h" | ||
13 | |||
14 | void __init ltq_soc_setup(void) | ||
15 | { | ||
16 | ltq_register_asc(0); | ||
17 | ltq_register_asc(1); | ||
18 | ltq_register_gpio(); | ||
19 | ltq_register_wdt(); | ||
20 | } | ||