diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-03-14 05:45:21 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-05-15 11:49:07 -0400 |
commit | d84114660a65e89e27ebd3fb21ce71ff579ee882 (patch) | |
tree | e73cace8d697ad2ad9304630414389c36fd18d29 /arch/mips/ath79 | |
parent | 80a7ed81a840aee97f7650cbeaabb3c2c1765e70 (diff) |
MIPS: ath79: add SoC detection code for AR934X
Also add 'soc_is_ar934[124x]' helper functions and a Kconfig
symbol for the AR934X SoCs.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Cc: linux-mips@linux-mips.org
Cc: mcgrof@infradead.org
Patchwork: https://patchwork.linux-mips.org/patch/3506/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ath79')
-rw-r--r-- | arch/mips/ath79/Kconfig | 4 | ||||
-rw-r--r-- | arch/mips/ath79/setup.c | 21 |
2 files changed, 24 insertions, 1 deletions
diff --git a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig index bc6edada38ac..7db8e8903a7b 100644 --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig | |||
@@ -69,6 +69,10 @@ config SOC_AR933X | |||
69 | select USB_ARCH_HAS_EHCI | 69 | select USB_ARCH_HAS_EHCI |
70 | def_bool n | 70 | def_bool n |
71 | 71 | ||
72 | config SOC_AR934X | ||
73 | select USB_ARCH_HAS_EHCI | ||
74 | def_bool n | ||
75 | |||
72 | config ATH79_DEV_GPIO_BUTTONS | 76 | config ATH79_DEV_GPIO_BUTTONS |
73 | def_bool n | 77 | def_bool n |
74 | 78 | ||
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c index 24dfedfb1740..60d212ef8629 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c | |||
@@ -1,10 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * Atheros AR71XX/AR724X/AR913X specific setup | 2 | * Atheros AR71XX/AR724X/AR913X specific setup |
3 | * | 3 | * |
4 | * Copyright (C) 2010-2011 Jaiganesh Narayanan <jnarayanan@atheros.com> | ||
4 | * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> | 5 | * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> |
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | 6 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> |
6 | * | 7 | * |
7 | * Parts of this file are based on Atheros' 2.6.15 BSP | 8 | * Parts of this file are based on Atheros' 2.6.15/2.6.31 BSP |
8 | * | 9 | * |
9 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
10 | * under the terms of the GNU General Public License version 2 as published | 11 | * under the terms of the GNU General Public License version 2 as published |
@@ -145,6 +146,24 @@ static void __init ath79_detect_sys_type(void) | |||
145 | rev = id & AR933X_REV_ID_REVISION_MASK; | 146 | rev = id & AR933X_REV_ID_REVISION_MASK; |
146 | break; | 147 | break; |
147 | 148 | ||
149 | case REV_ID_MAJOR_AR9341: | ||
150 | ath79_soc = ATH79_SOC_AR9341; | ||
151 | chip = "9341"; | ||
152 | rev = id & AR934X_REV_ID_REVISION_MASK; | ||
153 | break; | ||
154 | |||
155 | case REV_ID_MAJOR_AR9342: | ||
156 | ath79_soc = ATH79_SOC_AR9342; | ||
157 | chip = "9342"; | ||
158 | rev = id & AR934X_REV_ID_REVISION_MASK; | ||
159 | break; | ||
160 | |||
161 | case REV_ID_MAJOR_AR9344: | ||
162 | ath79_soc = ATH79_SOC_AR9344; | ||
163 | chip = "9344"; | ||
164 | rev = id & AR934X_REV_ID_REVISION_MASK; | ||
165 | break; | ||
166 | |||
148 | default: | 167 | default: |
149 | panic("ath79: unknown SoC, id:0x%08x", id); | 168 | panic("ath79: unknown SoC, id:0x%08x", id); |
150 | } | 169 | } |