From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 12 Apr 2016 00:52:07 +0200 Subject: [U-Boot] [PATCH] m68k: fix broken buildman m68k In-Reply-To: <1460413859-30790-1-git-send-email-angelo@sysam.it> References: <1460413859-30790-1-git-send-email-angelo@sysam.it> Message-ID: <570C2A97.7040707@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/12/2016 12:30 AM, Angelo Dureghello wrote: > fix 19/48 broken board compilations, due to a now too smal 16-bit > relative jump Won't it make sense to tweak the linker script to put those functions closer together instead ? > Signed-off-by: Angelo Dureghello > --- > arch/m68k/cpu/mcf523x/start.S | 8 ++++++-- > arch/m68k/cpu/mcf52x2/start.S | 8 ++++++-- > arch/m68k/cpu/mcf532x/start.S | 8 ++++++-- > arch/m68k/cpu/mcf5445x/start.S | 8 ++++++-- > 4 files changed, 24 insertions(+), 8 deletions(-) > > diff --git a/arch/m68k/cpu/mcf523x/start.S b/arch/m68k/cpu/mcf523x/start.S > index 8a23e72..1702f98 100644 > --- a/arch/m68k/cpu/mcf523x/start.S > +++ b/arch/m68k/cpu/mcf523x/start.S > @@ -141,8 +141,12 @@ _start: > > move.l #__got_start, %a5 /* put relocation table address to a5 */ > > - bsr cpu_init_f /* run low-level CPU init code (from flash) */ > - bsr board_init_f /* run low-level board init code (from flash) */ > + /* run low-level CPU init code (from flash) */ > + move.l #cpu_init_f, %a1 > + jsr (%a1) > + /* run low-level board init code (from flash) */ > + move.l #board_init_f, %a1 > + jsr (%a1) > > /* board_init_f() does not return */ > > diff --git a/arch/m68k/cpu/mcf52x2/start.S b/arch/m68k/cpu/mcf52x2/start.S > index 8a59496..4af691f 100644 > --- a/arch/m68k/cpu/mcf52x2/start.S > +++ b/arch/m68k/cpu/mcf52x2/start.S > @@ -198,8 +198,12 @@ _after_flashbar_copy: > > move.l #__got_start, %a5 /* put relocation table address to a5 */ > > - bsr cpu_init_f /* run low-level CPU init code (from flash) */ > - bsr board_init_f /* run low-level board init code (from flash) */ > + /* run low-level CPU init code (from flash) */ > + move.l #cpu_init_f, %a1 > + jsr (%a1) > + /* run low-level board init code (from flash) */ > + move.l #board_init_f, %a1 > + jsr (%a1) > > /* board_init_f() does not return */ > > diff --git a/arch/m68k/cpu/mcf532x/start.S b/arch/m68k/cpu/mcf532x/start.S > index 3b9ede0..131ad6e 100644 > --- a/arch/m68k/cpu/mcf532x/start.S > +++ b/arch/m68k/cpu/mcf532x/start.S > @@ -155,8 +155,12 @@ _start: > > move.l #__got_start, %a5 /* put relocation table address to a5 */ > > - bsr cpu_init_f /* run low-level CPU init code (from flash) */ > - bsr board_init_f /* run low-level board init code (from flash) */ > + /* run low-level CPU init code (from flash) */ > + move.l #cpu_init_f, %a1 > + jsr (%a1) > + /* run low-level board init code (from flash) */ > + move.l #board_init_f, %a1 > + jsr (%a1) > > /* board_init_f() does not return */ > > diff --git a/arch/m68k/cpu/mcf5445x/start.S b/arch/m68k/cpu/mcf5445x/start.S > index ae261b1..f50f147 100644 > --- a/arch/m68k/cpu/mcf5445x/start.S > +++ b/arch/m68k/cpu/mcf5445x/start.S > @@ -664,8 +664,12 @@ _start: > > move.l #__got_start, %a5 /* put relocation table address to a5 */ > > - bsr cpu_init_f /* run low-level CPU init code (from flash) */ > - bsr board_init_f /* run low-level board init code (from flash) */ > + /* run low-level CPU init code (from flash) */ > + move.l #cpu_init_f, %a1 > + jsr (%a1) > + /* run low-level board init code (from flash) */ > + move.l #board_init_f, %a1 > + jsr (%a1) > > /* board_init_f() does not return */ > > -- Best regards, Marek Vasut