Skip to content

Commit 6d1c8fd

Browse files
juhosgralfbaechle
authored andcommitted
MIPS: ath79: add revision id for the AR933X SoCs
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: linux-mips@linux-mips.org Cc: Kathy Giori <kgiori@qca.qualcomm.com> Cc: "Luis R. Rodriguez" <rodrigue@qca.qualcomm.com> Patchwork: https://patchwork.linux-mips.org/patch/2538/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 8bed128 commit 6d1c8fd

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

‎arch/mips/ath79/setup.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,18 @@ static void __init ath79_detect_sys_type(void)
116116
rev = id & AR724X_REV_ID_REVISION_MASK;
117117
break;
118118

119+
case REV_ID_MAJOR_AR9330:
120+
ath79_soc = ATH79_SOC_AR9330;
121+
chip = "9330";
122+
rev = id & AR933X_REV_ID_REVISION_MASK;
123+
break;
124+
125+
case REV_ID_MAJOR_AR9331:
126+
ath79_soc = ATH79_SOC_AR9331;
127+
chip = "9331";
128+
rev = id & AR933X_REV_ID_REVISION_MASK;
129+
break;
130+
119131
case REV_ID_MAJOR_AR913X:
120132
minor = id & AR913X_REV_ID_MINOR_MASK;
121133
rev = id >> AR913X_REV_ID_REVISION_SHIFT;

‎arch/mips/include/asm/mach-ath79/ar71xx_regs.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@
207207
#define REV_ID_MAJOR_AR7240 0x00c0
208208
#define REV_ID_MAJOR_AR7241 0x0100
209209
#define REV_ID_MAJOR_AR7242 0x1100
210+
#define REV_ID_MAJOR_AR9330 0x0110
211+
#define REV_ID_MAJOR_AR9331 0x1110
210212

211213
#define AR71XX_REV_ID_MINOR_MASK 0x3
212214
#define AR71XX_REV_ID_MINOR_AR7130 0x0
@@ -221,6 +223,8 @@
221223
#define AR913X_REV_ID_REVISION_MASK 0x3
222224
#define AR913X_REV_ID_REVISION_SHIFT 2
223225

226+
#define AR933X_REV_ID_REVISION_MASK 0x3
227+
224228
#define AR724X_REV_ID_REVISION_MASK 0x3
225229

226230
/*

‎arch/mips/include/asm/mach-ath79/ath79.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ enum ath79_soc_type {
2626
ATH79_SOC_AR7241,
2727
ATH79_SOC_AR7242,
2828
ATH79_SOC_AR9130,
29-
ATH79_SOC_AR9132
29+
ATH79_SOC_AR9132,
30+
ATH79_SOC_AR9330,
31+
ATH79_SOC_AR9331,
3032
};
3133

3234
extern enum ath79_soc_type ath79_soc;

0 commit comments

Comments
 (0)