public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andy Pont <andy.pont@sdcsystems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Atmel SAMA5D31 NOR boot - sanity check required
Date: Wed, 18 Jun 2014 10:33:20 +0100	[thread overview]
Message-ID: <013501cf8ad8$5dac5da0$190518e0$@pont@sdcsystems.com> (raw)
In-Reply-To: <53A0E964.1090905@atmel.com>

Hi Bo,

> I think you should check more detail in section 12 "Standard Boot
> Strategies". It needs more things to do. I will give a picture in
> following answer.
>

<snip>

> As the code execute on NOR flash, so, the SPL configure the CPU clock
> will cause SMC access abortion. So, a brief guide as following:

The datasheet says the user software in external memory should:

a) Enable the 32768 Hz oscillator if best accuracy is needed.
b) Reprogram the SMC setup, cycle, hold, mode timing registers for EBI CS0,
to adapt them to the new clock.
c) Program the PMC (Main Oscillator Enable or Bypass mode).
d) Program and start the PLL.
e) Switch the system clock to the new value.

So my current thinking is that:

- I am not so worried about (a), as I don't think accuracy is essential at
this point in time.
- (b) needs to be taken care of in the steps that you outline below.
- (c) ???
- The function at91_pmc_init() in board\atmel\sama5d3xek\sama5d3xek.c takes
care of items (d) and (e)

It has been a while since I have done this much low level code so I may be a
little rusty :-)

> 1. Write a ram function, which do as the datasheet says.
> 2. Add copy function (copy the ram function into sram) at the begin of
> the SPL code.
> 3. After the step 1, finished to execute, then, you can jump back to
> NOR to execute.

I'm not sure I follow how to do this.  Are there any similar implementations
elsewhere in U-Boot that I could use as a reference.  I should say that ARM
assembler isn't my strongest skill as most of my previous experience has
been gained with x86 and MIPS.

Thanks for all your help.

Andy.

  reply	other threads:[~2014-06-18  9:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <53a02455.c657b40a.7d93.546cSMTPIN_ADDED_BROKEN@mx.google.com>
2014-06-18  1:20 ` [U-Boot] Atmel SAMA5D31 NOR boot - sanity check required Bo Shen
2014-06-18  9:33   ` Andy Pont [this message]
2014-06-17 11:09 Andy Pont

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='013501cf8ad8$5dac5da0$190518e0$@pont@sdcsystems.com' \
    --to=andy.pont@sdcsystems.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