From: Sascha Hauer <s.hauer@pengutronix.de>
To: Roman Fietze <roman.fietze@telemotive.de>
Cc: barebox@lists.infradead.org
Subject: Re: Freescale i.MX35 using CSD1 and 256 MiB DDR2
Date: Tue, 26 Apr 2011 23:56:30 +0200 [thread overview]
Message-ID: <20110426215630.GL14770@pengutronix.de> (raw)
In-Reply-To: <201104261430.01267.roman.fietze@telemotive.de>
Hi Roman,
On Tue, Apr 26, 2011 at 02:30:01PM +0200, Roman Fietze wrote:
> Hello Barebox Mailing List Members,
>
> I found this advice to patch RedBoot to support more than 128 MiB DDR2
> on a Freescale i.MX35 3-stack eval board by enabling CSD1 and properly
> configuring the ESDRAMC.
>
> http://www.spinics.net/lists/u-boot-v2/msg03422.html
>
> They simply seem to modify the boot code by omitting some checks and
> adding MMU mapping entries.
>
> My changes are not successful yet. It seems I'm simply not yet
> familiar enough with the i.MX35, barebox, or even both. The changes
> that I added to barebox are at the end of this mail.
>
> It seems that barebox uses the DCD table to boot the chip in my case,
> so I added new entries there, and I can see them when dumping e.g. the
> ESDRAMC registers using barebox itself (yes, it still starts. I can
> still dump the RAM starting at 0x80000000, but when I try to dump
> 0x90000000 barebox simply hangs.
>
> I checked the IOMUX GPRA, the PAD settings for CS2 and CS3, the
> ESDRAMC registers and all locations of Freescale's document containing
> CS2, CS3, CSD0, CSD1, etc. with no success.
>
> I'm stuck. What am I missing? A pointer to the appropriate section of
> the documentation or any helpful link would already very helpful.
There are at least two bugs in your flash header, see below.
>
>
> diff --git a/arch/arm/boards/freescale-mx35-3-stack/flash_header.c b/arch/arm/boards/freescale-mx35-3-stack/flash_header.c
> index 4bee797..34edceb 100644
> --- a/arch/arm/boards/freescale-mx35-3-stack/flash_header.c
> +++ b/arch/arm/boards/freescale-mx35-3-stack/flash_header.c
> @@ -17,19 +17,28 @@ struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
> { .ptr_type = 4, .addr = 0xB8001010, .val = 0x0000030C, },
> { .ptr_type = 4, .addr = 0xB8001004, .val = 0x007ffc3f, },
> { .ptr_type = 4, .addr = 0xB8001000, .val = 0x92220000, },
> + { .ptr_type = 4, .addr = 0xB800100C, .val = 0x007ffc3f, },
> + { .ptr_type = 4, .addr = 0xB8001008, .val = 0x92220000, },
> { .ptr_type = 4, .addr = 0x80000400, .val = 0x12345678, },
> + { .ptr_type = 4, .addr = 0x90000400, .val = 0x12345678, },
> { .ptr_type = 4, .addr = 0xB8001000, .val = 0xA2220000, },
There is the equivalent for this at 0xB8001008 missing
> { .ptr_type = 4, .addr = 0x80000000, .val = 0x87654321, },
> + { .ptr_type = 4, .addr = 0x90000000, .val = 0x87654321, },
> { .ptr_type = 4, .addr = 0x80000000, .val = 0x87654321, },
> + { .ptr_type = 4, .addr = 0x90000000, .val = 0x87654321, },
> { .ptr_type = 4, .addr = 0xB8001000, .val = 0xB2220000, },
> + { .ptr_type = 4, .addr = 0xB8001004, .val = 0xB2220000, },
This should be 0xB8001008
> { .ptr_type = 1, .addr = 0x80000233, .val = 0xda, },
> + { .ptr_type = 1, .addr = 0x90000233, .val = 0xda, },
> { .ptr_type = 1, .addr = 0x82000780, .val = 0xda, },
> + { .ptr_type = 1, .addr = 0x92000780, .val = 0xda, },
> { .ptr_type = 1, .addr = 0x82000400, .val = 0xda, },
> + { .ptr_type = 1, .addr = 0x92000400, .val = 0xda, },
> { .ptr_type = 4, .addr = 0xB8001000, .val = 0x82226080, },
> { .ptr_type = 4, .addr = 0xB8001004, .val = 0x007ffc3f, },
> + { .ptr_type = 4, .addr = 0xB8001008, .val = 0x82226080, },
> { .ptr_type = 4, .addr = 0xB800100C, .val = 0x007ffc3f, },
> { .ptr_type = 4, .addr = 0xB8001010, .val = 0x00000304, },
> - { .ptr_type = 4, .addr = 0xB8001008, .val = 0x00002000, },
> };
>
>
>
> /* Skip SDRAM initialization if we run from RAM */
> - cmp pc, #0x80000000
> + cmp pc, #CSD0_BASE_ADDR
> bls 1f
> - cmp pc, #0x90000000
> + cmp pc, #CSD1_BASE_ADDR
This should be 0xa0000000 since with 256MB Ram this is still in SDRAM.
I Hope this helps.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-04-26 21:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 12:30 Roman Fietze
2011-04-26 21:56 ` Sascha Hauer [this message]
2011-04-27 8:38 ` [PATCH] freescale-mx35-3-stack: support 256 MiB RAM Roman Fietze
2011-04-27 9:14 ` Marc Kleine-Budde
2011-04-27 10:32 ` Roman Fietze
2011-04-27 10:34 ` Marc Kleine-Budde
2012-01-20 15:04 ` Thomas Mayer
2012-01-23 9:26 ` Sascha Hauer
2012-01-23 14:04 ` Thomas Mayer
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=20110426215630.GL14770@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=roman.fietze@telemotive.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