aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-03-14 05:45:21 -0400
committerRalf Baechle <ralf@linux-mips.org>2012-05-15 11:49:07 -0400
commitd84114660a65e89e27ebd3fb21ce71ff579ee882 (patch)
treee73cace8d697ad2ad9304630414389c36fd18d29 /arch/mips/include
parent80a7ed81a840aee97f7650cbeaabb3c2c1765e70 (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.h2
-rw-r--r--arch/mips/include/asm/mach-ath79/ath79.h23
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
34extern enum ath79_soc_type ath79_soc; 37extern 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
81static inline int soc_is_ar9341(void)
82{
83 return (ath79_soc == ATH79_SOC_AR9341);
84}
85
86static inline int soc_is_ar9342(void)
87{
88 return (ath79_soc == ATH79_SOC_AR9342);
89}
90
91static inline int soc_is_ar9344(void)
92{
93 return (ath79_soc == ATH79_SOC_AR9344);
94}
95
96static inline int soc_is_ar934x(void)
97{
98 return soc_is_ar9341() || soc_is_ar9342() || soc_is_ar9344();
99}
100
78extern void __iomem *ath79_ddr_base; 101extern void __iomem *ath79_ddr_base;
79extern void __iomem *ath79_pll_base; 102extern void __iomem *ath79_pll_base;
80extern void __iomem *ath79_reset_base; 103extern void __iomem *ath79_reset_base;