mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
spi: spi-fsl-dspi: Rename fifo_{read,write} and {tx,cmd}_fifo_write
[ Upstream commit 547248fbed23f3cd2f6a5937b44fad60993640c4 ] These function names are very generic and it is easy to get confused. Rename them after the hardware register that they are accessing. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://lore.kernel.org/r/20200304220044.11193-6-olteanv@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> Stable-dep-of: fa60c094c19b ("spi: spi-fsl-dspi: Clear completion counter before initiating transfer") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
3cef0d2afb
commit
3f6491c3bc
1 changed files with 11 additions and 11 deletions
|
|
@ -560,12 +560,12 @@ static void ns_delay_scale(char *psc, char *sc, int delay_ns,
|
|||
}
|
||||
}
|
||||
|
||||
static void fifo_write(struct fsl_dspi *dspi)
|
||||
static void dspi_pushr_write(struct fsl_dspi *dspi)
|
||||
{
|
||||
regmap_write(dspi->regmap, SPI_PUSHR, dspi_pop_tx_pushr(dspi));
|
||||
}
|
||||
|
||||
static void cmd_fifo_write(struct fsl_dspi *dspi)
|
||||
static void dspi_pushr_cmd_write(struct fsl_dspi *dspi)
|
||||
{
|
||||
u16 cmd = dspi->tx_cmd;
|
||||
|
||||
|
|
@ -574,7 +574,7 @@ static void cmd_fifo_write(struct fsl_dspi *dspi)
|
|||
regmap_write(dspi->regmap_pushr, PUSHR_CMD, cmd);
|
||||
}
|
||||
|
||||
static void tx_fifo_write(struct fsl_dspi *dspi, u16 txdata)
|
||||
static void dspi_pushr_txdata_write(struct fsl_dspi *dspi, u16 txdata)
|
||||
{
|
||||
regmap_write(dspi->regmap_pushr, PUSHR_TX, txdata);
|
||||
}
|
||||
|
|
@ -590,18 +590,18 @@ static void dspi_tcfq_write(struct fsl_dspi *dspi)
|
|||
*/
|
||||
u32 data = dspi_pop_tx(dspi);
|
||||
|
||||
cmd_fifo_write(dspi);
|
||||
tx_fifo_write(dspi, data & 0xFFFF);
|
||||
tx_fifo_write(dspi, data >> 16);
|
||||
dspi_pushr_cmd_write(dspi);
|
||||
dspi_pushr_txdata_write(dspi, data & 0xFFFF);
|
||||
dspi_pushr_txdata_write(dspi, data >> 16);
|
||||
} else {
|
||||
/* Write one entry to both TX FIFO and CMD FIFO
|
||||
* simultaneously.
|
||||
*/
|
||||
fifo_write(dspi);
|
||||
dspi_pushr_write(dspi);
|
||||
}
|
||||
}
|
||||
|
||||
static u32 fifo_read(struct fsl_dspi *dspi)
|
||||
static u32 dspi_popr_read(struct fsl_dspi *dspi)
|
||||
{
|
||||
u32 rxdata = 0;
|
||||
|
||||
|
|
@ -611,7 +611,7 @@ static u32 fifo_read(struct fsl_dspi *dspi)
|
|||
|
||||
static void dspi_tcfq_read(struct fsl_dspi *dspi)
|
||||
{
|
||||
dspi_push_rx(dspi, fifo_read(dspi));
|
||||
dspi_push_rx(dspi, dspi_popr_read(dspi));
|
||||
}
|
||||
|
||||
static void dspi_eoq_write(struct fsl_dspi *dspi)
|
||||
|
|
@ -629,7 +629,7 @@ static void dspi_eoq_write(struct fsl_dspi *dspi)
|
|||
if (fifo_size == (DSPI_FIFO_SIZE - 1))
|
||||
dspi->tx_cmd |= SPI_PUSHR_CMD_CTCNT;
|
||||
/* Write combined TX FIFO and CMD FIFO entry */
|
||||
fifo_write(dspi);
|
||||
dspi_pushr_write(dspi);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -639,7 +639,7 @@ static void dspi_eoq_read(struct fsl_dspi *dspi)
|
|||
|
||||
/* Read one FIFO entry and push to rx buffer */
|
||||
while ((dspi->rx < dspi->rx_end) && fifo_size--)
|
||||
dspi_push_rx(dspi, fifo_read(dspi));
|
||||
dspi_push_rx(dspi, dspi_popr_read(dspi));
|
||||
}
|
||||
|
||||
static int dspi_rxtx(struct fsl_dspi *dspi)
|
||||
|
|
|
|||
Loading…
Reference in a new issue