diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-03-14 05:45:21 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-05-15 11:49:07 -0400 |
commit | d84114660a65e89e27ebd3fb21ce71ff579ee882 (patch) | |
tree | e73cace8d697ad2ad9304630414389c36fd18d29 /arch/mips/include | |
parent | 80a7ed81a840aee97f7650cbeaabb3c2c1765e70 (diff) |
MIPS: ath79: add SoC detection code for AR934X
Also add 'soc_is_ar934[124x]' helper functions and a Kconfig
symbol for the AR934X SoCs.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Cc: linux-mips@linux-mips.org
Cc: mcgrof@infradead.org
Patchwork: https://patchwork.linux-mips.org/patch/3506/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include')
-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 |
2 files changed, 25 insertions, 0 deletions
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; |