From: Simon Glass Date: Wed, 14 Dec 2016 20:27:39 -0700 Subject: [U-Boot] [PATCH 08/29] blackfin: Use generic board to set the stack address In-Reply-To: <1481772480-29544-1-git-send-email-sjg@chromium.org> References: <1481772480-29544-1-git-send-email-sjg@chromium.org> Message-ID: <1481772480-29544-9-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Rather than using a hard-coded stack address, call board_init_f_alloc_reserve() and board_init_f_init_reserve() and use the stack address thus obtained. This makes blackfin more like other archs. Signed-off-by: Simon Glass --- arch/blackfin/cpu/start.S | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/blackfin/cpu/start.S b/arch/blackfin/cpu/start.S index 01985ea..5e19ad2 100644 --- a/arch/blackfin/cpu/start.S +++ b/arch/blackfin/cpu/start.S @@ -191,11 +191,16 @@ ENTRY(_start) #endif .Lnorelocate: + r0.l = LO(CONFIG_SYS_EARLY_SP_TOP) + r0.h = HI(CONFIG_SYS_EARLY_SP_TOP) + call _board_init_f_alloc_reserve + /* Setup the actual stack in external memory */ - sp.h = HI(CONFIG_STACKBASE); - sp.l = LO(CONFIG_STACKBASE); + sp = r0 fp = sp; + call _board_init_f_init_reserve + /* Now lower ourselves from the highest interrupt level to * the lowest. We do this by masking all interrupts but 15, * setting the 15 handler to ".Lenable_nested", raising the 15 -- 2.8.0.rc3.226.g39d4020