aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-06-23 12:13:14 -0400
committerRalf Baechle <ralf@linux-mips.org>2011-12-07 17:02:45 -0500
commit6d1c8fde2daa498fa6ddf8916bcfc5aee1bbe51b (patch)
treebf3d479ffb45da56cb23ebdab440de63cf3a674b /arch/mips
parent8bed1288d479fd118d30666de53dfba8044f789f (diff)
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>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/ath79/setup.c12
-rw-r--r--arch/mips/include/asm/mach-ath79/ar71xx_regs.h4
-rw-r--r--arch/mips/include/asm/mach-ath79/ath79.h4
3 files changed, 19 insertions, 1 deletions
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
index dea5af1a3694..4187a1122048 100644
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -116,6 +116,18 @@ static void __init ath79_detect_sys_type(void)
116 rev = id & AR724X_REV_ID_REVISION_MASK; 116 rev = id & AR724X_REV_ID_REVISION_MASK;
117 break; 117 break;
118 118
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
119 case REV_ID_MAJOR_AR913X: 131 case REV_ID_MAJOR_AR913X:
120 minor = id & AR913X_REV_ID_MINOR_MASK; 132 minor = id & AR913X_REV_ID_MINOR_MASK;
121 rev = id >> AR913X_REV_ID_REVISION_SHIFT; 133 rev = id >> AR913X_REV_ID_REVISION_SHIFT;
diff --git a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
index 86f0fc8c07c1..929be06e1475 100644
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
@@ -207,6 +207,8 @@
207#define REV_ID_MAJOR_AR7240 0x00c0 207#define REV_ID_MAJOR_AR7240 0x00c0
208#define REV_ID_MAJOR_AR7241 0x0100 208#define REV_ID_MAJOR_AR7241 0x0100
209#define REV_ID_MAJOR_AR7242 0x1100 209#define REV_ID_MAJOR_AR7242 0x1100
210#define REV_ID_MAJOR_AR9330 0x0110
211#define REV_ID_MAJOR_AR9331 0x1110
210 212
211#define AR71XX_REV_ID_MINOR_MASK 0x3 213#define AR71XX_REV_ID_MINOR_MASK 0x3
212#define AR71XX_REV_ID_MINOR_AR7130 0x0 214#define AR71XX_REV_ID_MINOR_AR7130 0x0
@@ -221,6 +223,8 @@
221#define AR913X_REV_ID_REVISION_MASK 0x3 223#define AR913X_REV_ID_REVISION_MASK 0x3
222#define AR913X_REV_ID_REVISION_SHIFT 2 224#define AR913X_REV_ID_REVISION_SHIFT 2
223 225
226#define AR933X_REV_ID_REVISION_MASK 0x3
227
224#define AR724X_REV_ID_REVISION_MASK 0x3 228#define AR724X_REV_ID_REVISION_MASK 0x3
225 229
226/* 230/*
diff --git a/arch/mips/include/asm/mach-ath79/ath79.h b/arch/mips/include/asm/mach-ath79/ath79.h
index 6a9f168506fe..2dfc94c0444b 100644
--- a/arch/mips/include/asm/mach-ath79/ath79.h
+++ b/arch/mips/include/asm/mach-ath79/ath79.h
@@ -26,7 +26,9 @@ enum ath79_soc_type {
26 ATH79_SOC_AR7241, 26 ATH79_SOC_AR7241,
27 ATH79_SOC_AR7242, 27 ATH79_SOC_AR7242,
28 ATH79_SOC_AR9130, 28 ATH79_SOC_AR9130,
29 ATH79_SOC_AR9132 29 ATH79_SOC_AR9132,
30 ATH79_SOC_AR9330,
31 ATH79_SOC_AR9331,
30}; 32};
31 33
32extern enum ath79_soc_type ath79_soc; 34extern enum ath79_soc_type ath79_soc;