All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC][PATCH 17/19] arm cp15: setup mmu and enable dcache
Date: Fri, 30 Jul 2010 12:13:51 +0200	[thread overview]
Message-ID: <4C52A5DF.3080003@denx.de> (raw)
In-Reply-To: <4C52A1FD.3050105@ge.com>

Hello Nick,

Nick Thompson wrote:
> On 30/07/10 10:32, Heiko Schocher wrote:
>> Nick Thompson wrote:
>>> On 29/07/10 11:45, Heiko Schocher wrote:
>>>> +	     i++) {
>>>> +		page_table[i] = i << 20 | (3 << 10) | 0x1e;
>>> These numbers ought to be defines, no?
>>>
>>> The 0x1e will not work on da8xx as the data cache is broken. The d-cache can
>>> still be used in write back mode, so the value 0x1a should be used. It would
> 
> Here, I should have said write-thru' can still be used...
> 
>>> be good to have symbols to define the caching modes: none, wr-thru', wr-back
>>> or some such, similar to Linux.
>> Ah, Ok, good hint!
>>
>> What with:
>>
>> if !defined(CONFIG_SYS_ARM_CACHE_SETUP)
>> #define CONFIG_SYS_ARM_CACHE_SETUP	0x1e
>> #endif
>>
>> 		page_table[i] = i << 20 | (3 << 10) | CONFIG_SYS_ARM_CACHE_SETUP;
>>
>> So boards/architectures can define there own values?
> 
> How about:
> 
> #if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
> #define CACHE_SETUP	0x1a
> #else
> #define CACHE_SETUP	0x1e
> #endif
> 
> 		page_table[i] = i << 20 | (3 << 10) | CACHE_SETUP;
> 
> This would avoid people having to look up the appropriate value(s).

Ok, I am fine with that too.

> This follows the Linux model, but there the symbol CPU_CACHE_WRITETHROUGH
> is used. Ideally, I would suggest we use the CPU form as well, but it
> would imply an effect beyond ARM.

I vote for CONFIG_SYS_ARM_CACHE_WRITETHROUGH

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2010-07-30 10:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 10:45 [U-Boot] [RFC][PATCH 17/19] arm cp15: setup mmu and enable dcache Heiko Schocher
2010-07-30  9:11 ` Nick Thompson
2010-07-30  9:31   ` Alessandro Rubini
2010-07-30  9:32   ` Heiko Schocher
2010-07-30  9:57     ` Nick Thompson
2010-07-30 10:13       ` Heiko Schocher [this message]
2010-08-03 10:16   ` [U-Boot] [RFC][PATCH v2 " Heiko Schocher
2010-08-05 18:22     ` Ben Gardiner
2010-08-06  5:29       ` Heiko Schocher
2010-08-06 15:41         ` Ben Gardiner
2010-08-06 15:46           ` Wolfgang Denk
2010-08-06 16:14             ` Ben Gardiner
2010-08-06 16:27               ` Reinhard Meyer
2010-08-06 16:32                 ` Reinhard Meyer
2010-08-06 16:44                   ` Ben Gardiner
2010-08-10 17:45                     ` Ben Gardiner
2010-08-11  5:56                       ` Heiko Schocher
2010-08-11 13:31                         ` Ben Gardiner
2010-08-11 13:53                           ` Ben Gardiner
2010-08-11 17:06                             ` Heiko Schocher
2010-08-11 19: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=4C52A5DF.3080003@denx.de \
    --to=hs@denx.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.