Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: imx: add i.MX51 ECSPI target mode support

ECSPI in i.MX51 and i.MX53 support target mode. Current code only support
i.MX53. Remove is_imx53_ecspi() check for target mode to support i.MX51.

Signed-off-by: Carlos Song <carlos.song@nxp.com>
Link: https://patch.msgid.link/20251027110256.543314-1-carlos.song@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Carlos Song and committed by
Mark Brown
4e92abd0 55d03b5b

+4 -5
+4 -5
drivers/spi/spi-imx.c
··· 586 586 * is not functional for imx53 Soc, config SPI burst completed when 587 587 * BURST_LENGTH + 1 bits are received 588 588 */ 589 - if (spi_imx->target_mode && is_imx53_ecspi(spi_imx)) 589 + if (spi_imx->target_mode) 590 590 cfg &= ~MX51_ECSPI_CONFIG_SBBCTRL(channel); 591 591 else 592 592 cfg |= MX51_ECSPI_CONFIG_SBBCTRL(channel); ··· 674 674 675 675 /* Clear BL field and set the right value */ 676 676 ctrl &= ~MX51_ECSPI_CTRL_BL_MASK; 677 - if (spi_imx->target_mode && is_imx53_ecspi(spi_imx)) 677 + if (spi_imx->target_mode) 678 678 ctrl |= (spi_imx->target_burst * 8 - 1) 679 679 << MX51_ECSPI_CTRL_BL_OFFSET; 680 680 else { ··· 1367 1367 spi_imx->rx_only = ((t->tx_buf == NULL) 1368 1368 || (t->tx_buf == spi->controller->dummy_tx)); 1369 1369 1370 - if (is_imx53_ecspi(spi_imx) && spi_imx->target_mode) { 1370 + if (spi_imx->target_mode) { 1371 1371 spi_imx->rx = mx53_ecspi_rx_target; 1372 1372 spi_imx->tx = mx53_ecspi_tx_target; 1373 1373 spi_imx->target_burst = t->len; ··· 1641 1641 struct spi_imx_data *spi_imx = spi_controller_get_devdata(spi->controller); 1642 1642 int ret = 0; 1643 1643 1644 - if (is_imx53_ecspi(spi_imx) && 1645 - transfer->len > MX53_MAX_TRANSFER_BYTES) { 1644 + if (transfer->len > MX53_MAX_TRANSFER_BYTES) { 1646 1645 dev_err(&spi->dev, "Transaction too big, max size is %d bytes\n", 1647 1646 MX53_MAX_TRANSFER_BYTES); 1648 1647 return -EMSGSIZE;