Skip to content
Snippets Groups Projects
Commit 2b9fe111 authored by Simon Glass's avatar Simon Glass
Browse files

rockchip: spi: Correct the bus init code


Two of the init values are created locally so cannot be out of range.
The masking is unnecessary and in one case is incorrect. Fix it.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 28a943c1
No related branches found
No related tags found
No related merge requests found
......@@ -221,7 +221,7 @@ static int rockchip_spi_claim_bus(struct udevice *dev)
ctrlr0 = OMOD_MASTER << OMOD_SHIFT;
/* Data Frame Size */
ctrlr0 |= spi_dfs & DFS_MASK << DFS_SHIFT;
ctrlr0 |= spi_dfs << DFS_SHIFT;
/* set SPI mode 0..3 */
if (priv->mode & SPI_CPOL)
......@@ -242,7 +242,7 @@ static int rockchip_spi_claim_bus(struct udevice *dev)
ctrlr0 |= FBM_MSB << FBM_SHIFT;
/* Byte and Halfword Transform */
ctrlr0 |= (spi_tf & HALF_WORD_MASK) << HALF_WORD_TX_SHIFT;
ctrlr0 |= spi_tf << HALF_WORD_TX_SHIFT;
/* Rxd Sample Delay */
ctrlr0 |= 0 << RXDSD_SHIFT;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment