]> git.sur5r.net Git - u-boot/commitdiff
Move conditional compilation of MPC8XXX SPI driver to Makefile
authorBen Warren <biggerbadderben@gmail.com>
Mon, 9 Jun 2008 06:28:33 +0000 (23:28 -0700)
committerWolfgang Denk <wd@denx.de>
Tue, 1 Jul 2008 19:02:11 +0000 (21:02 +0200)
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
board/freescale/mpc8349emds/mpc8349emds.c
drivers/spi/Makefile
drivers/spi/mpc8xxx_spi.c
include/configs/MPC8349EMDS.h
include/spi.h
lib_ppc/board.c

index 4d57fafc9ad33d9661b356148d587ccc32be0365..9a312c37b67af0283c6bacb42bdc01c833668162 100644 (file)
@@ -253,7 +253,7 @@ void sdram_init(void)
 /*
  * The following are used to control the SPI chip selects for the SPI command.
  */
-#ifdef CONFIG_HARD_SPI
+#ifdef CONFIG_MPC8XXX_SPI
 
 #define SPI_CS_MASK    0x80000000
 
index e66e0ee092f341fc87af6d2dafbfc417e079cf54..4f7b679eeb2f86e48ec6c571bfa6e0b2004d2c06 100644 (file)
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libspi.a
 
-COBJS-y += mpc8xxx_spi.o
+COBJS-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o
 COBJS-$(CONFIG_ATMEL_SPI) += atmel_spi.o
 COBJS-$(CONFIG_MXC_SPI) += mxc_spi.o
 
index 136fb50052f1902c1cc285f0dfe46b880a3cbe8e..9eaf9860b4f83d720cffa7661c5c24a3fdc397d7 100644 (file)
@@ -22,7 +22,6 @@
  */
 
 #include <common.h>
-#if defined(CONFIG_MPC8XXX_SPI) && defined(CONFIG_HARD_SPI)
 
 #include <malloc.h>
 #include <spi.h>
@@ -180,4 +179,3 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
 
        return 0;
 }
-#endif                         /* CONFIG_HARD_SPI */
index 37e3ca40b3f52c3ec57d2b57c807a764c8ac7aa4..870583845d9ca706e6b492067a4e10f500196eec 100644 (file)
 
 /* SPI */
 #define CONFIG_MPC8XXX_SPI
-#define CONFIG_HARD_SPI                        /* SPI with hardware support */
 #undef CONFIG_SOFT_SPI                 /* SPI bit-banged */
 
 /* GPIOs.  Used as SPI chip selects */
index 7744c2e36b057c02e9d22be42be6a6dd6a1f330d..320e50e5296ca1914cc30c36c882cf576abdd4a5 100644 (file)
 #ifndef _SPI_H_
 #define _SPI_H_
 
+/* Controller-specific definitions: */
+
+/* CONFIG_HARD_SPI triggers SPI bus initialization in PowerPC */
+#ifdef CONFIG_MPC8XXX_SPI
+# ifndef CONFIG_HARD_SPI
+#  define CONFIG_HARD_SPI
+# endif
+#endif
+
 /* SPI mode flags */
 #define        SPI_CPHA        0x01                    /* clock phase */
 #define        SPI_CPOL        0x02                    /* clock polarity */
index c42e08862fc87321c86261fcf8fb14f5d7f86b1b..96c573ce17f449a7fd423fc18a2a45fa9de6a356 100644 (file)
@@ -90,9 +90,7 @@ void doc_init (void);
     defined(CONFIG_SOFT_I2C)
 #include <i2c.h>
 #endif
-#if defined(CONFIG_HARD_SPI)
 #include <spi.h>
-#endif
 #include <nand.h>
 
 static char *failed = "*** failed ***\n";