[U-Boot] [PATCH 6/7] powerpc, 8xx: move SPI driver to drivers/spi/

Christophe Leroy christophe.leroy at c-s.fr
Thu Jun 29 16:54:30 UTC 2017


Signed-off-by: Christophe Leroy <christophe.leroy at c-s.fr>
---
 arch/powerpc/cpu/mpc8xx/Makefile                          | 1 -
 drivers/spi/Kconfig                                       | 6 ++++++
 drivers/spi/Makefile                                      | 1 +
 arch/powerpc/cpu/mpc8xx/spi.c => drivers/spi/mpc8xx_spi.c | 3 ---
 4 files changed, 7 insertions(+), 4 deletions(-)
 rename arch/powerpc/cpu/mpc8xx/spi.c => drivers/spi/mpc8xx_spi.c (99%)

diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile
index c6b933b680..9f62454dfb 100644
--- a/arch/powerpc/cpu/mpc8xx/Makefile
+++ b/arch/powerpc/cpu/mpc8xx/Makefile
@@ -16,5 +16,4 @@ obj-y	+= interrupts.o
 obj-$(CONFIG_CMD_REGINFO) += reginfo.o
 obj-y	+= serial.o
 obj-y	+= speed.o
-obj-y	+= spi.o
 obj-y	+= plprcr_write.o
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index bef864f46e..03d0c05f23 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -223,4 +223,10 @@ config TI_QSPI
 	  Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms.
 	  This driver support spi flash single, quad and memory reads.
 
+config MPC8XX_SPI
+	bool "MPC8XX SPI Driver"
+	depends on 8xx
+	help
+	  Enable support for SPI on MPC8XX
+
 endmenu # menu "SPI Support"
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index c090562c77..9f8b86de76 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -30,6 +30,7 @@ obj-$(CONFIG_FSL_QSPI) += fsl_qspi.o
 obj-$(CONFIG_ICH_SPI) +=  ich.o
 obj-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o
 obj-$(CONFIG_LPC32XX_SSP) += lpc32xx_ssp.o
+obj-$(CONFIG_MPC8XX_SPI) += mpc8xx_spi.o
 obj-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o
 obj-$(CONFIG_MVEBU_A3700_SPI) += mvebu_a3700_spi.o
 obj-$(CONFIG_MXC_SPI) += mxc_spi.o
diff --git a/arch/powerpc/cpu/mpc8xx/spi.c b/drivers/spi/mpc8xx_spi.c
similarity index 99%
rename from arch/powerpc/cpu/mpc8xx/spi.c
rename to drivers/spi/mpc8xx_spi.c
index f39ce22632..74ba11e77a 100644
--- a/arch/powerpc/cpu/mpc8xx/spi.c
+++ b/drivers/spi/mpc8xx_spi.c
@@ -25,8 +25,6 @@
 #include <post.h>
 #include <serial.h>
 
-#ifdef CONFIG_SPI
-
 /* Warning:
  * You cannot enable DEBUG for early system initalization, i. e. when
  * this driver is used to read environment parameters like "baudrate"
@@ -421,4 +419,3 @@ ssize_t spi_xfer (size_t count)
 
 	return count;
 }
-#endif	/* CONFIG_SPI */
-- 
2.12.0



More information about the U-Boot mailing list