1 From a6b04a056cd63e9241b94bc5dcc8847fa4cb1d34 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Thu, 23 Jun 2011 18:13:14 +0200
4 Subject: [PATCH 05/27] MIPS: ath79: add revision id for the AR933X SoCs
6 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
7 Cc: linux-mips@linux-mips.org
8 Cc: Kathy Giori <kgiori@qca.qualcomm.com>
9 Cc: "Luis R. Rodriguez" <rodrigue@qca.qualcomm.com>
10 Patchwork: https://patchwork.linux-mips.org/patch/2538/
11 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 arch/mips/ath79/setup.c | 12 ++++++++++++
14 arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 4 ++++
15 arch/mips/include/asm/mach-ath79/ath79.h | 4 +++-
16 3 files changed, 19 insertions(+), 1 deletions(-)
18 --- a/arch/mips/ath79/setup.c
19 +++ b/arch/mips/ath79/setup.c
20 @@ -116,6 +116,18 @@ static void __init ath79_detect_sys_type
21 rev = id & AR724X_REV_ID_REVISION_MASK;
24 + case REV_ID_MAJOR_AR9330:
25 + ath79_soc = ATH79_SOC_AR9330;
27 + rev = id & AR933X_REV_ID_REVISION_MASK;
30 + case REV_ID_MAJOR_AR9331:
31 + ath79_soc = ATH79_SOC_AR9331;
33 + rev = id & AR933X_REV_ID_REVISION_MASK;
36 case REV_ID_MAJOR_AR913X:
37 minor = id & AR913X_REV_ID_MINOR_MASK;
38 rev = id >> AR913X_REV_ID_REVISION_SHIFT;
39 --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
40 +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
42 #define REV_ID_MAJOR_AR7240 0x00c0
43 #define REV_ID_MAJOR_AR7241 0x0100
44 #define REV_ID_MAJOR_AR7242 0x1100
45 +#define REV_ID_MAJOR_AR9330 0x0110
46 +#define REV_ID_MAJOR_AR9331 0x1110
48 #define AR71XX_REV_ID_MINOR_MASK 0x3
49 #define AR71XX_REV_ID_MINOR_AR7130 0x0
51 #define AR913X_REV_ID_REVISION_MASK 0x3
52 #define AR913X_REV_ID_REVISION_SHIFT 2
54 +#define AR933X_REV_ID_REVISION_MASK 0x3
56 #define AR724X_REV_ID_REVISION_MASK 0x3
59 --- a/arch/mips/include/asm/mach-ath79/ath79.h
60 +++ b/arch/mips/include/asm/mach-ath79/ath79.h
61 @@ -26,7 +26,9 @@ enum ath79_soc_type {
71 extern enum ath79_soc_type ath79_soc;