diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2011-01-04 15:28:16 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-01-18 13:30:25 -0500 |
commit | 0aabf1a4d9b6b2d2371f641ec19fb7551cea4a90 (patch) | |
tree | 9bb5ece8310ce78c19652058f5a00816e6fc5d2d | |
parent | 6eae43c57ee92de91f6cc7c391cea97c43295da0 (diff) |
MIPS: ath79: utilize the MIPS multi-machine support
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1949/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/Kconfig | 1 | ||||
-rw-r--r-- | arch/mips/ath79/machtypes.h | 21 | ||||
-rw-r--r-- | arch/mips/ath79/setup.c | 15 |
3 files changed, 37 insertions, 0 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 02d3cd4b124c..1adca2c3df02 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -74,6 +74,7 @@ config ATH79 | |||
74 | select CSRC_R4K | 74 | select CSRC_R4K |
75 | select DMA_NONCOHERENT | 75 | select DMA_NONCOHERENT |
76 | select IRQ_CPU | 76 | select IRQ_CPU |
77 | select MIPS_MACHINE | ||
77 | select SYS_HAS_CPU_MIPS32_R2 | 78 | select SYS_HAS_CPU_MIPS32_R2 |
78 | select SYS_HAS_EARLY_PRINTK | 79 | select SYS_HAS_EARLY_PRINTK |
79 | select SYS_SUPPORTS_32BIT_KERNEL | 80 | select SYS_SUPPORTS_32BIT_KERNEL |
diff --git a/arch/mips/ath79/machtypes.h b/arch/mips/ath79/machtypes.h new file mode 100644 index 000000000000..fac0e26a2433 --- /dev/null +++ b/arch/mips/ath79/machtypes.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X machine type definitions | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ATH79_MACHTYPE_H | ||
13 | #define _ATH79_MACHTYPE_H | ||
14 | |||
15 | #include <asm/mips_machine.h> | ||
16 | |||
17 | enum ath79_mach_type { | ||
18 | ATH79_MACH_GENERIC = 0, | ||
19 | }; | ||
20 | |||
21 | #endif /* _ATH79_MACHTYPE_H */ | ||
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c index 29dde98f49ed..5e5740298709 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c | |||
@@ -20,11 +20,13 @@ | |||
20 | #include <asm/bootinfo.h> | 20 | #include <asm/bootinfo.h> |
21 | #include <asm/time.h> /* for mips_hpt_frequency */ | 21 | #include <asm/time.h> /* for mips_hpt_frequency */ |
22 | #include <asm/reboot.h> /* for _machine_{restart,halt} */ | 22 | #include <asm/reboot.h> /* for _machine_{restart,halt} */ |
23 | #include <asm/mips_machine.h> | ||
23 | 24 | ||
24 | #include <asm/mach-ath79/ath79.h> | 25 | #include <asm/mach-ath79/ath79.h> |
25 | #include <asm/mach-ath79/ar71xx_regs.h> | 26 | #include <asm/mach-ath79/ar71xx_regs.h> |
26 | #include "common.h" | 27 | #include "common.h" |
27 | #include "dev-common.h" | 28 | #include "dev-common.h" |
29 | #include "machtypes.h" | ||
28 | 30 | ||
29 | #define ATH79_SYS_TYPE_LEN 64 | 31 | #define ATH79_SYS_TYPE_LEN 64 |
30 | 32 | ||
@@ -184,7 +186,20 @@ static int __init ath79_setup(void) | |||
184 | { | 186 | { |
185 | ath79_gpio_init(); | 187 | ath79_gpio_init(); |
186 | ath79_register_uart(); | 188 | ath79_register_uart(); |
189 | |||
190 | mips_machine_setup(); | ||
191 | |||
187 | return 0; | 192 | return 0; |
188 | } | 193 | } |
189 | 194 | ||
190 | arch_initcall(ath79_setup); | 195 | arch_initcall(ath79_setup); |
196 | |||
197 | static void __init ath79_generic_init(void) | ||
198 | { | ||
199 | /* Nothing to do */ | ||
200 | } | ||
201 | |||
202 | MIPS_MACHINE(ATH79_MACH_GENERIC, | ||
203 | "Generic", | ||
204 | "Generic AR71XX/AR724X/AR913X based board", | ||
205 | ath79_generic_init); | ||