aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-5.4
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic/backport-5.4')
-rw-r--r--target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch16
-rw-r--r--target/linux/generic/backport-5.4/396-5.8-sch_cake-don-t-try-to-reallocate-or-unshare-skb-unco.patch96
-rw-r--r--target/linux/generic/backport-5.4/397-5.8-sch_cake-don-t-call-diffserv-parsing-code-when-it-is.patch62
-rw-r--r--target/linux/generic/backport-5.4/398-5.8-sch_cake-fix-a-few-style-nits.patch40
-rw-r--r--target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch6
-rw-r--r--target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch6
-rw-r--r--target/linux/generic/backport-5.4/803-v5.8-i2c-pxa-use-official-address-byte-helper.patch6
-rw-r--r--target/linux/generic/backport-5.4/806-v5.8-i2c-pxa-re-arrange-functions-to-flow-better.patch10
-rw-r--r--target/linux/generic/backport-5.4/808-v5.8-i2c-pxa-add-and-use-definitions-for-IBMR-register.patch8
-rw-r--r--target/linux/generic/backport-5.4/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch2
-rw-r--r--target/linux/generic/backport-5.4/811-v5.8-i2c-pxa-move-DT-IDs-along-side-platform-IDs.patch2
-rw-r--r--target/linux/generic/backport-5.4/812-v5.8-i2c-pxa-fix-i2c_pxa_scream_blue_murder-debug-output.patch47
-rw-r--r--target/linux/generic/backport-5.4/815-v5.8-i2c-pxa-consolidate-i2c_pxa_-xfer-implementations.patch8
-rw-r--r--target/linux/generic/backport-5.4/816-v5.8-i2c-pxa-avoid-complaints-with-non-responsive-slaves.patch4
-rw-r--r--target/linux/generic/backport-5.4/817-v5.8-i2c-pxa-ensure-timeout-messages-are-unique.patch6
-rw-r--r--target/linux/generic/backport-5.4/818-v5.8-i2c-pxa-remove-some-unnecessary-debug.patch2
-rw-r--r--target/linux/generic/backport-5.4/819-v5.8-i2c-pxa-clear-all-master-action-bits-in-i2c_pxa_stop.patch38
17 files changed, 38 insertions, 321 deletions
diff --git a/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch b/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch
index 2be0d36392..8f6406c290 100644
--- a/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch
+++ b/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch
@@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
s32 tin_deficit;
u32 tin_backlog;
u32 tin_dropped;
-@@ -1919,7 +1918,7 @@ begin:
+@@ -1943,7 +1942,7 @@ begin:
while (b->tin_deficit < 0 ||
!(b->sparse_flow_count + b->bulk_flow_count)) {
if (b->tin_deficit <= 0)
@@ -41,7 +41,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (b->sparse_flow_count + b->bulk_flow_count)
empty = false;
-@@ -2241,8 +2240,7 @@ static int cake_config_besteffort(struct
+@@ -2265,8 +2264,7 @@ static int cake_config_besteffort(struct
cake_set_rate(b, rate, mtu,
us_to_ns(q->target), us_to_ns(q->interval));
@@ -51,7 +51,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
-@@ -2253,8 +2251,7 @@ static int cake_config_precedence(struct
+@@ -2277,8 +2275,7 @@ static int cake_config_precedence(struct
struct cake_sched_data *q = qdisc_priv(sch);
u32 mtu = psched_mtu(qdisc_dev(sch));
u64 rate = q->rate_bps;
@@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 i;
q->tin_cnt = 8;
-@@ -2267,18 +2264,14 @@ static int cake_config_precedence(struct
+@@ -2291,18 +2288,14 @@ static int cake_config_precedence(struct
cake_set_rate(b, rate, mtu, us_to_ns(q->target),
us_to_ns(q->interval));
@@ -83,7 +83,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return 0;
-@@ -2347,8 +2340,7 @@ static int cake_config_diffserv8(struct
+@@ -2371,8 +2364,7 @@ static int cake_config_diffserv8(struct
struct cake_sched_data *q = qdisc_priv(sch);
u32 mtu = psched_mtu(qdisc_dev(sch));
u64 rate = q->rate_bps;
@@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 i;
q->tin_cnt = 8;
-@@ -2364,18 +2356,14 @@ static int cake_config_diffserv8(struct
+@@ -2388,18 +2380,14 @@ static int cake_config_diffserv8(struct
cake_set_rate(b, rate, mtu, us_to_ns(q->target),
us_to_ns(q->interval));
@@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return 0;
-@@ -2414,17 +2402,11 @@ static int cake_config_diffserv4(struct
+@@ -2438,17 +2426,11 @@ static int cake_config_diffserv4(struct
cake_set_rate(&q->tins[3], rate >> 2, mtu,
us_to_ns(q->target), us_to_ns(q->interval));
@@ -137,7 +137,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
-@@ -2455,15 +2437,10 @@ static int cake_config_diffserv3(struct
+@@ -2479,15 +2461,10 @@ static int cake_config_diffserv3(struct
cake_set_rate(&q->tins[2], rate >> 2, mtu,
us_to_ns(q->target), us_to_ns(q->interval));
diff --git a/target/linux/generic/backport-5.4/396-5.8-sch_cake-don-t-try-to-reallocate-or-unshare-skb-unco.patch b/target/linux/generic/backport-5.4/396-5.8-sch_cake-don-t-try-to-reallocate-or-unshare-skb-unco.patch
deleted file mode 100644
index a36095c26c..0000000000
--- a/target/linux/generic/backport-5.4/396-5.8-sch_cake-don-t-try-to-reallocate-or-unshare-skb-unco.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 9208d2863ac689a563b92f2161d8d1e7127d0add Mon Sep 17 00:00:00 2001
-From: Ilya Ponetayev <i.ponetaev@ndmsystems.com>
-Date: Thu, 25 Jun 2020 22:12:07 +0200
-Subject: [PATCH] sch_cake: don't try to reallocate or unshare skb
- unconditionally
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-cake_handle_diffserv() tries to linearize mac and network header parts of
-skb and to make it writable unconditionally. In some cases it leads to full
-skb reallocation, which reduces throughput and increases CPU load. Some
-measurements of IPv4 forward + NAPT on MIPS router with 580 MHz single-core
-CPU was conducted. It appears that on kernel 4.9 skb_try_make_writable()
-reallocates skb, if skb was allocated in ethernet driver via so-called
-'build skb' method from page cache (it was discovered by strange increase
-of kmalloc-2048 slab at first).
-
-Obtain DSCP value via read-only skb_header_pointer() call, and leave
-linearization only for DSCP bleaching or ECN CE setting. And, as an
-additional optimisation, skip diffserv parsing entirely if it is not needed
-by the current configuration.
-
-Fixes: c87b4ecdbe8d ("sch_cake: Make sure we can write the IP header before changing DSCP bits")
-Signed-off-by: Ilya Ponetayev <i.ponetaev@ndmsystems.com>
-[ fix a few style issues, reflow commit message ]
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
----
- net/sched/sch_cake.c | 41 ++++++++++++++++++++++++++++++-----------
- 1 file changed, 30 insertions(+), 11 deletions(-)
-
---- a/net/sched/sch_cake.c
-+++ b/net/sched/sch_cake.c
-@@ -1553,30 +1553,49 @@ static unsigned int cake_drop(struct Qdi
-
- static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash)
- {
-- int wlen = skb_network_offset(skb);
-+ const int offset = skb_network_offset(skb);
-+ u16 *buf, buf_;
- u8 dscp;
-
- switch (tc_skb_protocol(skb)) {
- case htons(ETH_P_IP):
-- wlen += sizeof(struct iphdr);
-- if (!pskb_may_pull(skb, wlen) ||
-- skb_try_make_writable(skb, wlen))
-+ buf = skb_header_pointer(skb, offset, sizeof(buf_), &buf_);
-+ if (unlikely(!buf))
- return 0;
-
-- dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2;
-- if (wash && dscp)
-+ /* ToS is in the second byte of iphdr */
-+ dscp = ipv4_get_dsfield((struct iphdr *)buf) >> 2;
-+
-+ if (wash && dscp) {
-+ const int wlen = offset + sizeof(struct iphdr);
-+
-+ if (!pskb_may_pull(skb, wlen) ||
-+ skb_try_make_writable(skb, wlen))
-+ return 0;
-+
- ipv4_change_dsfield(ip_hdr(skb), INET_ECN_MASK, 0);
-+ }
-+
- return dscp;
-
- case htons(ETH_P_IPV6):
-- wlen += sizeof(struct ipv6hdr);
-- if (!pskb_may_pull(skb, wlen) ||
-- skb_try_make_writable(skb, wlen))
-+ buf = skb_header_pointer(skb, offset, sizeof(buf_), &buf_);
-+ if (unlikely(!buf))
- return 0;
-
-- dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> 2;
-- if (wash && dscp)
-+ /* Traffic class is in the first and second bytes of ipv6hdr */
-+ dscp = ipv6_get_dsfield((struct ipv6hdr *)buf) >> 2;
-+
-+ if (wash && dscp) {
-+ const int wlen = offset + sizeof(struct ipv6hdr);
-+
-+ if (!pskb_may_pull(skb, wlen) ||
-+ skb_try_make_writable(skb, wlen))
-+ return 0;
-+
- ipv6_change_dsfield(ipv6_hdr(skb), INET_ECN_MASK, 0);
-+ }
-+
- return dscp;
-
- case htons(ETH_P_ARP):
diff --git a/target/linux/generic/backport-5.4/397-5.8-sch_cake-don-t-call-diffserv-parsing-code-when-it-is.patch b/target/linux/generic/backport-5.4/397-5.8-sch_cake-don-t-call-diffserv-parsing-code-when-it-is.patch
deleted file mode 100644
index 2d9cd29780..0000000000
--- a/target/linux/generic/backport-5.4/397-5.8-sch_cake-don-t-call-diffserv-parsing-code-when-it-is.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 8c95eca0bb8c4bd2231a0d581f1ad0d50c90488c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
-Date: Thu, 25 Jun 2020 22:12:08 +0200
-Subject: [PATCH] sch_cake: don't call diffserv parsing code when it is not
- needed
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-As a further optimisation of the diffserv parsing codepath, we can skip it
-entirely if CAKE is configured to neither use diffserv-based
-classification, nor to zero out the diffserv bits.
-
-Fixes: c87b4ecdbe8d ("sch_cake: Make sure we can write the IP header before changing DSCP bits")
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
----
- net/sched/sch_cake.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
---- a/net/sched/sch_cake.c
-+++ b/net/sched/sch_cake.c
-@@ -1551,7 +1551,7 @@ static unsigned int cake_drop(struct Qdi
- return idx + (tin << 16);
- }
-
--static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash)
-+static u8 cake_handle_diffserv(struct sk_buff *skb, bool wash)
- {
- const int offset = skb_network_offset(skb);
- u16 *buf, buf_;
-@@ -1612,14 +1612,17 @@ static struct cake_tin_data *cake_select
- {
- struct cake_sched_data *q = qdisc_priv(sch);
- u32 tin, mark;
-+ bool wash;
- u8 dscp;
-
- /* Tin selection: Default to diffserv-based selection, allow overriding
-- * using firewall marks or skb->priority.
-+ * using firewall marks or skb->priority. Call DSCP parsing early if
-+ * wash is enabled, otherwise defer to below to skip unneeded parsing.
- */
-- dscp = cake_handle_diffserv(skb,
-- q->rate_flags & CAKE_FLAG_WASH);
- mark = (skb->mark & q->fwmark_mask) >> q->fwmark_shft;
-+ wash = !!(q->rate_flags & CAKE_FLAG_WASH);
-+ if (wash)
-+ dscp = cake_handle_diffserv(skb, wash);
-
- if (q->tin_mode == CAKE_DIFFSERV_BESTEFFORT)
- tin = 0;
-@@ -1633,6 +1636,8 @@ static struct cake_tin_data *cake_select
- tin = q->tin_order[TC_H_MIN(skb->priority) - 1];
-
- else {
-+ if (!wash)
-+ dscp = cake_handle_diffserv(skb, wash);
- tin = q->tin_index[dscp];
-
- if (unlikely(tin >= q->tin_cnt))
diff --git a/target/linux/generic/backport-5.4/398-5.8-sch_cake-fix-a-few-style-nits.patch b/target/linux/generic/backport-5.4/398-5.8-sch_cake-fix-a-few-style-nits.patch
deleted file mode 100644
index 1160489efb..0000000000
--- a/target/linux/generic/backport-5.4/398-5.8-sch_cake-fix-a-few-style-nits.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 3f608f0c41360b11b04c763f348b712f651c8bac Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
-Date: Thu, 25 Jun 2020 22:12:09 +0200
-Subject: [PATCH] sch_cake: fix a few style nits
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-I spotted a few nits when comparing the in-tree version of sch_cake with
-the out-of-tree one: A redundant error variable declaration shadowing an
-outer declaration, and an indentation alignment issue. Fix both of these.
-
-Fixes: 046f6fd5daef ("sched: Add Common Applications Kept Enhanced (cake) qdisc")
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
----
- net/sched/sch_cake.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/net/sched/sch_cake.c
-+++ b/net/sched/sch_cake.c
-@@ -2717,7 +2717,7 @@ static int cake_init(struct Qdisc *sch,
- qdisc_watchdog_init(&q->watchdog, sch);
-
- if (opt) {
-- int err = cake_change(sch, opt, extack);
-+ err = cake_change(sch, opt, extack);
-
- if (err)
- return err;
-@@ -3034,7 +3034,7 @@ static int cake_dump_class_stats(struct
- PUT_STAT_S32(BLUE_TIMER_US,
- ktime_to_us(
- ktime_sub(now,
-- flow->cvars.blue_timer)));
-+ flow->cvars.blue_timer)));
- }
- if (flow->cvars.dropping) {
- PUT_STAT_S32(DROP_NEXT_US,
diff --git a/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch b/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
index 23230abfbb..6ee99b4791 100644
--- a/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
+++ b/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
@@ -54,7 +54,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
#include <linux/mdio.h>
#include <linux/io.h>
#include <linux/uaccess.h>
-@@ -1183,6 +1184,65 @@ phy_standalone_show(struct device *dev,
+@@ -1185,6 +1186,65 @@ phy_standalone_show(struct device *dev,
static DEVICE_ATTR_RO(phy_standalone);
/**
@@ -120,7 +120,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* phy_attach_direct - attach a network device to a given PHY device pointer
* @dev: network device to attach
* @phydev: Pointer to phy_device to attach
-@@ -1259,6 +1319,9 @@ int phy_attach_direct(struct net_device
+@@ -1261,6 +1321,9 @@ int phy_attach_direct(struct net_device
dev->phydev = phydev;
}
@@ -130,7 +130,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/* Some Ethernet drivers try to connect to a PHY device before
* calling register_netdevice() -> netdev_register_kobject() and
* does the dev->dev.kobj initialization. Here we only check for
-@@ -2287,6 +2350,9 @@ static int phy_remove(struct device *dev
+@@ -2289,6 +2352,9 @@ static int phy_remove(struct device *dev
phydev->state = PHY_DOWN;
mutex_unlock(&phydev->lock);
diff --git a/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch b/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch
index 855c4d2aac..f03cd2a984 100644
--- a/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch
+++ b/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch
@@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -1679,6 +1679,40 @@ static int genphy_config_advert(struct p
+@@ -1681,6 +1681,40 @@ static int genphy_config_advert(struct p
}
/**
@@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* genphy_config_eee_advert - disable unwanted eee mode advertisement
* @phydev: target phy_device struct
*
-@@ -1787,6 +1821,54 @@ int __genphy_config_aneg(struct phy_devi
+@@ -1789,6 +1823,54 @@ int __genphy_config_aneg(struct phy_devi
EXPORT_SYMBOL(__genphy_config_aneg);
/**
@@ -116,7 +116,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* genphy_aneg_done - return auto-negotiation status
* @phydev: target phy_device struct
*
-@@ -1958,6 +2040,63 @@ int genphy_read_status(struct phy_device
+@@ -1960,6 +2042,63 @@ int genphy_read_status(struct phy_device
EXPORT_SYMBOL(genphy_read_status);
/**
diff --git a/target/linux/generic/backport-5.4/803-v5.8-i2c-pxa-use-official-address-byte-helper.patch b/target/linux/generic/backport-5.4/803-v5.8-i2c-pxa-use-official-address-byte-helper.patch
index c20a00c7f4..a937b52d9d 100644
--- a/target/linux/generic/backport-5.4/803-v5.8-i2c-pxa-use-official-address-byte-helper.patch
+++ b/target/linux/generic/backport-5.4/803-v5.8-i2c-pxa-use-official-address-byte-helper.patch
@@ -18,7 +18,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
-@@ -675,16 +675,6 @@ static void i2c_pxa_slave_stop(struct px
+@@ -674,16 +674,6 @@ static void i2c_pxa_slave_stop(struct px
* PXA I2C Master mode
*/
@@ -35,7 +35,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
static inline void i2c_pxa_start_message(struct pxa_i2c *i2c)
{
u32 icr;
-@@ -692,8 +682,8 @@ static inline void i2c_pxa_start_message
+@@ -691,8 +681,8 @@ static inline void i2c_pxa_start_message
/*
* Step 1: target slave address into IDBR
*/
@@ -46,7 +46,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/*
* Step 2: initiate the write.
-@@ -1006,8 +996,8 @@ static void i2c_pxa_irq_txempty(struct p
+@@ -1003,8 +993,8 @@ static void i2c_pxa_irq_txempty(struct p
/*
* Write the next address.
*/
diff --git a/target/linux/generic/backport-5.4/806-v5.8-i2c-pxa-re-arrange-functions-to-flow-better.patch b/target/linux/generic/backport-5.4/806-v5.8-i2c-pxa-re-arrange-functions-to-flow-better.patch
index ff631cf352..9f09f9dacb 100644
--- a/target/linux/generic/backport-5.4/806-v5.8-i2c-pxa-re-arrange-functions-to-flow-better.patch
+++ b/target/linux/generic/backport-5.4/806-v5.8-i2c-pxa-re-arrange-functions-to-flow-better.patch
@@ -18,7 +18,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
-@@ -327,7 +327,6 @@ static void i2c_pxa_scream_blue_murder(s
+@@ -326,7 +326,6 @@ static void i2c_pxa_scream_blue_murder(s
#endif /* ifdef DEBUG / else */
static void i2c_pxa_master_complete(struct pxa_i2c *i2c, int ret);
@@ -26,7 +26,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
static inline int i2c_pxa_is_slavemode(struct pxa_i2c *i2c)
{
-@@ -700,34 +699,6 @@ static inline void i2c_pxa_stop_message(
+@@ -697,34 +696,6 @@ static inline void i2c_pxa_stop_message(
writel(icr, _ICR(i2c));
}
@@ -61,7 +61,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/*
* PXA I2C send master code
* 1. Load master code to IDBR and send it.
-@@ -756,140 +727,6 @@ static int i2c_pxa_send_mastercode(struc
+@@ -753,140 +724,6 @@ static int i2c_pxa_send_mastercode(struc
return (timeout == 0) ? I2C_RETRY : 0;
}
@@ -202,7 +202,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/*
* i2c_pxa_master_complete - complete the message and wake up.
*/
-@@ -1096,6 +933,71 @@ static irqreturn_t i2c_pxa_handler(int t
+@@ -1093,6 +930,71 @@ static irqreturn_t i2c_pxa_handler(int t
return IRQ_HANDLED;
}
@@ -274,7 +274,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
static int i2c_pxa_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
{
-@@ -1129,6 +1031,103 @@ static const struct i2c_algorithm i2c_px
+@@ -1126,6 +1028,103 @@ static const struct i2c_algorithm i2c_px
.functionality = i2c_pxa_functionality,
};
diff --git a/target/linux/generic/backport-5.4/808-v5.8-i2c-pxa-add-and-use-definitions-for-IBMR-register.patch b/target/linux/generic/backport-5.4/808-v5.8-i2c-pxa-add-and-use-definitions-for-IBMR-register.patch
index 16518b0e66..f197808d23 100644
--- a/target/linux/generic/backport-5.4/808-v5.8-i2c-pxa-add-and-use-definitions-for-IBMR-register.patch
+++ b/target/linux/generic/backport-5.4/808-v5.8-i2c-pxa-add-and-use-definitions-for-IBMR-register.patch
@@ -27,7 +27,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
#define ICR_START (1 << 0) /* start bit */
#define ICR_STOP (1 << 1) /* stop bit */
#define ICR_ACKNAK (1 << 2) /* send ACK(0) or NAK(1) */
-@@ -335,7 +338,7 @@ static void i2c_pxa_abort(struct pxa_i2c
+@@ -334,7 +337,7 @@ static void i2c_pxa_abort(struct pxa_i2c
return;
}
@@ -36,7 +36,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
unsigned long icr = readl(_ICR(i2c));
icr &= ~ICR_START;
-@@ -390,7 +393,8 @@ static int i2c_pxa_wait_master(struct px
+@@ -389,7 +392,8 @@ static int i2c_pxa_wait_master(struct px
* quick check of the i2c lines themselves to ensure they've
* gone high...
*/
@@ -46,7 +46,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
if (i2c_debug > 0)
dev_dbg(&i2c->adap.dev, "%s: done\n", __func__);
return 1;
-@@ -575,7 +579,7 @@ static void i2c_pxa_slave_start(struct p
+@@ -574,7 +578,7 @@ static void i2c_pxa_slave_start(struct p
timeout = 0x10000;
while (1) {
@@ -55,7 +55,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
break;
timeout--;
-@@ -638,7 +642,7 @@ static void i2c_pxa_slave_start(struct p
+@@ -637,7 +641,7 @@ static void i2c_pxa_slave_start(struct p
timeout = 0x10000;
while (1) {
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
index 9809d1dbbb..9b1dee62ce 100644
--- 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
@@ -53,7 +53,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
},
[REGS_A3700] = {
.ibmr = 0x00,
-@@ -1232,8 +1240,8 @@ static int i2c_pxa_probe(struct platform
+@@ -1229,8 +1237,8 @@ static int i2c_pxa_probe(struct platform
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;
diff --git a/target/linux/generic/backport-5.4/811-v5.8-i2c-pxa-move-DT-IDs-along-side-platform-IDs.patch b/target/linux/generic/backport-5.4/811-v5.8-i2c-pxa-move-DT-IDs-along-side-platform-IDs.patch
index 70ef8f35ab..02565229d8 100644
--- a/target/linux/generic/backport-5.4/811-v5.8-i2c-pxa-move-DT-IDs-along-side-platform-IDs.patch
+++ b/target/linux/generic/backport-5.4/811-v5.8-i2c-pxa-move-DT-IDs-along-side-platform-IDs.patch
@@ -32,7 +32,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
static const struct platform_device_id i2c_pxa_id_table[] = {
{ "pxa2xx-i2c", REGS_PXA2XX },
{ "pxa3xx-pwri2c", REGS_PXA3XX },
-@@ -1181,15 +1190,6 @@ static const struct i2c_algorithm i2c_px
+@@ -1178,15 +1187,6 @@ static const struct i2c_algorithm i2c_px
.functionality = i2c_pxa_functionality,
};
diff --git a/target/linux/generic/backport-5.4/812-v5.8-i2c-pxa-fix-i2c_pxa_scream_blue_murder-debug-output.patch b/target/linux/generic/backport-5.4/812-v5.8-i2c-pxa-fix-i2c_pxa_scream_blue_murder-debug-output.patch
deleted file mode 100644
index 0afb29472b..0000000000
--- a/target/linux/generic/backport-5.4/812-v5.8-i2c-pxa-fix-i2c_pxa_scream_blue_murder-debug-output.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From: Russell King <rmk+kernel@armlinux.org.uk>
-Bcc: linux@mail.armlinux.org.uk
-Cc: linux-i2c@vger.kernel.org
-Subject: [PATCH 10/17] i2c: pxa: fix i2c_pxa_scream_blue_murder() debug output
-MIME-Version: 1.0
-Content-Disposition: inline
-Content-Transfer-Encoding: 8bit
-Content-Type: text/plain; charset="utf-8"
-
-The IRQ log output is supposed to appear on a single line. However,
-commit 3a2dc1677b60 ("i2c: pxa: Update debug function to dump more info
-on error") resulted in it being printed one-entry-per-line, which is
-excessively long.
-
-Fixing this is not a trivial matter; using pr_cont() doesn't work as
-the previous dev_dbg() may not have been compiled in, or may be
-dynamic.
-
-Since the rest of this function output is at error level, and is also
-debug output, promote this to error level as well to avoid this
-problem.
-
-Reduce the number of always zero prefix digits to save screen real-
-estate.
-
-Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
----
- drivers/i2c/busses/i2c-pxa.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
---- a/drivers/i2c/busses/i2c-pxa.c
-+++ b/drivers/i2c/busses/i2c-pxa.c
-@@ -364,11 +364,10 @@ static void i2c_pxa_scream_blue_murder(s
- dev_err(dev, "IBMR: %08x IDBR: %08x ICR: %08x ISR: %08x\n",
- readl(_IBMR(i2c)), readl(_IDBR(i2c)), readl(_ICR(i2c)),
- readl(_ISR(i2c)));
-- dev_dbg(dev, "log: ");
-+ dev_err(dev, "log:");
- for (i = 0; i < i2c->irqlogidx; i++)
-- pr_debug("[%08x:%08x] ", i2c->isrlog[i], i2c->icrlog[i]);
--
-- pr_debug("\n");
-+ pr_cont(" [%03x:%05x]", i2c->isrlog[i], i2c->icrlog[i]);
-+ pr_cont("\n");
- }
-
- #else /* ifdef DEBUG */
diff --git a/target/linux/generic/backport-5.4/815-v5.8-i2c-pxa-consolidate-i2c_pxa_-xfer-implementations.patch b/target/linux/generic/backport-5.4/815-v5.8-i2c-pxa-consolidate-i2c_pxa_-xfer-implementations.patch
index d5fb1d2cbe..2debd4c86b 100644
--- a/target/linux/generic/backport-5.4/815-v5.8-i2c-pxa-consolidate-i2c_pxa_-xfer-implementations.patch
+++ b/target/linux/generic/backport-5.4/815-v5.8-i2c-pxa-consolidate-i2c_pxa_-xfer-implementations.patch
@@ -18,7 +18,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
-@@ -1061,18 +1061,20 @@ static int i2c_pxa_do_xfer(struct pxa_i2
+@@ -1059,18 +1059,20 @@ static int i2c_pxa_do_xfer(struct pxa_i2
return ret;
}
@@ -44,7 +44,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
udelay(100);
}
i2c_pxa_scream_blue_murder(i2c, "exhausted retries");
-@@ -1082,6 +1084,14 @@ static int i2c_pxa_xfer(struct i2c_adapt
+@@ -1080,6 +1082,14 @@ static int i2c_pxa_xfer(struct i2c_adapt
return ret;
}
@@ -59,7 +59,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
static u32 i2c_pxa_functionality(struct i2c_adapter *adap)
{
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL |
-@@ -1165,7 +1175,6 @@ static int i2c_pxa_pio_xfer(struct i2c_a
+@@ -1163,7 +1173,6 @@ static int i2c_pxa_pio_xfer(struct i2c_a
struct i2c_msg msgs[], int num)
{
struct pxa_i2c *i2c = adap->algo_data;
@@ -67,7 +67,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/* If the I2C controller is disabled we need to reset it
(probably due to a suspend/resume destroying state). We do
-@@ -1174,20 +1183,7 @@ static int i2c_pxa_pio_xfer(struct i2c_a
+@@ -1172,20 +1181,7 @@ static int i2c_pxa_pio_xfer(struct i2c_a
if (!(readl(_ICR(i2c)) & ICR_IUE))
i2c_pxa_reset(i2c);
diff --git a/target/linux/generic/backport-5.4/816-v5.8-i2c-pxa-avoid-complaints-with-non-responsive-slaves.patch b/target/linux/generic/backport-5.4/816-v5.8-i2c-pxa-avoid-complaints-with-non-responsive-slaves.patch
index f56e5b647f..63e6db80ad 100644
--- a/target/linux/generic/backport-5.4/816-v5.8-i2c-pxa-avoid-complaints-with-non-responsive-slaves.patch
+++ b/target/linux/generic/backport-5.4/816-v5.8-i2c-pxa-avoid-complaints-with-non-responsive-slaves.patch
@@ -33,7 +33,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
#define BUS_ERROR (-EREMOTEIO)
#define XFER_NAKED (-ECONNREFUSED)
#define I2C_RETRY (-2000) /* an error has occurred retry transmit */
-@@ -840,7 +841,7 @@ static void i2c_pxa_irq_txempty(struct p
+@@ -838,7 +839,7 @@ static void i2c_pxa_irq_txempty(struct p
*/
if (isr & ISR_ACKNAK) {
if (i2c->msg_ptr == 0 && i2c->msg_idx == 0)
@@ -42,7 +42,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
else
ret = XFER_NAKED;
}
-@@ -1068,16 +1069,19 @@ static int i2c_pxa_internal_xfer(struct
+@@ -1066,16 +1067,19 @@ static int i2c_pxa_internal_xfer(struct
{
int ret, i;
diff --git a/target/linux/generic/backport-5.4/817-v5.8-i2c-pxa-ensure-timeout-messages-are-unique.patch b/target/linux/generic/backport-5.4/817-v5.8-i2c-pxa-ensure-timeout-messages-are-unique.patch
index 24cda47789..37a77b6c5c 100644
--- a/target/linux/generic/backport-5.4/817-v5.8-i2c-pxa-ensure-timeout-messages-are-unique.patch
+++ b/target/linux/generic/backport-5.4/817-v5.8-i2c-pxa-ensure-timeout-messages-are-unique.patch
@@ -16,7 +16,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
-@@ -1054,7 +1054,7 @@ static int i2c_pxa_do_xfer(struct pxa_i2
+@@ -1052,7 +1052,7 @@ static int i2c_pxa_do_xfer(struct pxa_i2
ret = i2c->msg_idx;
if (!timeout && i2c->msg_num) {
@@ -25,7 +25,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
ret = I2C_RETRY;
}
-@@ -1124,7 +1124,7 @@ static int i2c_pxa_pio_set_master(struct
+@@ -1122,7 +1122,7 @@ static int i2c_pxa_pio_set_master(struct
if (timeout < 0) {
show_state(i2c);
dev_err(&i2c->adap.dev,
@@ -34,7 +34,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
return I2C_RETRY;
}
-@@ -1168,7 +1168,7 @@ static int i2c_pxa_do_pio_xfer(struct px
+@@ -1166,7 +1166,7 @@ static int i2c_pxa_do_pio_xfer(struct px
out:
if (timeout == 0) {
diff --git a/target/linux/generic/backport-5.4/818-v5.8-i2c-pxa-remove-some-unnecessary-debug.patch b/target/linux/generic/backport-5.4/818-v5.8-i2c-pxa-remove-some-unnecessary-debug.patch
index f14bb30e38..5438588ded 100644
--- a/target/linux/generic/backport-5.4/818-v5.8-i2c-pxa-remove-some-unnecessary-debug.patch
+++ b/target/linux/generic/backport-5.4/818-v5.8-i2c-pxa-remove-some-unnecessary-debug.patch
@@ -20,7 +20,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
-@@ -1116,10 +1116,8 @@ static int i2c_pxa_pio_set_master(struct
+@@ -1114,10 +1114,8 @@ static int i2c_pxa_pio_set_master(struct
/*
* Wait for the bus to become free.
*/
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
deleted file mode 100644
index 70fbffc47f..0000000000
--- a/target/linux/generic/backport-5.4/819-v5.8-i2c-pxa-clear-all-master-action-bits-in-i2c_pxa_stop.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-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(-)
-
---- a/drivers/i2c/busses/i2c-pxa.c
-+++ b/drivers/i2c/busses/i2c-pxa.c
-@@ -754,11 +754,9 @@ static inline void i2c_pxa_stop_message(
- {
- 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));
- }
-