All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] ARM: davinci: da850: Enable Caches for DA850-EVM
Date: Mon, 28 Aug 2017 07:48:39 -0500	[thread overview]
Message-ID: <CAHCN7x+zPAaQzVcF8EDqG-vRT8q0gcRe91wz9Ozf-4n7VoAGfQ@mail.gmail.com> (raw)
In-Reply-To: <1503873560-1496-1-git-send-email-aford173@gmail.com>

On Sun, Aug 27, 2017 at 5:39 PM, Adam Ford <aford173@gmail.com> wrote:
> What starting up the DA850-EVM, U-Boot generates a warning:
>    WARNING: Caches not enabled
>
> Looking at other arm926 processors, this is an attempt
> to enable the caches and remove the warning.
>
> I am notsure who the proper TI or ARM people are to review this.
>

For what It's worth, I ran some whetstone benchmarks.  Using 1000 loops,
the da850-evm increased from 14.3 MIPS without cache to 16.7 MIPS with cache

> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
>  board/davinci/da8xxevm/da850evm.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
> index c2d2e8e..33a923c 100644
> --- a/board/davinci/da8xxevm/da850evm.c
> +++ b/board/davinci/da8xxevm/da850evm.c
> @@ -491,3 +491,29 @@ int board_eth_init(bd_t *bis)
>         return 0;
>  }
>  #endif /* CONFIG_DRIVER_TI_EMAC */
> +
> +#ifndef CONFIG_SYS_ICACHE_OFF
> +/* Invalidate entire I-cache and branch predictor array */
> +void invalidate_icache_all(void)
> +{
> +       unsigned long i = 0;
> +
> +       asm ("mcr p15, 0, %0, c7, c5, 0" : : "r" (i));
> +}
> +#else
> +void invalidate_icache_all(void)
> +{
> +}
> +#endif
> +
> +#ifndef CONFIG_SYS_DCACHE_OFF
> +void enable_caches(void)
> +{
> +       /* Enable D-cache. I-cache is already enabled in start.S */
> +       dcache_enable();
> +}
> +#else
> +void enable_caches(void)
> +{
> +}
> +#endif /* CONFIG_SYS_DCACHE_OFF */
> --
> 2.7.4
>

  reply	other threads:[~2017-08-28 12:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27 22:39 [U-Boot] [RFC] ARM: davinci: da850: Enable Caches for DA850-EVM Adam Ford
2017-08-28 12:48 ` Adam Ford [this message]
2017-08-29  7:01 ` Peter Howard
2017-08-29 10:14   ` Adam Ford
2017-08-29 10:30 ` Vignesh R

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHCN7x+zPAaQzVcF8EDqG-vRT8q0gcRe91wz9Ozf-4n7VoAGfQ@mail.gmail.com \
    --to=aford173@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.