From patchwork Thu Jun 13 10:59:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 251040 X-Patchwork-Delegate: daniel.schwierzeck@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 494932C009E for ; Thu, 13 Jun 2013 21:00:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 352114A0C1; Thu, 13 Jun 2013 13:00:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cT9BJl22XV1m; Thu, 13 Jun 2013 13:00:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 457E54A044; Thu, 13 Jun 2013 13:00:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 00EC34A027 for ; Thu, 13 Jun 2013 13:00:04 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G6KI70xEYIbH for ; Thu, 13 Jun 2013 12:59:57 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) by theia.denx.de (Postfix) with ESMTPS id 688334A020 for ; Thu, 13 Jun 2013 12:59:50 +0200 (CEST) X-Virus-Scanned: at arrakis.dune.hu Received: from localhost.localdomain (catvpool-576570d8.szarvasnet.hu [87.101.112.216]) by arrakis.dune.hu (Postfix) with ESMTPSA id E4D1C283C2A; Thu, 13 Jun 2013 12:58:24 +0200 (CEST) From: Gabor Juhos To: u-boot@lists.denx.de Date: Thu, 13 Jun 2013 12:59:29 +0200 Message-Id: <1371121176-20256-4-git-send-email-juhosg@openwrt.org> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1371121176-20256-1-git-send-email-juhosg@openwrt.org> References: <1371121176-20256-1-git-send-email-juhosg@openwrt.org> Subject: [U-Boot] [PATCH 03/10] MIPS: xburst/start.S: save relocation address in s2 register X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Synchronize the code with mips{32,64}/start.S, in order to allow further unifications. Signed-off-by: Gabor Juhos Cc: Daniel Schwierzeck --- arch/mips/cpu/xburst/start.S | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/mips/cpu/xburst/start.S b/arch/mips/cpu/xburst/start.S index d2c064b..33111c7 100644 --- a/arch/mips/cpu/xburst/start.S +++ b/arch/mips/cpu/xburst/start.S @@ -63,8 +63,10 @@ _start: relocate_code: move sp, a0 # set new stack pointer + move s2, a2 # save destination address in s2 + li t0, CONFIG_SYS_MONITOR_BASE - sub t6, a2, t0 # t6 <-- relocation offset + sub t6, s2, t0 # t6 <-- relocation offset la t3, in_ram lw t2, -12(t3) # t2 <-- __image_copy_end @@ -112,7 +114,7 @@ relocate_code: nop /* Jump to where we've relocated ourselves */ - addi t0, a2, in_ram - _start + addi t0, s2, in_ram - _start jr t0 nop @@ -187,6 +189,6 @@ in_ram: move a0, a1 # a0 <-- gd la t9, board_init_r jr t9 - move a1, a2 + move a1, s2 .end relocate_code