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

Allen Martin
2012-05-10T07:02:22Z

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(-)

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)
{
--
1.7.9.5