linux-mips
[Top] [All Lists]

Re: [PATCH 02/11] MIPS: ath79: add SoC detection code for the QCA955X So

To: John Crispin <blogic@openwrt.org>
Subject: Re: [PATCH 02/11] MIPS: ath79: add SoC detection code for the QCA955X SoCs
From: Gabor Juhos <juhosg@openwrt.org>
Date: Fri, 15 Feb 2013 17:42:20 +0100
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips <linux-mips@linux-mips.org>, "Rodriguez, Luis" <rodrigue@qca.qualcomm.com>, "Giori, Kathy" <kgiori@qca.qualcomm.com>, QCA Linux Team <qca-linux-team@qca.qualcomm.com>
In-reply-to: <511E5BB8.8060800@openwrt.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1360939105-23591-1-git-send-email-juhosg@openwrt.org> <1360939105-23591-3-git-send-email-juhosg@openwrt.org> <511E5BB8.8060800@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
2013.02.15. 17:00 keltezéssel, John Crispin írta:
> 
>>
>> -    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);
>>   }
>>   
> Hi,
> 
> maybe a soc_is_qca() could be used here, otherwise you will need to patch this
> line again for the next SoC and so on ....

Hm, if I would add a soc_is_qca() macro, I would have to patch that macro for
the next SoCs instead of this line.

Maybe it would be better to add the AR/QCA prefix to each chip name, and use
'Qualcomm Atheros' unconditionally in the sprintf call?

-Gabor

<Prev in Thread] Current Thread [Next in Thread>