[U-Boot] [PATCH 2/2] sunxi: SPI: reset bus when enabling clock

Fahad Sadah fahad at sadah.uk
Sat Aug 4 12:23:55 UTC 2018


---
 drivers/spi/sun6i_spi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/sun6i_spi.c b/drivers/spi/sun6i_spi.c
index 3192548e83..3c6a13e40e 100644
--- a/drivers/spi/sun6i_spi.c
+++ b/drivers/spi/sun6i_spi.c
@@ -215,6 +215,7 @@ static inline void sun6i_spi_enable_clock(void)
 	struct sunxi_ccm_reg *const ccm =
 		(struct sunxi_ccm_reg *const)SUNXI_CCM_BASE;
 
+	setbits_le32(&ccm->ahb_reset0_cfg, (1 << AHB_RESET_OFFSET_SPI0));
 	setbits_le32(&ccm->ahb_gate0, (1 << AHB_GATE_OFFSET_SPI0));
 	writel((1 << 31), &ccm->spi0_clk_cfg);
 }
-- 
2.14.1



More information about the U-Boot mailing list