mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
spi: rockchip: Preset SPI slave controller configuration
Ensure that cs io is in the input state in initial progress. Change-Id: I808994ec14e3f4ab1c580f2f07e3e41b444bcc2e Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
@@ -909,6 +909,8 @@ static int rockchip_spi_setup(struct spi_device *spi)
|
||||
cr0 |= BIT(spi->chip_select) << CR0_SOI_OFFSET;
|
||||
else if (spi->chip_select <= 1)
|
||||
cr0 &= ~(BIT(spi->chip_select) << CR0_SOI_OFFSET);
|
||||
if (spi_controller_is_slave(spi->controller))
|
||||
cr0 |= CR0_OPM_SLAVE << CR0_OPM_OFFSET;
|
||||
|
||||
writel_relaxed(cr0, rs->regs + ROCKCHIP_SPI_CTRLR0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user