All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] ARmv7: Add a soc_init hook to start.S
Date: Thu, 22 Jan 2015 20:10:06 +0100	[thread overview]
Message-ID: <54C14B0E.9000308@redhat.com> (raw)
In-Reply-To: <20150122162058.GF10826@bill-the-cat>

Hi,

On 22-01-15 17:20, Tom Rini wrote:
> On Wed, Jan 21, 2015 at 09:03:25PM +0100, Hans de Goede wrote:
>
>> On some SoCs / ARMv7 CPU cores we need to do some setup before enabling the
>> icache, etc. Add a soc_init hook with a weak default which just calls
>> cpu_init_cp15.
>>
>> This way different implementations can be provided to do some extra work
>> before or after cpu_init_cp15, or completely replacing cpu_init_cp15.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   arch/arm/cpu/armv7/start.S | 18 +++++++++++++++++-
>>   1 file changed, 17 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
>> index fdc05b9..9882b20 100644
>> --- a/arch/arm/cpu/armv7/start.S
>> +++ b/arch/arm/cpu/armv7/start.S
>> @@ -64,7 +64,7 @@ reset:
>>
>>   	/* the mask ROM code should have PLL and others stable */
>>   #ifndef CONFIG_SKIP_LOWLEVEL_INIT
>> -	bl	cpu_init_cp15
>> +	bl	soc_init
>>   	bl	cpu_init_crit
>>   #endif
>
> I like the direction here.  And I want to make sure I get the sunxi
> direction right here too (as I agree with the need / desire for boot0 +
> U-Boot to be a valid combination).  I think we can take this a step
> farther.  cpu_init_crit (on armv7) is basically a call to s_init().
>
> For am33xx (and I bet but need to do and test omap3+) we can, with
> Simon's patch to let us move stack to DDR a tiny bit later, in the SPL
> case make s_init empty, which just leaves us with (with your patch)
> soc_init.  Is there some way we can put all of this together in a
> function?

You mean essentially call s_init here and have s_init call cpu_init_cp15
I guess we could do that, but it would require auditing all existing armv7
users of s_init. This may require me to rethink how / when I do timer &
gpio init etc. for u-boot.bin on sunxi, but that should not be a (big)
problem.

Regards,

Hans

  reply	other threads:[~2015-01-22 19:10 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 20:03 [U-Boot] [PATCH 1/3] ARmv7: Add a soc_init hook to start.S Hans de Goede
2015-01-21 20:03 ` [U-Boot] [PATCH 2/3] ARMv7: Add a cpu_init_cortex_a7 helper function Hans de Goede
2015-01-21 20:03 ` [U-Boot] [PATCH 3/3] sunxi: Switch to using soc_init hook for setting the ACTLR.SMP bit Hans de Goede
2015-02-08  5:42   ` Ian Campbell
2015-01-21 21:59 ` [U-Boot] [PATCH 1/3] ARmv7: Add a soc_init hook to start.S Bill Pringlemeir
2015-01-22 13:29   ` Hans de Goede
2015-01-22 15:48     ` Bill Pringlemeir
2015-01-22 16:20 ` Tom Rini
2015-01-22 19:10   ` Hans de Goede [this message]
2015-01-22 21:03     ` Tom Rini
2015-01-23  8:54       ` Hans de Goede
2015-01-26 15:18         ` Tom Rini
2015-01-26 19:32           ` Hans de Goede
2015-01-27 14:23             ` Tom Rini
2015-01-31 21:25               ` Albert ARIBAUD
2015-01-31 21:49                 ` Tom Rini
2015-01-31 22:14                   ` Simon Glass
2015-02-02 18:56                     ` Tom Rini
2015-02-02 19:26                       ` Simon Glass
2015-02-04  8:48                       ` Albert ARIBAUD
2015-02-05  3:00                         ` Simon Glass
2015-02-05  8:27                           ` Hans de Goede
2015-02-05 15:14                           ` Albert ARIBAUD
2015-02-05 15:34                             ` Simon Glass
2015-02-05 18:02                               ` Albert ARIBAUD
2015-02-05 19:13                                 ` Simon Glass
2015-02-10 22:07                         ` Tom Rini
2015-02-10 23:27                           ` Simon Glass
2015-01-26  8:09   ` Albert ARIBAUD
2015-01-26 10:50     ` Hans de Goede

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=54C14B0E.9000308@redhat.com \
    --to=hdegoede@redhat.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 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.