linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next RFC PATCH 0/4] net: dsa: qca8k: code split for qca8k
@ 2022-07-16 17:49 Christian Marangi
  2022-07-16 17:49 ` [net-next RFC PATCH 1/4] net: dsa: qca8k: drop qca8k_read/write/rmw for regmap variant Christian Marangi
                   ` (4 more replies)
  0 siblings, 5 replies; 29+ messages in thread
From: Christian Marangi @ 2022-07-16 17:49 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Russell King, Greg Kroah-Hartman, Jens Axboe, Christian Marangi,
	linux-kernel, netdev

This is posted as an RFC as it does contain changes that depends on a
regmap patch. The patch is here [1] hoping it will get approved.

If it will be NACKed, I will have to rework this and revert one of the
patch that makes use of the new regmap bulk implementation.

Anyway, this is needed ad ipq4019 SoC have an internal switch that is
based on qca8k with very minor changes. The general function is equal.

Because of this we split the driver to common and specific code.

As the common function needs to be moved to a different file to be
reused, we had to convert every remaining user of qca8k_read/write/rmw
to regmap variant.
We had also to generilized the special handling for the ethtool_stats
function that makes use of the autocast mib. (ipq4019 will have a
different tagger and use mmio so it could be quicker to use mmio instead
of automib feature)
And we had to convert the regmap read/write to bulk implementation to
drop the special function that makes use of it. This will be compatible
with ipq4019 and at the same time permits normal switch to use the eth
mgmt way to send the entire ATU table read/write in one go.

(the bulk implementation could not be done when it was introduced as
regmap didn't support at times bulk read/write without a bus)

[1] https://lore.kernel.org/lkml/20220715201032.19507-1-ansuelsmth@gmail.com/

Christian Marangi (4):
  net: dsa: qca8k: drop qca8k_read/write/rmw for regmap variant
  net: dsa: qca8k: convert to regmap read/write API
  net: dsa: qca8k: rework mib autocast handling
  net: dsa: qca8k: split qca8k in common and 8xxx specific code

 drivers/net/dsa/qca/Makefile                  |    1 +
 drivers/net/dsa/qca/{qca8k.c => qca8k-8xxx.c} | 1638 +++--------------
 drivers/net/dsa/qca/qca8k-common.c            | 1174 ++++++++++++
 drivers/net/dsa/qca/qca8k.h                   |   61 +
 4 files changed, 1463 insertions(+), 1411 deletions(-)
 rename drivers/net/dsa/qca/{qca8k.c => qca8k-8xxx.c} (60%)
 create mode 100644 drivers/net/dsa/qca/qca8k-common.c

-- 
2.36.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2022-07-19  0:41 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-16 17:49 [net-next RFC PATCH 0/4] net: dsa: qca8k: code split for qca8k Christian Marangi
2022-07-16 17:49 ` [net-next RFC PATCH 1/4] net: dsa: qca8k: drop qca8k_read/write/rmw for regmap variant Christian Marangi
2022-07-18 18:04   ` Vladimir Oltean
2022-07-18 17:55     ` Christian Marangi
2022-07-18 18:40       ` Vladimir Oltean
2022-07-18 18:40         ` Christian Marangi
2022-07-18 19:35           ` Vladimir Oltean
2022-07-18 19:30             ` Christian Marangi
2022-07-18 20:30               ` Vladimir Oltean
2022-07-18 21:54                 ` Christian Marangi
2022-07-18 23:43                   ` Vladimir Oltean
2022-07-18 23:32                     ` Christian Marangi
2022-07-19  0:18                       ` Vladimir Oltean
2022-07-19  0:17                         ` Christian Marangi
2022-07-19  0:41                           ` Vladimir Oltean
2022-07-16 17:49 ` [net-next RFC PATCH 2/4] net: dsa: qca8k: convert to regmap read/write API Christian Marangi
2022-07-16 17:49 ` [net-next RFC PATCH 3/4] net: dsa: qca8k: rework mib autocast handling Christian Marangi
2022-07-18 17:27   ` Vladimir Oltean
2022-07-18 17:20     ` Christian Marangi
2022-07-18 17:58       ` Vladimir Oltean
2022-07-16 17:49 ` [net-next RFC PATCH 4/4] net: dsa: qca8k: split qca8k in common and 8xxx specific code Christian Marangi
2022-07-18 17:21   ` Vladimir Oltean
2022-07-18 17:10     ` Christian Marangi
2022-07-18 17:38       ` Vladimir Oltean
2022-07-18 14:46 ` [net-next RFC PATCH 0/4] net: dsa: qca8k: code split for qca8k Christian Marangi
2022-07-18 17:35   ` Vladimir Oltean
2022-07-18 17:23     ` Christian Marangi
2022-07-18 18:15       ` Vladimir Oltean
2022-07-18 18:02         ` Christian Marangi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).