Skip to contentSkip to conversation

DaVinci now respects SKIP_LOWLEVEL_INIT

PATCH New David Brownell 4 participants 9 messages Apr 12, 2009 – Apr 17, 2009 Arm/actions semi architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DaVinci now respects SKIP_LOWLEVEL_INIT

From: David Brownell <[email protected]>

Don't needlessly include lowlevel init code; that's only really needed with boot-from NOR (not boot-from-NAND). The 2nd stage loader (UBL) handles that before it loads U-Boot.

cpu/arm926ejs/davinci/lowlevel_init.S +4 -0
@@ -45,6 +45,8 @@
 
 #include <config.h>
 
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
+
 .globl	lowlevel_init
 lowlevel_init:
 
@@ -705,3 +707,5 @@ DDR2_START_ADDR:
 	.word	0x80000000
 DUMMY_VAL:
 	.word	0xa55aa55a
+
+#endif /* !CONFIG_SKIP_LOWLEVEL_INIT */
#1 lore raw

PATCH 1/1 DaVinci now respects SKIP_LOWLEVEL_INIT

Quoted 11 lines · David Brownell

From: David Brownell <[email protected]>

Don't needlessly include lowlevel init code; that's only really needed with boot-from NOR (not boot-from-NAND). The 2nd stage loader (UBL) handles that before it loads U-Boot.

cpu/arm926ejs/davinci/lowlevel_init.S line 48

Quoted 4 lines
cpu/arm926ejs/davinci/lowlevel_init.S +1 -0
@@ -45,6 +45,8 @@
 
 #include <config.h>
 
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT

please move this to the Makefile

Best Regards,
J.

#2 lore raw

PATCH 1/1 DaVinci now respects SKIP_LOWLEVEL_INIT

Quoted 1 line · Jean-Christophe PLAGNIOL-VILLARD

please move this to the Makefile

===== CUT HERE
From: David Brownell <[email protected]>

Don't needlessly include lowlevel init code; that's only really needed with boot-from NOR (not boot-from-NAND). The 2nd stage loader (UBL) handles that before it loads U-Boot.

---
 cpu/arm926ejs/davinci/Makefile |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
cpu/arm926ejs/davinci/Makefile +5 -1
@@ -28,7 +28,11 @@ include $(TOPDIR)/config.mk
 LIB	= $(obj)lib$(SOC).a
 
 COBJS	= timer.o ether.o lxt972.o dp83848.o
-SOBJS	= lowlevel_init.o reset.o
+SOBJS	= reset.o
+
+ifndef CONFIG_SKIP_LOWLEVEL_INIT
+	SOBJS	+= lowlevel_init.o
+endif
 
 SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS) $(SOBJS))
#3 lore raw

PATCH 1/1 DaVinci now respects SKIP_LOWLEVEL_INIT

Dear David Brownell,

cpu/arm926ejs/davinci/Makefile include $(TOPDIR)/config.mk · line 35

Quoted 8 lines · In message <[email protected]> you wrote:

COBJS = timer.o ether.o lxt972.o dp83848.o

cpu/arm926ejs/davinci/Makefile +5 -1
-SOBJS	= lowlevel_init.o reset.o
+SOBJS	= reset.o
+
+ifndef CONFIG_SKIP_LOWLEVEL_INIT
+	SOBJS	+= lowlevel_init.o
+endif

Please don't do it like this. Please use the same style like everybody else.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Only a fool fights in a burning house.
	-- Kank the Klingon, "Day of the Dove", stardate unknown
#4 lore raw

PATCH 1/1 DaVinci now respects SKIP_LOWLEVEL_INIT

Quoted 2 lines · Wolfgang Denk

Please don't do it like this. Please use the same style like everybody else.

Having to guess .. you mean don't indent?

========== CUT HERE
From: David Brownell <[email protected]>

Don't needlessly include lowlevel init code; that's only really needed with boot-from NOR (not boot-from-NAND). The 2nd stage loader (UBL) handles that before it loads U-Boot.

