mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
spi: spi-fsl-dspi: Support SPI software timestamping in all non-DMA modes
There's no reason to keep this .ptp_sts_supported property explicitly in devtype_data, since it can be deduced from the operating mode alone. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Message-Id: <20200302001958.11105-6-olteanv@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ca5052c8bf
commit
63669902f7
1 changed files with 2 additions and 9 deletions
|
@ -122,7 +122,6 @@ enum dspi_trans_mode {
|
|||
struct fsl_dspi_devtype_data {
|
||||
enum dspi_trans_mode trans_mode;
|
||||
u8 max_clock_factor;
|
||||
bool ptp_sts_supported;
|
||||
bool xspi_mode;
|
||||
int fifo_size;
|
||||
int dma_bufsize;
|
||||
|
@ -150,48 +149,41 @@ static const struct fsl_dspi_devtype_data devtype_data[] = {
|
|||
[LS1021A] = {
|
||||
.trans_mode = DSPI_TCFQ_MODE,
|
||||
.max_clock_factor = 8,
|
||||
.ptp_sts_supported = true,
|
||||
.xspi_mode = true,
|
||||
.fifo_size = 4,
|
||||
},
|
||||
[LS1012A] = {
|
||||
.trans_mode = DSPI_TCFQ_MODE,
|
||||
.max_clock_factor = 8,
|
||||
.ptp_sts_supported = true,
|
||||
.xspi_mode = true,
|
||||
.fifo_size = 16,
|
||||
},
|
||||
[LS1043A] = {
|
||||
.trans_mode = DSPI_TCFQ_MODE,
|
||||
.max_clock_factor = 8,
|
||||
.ptp_sts_supported = true,
|
||||
.xspi_mode = true,
|
||||
.fifo_size = 16,
|
||||
},
|
||||
[LS1046A] = {
|
||||
.trans_mode = DSPI_TCFQ_MODE,
|
||||
.max_clock_factor = 8,
|
||||
.ptp_sts_supported = true,
|
||||
.xspi_mode = true,
|
||||
.fifo_size = 16,
|
||||
},
|
||||
[LS2080A] = {
|
||||
.trans_mode = DSPI_TCFQ_MODE,
|
||||
.max_clock_factor = 8,
|
||||
.ptp_sts_supported = true,
|
||||
.xspi_mode = true,
|
||||
.fifo_size = 4,
|
||||
},
|
||||
[LS2085A] = {
|
||||
.trans_mode = DSPI_TCFQ_MODE,
|
||||
.max_clock_factor = 8,
|
||||
.ptp_sts_supported = true,
|
||||
.fifo_size = 4,
|
||||
},
|
||||
[LX2160A] = {
|
||||
.trans_mode = DSPI_TCFQ_MODE,
|
||||
.max_clock_factor = 8,
|
||||
.ptp_sts_supported = true,
|
||||
.xspi_mode = true,
|
||||
.fifo_size = 4,
|
||||
},
|
||||
|
@ -1246,7 +1238,8 @@ static int dspi_probe(struct platform_device *pdev)
|
|||
ctlr->max_speed_hz =
|
||||
clk_get_rate(dspi->clk) / dspi->devtype_data->max_clock_factor;
|
||||
|
||||
ctlr->ptp_sts_supported = dspi->devtype_data->ptp_sts_supported;
|
||||
if (dspi->devtype_data->trans_mode != DSPI_DMA_MODE)
|
||||
ctlr->ptp_sts_supported = true;
|
||||
|
||||
platform_set_drvdata(pdev, ctlr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue