Skip to content

Commit 35c9d46

Browse files
Esben Haabendalbroonie
Esben Haabendal
authored andcommitted
spi: spi-fsl-dspi: Advertise 32 bit for XSPI mode
Signed-off-by: Esben Haabendal <[email protected]> Acked-by: Martin Hundebøll <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 8fcd151 commit 35c9d46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/spi/spi-fsl-dspi.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,6 @@ static int dspi_probe(struct platform_device *pdev)
10011001

10021002
master->cleanup = dspi_cleanup;
10031003
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST;
1004-
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 16);
10051004

10061005
pdata = dev_get_platdata(&pdev->dev);
10071006
if (pdata) {
@@ -1033,6 +1032,11 @@ static int dspi_probe(struct platform_device *pdev)
10331032
}
10341033
}
10351034

1035+
if (dspi->devtype_data->xspi_mode)
1036+
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);
1037+
else
1038+
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 16);
1039+
10361040
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
10371041
base = devm_ioremap_resource(&pdev->dev, res);
10381042
if (IS_ERR(base)) {

0 commit comments

Comments
 (0)