<div dir="ltr"><div>From: Graham Fairweather <<a href="mailto:xotic750@gmail.com">xotic750@gmail.com</a>></div><div><br></div><div>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. More info can be found at:</div><div><a href="https://forum.openwrt.org/viewtopic.php?id=64621">https://forum.openwrt.org/viewtopic.php?id=64621</a></div><div><a href="https://github.com/Xotic750/openwrt/tree/fix_logged_cpu_id_bcm63xx">https://github.com/Xotic750/openwrt/tree/fix_logged_cpu_id_bcm63xx</a></div><div>Signed-off-by: Graham Fairweather <<a href="mailto:xotic750@gmail.com">xotic750@gmail.com</a>></div><div>---</div><div>v2 fixes an issue where the 4.4 kernel uses 'pr_info' rather than 'printk'. Missed the problem in my initial attempts with 'quilt'. </div><div>---</div><div> target/linux/brcm63xx/patches-4.1/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch | 9 +++++++++</div><div> target/linux/brcm63xx/patches-4.4/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch | 9 +++++++++</div><div> 2 files changed, 18 insertions(+)</div><div>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</div><div>index 661abf6..23491aa 100644</div><div>--- a/target/linux/brcm63xx/patches-4.1/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch</div><div>+++ b/target/linux/brcm63xx/patches-4.1/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch</div><div>@@ -41,6 +41,15 @@ Subject: [PATCH 40/53] MIPS: BCM63XX: add a new cpu variant helper</div><div>  <span class="" style="white-space:pre">  </span>bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT;</div><div>  </div><div>  <span class="" style="white-space:pre">       </span>switch (bcm63xx_cpu_id) {</div><div>+@@ -377,7 +387,7 @@ void __init bcm63xx_cpu_init(void)</div><div>+ <span class="" style="white-space:pre">  </span>bcm63xx_memory_size = detect_memory_size();</div><div>+ </div><div>+ <span class="" style="white-space:pre">    </span>printk(KERN_INFO "Detected Broadcom 0x%04x CPU revision %02x\n",</div><div>+-<span class="" style="white-space:pre">       </span>       bcm63xx_cpu_id, bcm63xx_cpu_rev);</div><div>++<span class="" style="white-space:pre">      </span>       bcm63xx_cpu_variant, bcm63xx_cpu_rev);</div><div>+ <span class="" style="white-space:pre"> </span>printk(KERN_INFO "CPU frequency is %u MHz\n",</div><div>+ <span class="" style="white-space:pre">  </span>       bcm63xx_cpu_freq / 1000000);</div><div>+ <span class="" style="white-space:pre">   </span>printk(KERN_INFO "%uMB of RAM installed\n",</div><div> --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h</div><div> +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h</div><div> @@ -19,6 +19,7 @@</div><div>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</div><div>index 661abf6..330a9e6 100644</div><div>--- a/target/linux/brcm63xx/patches-4.4/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch</div><div>+++ b/target/linux/brcm63xx/patches-4.4/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch</div><div>@@ -41,6 +41,15 @@ Subject: [PATCH 40/53] MIPS: BCM63XX: add a new cpu variant helper</div><div>  <span class="" style="white-space:pre">      </span>bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT;</div><div>  </div><div>  <span class="" style="white-space:pre">       </span>switch (bcm63xx_cpu_id) {</div><div>+@@ -377,7 +387,7 @@ void __init bcm63xx_cpu_init(void)</div><div>+ <span class="" style="white-space:pre">  </span>bcm63xx_memory_size = detect_memory_size();</div><div>+ </div><div>+ <span class="" style="white-space:pre">    </span>pr_info("Detected Broadcom 0x%04x CPU revision %02x\n",</div><div>+-<span class="" style="white-space:pre">                </span>bcm63xx_cpu_id, bcm63xx_cpu_rev);</div><div>++<span class="" style="white-space:pre">                </span>bcm63xx_cpu_variant, bcm63xx_cpu_rev);</div><div>+ <span class="" style="white-space:pre">   </span>pr_info("CPU frequency is %u MHz\n",</div><div>+ <span class="" style="white-space:pre">           </span>bcm63xx_cpu_freq / 1000000);</div><div>+ <span class="" style="white-space:pre">     </span>pr_info("%uMB of RAM installed\n",</div><div> --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h</div><div> +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h</div><div> @@ -19,6 +19,7 @@</div></div>