diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-02-15 13:38:16 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-02-19 09:36:24 +0100 |
commit | 2e6c91e392fd7be2ef0ba1e9a20e0ebe8ab79cf3 (patch) | |
tree | 0cb70c58b13339005f08a31141ca3e57ee58f039 /arch/mips/ath79/setup.c | |
parent | 908987797076b848f01b32c21d61d0e152efc236 (diff) | |
download | blackbird-op-linux-2e6c91e392fd7be2ef0ba1e9a20e0ebe8ab79cf3.tar.gz blackbird-op-linux-2e6c91e392fd7be2ef0ba1e9a20e0ebe8ab79cf3.zip |
MIPS: ath79: add SoC detection code for the QCA955X SoCs
Also add 'soc_is_qca955[68x]' helper functions
and a Kconfig symbol for the SoC family.
Cc: Rodriguez, Luis <rodrigue@qca.qualcomm.com>
Cc: Giori, Kathy <kgiori@qca.qualcomm.com>
Cc: QCA Linux Team <qca-linux-team@qca.qualcomm.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/4943/
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips/ath79/setup.c')
-rw-r--r-- | arch/mips/ath79/setup.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c index 60d212ef8629..d5b3c9057018 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c @@ -164,13 +164,29 @@ static void __init ath79_detect_sys_type(void) rev = id & AR934X_REV_ID_REVISION_MASK; break; + case REV_ID_MAJOR_QCA9556: + ath79_soc = ATH79_SOC_QCA9556; + chip = "9556"; + rev = id & QCA955X_REV_ID_REVISION_MASK; + break; + + case REV_ID_MAJOR_QCA9558: + ath79_soc = ATH79_SOC_QCA9558; + chip = "9558"; + rev = id & QCA955X_REV_ID_REVISION_MASK; + break; + default: panic("ath79: unknown SoC, id:0x%08x", id); } ath79_soc_rev = rev; - sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); + if (soc_is_qca955x()) + sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u", + chip, rev); + else + sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); pr_info("SoC: %s\n", ath79_sys_type); } |