summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-mpc512x-psc.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-02-17 14:45:40 -0600
committerMark Brown <broonie@kernel.org>2023-03-05 23:39:00 +0000
commit04725901d9933b3134e6dee6b5bc1efb67f8d43f (patch)
tree4fb41c8dd9750ee64ecb81f2972ed9a8e6a62fcf /drivers/spi/spi-mpc512x-psc.c
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff)
spi: mpc5xxx-psc: Remove unused platform_data
The platform_data for the MPC5xxx PSC SPI controllers is never used, so remove it and the resulting code which depends on it. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230217-dt-mpc5xxx-spi-v1-1-3be8602fce1e@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-mpc512x-psc.c')
-rw-r--r--drivers/spi/spi-mpc512x-psc.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c
index 03630359ce70..0b4d49ef84de 100644
--- a/drivers/spi/spi-mpc512x-psc.c
+++ b/drivers/spi/spi-mpc512x-psc.c
@@ -22,7 +22,6 @@
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/spi/spi.h>
-#include <linux/fsl_devices.h>
#include <asm/mpc52xx_psc.h>
enum {
@@ -51,8 +50,6 @@ enum {
__ret; })
struct mpc512x_psc_spi {
- void (*cs_control)(struct spi_device *spi, bool on);
-
/* driver internal data */
int type;
void __iomem *psc;
@@ -128,26 +125,16 @@ static void mpc512x_psc_spi_activate_cs(struct spi_device *spi)
mps->bits_per_word = cs->bits_per_word;
if (spi->cs_gpiod) {
- if (mps->cs_control)
- /* boardfile override */
- mps->cs_control(spi, (spi->mode & SPI_CS_HIGH) ? 1 : 0);
- else
- /* gpiolib will deal with the inversion */
- gpiod_set_value(spi->cs_gpiod, 1);
+ /* gpiolib will deal with the inversion */
+ gpiod_set_value(spi->cs_gpiod, 1);
}
}
static void mpc512x_psc_spi_deactivate_cs(struct spi_device *spi)
{
- struct mpc512x_psc_spi *mps = spi_master_get_devdata(spi->master);
-
if (spi->cs_gpiod) {
- if (mps->cs_control)
- /* boardfile override */
- mps->cs_control(spi, (spi->mode & SPI_CS_HIGH) ? 0 : 1);
- else
- /* gpiolib will deal with the inversion */
- gpiod_set_value(spi->cs_gpiod, 0);
+ /* gpiolib will deal with the inversion */
+ gpiod_set_value(spi->cs_gpiod, 0);
}
}
@@ -474,7 +461,6 @@ static irqreturn_t mpc512x_psc_spi_isr(int irq, void *dev_id)
static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr,
u32 size, unsigned int irq)
{
- struct fsl_spi_platform_data *pdata = dev_get_platdata(dev);
struct mpc512x_psc_spi *mps;
struct spi_master *master;
int ret;
@@ -490,12 +476,6 @@ static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr,
mps->type = (int)of_device_get_match_data(dev);
mps->irq = irq;
- if (pdata) {
- mps->cs_control = pdata->cs_control;
- master->bus_num = pdata->bus_num;
- master->num_chipselect = pdata->max_chipselect;
- }
-
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST;
master->setup = mpc512x_psc_spi_setup;
master->prepare_transfer_hardware = mpc512x_psc_spi_prep_xfer_hw;