public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] arm: cm4008, cm41xx: set gd->ram_size in dram_init
Date: Fri, 06 Jul 2012 12:25:00 +0200	[thread overview]
Message-ID: <4FF6BCFC.4030500@gmail.com> (raw)
In-Reply-To: <201207061114.59249.yann.vernier@orsoc.se>

Dear Yann Vernier,

On 06.07.2012 11:14, Yann Vernier wrote:
> On Friday 06 July 2012 10:43:40 you wrote:
>>>>> =((CONFIG_SYS_SDRAM_BASE+CONFIG_SYS_SDRAM_SIZE-0x10000)<<(22-16) | \ +
>>>>>      (CONFIG_SYS_SDRAM_BASE>>(16-12) | 0x00e))
>>>>
>>>> ugh ... magic. Will it work for every possible setting?
>>>> How about one setting CONFIG_SYS_SDRAM_BASE != 0x0? I the base address
>>>> related to register content in any way?
>>>
>>> It's not a guarded secret, although it is far from obvious where to find
>>> it. One way is micrel.com - Products - Ethernet ICs / ARM based SOC's -
>>> HW Design Kit. Within that zip file,
>>> KS8695X_EVAL_HW_RV4.0_DP/RegDescription/KS8695X Register Description
>>> v1.1.pdf
>>
>> With this information I understand your equation. I think you should not
>> do it that way. You may solve the current state (all devices have 8
>> column, 4 bank and 32 bit). But one adding (well, if that will ever come
>> ;) another board with different setting will get in trouble here and
>> need to find another solution. Maybe more sophisticated by doing another
>> equation.
>>
>> I think a straight forward solution here would be to add another special
>> define in the board config, write the magic number down there and maybe
>> describe what the number stands for. You can then just use the
>> previously defined value in start.S.
>> You may have a look for at91 lowlevel_init, there it is done that way.
> 
> I shall. In fact, I may already have this problem as I need to verify the 
> timing on the flash memory (I have the demo board, not a cm4xxx), and the 
> reason I work on this is that we may design another board soon.
> 
> I'm a little hesitant about how to fit these changes together, though; for now 
> I have three barely separated patches, but overhauling all those magic numbers 
> changes them all yet again. These three patches are all necessary to make my 
> u-boot work in the first place, while fixing the magic values is a code cleanup 
> change - probably editing arch/arm/include/asm/arch-ks8695/platform.h which 
> currently contains a few meaningless constants like KS8695_SDRAM_START and a 
> consistent misspelling of definitions. 
> 
> Could I save the value decoding and corresponding configuration changes for a 
> fourth patch?

I'm fine with this suggestion.
So the next question is who would pull it in mainline? Since this is arm
related I guess Albert is the one in question.
I think these three patches are all fixes to get a board already in
mainline working. So I think we should try to get these in -rc1.
Albert, can you please comment?

Best regards

Andreas Bie?mann

  reply	other threads:[~2012-07-06 10:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06  8:15 [U-Boot] [PATCH v2] arm: cm4008, cm41xx: set gd->ram_size in dram_init Yann Vernier
2012-07-06  8:43 ` Andreas Bießmann
2012-07-06  9:14   ` Yann Vernier
2012-07-06 10:25     ` Andreas Bießmann [this message]
2012-07-09 21:58       ` Albert ARIBAUD
2012-07-10 12:19         ` Greg Ungerer
2012-07-12  9:32           ` Andreas Bießmann
2012-07-12  9:30         ` Andreas Bießmann
  -- strict thread matches above, loose matches on Subject: below --
2012-07-05 10:02 [U-Boot] [PATCH 1/3] cm4008: " Andreas Bießmann
2012-07-05 12:11 ` [U-Boot] [PATCH v2] arm: cm4008, cm41xx: " Yann Vernier
2012-07-05 14:48   ` Andreas Bießmann

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=4FF6BCFC.4030500@gmail.com \
    --to=andreas.devel@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox