Skip to contentSkip to conversation

ppc/85xx: Fix building NAND_SPL out of tree

PATCH New Kumar Gala 1 participant 4 messages Oct 27, 2009

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 ppc/85xx: Fix building NAND_SPL out of tree

We need to source files to exist in the O=<FOO> nand_spl dir when we build out of tree.

---
 nand_spl/board/freescale/mpc8536ds/Makefile |    6 ++++++
 nand_spl/board/freescale/p1_p2_rdb/Makefile |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
nand_spl/board/freescale/mpc8536ds/Makefile +6 -0
index 1d5e319..7ed9d61 100644
@@ -111,6 +111,12 @@ $(obj)tlb_table.c:
 	@rm -f $(obj)tlb_table.c
 	ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
 
+ifneq ($(OBJTREE), $(SRCTREE))
+$(obj)nand_boot.c:
+	@rm -f $(obj)nand_boot.c
+	ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
+endif
+
 #########################################################################
 
 $(obj)%.o:	$(obj)%.S
nand_spl/board/freescale/p1_p2_rdb/Makefile +6 -0
index 1d5e319..7ed9d61 100644
@@ -111,6 +111,12 @@ $(obj)tlb_table.c:
 	@rm -f $(obj)tlb_table.c
 	ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
 
+ifneq ($(OBJTREE), $(SRCTREE))
+$(obj)nand_boot.c:
+	@rm -f $(obj)nand_boot.c
+	ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
+endif
+
 #########################################################################
 
 $(obj)%.o:	$(obj)%.S
Signature · 1 line
1.6.0.6
author
#1 lore raw

PATCH 1/1 ppc/85xx: Fix compiler warning in nand_spl/.../p1_p2_rdb/nand_boot.c

nand_boot.c: In function 'board_init_f':
nand_boot.c:44: warning: 'sys_clk' may be used uninitialized in this function

---
 nand_spl/board/freescale/p1_p2_rdb/nand_boot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
nand_spl/board/freescale/p1_p2_rdb/nand_boot.c +1 -1
index bd513b8..af442ea 100644
@@ -41,7 +41,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 void board_init_f(ulong bootflag)
 {
-	uint plat_ratio, bus_clk, sys_clk;
+	uint plat_ratio, bus_clk, sys_clk = 0;
 	volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
 	volatile ccsr_gpio_t *pgpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR);
 	uint val, temp, sysclk_mask;
Signature · 1 line
1.6.0.6
author Applied
#2 lore raw

PATCH 1/1 ppc/85xx: Fix compiler warning in nand_spl/.../p1_p2_rdb/nand_boot.c

Quoted 8 lines · Kumar Gala

nand_boot.c: In function 'board_init_f':
nand_boot.c:44: warning: 'sys_clk' may be used uninitialized in this function

---
nand_spl/board/freescale/p1_p2_rdb/nand_boot.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)

applied to 85xx.

- k

author Applied
#3 lore raw

PATCH 1/1 ppc/85xx: Fix building NAND_SPL out of tree

In reply to Kumar Gala
Quoted 8 lines · Kumar Gala

We need to source files to exist in the O=<FOO> nand_spl dir when we build out of tree.

---

nand_spl/board/freescale/mpc8536ds/Makefile |    6 ++++++
nand_spl/board/freescale/p1_p2_rdb/Makefile |    6 ++++++
2 files changed, 12 insertions(+), 0 deletions(-)

applied to 85xx.

- k