From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] scb9328: Add ARM relocation support
Date: Fri, 10 Jun 2011 09:24:45 +0200 [thread overview]
Message-ID: <4DF1C6BD.9080800@denx.de> (raw)
In-Reply-To: <4DF1AF2B.6030602@synertronixx.de>
On 06/10/2011 07:44 AM, Torsten Koschorrek wrote:
> Hello,
Hi Torsten,
send your answer to the ML, too. Someone else can help you ;-)
>> size1 = get_ram_size((volatile void *)SCB9328_SDRAM_1,
>> SCB9328_SDRAM_1_SIZE);
>> #if ( CONFIG_NR_DRAM_BANKS> 1 )
>> size2 = get_ram_size((volatile void *)SCB9328_SDRAM_2,
>> SCB9328_SDRAM_2_SIZE);
>> .....
>>
>> and then:
>> gd->ram_size = size1 + size2 + size3 + size4;
>>
>
> Yes, I thought about it. The thing is, we only have one bank on the
> system. So, dram_init_banksize() needs a cleanup, but that's a problem
> for another cleanup-patch, which will be committed in a next step.
>
> (If it's needed I could do a minor cleanup first...)
You decide. However, the code in the patch is wrong. If you have only
one bank, you could directly simplify your code, I think.
>
>>> /**
>>> diff --git a/include/configs/scb9328.h b/include/configs/scb9328.h
>>> index 3da214e..c610ed1 100644
>>> --- a/include/configs/scb9328.h
>>> +++ b/include/configs/scb9328.h
>>> @@ -127,6 +127,9 @@
>>> #define SCB9328_SDRAM_1 0x08000000 /* SDRAM bank #1 */
>>> #define SCB9328_SDRAM_1_SIZE 0x01000000 /* 16 MB */
>>> +#define CONFIG_SYS_SDRAM_BASE SCB9328_SDRAM_1
>>> +#define CONFIG_SYS_INIT_SP_ADDR SCB9328_SDRAM_1 + 0xf00000
>>
>> In most boards/processors the stack pointer is set to the internal RAM,
>> that is available before the SDRAM controller is activated. When not
>> available, cache can be used. Is there no internal memory available for
>> this processor ? It could be that the stack is used before the SDRAM is
>> initialized, and then it hangs.
>>
>
> I suppose, here is the cause of the hanging problem, yes. While I was
> trying to solve it I saw some board configs which use sdram, too.
Take into account that a lot of new processors set automatically the RAM
controller before u-boot is started. I am thinking to the newer i.MX
processors, but this is true for other architectures, too. And in some
cases u-boot runs as second or third bootloader, such as for at91sam,
davinci and omap, without touching the RAM controller that is already
programmed by the first-stage bootloader. In your case the SDRAM
controller is probably not yet programmed when the stack pointer is set.
> Internal RAM came to my mind, too, but I didn't had the time to
> investigate further.
>
> Unfortunately I have to work on another project today and next week and
> I think I'm not able to solve the hanging problem.
Understood, I tried only to give you some hints where to check ;-)
> Minor fixes (such as
> config.mk) for the above patch should be possible, though.
Ok, agree. Fix first the problem to make MAKEALL happy and build the
board again.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2011-06-10 7:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 11:36 [U-Boot] [PATCH] scb9328: Add ARM relocation support Torsten Koschorrek
2011-06-09 14:34 ` Stefano Babic
[not found] ` <4DF1AF2B.6030602@synertronixx.de>
2011-06-10 7:24 ` Stefano Babic [this message]
2011-06-10 17:55 ` Torsten Koschorrek
2011-07-04 9:34 ` Torsten Koschorrek
2011-07-04 9:43 ` Stefano Babic
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=4DF1C6BD.9080800@denx.de \
--to=sbabic@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.