---
 cpu/arm926ejs/davinci/Makefile |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
cpu/arm926ejs/davinci/Makefile +5 -1
@@ -28,7 +28,11 @@ include $(TOPDIR)/config.mk
 LIB	= $(obj)lib$(SOC).a
 
 COBJS	= timer.o ether.o lxt972.o dp83848.o
-SOBJS	= lowlevel_init.o reset.o
+SOBJS	= reset.o
+
+ifndef CONFIG_SKIP_LOWLEVEL_INIT
+SOBJS	+= lowlevel_init.o
+endif
 
 SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS) $(SOBJS))
#5 lore raw

PATCH 1/1 DaVinci now respects SKIP_LOWLEVEL_INIT

Hi

2009/4/14 David Brownell <[email protected]>:

Quoted 24 lines · Wolfgang Denk
Quoted 2 lines

Please don't do it like this. Please use the same style like everybody else.

Having to guess .. you mean don't indent?

========== CUT HERE
From: David Brownell <[email protected]>

Don't needlessly include lowlevel init code; that's only really needed with boot-from NOR (not boot-from-NAND). ?The 2nd stage loader (UBL) handles that before it loads U-Boot.

---
?cpu/arm926ejs/davinci/Makefile | ? ?6 +++++-
?1 file changed, 5 insertions(+), 1 deletion(-)

cpu/arm926ejs/davinci/Makefile +0 -0
@@ -28,7 +28,11 @@ include $(TOPDIR)/config.mk

?LIB ? ?= $(obj)lib$(SOC).a

?COBJS ?= timer.o ether.o lxt972.o dp83848.o

cpu/arm926ejs/davinci/Makefile include $(TOPDIR)/config.mk · line 35

Quoted 6 lines
cpu/arm926ejs/davinci/Makefile +5 -1
-SOBJS ?= lowlevel_init.o reset.o
+SOBJS ?= reset.o
+
+ifndef CONFIG_SKIP_LOWLEVEL_INIT
+SOBJS ?+= lowlevel_init.o
+endif

I was about to suggest that they were hinting at something like:
SOBJS-$(CONFIG_SKIP_LOWLEVEL_INIT) += lowlevel_init.o

But then I realized that lowlevel_init.o should be omitted if SKIP_LOWLEVEL.. is defined, and I don't know how to do that.

Regards, Magnus

#6 lore raw

PATCH 1/1 DaVinci now respects SKIP_LOWLEVEL_INIT

In reply to David Brownell
Quoted 5 lines · David Brownell
Quoted 2 lines · Wolfgang Denk

Please don't do it like this. Please use the same style like everybody else.

Having to guess .. you mean don't indent?

yes

please move the Makefile to SOBJS-y COBJS-y

Best Regards,
J.

#7 lore raw

PATCH 1/1 DaVinci now respects SKIP_LOWLEVEL_INIT

Quoted 1 line · Jean-Christophe PLAGNIOL-VILLARD

please move the Makefile to SOBJS-y COBJS-y

I'm not following. A quick scan of boards I've used shows most of them using SOBJS, rather than SOBJS-y.

And how would you propose making a *negative* config option (as in $SUBJECT) fit into that SOBJ-$(X) framework?

I'd have expected you to want such a change in a separate patch too, since it's unrelated to $SUBJECT ... ;)

#8 lore raw

PATCH 1/1 DaVinci now respects SKIP_LOWLEVEL_INIT

Quoted 8 lines · David Brownell
Quoted 1 line · Jean-Christophe PLAGNIOL-VILLARD

please move the Makefile to SOBJS-y COBJS-y

I'm not following. A quick scan of boards I've used shows most of them using SOBJS, rather than SOBJS-y.

And how would you propose making a *negative* config option (as in $SUBJECT) fit into that SOBJ-$(X) framework?

yes you can not do it so the ifndef is correct

Quoted 3 lines

I'd have expected you to want such a change in a separate patch too, since it's unrelated to $SUBJECT ... ;)

yes for the current one the remove of the tab is enough

Best Regards,
J.