提交 e9e128a6 编写于 作者: H Heiner Kallweit 提交者: Mark Brown

spi: fsl-espi: improve check for SPI_QE_CPU_MODE

SPI_QE_CPU_MODE doesn't exist for ESPI and is set by of_mpc8xxx_spi_probe
based on DT property "mode". This property is not defined for ESPI,
see Documentation/devicetree/bindings/spi/fsl-spi.txt.
So print an error message and bail out if SPI_QE_CPU_MODE is set.
Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 e3cd6cf4
...@@ -583,8 +583,9 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem, ...@@ -583,8 +583,9 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem,
goto err_probe; goto err_probe;
if (mpc8xxx_spi->flags & SPI_QE_CPU_MODE) { if (mpc8xxx_spi->flags & SPI_QE_CPU_MODE) {
mpc8xxx_spi->rx_shift = 16; dev_err(dev, "SPI_QE_CPU_MODE is not supported on ESPI!\n");
mpc8xxx_spi->tx_shift = 24; ret = -EINVAL;
goto err_probe;
} }
/* SPI controller initializations */ /* SPI controller initializations */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册