mips: bmips: setup: make CBR address configurable
authorChristian Marangi <ansuelsmth@gmail.com>
Thu, 20 Jun 2024 15:26:44 +0000 (17:26 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 27 Jun 2024 08:44:32 +0000 (10:44 +0200)
commitb95b30e50aed225d26e20737873ae2404941901c
treef2abb3cc75e1ce9a151de76cf6bbf2de091dc660
parent3de96d810ffd712b7ad2bd764c1390fac2436551
mips: bmips: setup: make CBR address configurable

Add support to provide CBR address from DT to handle broken
SoC/Bootloader that doesn't correctly init it. This permits to use the
RAC flush even in these condition.

To provide a CBR address from DT, the property "brcm,bmips-cbr-reg"
needs to be set in the "cpus" node. On DT init, this property presence
will be checked and will set the bmips_cbr_addr value accordingly. Also
bmips_rac_flush_disable will be set to false as RAC flush can be
correctly supported.

The CBR address from DT will overwrite the cached one and the
one set in the CBR register will be ignored.

Also the DT CBR address is validated on being outside DRAM window.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/bcm47xx/setup.c
arch/mips/bcm63xx/setup.c
arch/mips/bmips/setup.c