[LEDE-DEV] [PATCHv4 1/1] [brcm63xx] Fix the logged CPU variant

Graham Fairweather xotic750 at gmail.com
Fri Jun 3 03:44:34 PDT 2016


Ok. No it doesn't add functionality to the code but for me it feels
just wrong to report in dmesg (the human functionality) that a device
is a Broadcom 6368 variant 2 (which doesn't exist), but thanks.

On 3 June 2016 at 11:27, Álvaro Fernández Rojas <noltari at gmail.com> wrote:
> NACK, this doesn't add any funcionality and original firmwares show these
> SoCs as their generic CPU IDs (e.g: 6368 for the 6369).
>
> El 23/5/16 a las 0:46, Xotic750 escribió:
>
>> From: Graham Fairweather <xotic750 at gmail.com>
>>
>> This patch fixes the logged detected CPU ID when an equivalent is used,
>> like in the case where we have a bcm6369 and configuration for a
>> bcm6368 is used.
>> So, it will display 'Detected Broadcom 0x6369 CPU revision b2' instead of
>> 'Detected Broadcom 0x6368 CPU revision b2'.
>> More info can be found at:
>> https://forum.openwrt.org/viewtopic.php?id=64621
>> https://github.com/Xotic750/mirror-lede/tree/fix_cpu_id
>> Signed-off-by: Graham Fairweather <xotic750 at gmail.com>
>> ---
>>   .../330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch          | 9
>> +++++++++
>>   .../330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch          | 9
>> +++++++++
>>   2 files changed, 18 insertions(+)
>>
>> diff --git
>> a/target/linux/brcm63xx/patches-4.1/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
>> b/target/linux/brcm63xx/patches-4.1/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
>> index 661abf6..23491aa 100644
>> ---
>> a/target/linux/brcm63xx/patches-4.1/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
>> +++
>> b/target/linux/brcm63xx/patches-4.1/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
>> @@ -41,6 +41,15 @@ Subject: [PATCH 40/53] MIPS: BCM63XX: add a new cpu
>> variant helper
>>         bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT;
>>         switch (bcm63xx_cpu_id) {
>> +@@ -377,7 +387,7 @@ void __init bcm63xx_cpu_init(void)
>> +       bcm63xx_memory_size = detect_memory_size();
>> +
>> +       printk(KERN_INFO "Detected Broadcom 0x%04x CPU revision %02x\n",
>> +-             bcm63xx_cpu_id, bcm63xx_cpu_rev);
>> ++             bcm63xx_cpu_variant, bcm63xx_cpu_rev);
>> +       printk(KERN_INFO "CPU frequency is %u MHz\n",
>> +              bcm63xx_cpu_freq / 1000000);
>> +       printk(KERN_INFO "%uMB of RAM installed\n",
>>   --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
>>   +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
>>   @@ -19,6 +19,7 @@
>> diff --git
>> a/target/linux/brcm63xx/patches-4.4/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
>> b/target/linux/brcm63xx/patches-4.4/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
>> index 661abf6..330a9e6 100644
>> ---
>> a/target/linux/brcm63xx/patches-4.4/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
>> +++
>> b/target/linux/brcm63xx/patches-4.4/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
>> @@ -41,6 +41,15 @@ Subject: [PATCH 40/53] MIPS: BCM63XX: add a new cpu
>> variant helper
>>         bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT;
>>         switch (bcm63xx_cpu_id) {
>> +@@ -377,7 +387,7 @@ void __init bcm63xx_cpu_init(void)
>> +       bcm63xx_memory_size = detect_memory_size();
>> +
>> +       pr_info("Detected Broadcom 0x%04x CPU revision %02x\n",
>> +-              bcm63xx_cpu_id, bcm63xx_cpu_rev);
>> ++              bcm63xx_cpu_variant, bcm63xx_cpu_rev);
>> +       pr_info("CPU frequency is %u MHz\n",
>> +               bcm63xx_cpu_freq / 1000000);
>> +       pr_info("%uMB of RAM installed\n",
>>   --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
>>   +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
>>   @@ -19,6 +19,7 @@
>
>



More information about the Lede-dev mailing list