diff mbox

[U-Boot,v2] mx6: Remove lowlevel_init.S

Message ID 1348331077-6914-1-git-send-email-festevam@gmail.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Fabio Estevam Sept. 22, 2012, 4:24 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

lowlevel_init.S is not used on mx6, so remove the file and the associated calls.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Also remove SOBJS

 arch/arm/cpu/armv7/mx6/Makefile        |    5 ++---
 arch/arm/cpu/armv7/mx6/lowlevel_init.S |   25 -------------------------
 arch/arm/cpu/armv7/start.S             |   24 ------------------------
 3 files changed, 2 insertions(+), 52 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/mx6/lowlevel_init.S

Comments

Stefano Babic Sept. 25, 2012, 1:07 p.m. UTC | #1
On 22/09/2012 18:24, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> lowlevel_init.S is not used on mx6, so remove the file and the associated calls.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, next branch, thanks.

Best regards,
Stefano Babic
Stefano Babic Sept. 28, 2012, 8:30 a.m. UTC | #2
On 22/09/2012 18:24, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> lowlevel_init.S is not used on mx6, so remove the file and the associated calls.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Hi Fabio,

I am testing the -next branch. MX5 does not boot anymore - I have tested
on MX53. In fact:

> Changes since v1:
> - Also remove SOBJS
> 
>  arch/arm/cpu/armv7/mx6/Makefile        |    5 ++---
>  arch/arm/cpu/armv7/mx6/lowlevel_init.S |   25 -------------------------
>  arch/arm/cpu/armv7/start.S             |   24 ------------------------
>  3 files changed, 2 insertions(+), 52 deletions(-)
>  delete mode 100644 arch/arm/cpu/armv7/mx6/lowlevel_init.S
> 
> diff --git a/arch/arm/cpu/armv7/mx6/Makefile b/arch/arm/cpu/armv7/mx6/Makefile
> index cbce411..10f512f 100644
> --- a/arch/arm/cpu/armv7/mx6/Makefile
> +++ b/arch/arm/cpu/armv7/mx6/Makefile
> @@ -28,10 +28,9 @@ include $(TOPDIR)/config.mk
>  LIB	= $(obj)lib$(SOC).o
>  
>  COBJS	= soc.o clock.o
> -SOBJS   = lowlevel_init.o
>  
> -SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
> -OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
> +SRCS	:= $(COBJS:.o=.c)
> +OBJS	:= $(addprefix $(obj), $(COBJS))
>  
>  all:	$(obj).depend $(LIB)
>  
> diff --git a/arch/arm/cpu/armv7/mx6/lowlevel_init.S b/arch/arm/cpu/armv7/mx6/lowlevel_init.S
> deleted file mode 100644
> index acadef2..0000000
> --- a/arch/arm/cpu/armv7/mx6/lowlevel_init.S
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -/*
> - * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
> - *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License as
> - * published by the Free Software Foundation; either version 2 of
> - * the License, or (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> - * MA 02111-1307 USA
> - */
> -.section ".text.init", "x"
> -
> -#include <linux/linkage.h>
> -
> -ENTRY(lowlevel_init)
> -	mov pc, lr
> -ENDPROC(lowlevel_init)
> diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
> index 32658eb..4c7c385 100644
> --- a/arch/arm/cpu/armv7/start.S
> +++ b/arch/arm/cpu/armv7/start.S
> @@ -152,7 +152,6 @@ reset:
>  	/* the mask ROM code should have PLL and others stable */
>  #ifndef CONFIG_SKIP_LOWLEVEL_INIT
>  	bl	cpu_init_cp15
> -	bl	cpu_init_crit

What does happen now to the poor MX5 ? lowlevel_init is not called
anymore, I presume...

Maybe it is better to add a weak function in MX6 cpu code. This let Eric
to add a custom lowlevel_init, as he asked.

Do you agree ?

Best regards,
Stefano
Fabio Estevam Sept. 28, 2012, 1:21 p.m. UTC | #3
Hi Stefano,

On Fri, Sep 28, 2012 at 5:30 AM, Stefano Babic <sbabic@denx.de> wrote:

> What does happen now to the poor MX5 ? lowlevel_init is not called
> anymore, I presume...

Which board did you test this with, please?

Regards,

Fabio Estevam
Benoît Thébaudeau Sept. 28, 2012, 1:35 p.m. UTC | #4
Hi Fabio,

