diff options
-rw-r--r-- | arch/mips/ath79/Kconfig | 4 | ||||
-rw-r--r-- | arch/mips/ath79/setup.c | 21 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-ath79/ath79.h | 23 |
4 files changed, 49 insertions, 1 deletions
diff --git a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig index bc6edada38ac..7db8e8903a7b 100644 --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig | |||
@@ -69,6 +69,10 @@ config SOC_AR933X | |||
69 | select USB_ARCH_HAS_EHCI | 69 | select USB_ARCH_HAS_EHCI |
70 | def_bool n | 70 | def_bool n |
71 | 71 | ||
72 | config SOC_AR934X | ||
73 | select USB_ARCH_HAS_EHCI | ||
74 | def_bool n | ||
75 | |||
72 | config ATH79_DEV_GPIO_BUTTONS | 76 | config ATH79_DEV_GPIO_BUTTONS |
73 | def_bool n | 77 | def_bool n |
74 | 78 | ||
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c index 24dfedfb1740..60d212ef8629 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c | |||
@@ -1,10 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * Atheros AR71XX/AR724X/AR913X specific setup | 2 | * Atheros AR71XX/AR724X/AR913X specific setup |
3 | * | 3 | * |
4 | * Copyright (C) 2010-2011 Jaiganesh Narayanan <jnarayanan@atheros.com> | ||
4 | * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> | 5 | * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> |
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | 6 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> |
6 | * | 7 | * |
7 | * Parts of this file are based on Atheros' 2.6.15 BSP | 8 | * Parts of this file are based on Atheros' 2.6.15/2.6.31 BSP |
8 | * | 9 | * |
9 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
10 | * under the terms of the GNU General Public License version 2 as published | 11 | * under the terms of the GNU General Public License version 2 as published |
@@ -145,6 +146,24 @@ static void __init ath79_detect_sys_type(void) | |||
145 | rev = id & AR933X_REV_ID_REVISION_MASK; | 146 | rev = id & AR933X_REV_ID_REVISION_MASK; |
146 | break; | 147 | break; |
147 | 148 | ||
149 | case REV_ID_MAJOR_AR9341: | ||
150 | ath79_soc = ATH79_SOC_AR9341; | ||
151 | chip = "9341"; | ||
152 | rev = id & AR934X_REV_ID_REVISION_MASK; | ||
153 | break; | ||
154 | |||
155 | case REV_ID_MAJOR_AR9342: | ||
156 | ath79_soc = ATH79_SOC_AR9342; | ||
157 | chip = "9342"; | ||
158 | rev = id & AR934X_REV_ID_REVISION_MASK; | ||
159 | break; | ||
160 | |||
161 | case REV_ID_MAJOR_AR9344: | ||
162 | ath79_soc = ATH79_SOC_AR9344; | ||
163 | chip = "9344"; | ||
164 | rev = id & AR934X_REV_ID_REVISION_MASK; | ||
165 | break; | ||
166 | |||
148 | default: | 167 | default: |
149 | panic("ath79: unknown SoC, id:0x%08x", id); | 168 | panic("ath79: unknown SoC, id:0x%08x", id); |
150 | } | 169 | } |
diff --git a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h index b7df67494795..4e3c55d4b078 100644 --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h | |||
@@ -271,6 +271,8 @@ | |||
271 | 271 | ||
272 | #define AR724X_REV_ID_REVISION_MASK 0x3 | 272 | #define AR724X_REV_ID_REVISION_MASK 0x3 |
273 | 273 | ||
274 | #define AR934X_REV_ID_REVISION_MASK 0xf | ||
275 | |||
274 | /* | 276 | /* |
275 | * SPI block | 277 | * SPI block |
276 | */ | 278 | */ |
diff --git a/arch/mips/include/asm/mach-ath79/ath79.h b/arch/mips/include/asm/mach-ath79/ath79.h index 6d0c6c9d5622..4f248c3d7b23 100644 --- a/arch/mips/include/asm/mach-ath79/ath79.h +++ b/arch/mips/include/asm/mach-ath79/ath79.h | |||
@@ -29,6 +29,9 @@ enum ath79_soc_type { | |||
29 | ATH79_SOC_AR9132, | 29 | ATH79_SOC_AR9132, |
30 | ATH79_SOC_AR9330, | 30 | ATH79_SOC_AR9330, |
31 | ATH79_SOC_AR9331, | 31 | ATH79_SOC_AR9331, |
32 | ATH79_SOC_AR9341, | ||
33 | ATH79_SOC_AR9342, | ||
34 | ATH79_SOC_AR9344, | ||
32 | }; | 35 | }; |
33 | 36 | ||
34 | extern enum ath79_soc_type ath79_soc; | 37 | extern enum ath79_soc_type ath79_soc; |
@@ -75,6 +78,26 @@ static inline int soc_is_ar933x(void) | |||
75 | ath79_soc == ATH79_SOC_AR9331); | 78 | ath79_soc == ATH79_SOC_AR9331); |
76 | } | 79 | } |
77 | 80 | ||
81 | static inline int soc_is_ar9341(void) | ||
82 | { | ||
83 | return (ath79_soc == ATH79_SOC_AR9341); | ||
84 | } | ||
85 | |||
86 | static inline int soc_is_ar9342(void) | ||
87 | { | ||
88 | return (ath79_soc == ATH79_SOC_AR9342); | ||
89 | } | ||
90 | |||
91 | static inline int soc_is_ar9344(void) | ||
92 | { | ||
93 | return (ath79_soc == ATH79_SOC_AR9344); | ||
94 | } | ||
95 | |||
96 | static inline int soc_is_ar934x(void) | ||
97 | { | ||
98 | return soc_is_ar9341() || soc_is_ar9342() || soc_is_ar9344(); | ||
99 | } | ||
100 | |||
78 | extern void __iomem *ath79_ddr_base; | 101 | extern void __iomem *ath79_ddr_base; |
79 | extern void __iomem *ath79_pll_base; | 102 | extern void __iomem *ath79_pll_base; |
80 | extern void __iomem *ath79_reset_base; | 103 | extern void __iomem *ath79_reset_base; |