mips: SoC or board specific override of flush_dcache_range()
Daniel Schwierzeck
daniel.schwierzeck at gmail.com
Mon Dec 23 19:33:07 CET 2019
Hi Alex,
Am 21.12.19 um 01:56 schrieb Alex Nemirovsky:
> Hello Daniel et. all,
>
> We have a need to override what is done inside arch/mips/lib/cache.c::flush_dcache_range()
> for our SoC/board.
>
> Easiest approach seems to be making the function __weak upstream. i.e.
>
> -void flush_dcache_range(ulong start_addr, ulong stop)
> +void __weak flush_dcache_range(ulong start_addr, ulong stop)
>
> thoughts?
>
could you explain what is different? Is it some propietary vendor/SoC
specific functionality or only special for a MIPS core family?
If possible I'd like to keep the cache code in one place and maybe
extend it with some feature toggled code. Alternatively
flush_dcache_range() could call a weak function as an extension point
(similar to __ioremap_mode()). Only if you really needed to completely
replace the code, you could submit a patch to make flush_dcache_range()
weak.
--
- Daniel
More information about the U-Boot
mailing list