Commit e3ce4f44 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Mark Brown

spi: fsl-espi: remove usage of mpc8xxx_spi->flags

Change the check to access property "mode" directly.
This allows us to get rid of mpc8xxx_spi->flags in a subsequent
patch in this patch series as it's used nowhere else.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7454346b
...@@ -620,12 +620,6 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem, ...@@ -620,12 +620,6 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem,
if (ret) if (ret)
goto err_probe; goto err_probe;
if (mpc8xxx_spi->flags & SPI_QE_CPU_MODE) {
dev_err(dev, "SPI_QE_CPU_MODE is not supported on ESPI!\n");
ret = -EINVAL;
goto err_probe;
}
/* SPI controller initializations */ /* SPI controller initializations */
fsl_espi_write_reg(mpc8xxx_spi, ESPI_SPMODE, 0); fsl_espi_write_reg(mpc8xxx_spi, ESPI_SPMODE, 0);
fsl_espi_write_reg(mpc8xxx_spi, ESPI_SPIM, 0); fsl_espi_write_reg(mpc8xxx_spi, ESPI_SPIM, 0);
...@@ -715,6 +709,11 @@ static int of_fsl_espi_probe(struct platform_device *ofdev) ...@@ -715,6 +709,11 @@ static int of_fsl_espi_probe(struct platform_device *ofdev)
unsigned int irq, num_cs; unsigned int irq, num_cs;
int ret; int ret;
if (of_property_read_bool(np, "mode")) {
dev_err(dev, "mode property is not supported on ESPI!\n");
return -EINVAL;
}
ret = of_mpc8xxx_spi_probe(ofdev); ret = of_mpc8xxx_spi_probe(ofdev);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment