mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-21 05:14:52 +08:00
spi: mchp-pci1xxxx: Fix length of SPI transactions not set properly in driver
In pci1xxxx_spi_transfer_one API, length of SPI transaction gets cleared
by setting of length mask. Set length of transaction only after masking
length field.
Fixes: 1cc0cbea71
("spi: microchip: pci1xxxx: Add driver for SPI controller of PCI1XXXX PCIe switch")
Signed-off-by: Tharun Kumar P <tharunkumar.pasumarthi@microchip.com>
Link: https://lore.kernel.org/r/20230404171613.1336093-2-tharunkumar.pasumarthi@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
43bac5158b
commit
35c8c5e503
@ -199,8 +199,9 @@ static int pci1xxxx_spi_transfer_one(struct spi_controller *spi_ctlr,
|
||||
else
|
||||
regval &= ~SPI_MST_CTL_MODE_SEL;
|
||||
|
||||
regval |= ((clkdiv << 5) | SPI_FORCE_CE | (len << 8));
|
||||
regval |= ((clkdiv << 5) | SPI_FORCE_CE);
|
||||
regval &= ~SPI_MST_CTL_CMD_LEN_MASK;
|
||||
regval |= (len << 8);
|
||||
writel(regval, par->reg_base +
|
||||
SPI_MST_CTL_REG_OFFSET(p->hw_inst));
|
||||
regval = readl(par->reg_base +
|
||||
|
Loading…
Reference in New Issue
Block a user