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

Piotr Wilczek p.wilczek at samsung.com
Mon Sep 24 13:56:30 CEST 2012


This patch add #ifdef CONFIG_SYS_IMMR in spi_init function

Signed-off-by: Piotr Wilczek <p.wilczek at samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
CC: Minkyu Kang <mk7.kang at samsung.com>
CC: Wolfgang Denk <wd at denx.de>
CC: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at 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(-)

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
-- 
1.7.5.4



More information about the U-Boot mailing list