aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/ath79/Kconfig4
-rw-r--r--arch/mips/ath79/setup.c18
-rw-r--r--arch/mips/include/asm/mach-ath79/ar71xx_regs.h2
-rw-r--r--arch/mips/include/asm/mach-ath79/ath79.h17
4 files changed, 40 insertions, 1 deletions
diff --git a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig
index f44feee2d67f..cffdc8e3b63b 100644
--- a/arch/mips/ath79/Kconfig
+++ b/arch/mips/ath79/Kconfig
@@ -88,6 +88,10 @@ config SOC_AR934X
88 select PCI_AR724X if PCI 88 select PCI_AR724X if PCI
89 def_bool n 89 def_bool n
90 90
91config SOC_QCA955X
92 select USB_ARCH_HAS_EHCI
93 def_bool n
94
91config PCI_AR724X 95config PCI_AR724X
92 def_bool n 96 def_bool n
93 97
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
index 60d212ef8629..d5b3c9057018 100644
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -164,13 +164,29 @@ static void __init ath79_detect_sys_type(void)
164 rev = id & AR934X_REV_ID_REVISION_MASK; 164 rev = id & AR934X_REV_ID_REVISION_MASK;
165 break; 165 break;
166 166
167 case REV_ID_MAJOR_QCA9556:
168 ath79_soc = ATH79_SOC_QCA9556;
169 chip = "9556";
170 rev = id & QCA955X_REV_ID_REVISION_MASK;
171 break;
172
173 case REV_ID_MAJOR_QCA9558:
174 ath79_soc = ATH79_SOC_QCA9558;
175 chip = "9558";
176 rev = id & QCA955X_REV_ID_REVISION_MASK;
177 break;
178
167 default: 179 default:
168 panic("ath79: unknown SoC, id:0x%08x", id); 180 panic("ath79: unknown SoC, id:0x%08x", id);
169 } 181 }
170 182
171 ath79_soc_rev = rev; 183 ath79_soc_rev = rev;
172 184
173 sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); 185 if (soc_is_qca955x())
186 sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u",
187 chip, rev);
188 else
189 sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev);
174 pr_info("SoC: %s\n", ath79_sys_type); 190 pr_info("SoC: %s\n", ath79_sys_type);
175} 191}
176 192
diff --git a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
index d02c2d4e600e..63a9f2b600b8 100644
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
@@ -392,6 +392,8 @@
392 392
393#define AR934X_REV_ID_REVISION_MASK 0xf 393#define AR934X_REV_ID_REVISION_MASK 0xf
394 394
395#define QCA955X_REV_ID_REVISION_MASK 0xf
396
395/* 397/*
396 * SPI block 398 * SPI block
397 */ 399 */
diff --git a/arch/mips/include/asm/mach-ath79/ath79.h b/arch/mips/include/asm/mach-ath79/ath79.h
index 4f248c3d7b23..1557934aaca9 100644
--- a/arch/mips/include/asm/mach-ath79/ath79.h
+++ b/arch/mips/include/asm/mach-ath79/ath79.h
@@ -32,6 +32,8 @@ enum ath79_soc_type {
32 ATH79_SOC_AR9341, 32 ATH79_SOC_AR9341,
33 ATH79_SOC_AR9342, 33 ATH79_SOC_AR9342,
34 ATH79_SOC_AR9344, 34 ATH79_SOC_AR9344,
35 ATH79_SOC_QCA9556,
36 ATH79_SOC_QCA9558,
35}; 37};
36 38
37extern enum ath79_soc_type ath79_soc; 39extern enum ath79_soc_type ath79_soc;
@@ -98,6 +100,21 @@ static inline int soc_is_ar934x(void)
98 return soc_is_ar9341() || soc_is_ar9342() || soc_is_ar9344(); 100 return soc_is_ar9341() || soc_is_ar9342() || soc_is_ar9344();
99} 101}
100 102
103static inline int soc_is_qca9556(void)
104{
105 return ath79_soc == ATH79_SOC_QCA9556;
106}
107
108static inline int soc_is_qca9558(void)
109{
110 return ath79_soc == ATH79_SOC_QCA9558;
111}
112
113static inline int soc_is_qca955x(void)
114{
115 return soc_is_qca9556() || soc_is_qca9558();
116}
117
101extern void __iomem *ath79_ddr_base; 118extern void __iomem *ath79_ddr_base;
102extern void __iomem *ath79_pll_base; 119extern void __iomem *ath79_pll_base;
103extern void __iomem *ath79_reset_base; 120extern void __iomem *ath79_reset_base;