From: Ladislav Michl Date: Sat, 9 Feb 2008 01:43:52 +0100 Subject: [U-Boot-Users] [PATCH] [DRIVERS] is only available for ppc boards. In-Reply-To: References: <000201c85ea6$cf35c9d0$9a4d010a@Emea.Arm.com> <2acbd3e40801240850k6d7a5714n61479666d7cf9afe@mail.gmail.com> <20080124110130.ff642252.kim.phillips@freescale.com> <20080208224807.GA15511@michl.2n.cz> Message-ID: <20080209004352.GA24341@michl.2n.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 * Convert drivers/spi/Makefile to use CONFIG_ fixes " 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 #include -#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 */