Patchwork [U-Boot,v3,1/2] drivers: spi: modify soft spi driver

login
register
mail settings
Submitter Piotr Wilczek
Date Sept. 24, 2012, 11:56 a.m.
Message ID <1348487791-18435-2-git-send-email-p.wilczek@samsung.com>
Download mbox | patch
Permalink /patch/186386/
State Rejected
Delegated to: Minkyu Kang
Headers show

Comments

Piotr Wilczek - Sept. 24, 2012, 11:56 a.m.
This patch add #ifdef CONFIG_SYS_IMMR in spi_init function

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
Changes in v2:
- removed space between # and include;
- changed return in spi_cs_is_valid function;
Changes in v3:
- New patch from splited v2:

 drivers/spi/soft_spi.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c
index 13df8cb..1e7e9f7 100644
--- a/drivers/spi/soft_spi.c
+++ b/drivers/spi/soft_spi.c
@@ -26,6 +26,7 @@ 
 
 #include <common.h>
 #include <spi.h>
+#include <asm/gpio.h>
 
 #include <malloc.h>
 
@@ -59,7 +60,9 @@  static inline struct soft_spi_slave *to_soft_spi(struct spi_slave *slave)
 void spi_init (void)
 {
 #ifdef	SPI_INIT
+#ifdef CONFIG_SYS_IMMR
 	volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
+#endif
 
 	SPI_INIT;
 #endif