From: Simon Glass <sjg@chromium.org>
Date: Tue, 14 Oct 2014 05:41:54 +0000 (-0600)
Subject: dm: Remove spi_init() from board_r.c when using driver model
X-Git-Tag: v2025.01-rc5-pxa1908~14533^2~36
X-Git-Url: http://git.dujemihanovic.xyz/%22bddb.css/static/git-logo.png?a=commitdiff_plain;h=ebe76a2df9f6b82f41ec61d36d45bce56d556f17;p=u-boot.git

dm: Remove spi_init() from board_r.c when using driver model

Driver model does its own init, so we don't need this.

There is still a call in board_f.c but it is only enabled by CONFIG_HARD_SPI.
It is easy enough to disable that option when converting boards which use
it to driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
---

diff --git a/common/board_r.c b/common/board_r.c
index 7e1a76d97f..3affb6362f 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -354,7 +354,7 @@ static int initr_flash(void)
 }
 #endif
 
-#ifdef CONFIG_PPC
+#if defined(CONFIG_PPC) && !defined(CONFIG_DM_SPI)
 static int initr_spi(void)
 {
 	/* PPC does this here */