mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Roberto Nibali <rnibali@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: Booting mx25 based device from SD and NOR
Date: Tue, 29 May 2012 11:56:24 +0200	[thread overview]
Message-ID: <CAONxwYOVJ3kroiK2yMBKFh=dhEgturFVixzKzGg7JQG7VCRMAw@mail.gmail.com> (raw)
In-Reply-To: <20120529092958.GP30400@pengutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 1695 bytes --]

Hi Sascha

> > you need the reference manual of the i.MX25 to know the meaning of
> > > these registers and the datasheet of your flash to know it's timings
> > > then you can calculate the value to put in the registers.
> > >
> > >
> > I have found them in an old uboot tree a previous person patched to have
> > working support for NOR on boot. The values are:
> >
> >         { .ptr_type = 4, .addr = 0xB8002000, .val = 0x0000D003, },
> >         { .ptr_type = 4, .addr = 0xB8002004, .val = 0x00330D01, },
> >         { .ptr_type = 4, .addr = 0xB8002008, .val = 0x00220800, },
>
> Do these values match the ones you read out of the registers using your
> U-Boot?
>

Yep, the corresponing dcdheader.S entries:

DCDGEN( 1, 4, 0xB8002000, 0x0000D003) /* CS0_CSCRU */
DCDGEN( 2, 4, 0xB8002004, 0x00330d01) /* CS0_CSCRL */
DCDGEN( 3, 4, 0xB8002008, 0x00220800) /* CS0_CSCRA */

So I reckon at least I got this part working fine.

 > /* Set up 16bit NOR flash on WEIM CS0 */
> > writel(0xB8002000, 0x0000D003);
> >  writel(0xB8002004, 0x00330D01);
> > writel(0xB8002008, 0x00220800);
>
> You mixed up the argument order.
>
> Yikes!!!! I hope I didn't fry something. I'll quickly try the reversed
order and report back.


>  >
> > board_init_lowlevel_return();
> > }
> >
> > Why can't I printf() from low_level?
>
> Because the console hasn't been setup yet. That's exactly the reason why
> I recommend doing only the absolutely necessary stuff in lowlevel_init.
>
> Make perfect sense (*slapping forehead*). Thank you for your patience. I
reckon those questions of mine could be compiled into some sort of FAQ for
the newcomers into the barebox world to flatten the learning curve.

Cheers
Roberto

[-- Attachment #1.2: Type: text/html, Size: 2634 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-05-29  9:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 12:11 Roberto Nibali
2012-05-22 18:42 ` Sascha Hauer
2012-05-23 10:43   ` Roberto Nibali
2012-05-23 11:47     ` Eric Bénard
2012-05-24 12:49       ` Roberto Nibali
2012-05-24 12:58         ` Eric Bénard
2012-05-24 13:18           ` Roberto Nibali
2012-05-24 13:31             ` Eric Bénard
2012-05-25  9:04               ` Roberto Nibali
2012-05-25 10:08                 ` Eric Bénard
2012-05-29  9:06                   ` Roberto Nibali
2012-05-29  9:29                     ` Sascha Hauer
2012-05-29  9:56                       ` Roberto Nibali [this message]
2012-05-29 10:14                         ` Roberto Nibali
2012-05-30  5:47                           ` Sascha Hauer
2012-05-30  6:39                             ` Juergen Beisert
2012-05-31 13:12                             ` Roberto Nibali
2012-05-31 17:06                               ` Sascha Hauer
2012-06-01 10:25                                 ` Roberto Nibali
2012-06-05  7:09                                   ` Sascha Hauer
2012-05-24 17:17             ` Sascha Hauer
2012-05-25  9:19               ` Roberto Nibali
2012-05-25 10:01                 ` Sascha Hauer
2012-05-29  9:26                   ` Roberto Nibali

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='CAONxwYOVJ3kroiK2yMBKFh=dhEgturFVixzKzGg7JQG7VCRMAw@mail.gmail.com' \
    --to=rnibali@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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