Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
/*
* The following are used to control the SPI chip selects for the SPI command.
*/
/*
* The following are used to control the SPI chip selects for the SPI command.
*/
+#ifdef CONFIG_MPC8XXX_SPI
#define SPI_CS_MASK 0x80000000
#define SPI_CS_MASK 0x80000000
-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
COBJS-$(CONFIG_ATMEL_SPI) += atmel_spi.o
COBJS-$(CONFIG_MXC_SPI) += mxc_spi.o
-#if defined(CONFIG_MPC8XXX_SPI) && defined(CONFIG_HARD_SPI)
#include <malloc.h>
#include <spi.h>
#include <malloc.h>
#include <spi.h>
-#endif /* CONFIG_HARD_SPI */
/* SPI */
#define CONFIG_MPC8XXX_SPI
/* 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 */
#undef CONFIG_SOFT_SPI /* SPI bit-banged */
/* GPIOs. Used as SPI chip selects */
#ifndef _SPI_H_
#define _SPI_H_
#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 */
/* SPI mode flags */
#define SPI_CPHA 0x01 /* clock phase */
#define SPI_CPOL 0x02 /* clock polarity */
defined(CONFIG_SOFT_I2C)
#include <i2c.h>
#endif
defined(CONFIG_SOFT_I2C)
#include <i2c.h>
#endif
-#if defined(CONFIG_HARD_SPI)
#include <nand.h>
static char *failed = "*** failed ***\n";
#include <nand.h>
static char *failed = "*** failed ***\n";