[U-Boot,v2,8/9] board_r: fix build with DM_SPI
diff mbox series

Message ID 90668e18ab8c064e4a22e6fa9576b7ba474bfd0d.1542749104.git.christophe.leroy@c-s.fr
State Accepted
Delegated to: Tom Rini
Headers show
Series
  • [U-Boot,v2,1/9] powerpc, mpc8xx: clear top of stack
Related show

Commit Message

Christophe Leroy Nov. 21, 2018, 8:51 a.m. UTC
CC      common/board_r.o
common/board_r.c:747:2: error: ‘initr_spi’ undeclared here (not in a function)
  initr_spi,
  ^
make[1]: *** [common/board_r.o] Error 1

Fixes: ebe76a2df9f6 ("dm: Remove spi_init() from board_r.c when using driver model")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 common/board_r.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jagan Teki Nov. 21, 2018, 9:11 a.m. UTC | #1
On Wed, Nov 21, 2018 at 2:21 PM Christophe Leroy
<christophe.leroy@c-s.fr> wrote:
>
>   CC      common/board_r.o
> common/board_r.c:747:2: error: ‘initr_spi’ undeclared here (not in a function)
>   initr_spi,
>   ^
> make[1]: *** [common/board_r.o] Error 1

I have a patch to remove this code, which is not doing anything. will
take care while applying your dm patch.
Tom Rini Dec. 3, 2018, 10:50 p.m. UTC | #2
On Wed, Nov 21, 2018 at 08:51:55AM +0000, Christophe Leroy wrote:

> CC      common/board_r.o
> common/board_r.c:747:2: error: ‘initr_spi’ undeclared here (not in a function)
>   initr_spi,
>   ^
> make[1]: *** [common/board_r.o] Error 1
> 
> Fixes: ebe76a2df9f6 ("dm: Remove spi_init() from board_r.c when using driver model")
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

Applied to u-boot/master, thanks!

Patch
diff mbox series

diff --git a/common/board_r.c b/common/board_r.c
index c55e33eec27..0c2129b8ceb 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -743,7 +743,7 @@  static init_fnc_t init_sequence_r[] = {
 	/* initialize higher level parts of CPU like time base and timers */
 	cpu_init_r,
 #endif
-#ifdef CONFIG_PPC
+#if defined(CONFIG_PPC) && !defined(CONFIG_DM_SPI)
 	initr_spi,
 #endif
 #ifdef CONFIG_CMD_NAND