[U-Boot-Users] [PATCH] [DRIVERS] <asm/mpc8xxx_spi.h> is only available for ppc boards.
Ladislav Michl
ladis at linux-mips.org
Sat Feb 9 01:43:52 CET 2008
On Fri, Feb 08, 2008 at 07:10:44PM -0500, Ben Warren wrote:
> Here's the patch that will be going in:
> http://article.gmane.org/gmane.comp.boot-loaders.u-boot/36039
>
> I guess Wolfgang just hasn't had a chance to pull the 83xx tree.
>
> CONFIG_HARD_SPI is intended to be used by multiple controllers, not
> just MPC_8XXX
Okay, I just tried to use the same logic - no functional changes. What
about this as a replacement of above mentioned patch? (note that we are
trying to migrate towards COBJS-$(CONFIG_*) += file.o in Makefiles
instead of #ifdefs inside each file)
Signed-off-by: Ladislav Michl <ladis at linux-mips.org>
* Convert drivers/spi/Makefile to use CONFIG_
fixes "<asm/mpc8xxx_spi.h> is only available for ppc board" bug
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 0b7a2df..be62089 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -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 := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c
index a3d1c95..5635047 100644
--- a/drivers/spi/mpc8xxx_spi.c
+++ b/drivers/spi/mpc8xxx_spi.c
@@ -25,8 +25,6 @@
#include <spi.h>
#include <asm/mpc8xxx_spi.h>
-#ifdef CONFIG_HARD_SPI
-
#define SPI_EV_NE (0x80000000 >> 22) /* Receiver Not Empty */
#define SPI_EV_NF (0x80000000 >> 23) /* Transmitter Not Full */
@@ -140,4 +138,3 @@ int spi_xfer(spi_chipsel_type chipsel, int bitlen, uchar *dout, uchar *din)
return 0;
}
-#endif /* CONFIG_HARD_SPI */
diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h
index 07f2f30..bb90c2d 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -356,6 +356,7 @@
#define CFG_I2C2_OFFSET 0x3100
/* SPI */
+#define CONFIG_MPC8XXX_SPI
#define CONFIG_HARD_SPI /* SPI with hardware support */
#undef CONFIG_SOFT_SPI /* SPI bit-banged */
More information about the U-Boot
mailing list