summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorJagan Teki <jagan@openedev.com>2016-12-15 17:36:47 +0100
committerJagan Teki <jagan@amarulasolutions.com>2016-12-21 12:14:37 +0100
commit353f6a770f2ab50bdc38081e29e5ec5f586a05db (patch)
tree5f3901f2a838399d2a3c8c3a7c5afc2265e97b23 /drivers/spi
parent4cf5c5f1e60e6541630ae829b5fa2db704c268f0 (diff)
spi: Zap mpc52xx_spi.c, config and related code
armada100_spi.c, related config options and related codes 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>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/Makefile1
-rw-r--r--drivers/spi/mpc52xx_spi.c90
2 files changed, 0 insertions, 91 deletions
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 247c5f6558..70d2e49a96 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -35,7 +35,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 4613bec2aa..0000000000
--- 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;
-}