From: Tom Rini Date: Thu, 22 Jan 2015 11:20:58 -0500 Subject: [U-Boot] [PATCH 1/3] ARmv7: Add a soc_init hook to start.S In-Reply-To: <1421870607-22916-1-git-send-email-hdegoede@redhat.com> References: <1421870607-22916-1-git-send-email-hdegoede@redhat.com> Message-ID: <20150122162058.GF10826@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > 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? -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: