armbian_build/patch/kernel/archive/sunxi-6.15/patches.armbian/drv-spi-spi-sun4i.c-spi-bug-low-on-sck.patch
The-going 3188743b1a sunxi-6.15: Fix compilation errors caused by patch migration
Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>
2025-06-11 19:40:28 +02:00

36 lines
1.0 KiB
Diff

From f45c4632c0d5d25901f125ad80b245e5bdf50f7f Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Wed, 2 Feb 2022 14:16:31 +0300
Subject: drv:spi:spi-sun4i.c spi bug low on sck
---
drivers/spi/spi-sun4i.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index aa92fd5a35a9..9f3273256354 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -393,6 +393,7 @@ static int sun4i_spi_runtime_resume(struct device *dev)
struct spi_controller *host = dev_get_drvdata(dev);
struct sun4i_spi *sspi = spi_controller_get_devdata(host);
int ret;
+ u32 reg;
ret = clk_prepare_enable(sspi->hclk);
if (ret) {
@@ -406,8 +407,8 @@ static int sun4i_spi_runtime_resume(struct device *dev)
goto err;
}
- sun4i_spi_write(sspi, SUN4I_CTL_REG,
- SUN4I_CTL_MASTER | SUN4I_CTL_TP);
+ reg = sun4i_spi_read(sspi, SUN4I_CTL_REG);
+ sun4i_spi_write(sspi, SUN4I_CTL_REG, reg | SUN4I_CTL_MASTER | SUN4I_CTL_TP);
return 0;
--
2.35.3