This patch add #ifdef CONFIG_SYS_IMMR in spi_init function
Signed-off-by: Piotr Wilczek <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
CC: Minkyu Kang <[email protected]>
CC: Wolfgang Denk <[email protected]>
CC: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
---
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
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot