public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] zynq: Use arch_cpu_init() instead of lowlevel_init()
Date: Mon, 23 Sep 2013 16:37:26 +0200	[thread overview]
Message-ID: <20130923163726.746fd1bf@lilith> (raw)
In-Reply-To: <52404E08.6070606@monstr.eu>

Hi Michal,

On Mon, 23 Sep 2013 16:19:52 +0200, Michal Simek <monstr@monstr.eu>
wrote:

> On 09/23/2013 02:31 PM, Albert ARIBAUD wrote:
> > Hi Michal,
> > 
> > On Thu, 22 Aug 2013 14:52:02 +0200, Michal Simek
> > <michal.simek@xilinx.com> wrote:
> > 
> >> Zynq lowlevel_init() was implemented in C but stack
> >> pointer is setup after function call in _main().
> >> Move architecture setup to arch_cpu_init() which is call
> >> as the first function in board_init_f() which
> >> already have correct stack pointer.
> >>
> >> Reported-by: Sven Schwermer <sven.schwermer@tuhh.de>
> >> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> >> ---
> >> I can't see any problem to call zynq setup a little
> >> bit later. There is already expectation that u-boot
> >> runs from DDR.
> >> Moving lowlevel_init from C to ASM is possible but
> >> I will have to introduce new macros with hardcoded
> >> values. Using structures is much nicer.
> >>
> >> ---
> >>  arch/arm/cpu/armv7/zynq/cpu.c | 6 ++++++
> >>  1 file changed, 6 insertions(+)
> >>
> >> diff --git a/arch/arm/cpu/armv7/zynq/cpu.c b/arch/arm/cpu/armv7/zynq/cpu.c
> >> index 4367d1a..8846f30 100644
> >> --- a/arch/arm/cpu/armv7/zynq/cpu.c
> >> +++ b/arch/arm/cpu/armv7/zynq/cpu.c
> >> @@ -11,6 +11,10 @@
> >>
> >>  void lowlevel_init(void)
> >>  {
> >> +}
> > 
> > I'd rather you deleted lowlevel_init() as a C function with this
> > name should not exist.
> 
> Ok. Do you want me to create almost empty low_level.S or just use
> arch/arm/cpu/arvm7/lowlevel_init.S and define empty s_init()?

Urgh. I realize removing the C function would give you more work than
simply keeping it empty until the whole s_init() mess is cleaned up. :(

I'll take your change as-is, sorry for the noise.

> Thanks,
> Michal

Amicalement,
-- 
Albert.

  reply	other threads:[~2013-09-23 14:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22 12:52 [U-Boot] [PATCH] zynq: Use arch_cpu_init() instead of lowlevel_init() Michal Simek
2013-09-23 12:31 ` Albert ARIBAUD
2013-09-23 14:19   ` Michal Simek
2013-09-23 14:37     ` Albert ARIBAUD [this message]
2013-09-23 14:56       ` Michal Simek
2013-09-24 10:38       ` Michal Simek
2013-10-02 19:43         ` Albert ARIBAUD
2013-10-03  6:58           ` Michal Simek
2013-10-03  8:41             ` Albert ARIBAUD
2013-10-03  9:56               ` Michal Simek
2013-10-03 16:07                 ` Albert ARIBAUD
2013-10-17  6:33                   ` Albert ARIBAUD
2013-10-17  7:37                     ` Edgar E. Iglesias
2013-10-17  8:25                       ` Albert ARIBAUD
2013-10-17  8:30                         ` Michal Simek
2013-10-17 12:43                           ` Albert ARIBAUD
2013-10-17  6:49 ` Albert ARIBAUD

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=20130923163726.746fd1bf@lilith \
    --to=albert.u.boot@aribaud.net \
    --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