On Friday, September 28, 2012 3:21:22 PM, Fabio Estevam wrote:
> Hi Stefano,
> 
> On Fri, Sep 28, 2012 at 5:30 AM, Stefano Babic <sbabic@denx.de>
> wrote:
> 
> > What does happen now to the poor MX5 ? lowlevel_init is not called
> > anymore, I presume...
> 
> Which board did you test this with, please?

I have the same issue with a custom i.MX51 board. I guess all i.MX5 boards are
affected because armv7 start.S should not have been altered by this patch.

Please use an empty weak default implementation for i.MX6 as Stefano suggested.

Best regards,
Benoît
Benoît Thébaudeau Sept. 28, 2012, 1:39 p.m. UTC | #5
On Friday, September 28, 2012 3:35:41 PM, Benoît Thébaudeau wrote:
> Hi Fabio,
> 
> On Friday, September 28, 2012 3:21:22 PM, Fabio Estevam wrote:
> > Hi Stefano,
> > 
> > On Fri, Sep 28, 2012 at 5:30 AM, Stefano Babic <sbabic@denx.de>
> > wrote:
> > 
> > > What does happen now to the poor MX5 ? lowlevel_init is not
> > > called
> > > anymore, I presume...
> > 
> > Which board did you test this with, please?
> 
> I have the same issue with a custom i.MX51 board. I guess all i.MX5
> boards are
> affected because armv7 start.S should not have been altered by this
> patch.
> 
> Please use an empty weak default implementation for i.MX6 as Stefano
> suggested.

Note that this default implementation can be put in start.S like what was done
for save_boot_params().

Best regards,
Benoît
Stefano Babic Sept. 28, 2012, 2:59 p.m. UTC | #6
On 28/09/2012 15:21, Fabio Estevam wrote:
> Hi Stefano,
> 
> On Fri, Sep 28, 2012 at 5:30 AM, Stefano Babic <sbabic@denx.de> wrote:
> 
>> What does happen now to the poor MX5 ? lowlevel_init is not called
>> anymore, I presume...
> 
> Which board did you test this with, please?

I tested on a mx53qsb, but I think it affects all MX5 boards.

Regards,
Stefano
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/mx6/Makefile b/arch/arm/cpu/armv7/mx6/Makefile
index cbce411..10f512f 100644
--- a/arch/arm/cpu/armv7/mx6/Makefile
+++ b/arch/arm/cpu/armv7/mx6/Makefile
@@ -28,10 +28,9 @@  include $(TOPDIR)/config.mk
 LIB	= $(obj)lib$(SOC).o
 
 COBJS	= soc.o clock.o
-SOBJS   = lowlevel_init.o
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
+SRCS	:= $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj), $(COBJS))
 
 all:	$(obj).depend $(LIB)
 
diff --git a/arch/arm/cpu/armv7/mx6/lowlevel_init.S b/arch/arm/cpu/armv7/mx6/lowlevel_init.S
deleted file mode 100644
index acadef2..0000000
--- a/arch/arm/cpu/armv7/mx6/lowlevel_init.S
+++ /dev/null
@@ -1,25 +0,0 @@ 
-/*
- * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-.section ".text.init", "x"
-
-#include <linux/linkage.h>
-
-ENTRY(lowlevel_init)
-	mov pc, lr
-ENDPROC(lowlevel_init)
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 32658eb..4c7c385 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -152,7 +152,6 @@  reset:
 	/* the mask ROM code should have PLL and others stable */
 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
 	bl	cpu_init_cp15
-	bl	cpu_init_crit
 #endif
 
 /* Set stackpointer in internal RAM to call board_init_f */
@@ -353,29 +352,6 @@  ENTRY(cpu_init_cp15)
 	mov	pc, lr			@ back to my caller
 ENDPROC(cpu_init_cp15)
 
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-/*************************************************************************
- *
- * CPU_init_critical registers
- *
- * setup important registers
- * setup memory timing
- *
- *************************************************************************/
-ENTRY(cpu_init_crit)
-	/*
-	 * Jump to board specific initialization...
-	 * The Mask ROM will have already initialized
-	 * basic memory. Go here to bump up clock rate and handle
-	 * wake up conditions.
-	 */
-	mov	ip, lr			@ persevere link reg across call
-	bl	lowlevel_init		@ go setup pll,mux,memory
-	mov	lr, ip			@ restore link
-	mov	pc, lr			@ back to my caller
-ENDPROC(cpu_init_crit)
-#endif
-
 #ifndef CONFIG_SPL_BUILD
 /*
  *************************************************************************