ar71xx: use switchX names in network configuration
[openwrt.git] / target / linux / ar71xx / patches-3.7 / 172-MIPS-ath79-add-support-for-the-QCA9556-SoC.patch
1 --- a/arch/mips/ath79/setup.c
2 +++ b/arch/mips/ath79/setup.c
3 @@ -164,6 +164,12 @@ static void __init ath79_detect_sys_type
4                 rev = id & AR934X_REV_ID_REVISION_MASK;
5                 break;
6  
7 +       case REV_ID_MAJOR_QCA9556:
8 +               ath79_soc = ATH79_SOC_QCA9556;
9 +               chip = "9556";
10 +               rev = id & AR944X_REV_ID_REVISION_MASK;
11 +               break;
12 +
13         case REV_ID_MAJOR_QCA9558:
14                 ath79_soc = ATH79_SOC_QCA9558;
15                 chip = "9558";
16 --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
17 +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
18 @@ -460,6 +460,7 @@
19  #define REV_ID_MAJOR_AR9341            0x0120
20  #define REV_ID_MAJOR_AR9342            0x1120
21  #define REV_ID_MAJOR_AR9344            0x2120
22 +#define REV_ID_MAJOR_QCA9556           0x0130
23  #define REV_ID_MAJOR_QCA9558           0x1130
24  
25  #define AR71XX_REV_ID_MINOR_MASK       0x3
26 --- a/arch/mips/include/asm/mach-ath79/ath79.h
27 +++ b/arch/mips/include/asm/mach-ath79/ath79.h
28 @@ -32,6 +32,7 @@ enum ath79_soc_type {
29         ATH79_SOC_AR9341,
30         ATH79_SOC_AR9342,
31         ATH79_SOC_AR9344,
32 +       ATH79_SOC_QCA9556,
33         ATH79_SOC_QCA9558,
34  };
35  
36 @@ -99,6 +100,11 @@ static inline int soc_is_ar934x(void)
37         return soc_is_ar9341() || soc_is_ar9342() || soc_is_ar9344();
38  }
39  
40 +static inline int soc_is_qca9556(void)
41 +{
42 +       return ath79_soc == ATH79_SOC_QCA9556;
43 +}
44 +
45  static inline int soc_is_qca9558(void)
46  {
47         return ath79_soc == ATH79_SOC_QCA9558;
48 @@ -106,7 +112,7 @@ static inline int soc_is_qca9558(void)
49  
50  static inline int soc_is_qca955x(void)
51  {
52 -       return soc_is_qca9558();
53 +       return soc_is_qca9556() || soc_is_qca9558();
54  }
55  
56  extern void __iomem *ath79_ddr_base;