[U-Boot] [PATCH v3] nios2: convert cache flush to use dm cpu data

Thomas Chou thomas at wytron.com.tw
Mon Oct 19 01:48:44 CEST 2015



On 10/14/2015 09:38 AM, Thomas Chou wrote:
> Convert cache flush to use dm cpu data.
>
> The original cache flush functions are written in assembly
> and use CONFIG_SYS_{I,D}CACHE_SIZE... macros. It is difficult
> to convert to use cache configuration in dm cpu data which is
> extracted from device tree.
>
> The cacheflush.c of Linux nios2 arch uses cpuinfo structure,
> which is very close to our dm cpu data. So we copy and modify
> it to arch/nios2/lib/cache.c to replace the old cache.S.
>
> Signed-off-by: Thomas Chou <thomas at wytron.com.tw>
> ---
> v2
>    change commit message.
> v3
>    check initda instruction support.
>    add invalidate_dcache_range().
>
>   arch/nios2/include/asm/cache.h |  13 ++---
>   arch/nios2/lib/bootm.c         |   6 +--
>   arch/nios2/lib/cache.S         |  68 ------------------------
>   arch/nios2/lib/cache.c         | 114 +++++++++++++++++++++++++++++++++++++++++
>   4 files changed, 118 insertions(+), 83 deletions(-)
>   delete mode 100644 arch/nios2/lib/cache.S
>   create mode 100644 arch/nios2/lib/cache.c
>

Applied to u-boot-nios.


More information about the U-Boot mailing list