aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-5.4/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch
diff options
context:
space:
mode:
authorRussell King <linux@armlinux.org.uk>2020-05-21 09:57:27 +0100
committerPetr Štetiar <ynezz@true.cz>2020-05-21 12:55:31 +0200
commit714199ec3461b2b5bac9796d4f5ee79f56d2eb00 (patch)
tree9d02420e261024062d56df1b12776d9594c38658 /target/linux/generic/backport-5.4/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch
parent72a1d5c3acd5b0bec46612f94bb8a82fe4d56179 (diff)
downloadupstream-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/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch')
-rw-r--r--target/linux/generic/backport-5.4/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/target/linux/generic/backport-5.4/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch b/target/linux/generic/backport-5.4/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch
new file mode 100644
index 0000000000..2e98c7ba00
--- /dev/null
+++ b/target/linux/generic/backport-5.4/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch
@@ -0,0 +1,71 @@
+From: Russell King <rmk+kernel@armlinux.org.uk>
+Bcc: linux@mail.armlinux.org.uk
+Cc: linux-i2c@vger.kernel.org
+Subject: [PATCH 07/17] i2c: pxa: always set fm and hs members for each type
+MIME-Version: 1.0
+Content-Disposition: inline
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset="utf-8"
+
+Always set the fm and hs members of struct pxa_reg_layout. These
+members are already taking space, we don't need code as well.
+
+Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+---
+ drivers/i2c/busses/i2c-pxa.c | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
+index b3286d7ab75d..05dbe6bf4633 100644
+--- a/drivers/i2c/busses/i2c-pxa.c
++++ b/drivers/i2c/busses/i2c-pxa.c
+@@ -114,6 +114,8 @@ static struct pxa_reg_layout pxa_reg_layout[] = {
+ .icr = 0x10,
+ .isr = 0x18,
+ .isar = 0x20,
++ .fm = ICR_FM,
++ .hs = ICR_HS,
+ },
+ [REGS_PXA3XX] = {
+ .ibmr = 0x00,
+@@ -121,6 +123,8 @@ static struct pxa_reg_layout pxa_reg_layout[] = {
+ .icr = 0x08,
+ .isr = 0x0c,
+ .isar = 0x10,
++ .fm = ICR_FM,
++ .hs = ICR_HS,
+ },
+ [REGS_CE4100] = {
+ .ibmr = 0x14,
+@@ -128,6 +132,8 @@ static struct pxa_reg_layout pxa_reg_layout[] = {
+ .icr = 0x00,
+ .isr = 0x04,
+ /* no isar register */
++ .fm = ICR_FM,
++ .hs = ICR_HS,
+ },
+ [REGS_PXA910] = {
+ .ibmr = 0x00,
+@@ -137,6 +143,8 @@ static struct pxa_reg_layout pxa_reg_layout[] = {
+ .isar = 0x20,
+ .ilcr = 0x28,
+ .iwcr = 0x30,
++ .fm = ICR_FM,
++ .hs = ICR_HS,
+ },
+ [REGS_A3700] = {
+ .ibmr = 0x00,
+@@ -1235,8 +1243,8 @@ static int i2c_pxa_probe(struct platform_device *dev)
+ i2c->reg_idbr = i2c->reg_base + pxa_reg_layout[i2c_type].idbr;
+ i2c->reg_icr = i2c->reg_base + pxa_reg_layout[i2c_type].icr;
+ i2c->reg_isr = i2c->reg_base + pxa_reg_layout[i2c_type].isr;
+- i2c->fm_mask = pxa_reg_layout[i2c_type].fm ? : ICR_FM;
+- i2c->hs_mask = pxa_reg_layout[i2c_type].hs ? : ICR_HS;
++ i2c->fm_mask = pxa_reg_layout[i2c_type].fm;
++ i2c->hs_mask = pxa_reg_layout[i2c_type].hs;
+
+ if (i2c_type != REGS_CE4100)
+ i2c->reg_isar = i2c->reg_base + pxa_reg_layout[i2c_type].isar;
+--
+2.20.1
+