[PATCH 3/7] sh: Implement a default flush_dcache_all

Ilias Apalodimas ilias.apalodimas at linaro.org
Tue Jun 25 10:23:52 CEST 2024


On Thu, 20 Jun 2024 at 00:28, Tom Rini <trini at konsulko.com> wrote:
>
> Implement a weak default version of flush_dcache_all which is based on
> the ARM default, which is to flush the entire range via
> flush_dcache_range(...).
>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Cc: Marek Vasut <marex at denx.de>
> Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
> ---
>  arch/sh/cpu/sh4/cache.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c
> index 8c1839935ca1..f0cb39d6a923 100644
> --- a/arch/sh/cpu/sh4/cache.c
> +++ b/arch/sh/cpu/sh4/cache.c
> @@ -65,6 +65,15 @@ void flush_dcache_range(unsigned long start, unsigned long end)
>         }
>  }
>
> +/*
> + * Default implementation:
> + * do a range flush for the entire range
> + */
> +void flush_dcache_all(void)
> +{
> +       flush_dcache_range(0, ~0);
> +}
> +
>  void invalidate_dcache_range(unsigned long start, unsigned long end)
>  {
>         u32 v;
> --
> 2.34.1
>

Acked-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>


More information about the U-Boot mailing list