All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Scholz <steven.scholz@imc-berlin.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Bug in AT91RM9200: icache not enabled!
Date: Sun, 13 Mar 2005 16:40:18 +0100	[thread overview]
Message-ID: <42345EE2.9070604@imc-berlin.de> (raw)
In-Reply-To: <42344819.4020103@imc-berlin.de>

Hi there,

> while finding out why the loading of my FPGA takes so long with the 
> latest CVS version of U-Boot I noticed that the icache for the 
> AT91RM9200 is not enabled although icache_enable() is called in 
> cpu/at91rm9200/start.S:
> 
>         /*
>          * This does a lot more than just set up the memory, which
>          * is why it's called lowlevelinit
>          */
>         bl      lowlevelinit /* in memsetup.S */
>         bl      icache_enable;
>    ...
> 
> The problem is that icache_enable() only works on bit 2 of CP15 Reg 1. 
> But the important bit seems to be bit 12 judging by the AT91RM9200 User 
> Manual page 49.

I am a bit confused right now! The function

void icache_enable(void)
{
     ulong reg;
     reg = read_p15_c1();
     cp_delay();
     reg |= C1_IC;
     write_p15_c1(reg);
}

from cpu/at91rm9200/cpu.c does not seem to work (at least when called from 
start.S). When I do

  mrc     p15, 0, r0, c1, c0, 0	@ read cp15 control register (cp15 r1) in r0
  orr	r0, r0, #0x00001000	@ set bit 12 (I) I-Cache
  mcr     p15, 0, r0, c1, c0, 0	@ write r0 in cp15 control register (cp15 r1)

which should be the same, it works ... :-(

Especially I dont understand why the C function would need a cp_delay() why the 
assembler code does not ...

--
Steven

  reply	other threads:[~2005-03-13 15:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-13 14:03 [U-Boot-Users] Bug in AT91RM9200: icache not enabled! Steven Scholz
2005-03-13 15:40 ` Steven Scholz [this message]
     [not found] <20050313151724.99D12C1510@atlas.denx.de>
2005-03-13 16:00 ` Steven Scholz
2005-03-13 18:39   ` Wolfgang Denk
2005-03-14  8:23     ` Steven Scholz
  -- strict thread matches above, loose matches on Subject: below --
2005-03-30  7:19 Paugam Luc
2005-03-30  8:56 ` Wolfgang Denk

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=42345EE2.9070604@imc-berlin.de \
    --to=steven.scholz@imc-berlin.de \
    --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.