[U-Boot] [PATCH] spi: Zap mpc52xx_spi.c and config

armada100_spi.c and related config options are zapping becuase of "no DM conversion".
Cc: Werner Pfister Pfister_Werner@intercontrol.de Signed-off-by: Jagan Teki jagan@openedev.com --- Note: If someone want this to present, just respond with proper timeline.
board/intercontrol/digsy_mtc/digsy_mtc.c | 9 ---- configs/digsy_mtc_RAMBOOT_defconfig | 1 - configs/digsy_mtc_defconfig | 1 - configs/digsy_mtc_rev5_RAMBOOT_defconfig | 1 - configs/digsy_mtc_rev5_defconfig | 1 - drivers/spi/Makefile | 1 - drivers/spi/mpc52xx_spi.c | 90 -------------------------------- include/configs/digsy_mtc.h | 6 --- scripts/config_whitelist.txt | 1 - 9 files changed, 111 deletions(-) delete mode 100644 drivers/spi/mpc52xx_spi.c
diff --git a/board/intercontrol/digsy_mtc/digsy_mtc.c b/board/intercontrol/digsy_mtc/digsy_mtc.c index 2e52d51..37eb6c7 100644 --- a/board/intercontrol/digsy_mtc/digsy_mtc.c +++ b/board/intercontrol/digsy_mtc/digsy_mtc.c @@ -250,9 +250,6 @@ static inline void exbo_hw_init(void) {}
int board_early_init_r(void) { -#ifdef CONFIG_MPC52XX_SPI - struct mpc5xxx_gpt *gpt = (struct mpc5xxx_gpt*)MPC5XXX_GPT; -#endif /* * Now, when we are in RAM, enable flash write access for detection * process. Note that CS_BOOT cannot be cleared when executing in @@ -269,12 +266,6 @@ int board_early_init_r(void) /* Low level USB init, required for proper kernel operation */ usb_cpu_init(); #endif -#ifdef CONFIG_MPC52XX_SPI - /* GPT 6 Output Enable */ - out_be32(&gpt[6].emsr, 0x00000034); - /* GPT 7 Output Enable */ - out_be32(&gpt[7].emsr, 0x00000034); -#endif
return (0); } diff --git a/configs/digsy_mtc_RAMBOOT_defconfig b/configs/digsy_mtc_RAMBOOT_defconfig index 71fa0b7..66c3393 100644 --- a/configs/digsy_mtc_RAMBOOT_defconfig +++ b/configs/digsy_mtc_RAMBOOT_defconfig @@ -13,7 +13,6 @@ CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" CONFIG_AUTOBOOT_DELAY_STR="d" CONFIG_AUTOBOOT_STOP_STR=" " CONFIG_LOOPW=y -CONFIG_CMD_SPI=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set diff --git a/configs/digsy_mtc_defconfig b/configs/digsy_mtc_defconfig index 20491a4..daf08ce 100644 --- a/configs/digsy_mtc_defconfig +++ b/configs/digsy_mtc_defconfig @@ -11,7 +11,6 @@ CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="autoboot in %d seconds\n" CONFIG_AUTOBOOT_DELAY_STR=" " CONFIG_LOOPW=y -CONFIG_CMD_SPI=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set diff --git a/configs/digsy_mtc_rev5_RAMBOOT_defconfig b/configs/digsy_mtc_rev5_RAMBOOT_defconfig index 0db5f92..e55653b 100644 --- a/configs/digsy_mtc_rev5_RAMBOOT_defconfig +++ b/configs/digsy_mtc_rev5_RAMBOOT_defconfig @@ -13,7 +13,6 @@ CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" CONFIG_AUTOBOOT_DELAY_STR="d" CONFIG_AUTOBOOT_STOP_STR=" " CONFIG_LOOPW=y -CONFIG_CMD_SPI=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set diff --git a/configs/digsy_mtc_rev5_defconfig b/configs/digsy_mtc_rev5_defconfig index 713fa3d..f1f5f2e 100644 --- a/configs/digsy_mtc_rev5_defconfig +++ b/configs/digsy_mtc_rev5_defconfig @@ -13,7 +13,6 @@ CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" CONFIG_AUTOBOOT_DELAY_STR="d" CONFIG_AUTOBOOT_STOP_STR=" " CONFIG_LOOPW=y -CONFIG_CMD_SPI=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index 9e1f8df..c1ce158 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -34,7 +34,6 @@ 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_MPC52XX_SPI) += mpc52xx_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/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c deleted file mode 100644 index 4613bec..0000000 --- a/drivers/spi/mpc52xx_spi.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * (C) Copyright 2009 - * Frank Bodammer frank.bodammer@gcd-solutions.de - * (C) Copyright 2009 Semihalf, Grzegorz Bernacki - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include <common.h> -#include <asm/io.h> -#include <malloc.h> -#include <spi.h> -#include <mpc5xxx.h> - -void spi_init(void) -{ - struct mpc5xxx_spi *spi = (struct mpc5xxx_spi *)MPC5XXX_SPI; - /* - * Its important to use the correct order when initializing the - * registers - */ - out_8(&spi->ddr, 0x0F); /* set all SPI pins as output */ - out_8(&spi->pdr, 0x00); /* set SS low */ - /* SPI is master, SS is general purpose output */ - out_8(&spi->cr1, SPI_CR_MSTR | SPI_CR_SPE); - out_8(&spi->cr2, 0x00); /* normal operation */ - out_8(&spi->brr, 0x77); /* baud rate: IPB clock / 2048 */ -} - -struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, - unsigned int max_hz, unsigned int mode) -{ - struct spi_slave *slave; - - slave = spi_alloc_slave_base(bus, cs); - if (!slave) - return NULL; - - return slave; -} - -void spi_free_slave(struct spi_slave *slave) -{ - free(slave); -} - -int spi_claim_bus(struct spi_slave *slave) -{ - return 0; -} - -void spi_release_bus(struct spi_slave *slave) -{ - return; -} - -int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, - void *din, unsigned long flags) -{ - struct mpc5xxx_spi *spi = (struct mpc5xxx_spi *)MPC5XXX_SPI; - int i, iter = bitlen >> 3; - const uchar *txp = dout; - uchar *rxp = din; - - debug("spi_xfer: slave %u:%u dout %08X din %08X bitlen %u\n", - slave->bus, slave->cs, *(uint *) dout, *(uint *) din, bitlen); - - if (flags & SPI_XFER_BEGIN) - setbits_8(&spi->pdr, SPI_PDR_SS); - - for (i = 0; i < iter; i++) { - udelay(1000); - debug("spi_xfer: sending %x\n", txp[i]); - out_8(&spi->dr, txp[i]); - while (!(in_8(&spi->sr) & SPI_SR_SPIF)) { - udelay(1000); - if (in_8(&spi->sr) & SPI_SR_WCOL) { - rxp[i] = in_8(&spi->dr); - puts("spi_xfer: write collision\n"); - return -1; - } - } - rxp[i] = in_8(&spi->dr); - debug("spi_xfer: received %x\n", rxp[i]); - } - if (flags & SPI_XFER_END) - clrbits_8(&spi->pdr, SPI_PDR_SS); - - return 0; -} diff --git a/include/configs/digsy_mtc.h b/include/configs/digsy_mtc.h index b2120b9..ae0d3d4 100644 --- a/include/configs/digsy_mtc.h +++ b/include/configs/digsy_mtc.h @@ -216,12 +216,6 @@ #define CONFIG_BOOTCOMMAND "run mtcb_start"
/* - * SPI configuration - */ -#define CONFIG_HARD_SPI 1 -#define CONFIG_MPC52XX_SPI 1 - -/* * I2C configuration */ #define CONFIG_HARD_I2C 1 diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 6c7f8e0..bd72118 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -3105,7 +3105,6 @@ CONFIG_MPC5121ADS_REV2 CONFIG_MPC512x_FEC CONFIG_MPC5200 CONFIG_MPC5200_DDR -CONFIG_MPC52XX_SPI CONFIG_MPC555 CONFIG_MPC5xxx_FEC CONFIG_MPC5xxx_FEC_MII10

On Fri, Nov 25, 2016 at 01:10:56AM +0530, Jagan Teki wrote:
armada100_spi.c and related config options are zapping becuase of "no DM conversion".
Cc: Werner Pfister Pfister_Werner@intercontrol.de Signed-off-by: Jagan Teki jagan@openedev.com
Reviewed-by: Tom Rini trini@konsulko.com

On Tue, Nov 29, 2016 at 11:01 PM, Tom Rini trini@konsulko.com wrote:
On Fri, Nov 25, 2016 at 01:10:56AM +0530, Jagan Teki wrote:
armada100_spi.c and related config options are zapping becuase of "no DM conversion".
Cc: Werner Pfister Pfister_Werner@intercontrol.de Signed-off-by: Jagan Teki jagan@openedev.com
Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot-spi/master
thanks!
participants (2)
-
Jagan Teki
-
Tom Rini