diff options
author | Russell King <linux@armlinux.org.uk> | 2020-05-21 09:57:27 +0100 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2020-05-21 12:55:31 +0200 |
commit | 714199ec3461b2b5bac9796d4f5ee79f56d2eb00 (patch) | |
tree | 9d02420e261024062d56df1b12776d9594c38658 /target/linux/generic/backport-5.4/819-v5.8-i2c-pxa-clear-all-master-action-bits-in-i2c_pxa_stop.patch | |
parent | 72a1d5c3acd5b0bec46612f94bb8a82fe4d56179 (diff) | |
download | upstream-714199ec3461b2b5bac9796d4f5ee79f56d2eb00.tar.gz upstream-714199ec3461b2b5bac9796d4f5ee79f56d2eb00.tar.bz2 upstream-714199ec3461b2b5bac9796d4f5ee79f56d2eb00.zip |
kernel: backport v5.8 i2c-pxa updates
Add i2c-pxa updates queued for v5.8, which add bus recovery to this
driver; this is needed for the uDPU platform.
Signed-off-by: Russell King <linux@armlinux.org.uk>
Diffstat (limited to 'target/linux/generic/backport-5.4/819-v5.8-i2c-pxa-clear-all-master-action-bits-in-i2c_pxa_stop.patch')
-rw-r--r-- | target/linux/generic/backport-5.4/819-v5.8-i2c-pxa-clear-all-master-action-bits-in-i2c_pxa_stop.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/generic/backport-5.4/819-v5.8-i2c-pxa-clear-all-master-action-bits-in-i2c_pxa_stop.patch b/target/linux/generic/backport-5.4/819-v5.8-i2c-pxa-clear-all-master-action-bits-in-i2c_pxa_stop.patch new file mode 100644 index 0000000000..997670716f --- /dev/null +++ b/target/linux/generic/backport-5.4/819-v5.8-i2c-pxa-clear-all-master-action-bits-in-i2c_pxa_stop.patch @@ -0,0 +1,43 @@ +From: Russell King <rmk+kernel@armlinux.org.uk> +Bcc: linux@mail.armlinux.org.uk +Subject: [PATCH 5/7] i2c: pxa: clear all master action bits in + i2c_pxa_stop_message() +MIME-Version: 1.0 +Content-Disposition: inline +Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset="utf-8" + +If we timeout during a message transfer, the control register may +contain bits that cause an action to be set. Read-modify-writing the +register leaving these bits set may trigger the hardware to attempt +one of these actions unintentionally. + +Always clear these bits when cleaning up after a message or after +a timeout. + +Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> +--- + drivers/i2c/busses/i2c-pxa.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c +index db739cce93ac..a72d07bdb793 100644 +--- a/drivers/i2c/busses/i2c-pxa.c ++++ b/drivers/i2c/busses/i2c-pxa.c +@@ -795,11 +795,9 @@ static inline void i2c_pxa_stop_message(struct pxa_i2c *i2c) + { + u32 icr; + +- /* +- * Clear the STOP and ACK flags +- */ ++ /* Clear the START, STOP, ACK, TB and MA flags */ + icr = readl(_ICR(i2c)); +- icr &= ~(ICR_STOP | ICR_ACKNAK); ++ icr &= ~(ICR_START | ICR_STOP | ICR_ACKNAK | ICR_TB | ICR_MA); + writel(icr, _ICR(i2c)); + } + +-- +2.20.1 + |