Skip to content

Commit 8cd9141

Browse files
RajuRangojubroonie
authored andcommitted
spi: spi_amd: Updates to set tx/rx count functions
AMD SPI TX and RX counter registers are 1-byte length registers. The existing value will be overwritten during register write, so masking is not required. Co-developed-by: Krishnamoorthi M <krishnamoorthi.m@amd.com> Signed-off-by: Krishnamoorthi M <krishnamoorthi.m@amd.com> Co-developed-by: Akshata MukundShetty <akshata.mukundshetty@amd.com> Signed-off-by: Akshata MukundShetty <akshata.mukundshetty@amd.com> Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com> Link: https://patch.msgid.link/20240925133644.2922359-5-Raju.Rangoju@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent efd9834 commit 8cd9141

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/spi/spi-amd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ static int amd_spi_set_opcode(struct amd_spi *amd_spi, u8 cmd_opcode)
180180

181181
static inline void amd_spi_set_rx_count(struct amd_spi *amd_spi, u8 rx_count)
182182
{
183-
amd_spi_setclear_reg8(amd_spi, AMD_SPI_RX_COUNT_REG, rx_count, 0xff);
183+
amd_spi_writereg8(amd_spi, AMD_SPI_RX_COUNT_REG, rx_count);
184184
}
185185

186186
static inline void amd_spi_set_tx_count(struct amd_spi *amd_spi, u8 tx_count)
187187
{
188-
amd_spi_setclear_reg8(amd_spi, AMD_SPI_TX_COUNT_REG, tx_count, 0xff);
188+
amd_spi_writereg8(amd_spi, AMD_SPI_TX_COUNT_REG, tx_count);
189189
}
190190

191191
static int amd_spi_busy_wait(struct amd_spi *amd_spi)

0 commit comments

Comments
 (0)