diff mbox

[U-Boot,4/9] tegra: Add SPL build support to tegra boards

Message ID 1336633347-8049-5-git-send-email-amartin@nvidia.com
State Superseded
Headers show

Commit Message

Allen Martin May 10, 2012, 7:02 a.m. UTC
Include board.c for both SPL and non-SPL build.  Don't use timer_init
from board.c for SPL build.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 board/nvidia/common/Makefile |    2 +-
 board/nvidia/common/board.c  |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Stephen Warren May 15, 2012, 4:55 a.m. UTC | #1
On 05/10/2012 01:02 AM, Allen Martin wrote:
> Include board.c for both SPL and non-SPL build.  Don't use timer_init
> from board.c for SPL build.
> 
> Signed-off-by: Allen Martin <amartin@nvidia.com>

> diff --git a/board/nvidia/common/Makefile b/board/nvidia/common/Makefile

If we're already not building board.c for non-Cortex A9 (so not for SPL)

> -COBJS-y += board.o
> +COBJS-$(CONFIG_ARMCORTEXA9) += board.o

> diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c

> +#ifndef CONFIG_SPL_BUILD

I'm not sure that this ifdef is necessary since !CONFIG_SPL_BUILD any
time this file is compiled?
Allen Martin May 18, 2012, 10:42 p.m. UTC | #2
On Mon, May 14, 2012 at 09:55:20PM -0700, Stephen Warren wrote:
> On 05/10/2012 01:02 AM, Allen Martin wrote:
> > Include board.c for both SPL and non-SPL build.  Don't use timer_init
> > from board.c for SPL build.
> > 
> > Signed-off-by: Allen Martin <amartin@nvidia.com>
> 
> > diff --git a/board/nvidia/common/Makefile b/board/nvidia/common/Makefile
> 
> If we're already not building board.c for non-Cortex A9 (so not for SPL)
> 
> > -COBJS-y += board.o
> > +COBJS-$(CONFIG_ARMCORTEXA9) += board.o
> 
> > diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
> 
> > +#ifndef CONFIG_SPL_BUILD
> 
> I'm not sure that this ifdef is necessary since !CONFIG_SPL_BUILD any
> time this file is compiled?

Oh you're right, looks like my commit message is wrong too, I'll take
another look.

-Allen
diff mbox

Patch

diff --git a/board/nvidia/common/Makefile b/board/nvidia/common/Makefile
index 3e748fd..ac3b9cd 100644
--- a/board/nvidia/common/Makefile
+++ b/board/nvidia/common/Makefile
@@ -25,7 +25,7 @@  endif
 
 LIB	= $(obj)lib$(VENDOR).o
 
-COBJS-y += board.o
+COBJS-$(CONFIG_ARMCORTEXA9) += board.o
 COBJS-$(CONFIG_SPI_UART_SWITCH) += uart-spi-switch.o
 
 COBJS	:= $(COBJS-y)
diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index 85dd359..678a986 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -43,6 +43,7 @@  const struct tegra2_sysinfo sysinfo = {
 	CONFIG_TEGRA2_BOARD_STRING
 };
 
+#ifndef CONFIG_SPL_BUILD
 /*
  * Routine: timer_init
  * Description: init the timestamp and lastinc value
@@ -51,6 +52,7 @@  int timer_init(void)
 {
 	return 0;
 }
+#endif
 
 void __pin_mux_usb(void)
 {