Skip to content

QUICC Engine support on ARM, ARM64, PPC64

Rasmus Villemoes linux-arm-kernel linux-serial linuxppc-dev lkml netdev 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest49 patches 9 repliesIn review
  2. v548 patches 4 repliesSuperseded
  3. v447 patches 31 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v336 patches15 repliesSuperseded
v223 patches11 repliesSuperseded
v17 patches18 repliesSuperseded

Changes in v6 from the cover letter

- add various R-b, A-b tags

- add a patch (48/49) fixing a build issue on ARM with CONFIG_SMP=y

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/49soc: fsl: qe: remove space-before-tabdrivers/soc/fsl/qe/qe.c+2 -20 replies
2/49soc: fsl: qe: drop volatile qualifier of struct qe_ic::regsdrivers/soc/fsl/qe/qe_ic.c drivers/soc/fsl/qe/qe_ic.h+3 -30 replies
3/49soc: fsl: qe: rename qe_(clr/set/clrset)bit* helpersdrivers/net/wan/fsl_ucc_hdlc.c drivers/soc/fsl/qe/ucc.c include/soc/fsl/qe/qe.h+16 -160 replies
4/49soc: fsl: qe: introduce qe_io{read,write}* wrappersinclude/soc/fsl/qe/qe.h+25 -92 replies
5/49soc: fsl: qe: avoid ppc-specific io accessorsdrivers/soc/fsl/qe/gpio.c drivers/soc/fsl/qe/qe.c drivers/soc/fsl/qe/qe_ic.c +6 more+129 -1230 replies
6/49soc: fsl: qe: replace spin_event_timeout by readx_poll_timeout_atomicdrivers/soc/fsl/qe/qe.c+7 -60 replies
7/49soc: fsl: qe: qe.c: guard use of pvr_version_is() with CONFIG_PPC32drivers/soc/fsl/qe/qe.c+9 -10 replies
8/49soc: fsl: qe: drop unneeded #includesdrivers/soc/fsl/qe/qe.c drivers/soc/fsl/qe/qe_io.c+0 -70 replies
9/49soc: fsl: qe: drop assign-only high_active in qe_ic_initdrivers/soc/fsl/qe/qe_ic.c+2 -40 replies
10/49soc: fsl: qe: remove pointless sysfs registration in qe_ic.cdrivers/soc/fsl/qe/qe_ic.c+0 -310 replies
11/49soc: fsl: qe: use qe_ic_cascade_{low,high}_mpic also on 83xxarch/powerpc/platforms/83xx/misc.c include/soc/fsl/qe/qe_ic.h+5 -210 replies
12/49soc: fsl: qe: move calls of qe_ic_init out of arch/powerpc/arch/powerpc/platforms/83xx/km83xx.c arch/powerpc/platforms/83xx/misc.c arch/powerpc/platforms/83xx/mpc832x_mds.c +10 more+26 -1020 replies
13/49powerpc/83xx: remove mpc83xx_ipic_and_qe_init_IRQarch/powerpc/platforms/83xx/km83xx.c arch/powerpc/platforms/83xx/misc.c arch/powerpc/platforms/83xx/mpc832x_mds.c +4 more+5 -170 replies
14/49powerpc/85xx: remove mostly pointless mpc85xx_qe_init()arch/powerpc/platforms/85xx/common.c arch/powerpc/platforms/85xx/corenet_generic.c arch/powerpc/platforms/85xx/mpc85xx.h +3 more+0 -300 replies
15/49soc: fsl: qe: move qe_ic_cascade_* functions to qe_ic.cdrivers/soc/fsl/qe/qe_ic.c include/soc/fsl/qe/qe_ic.h+42 -420 replies
16/49soc: fsl: qe: rename qe_ic_cascade_low_mpic -> qe_ic_cascade_lowdrivers/soc/fsl/qe/qe_ic.c+4 -40 replies
17/49soc: fsl: qe: remove unused qe_ic_set_* functionsdrivers/soc/fsl/qe/qe_ic.c include/soc/fsl/qe/qe_ic.h+0 -980 replies
18/49soc: fsl: qe: don't use NO_IRQ in qe_ic.cdrivers/soc/fsl/qe/qe_ic.c+10 -110 replies
19/49soc: fsl: qe: make qe_ic_get_{low,high}_irq staticdrivers/soc/fsl/qe/qe_ic.c include/soc/fsl/qe/qe_ic.h+2 -120 replies
20/49soc: fsl: qe: simplify qe_ic_init()drivers/soc/fsl/qe/qe_ic.c+4 -230 replies
21/49soc: fsl: qe: merge qe_ic.h headers into qe_ic.cdrivers/soc/fsl/qe/qe_ic.c drivers/soc/fsl/qe/qe_ic.h include/soc/fsl/qe/qe_ic.h+50 -1570 replies
22/49soc: fsl: qe: qe.c: use of_property_read_* helpersdrivers/soc/fsl/qe/qe.c+8 -250 replies
23/49soc: fsl: qe: qe_io.c: don't open-code of_parse_phandle()drivers/soc/fsl/qe/qe_io.c+2 -50 replies
24/49soc: fsl: qe: qe_io.c: access device tree property using be32_to_cpudrivers/soc/fsl/qe/qe_io.c+10 -40 replies
25/49soc: fsl: qe: qe_io.c: use of_property_read_u32() in par_io_init()drivers/soc/fsl/qe/qe_io.c+3 -40 replies
26/49soc: fsl: move cpm.h from powerpc/include/asm to include/soc/fslarch/powerpc/include/asm/cpm.h include/soc/fsl/cpm.h+172 -1710 replies
27/49soc/fsl/qe/qe.h: update include path for cpm.hinclude/soc/fsl/qe/qe.h+1 -10 replies
28/49serial: ucc_uart: explicitly include soc/fsl/cpm.hdrivers/tty/serial/ucc_uart.c+1 -00 replies
29/49serial: ucc_uart: replace ppc-specific IO accessorsdrivers/tty/serial/ucc_uart.c+102 -1080 replies
30/49serial: ucc_uart: factor out soft_uart initializationdrivers/tty/serial/ucc_uart.c+58 -520 replies
31/49serial: ucc_uart: stub out soft_uart_init for !CONFIG_PPC32drivers/tty/serial/ucc_uart.c+16 -10 replies
32/49serial: ucc_uart: use of_property_read_u32() in ucc_uart_probe()drivers/tty/serial/ucc_uart.c+15 -210 replies
33/49serial: ucc_uart: limit brg-frequency workaround to PPC32drivers/tty/serial/ucc_uart.c+7 -00 replies
34/49serial: ucc_uart: access __be32 field using be32_to_cpudrivers/tty/serial/ucc_uart.c+3 -30 replies
35/49soc: fsl: qe: change return type of cpm_muram_alloc() to s32drivers/soc/fsl/qe/qe_common.c include/soc/fsl/qe/qe.h+24 -210 replies
36/49soc: fsl: qe: make cpm_muram_free() return voiddrivers/soc/fsl/qe/qe_common.c include/soc/fsl/qe/qe.h+3 -50 replies
37/49soc: fsl: qe: make cpm_muram_free() ignore a negative offsetdrivers/soc/fsl/qe/qe_common.c+3 -00 replies
38/49soc: fsl: qe: drop broken lazy call of cpm_muram_init()drivers/soc/fsl/qe/qe_common.c+0 -30 replies
39/49soc: fsl: qe: refactor cpm_muram_alloc_common to prevent BUG on error pathdrivers/soc/fsl/qe/qe_common.c+7 -90 replies
40/49soc: fsl: qe: avoid IS_ERR_VALUE in ucc_slow.cdrivers/soc/fsl/qe/ucc_slow.c include/soc/fsl/qe/ucc_slow.h+12 -160 replies
41/49soc: fsl: qe: drop use of IS_ERR_VALUE in qe_sdma_init()drivers/soc/fsl/qe/qe.c+3 -30 replies
42/49soc: fsl: qe: drop pointless check in qe_sdma_init()drivers/soc/fsl/qe/qe.c+0 -30 replies
43/49soc: fsl: qe: avoid IS_ERR_VALUE in ucc_fast.cdrivers/soc/fsl/qe/ucc_fast.c include/soc/fsl/qe/ucc_fast.h+8 -110 replies
44/49net/wan/fsl_ucc_hdlc: avoid use of IS_ERR_VALUE()drivers/net/wan/fsl_ucc_hdlc.c drivers/net/wan/fsl_ucc_hdlc.h+6 -62 replies
45/49net/wan/fsl_ucc_hdlc: fix reading of __be16 registersdrivers/net/wan/fsl_ucc_hdlc.c+2 -20 replies
46/49net/wan/fsl_ucc_hdlc: reject muram offsets above 64Kdrivers/net/wan/fsl_ucc_hdlc.c+5 -00 replies
47/49net: ethernet: freescale: make UCC_GETH explicitly depend on PPC32drivers/net/ethernet/freescale/Kconfig+1 -10 replies
48/49soc: fsl: qe: remove unused #include of asm/irq.h from ucc.cdrivers/soc/fsl/qe/ucc.c+0 -10 replies
49/49soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINEdrivers/soc/fsl/qe/Kconfig+2 -10 replies

Reviews trailers per patch

48 of 49 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchTimur TabiScott WoodDavid S. Miller
SeriesA-b A-b
1/49R-b
2/49R-b
3/49R-b
4/49R-b
5/49R-b
6/49R-b
7/49R-b
8/49R-b
9/49R-b
10/49R-b
11/49R-b
12/49R-b
13/49R-b A-b
14/49R-b A-b
15/49R-b
16/49R-b
17/49R-b
18/49R-b
19/49R-b
20/49R-b
21/49R-b
22/49R-b
23/49R-b
24/49R-b
25/49R-b
26/49R-b
27/49R-b
28/49R-b A-b
29/49R-b A-b
30/49R-b A-b
31/49R-b A-b
32/49R-b A-b
33/49R-b A-b
34/49R-b A-b
35/49R-b
36/49R-b
37/49R-b
38/49R-b
39/49R-b
40/49R-b
41/49R-b
42/49R-b
43/49R-b
44/49R-b
45/49R-b
46/49R-b
47/49R-b
48/49
49/49R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [PATCH v6 00/49] QUICC Engine support on ARM, ARM64, PPC64

There have been several attempts in the past few years to allow building the QUICC engine drivers for platforms other than PPC32. This is yet another attempt.

v5 can be found here: https://lore.kernel.org/lkml/[email protected]/

Changes in v6:

- add various R-b, A-b tags

- add a patch (48/49) fixing a build issue on ARM with CONFIG_SMP=y

I added that patch last in the series, apart from the "allow to build on ARM" Kconfig change, to preserve the enumeration of the other patches from v5.

1-5 are about replacing in_be32 etc. in the core QE code (drivers/soc/fsl/qe).

6-8 handle miscellaneous other ppcisms.

9-21 deal with qe_ic: Simplifying the driver significantly by removing unused code, and removing the platform-specific initialization from arch/powerpc/.

22-25 deal with raw access to devicetree properties in native endianness.

26-34 makes drivers/tty/serial/ucc_uart.c (CONFIG_SERIAL_QE) ready to build on non-ppc.

35-46 deal with IS_ERR_VALUE() and some other things found while digging around that part of the code.

47 adds a PPC32 dependency to UCC_GETH - it has some of the same issues that have been fixed in the ucc_uart and ucc_hdlc cases. Nobody has requested that I allow that driver to be built for arm{,64} and reportedly, the hardware has only ever shipped on PPC SOCs. So instead of growing this series even bigger, I kept that addition. It's trivial to remove if somebody cares enough to fix the build errors/warnings and actually has a platform to test the result on.

48 fixes a build issue on ARM reported by the kbuild bot.

Finally patch 49 lifts the PPC32 restriction from QUICC_ENGINE. At the request of Li Yang, it doesn't remove the PPC32 dependency but instead changes it to PPC|| ARM || ARM64 (or COMPILE_TEST), i.e. listing the platforms that may have a QE.

The series has been built and booted on both an mpc8309-based platform (ppc) as well as an ls1021a-based platform (arm). The core QE code is exercised on both, while I could only test the ucc_uart on arm, since the uarts are not wired up on our mpc8309 board. Qiang Zhao reports that the ucc_hdlc driver does indeed work on a ls1043ardb (arm64) board.

Rasmus Villemoes (49):
soc: fsl: qe: remove space-before-tab
soc: fsl: qe: drop volatile qualifier of struct qe_ic::regs
soc: fsl: qe: rename qe_(clr/set/clrset)bit* helpers
soc: fsl: qe: introduce qe_io{read,write}* wrappers
soc: fsl: qe: avoid ppc-specific io accessors
soc: fsl: qe: replace spin_event_timeout by readx_poll_timeout_atomic
soc: fsl: qe: qe.c: guard use of pvr_version_is() with CONFIG_PPC32
soc: fsl: qe: drop unneeded #includes
soc: fsl: qe: drop assign-only high_active in qe_ic_init
soc: fsl: qe: remove pointless sysfs registration in qe_ic.c
soc: fsl: qe: use qe_ic_cascade_{low,high}_mpic also on 83xx
soc: fsl: qe: move calls of qe_ic_init out of arch/powerpc/ powerpc/83xx: remove mpc83xx_ipic_and_qe_init_IRQ powerpc/85xx: remove mostly pointless mpc85xx_qe_init()
soc: fsl: qe: move qe_ic_cascade_* functions to qe_ic.c
soc: fsl: qe: rename qe_ic_cascade_low_mpic -> qe_ic_cascade_low
soc: fsl: qe: remove unused qe_ic_set_* functions
soc: fsl: qe: don't use NO_IRQ in qe_ic.c
soc: fsl: qe: make qe_ic_get_{low,high}_irq static
soc: fsl: qe: simplify qe_ic_init()
soc: fsl: qe: merge qe_ic.h headers into qe_ic.c
soc: fsl: qe: qe.c: use of_property_read_* helpers
soc: fsl: qe: qe_io.c: don't open-code of_parse_phandle()
soc: fsl: qe: qe_io.c: access device tree property using be32_to_cpu
soc: fsl: qe: qe_io.c: use of_property_read_u32() in par_io_init()
soc: fsl: move cpm.h from powerpc/include/asm to include/soc/fsl soc/fsl/qe/qe.h: update include path for cpm.h
serial: ucc_uart: explicitly include soc/fsl/cpm.h
serial: ucc_uart: replace ppc-specific IO accessors
serial: ucc_uart: factor out soft_uart initialization
serial: ucc_uart: stub out soft_uart_init for !CONFIG_PPC32
serial: ucc_uart: use of_property_read_u32() in ucc_uart_probe()
serial: ucc_uart: limit brg-frequency workaround to PPC32
serial: ucc_uart: access __be32 field using be32_to_cpu
soc: fsl: qe: change return type of cpm_muram_alloc() to s32
soc: fsl: qe: make cpm_muram_free() return void
soc: fsl: qe: make cpm_muram_free() ignore a negative offset
soc: fsl: qe: drop broken lazy call of cpm_muram_init()
soc: fsl: qe: refactor cpm_muram_alloc_common to prevent BUG on error
path
soc: fsl: qe: avoid IS_ERR_VALUE in ucc_slow.c
soc: fsl: qe: drop use of IS_ERR_VALUE in qe_sdma_init()
soc: fsl: qe: drop pointless check in qe_sdma_init()
soc: fsl: qe: avoid IS_ERR_VALUE in ucc_fast.c net/wan/fsl_ucc_hdlc: avoid use of IS_ERR_VALUE() net/wan/fsl_ucc_hdlc: fix reading of __be16 registers net/wan/fsl_ucc_hdlc: reject muram offsets above 64K
net: ethernet: freescale: make UCC_GETH explicitly depend on PPC32
soc: fsl: qe: remove unused #include of asm/irq.h from ucc.c
soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE

 arch/powerpc/include/asm/cpm.h                | 172 +-------
 arch/powerpc/platforms/83xx/km83xx.c          |   3 +-
 arch/powerpc/platforms/83xx/misc.c            |  23 --
 arch/powerpc/platforms/83xx/mpc832x_mds.c     |   3 +-
 arch/powerpc/platforms/83xx/mpc832x_rdb.c     |   3 +-
 arch/powerpc/platforms/83xx/mpc836x_mds.c     |   3 +-
 arch/powerpc/platforms/83xx/mpc836x_rdk.c     |   3 +-
 arch/powerpc/platforms/83xx/mpc83xx.h         |   7 -
 arch/powerpc/platforms/85xx/common.c          |  23 --
 arch/powerpc/platforms/85xx/corenet_generic.c |  12 -
 arch/powerpc/platforms/85xx/mpc85xx.h         |   2 -
 arch/powerpc/platforms/85xx/mpc85xx_mds.c     |  28 --
 arch/powerpc/platforms/85xx/mpc85xx_rdb.c     |  18 -
 arch/powerpc/platforms/85xx/twr_p102x.c       |  16 -
 drivers/net/ethernet/freescale/Kconfig        |   2 +-
 drivers/net/wan/fsl_ucc_hdlc.c                |  23 +-
 drivers/net/wan/fsl_ucc_hdlc.h                |   2 +-
 drivers/soc/fsl/qe/Kconfig                    |   3 +-
 drivers/soc/fsl/qe/gpio.c                     |  34 +-
 drivers/soc/fsl/qe/qe.c                       | 104 ++---
 drivers/soc/fsl/qe/qe_common.c                |  50 +--
 drivers/soc/fsl/qe/qe_ic.c                    | 285 ++++++-------
 drivers/soc/fsl/qe/qe_ic.h                    |  99 -----
 drivers/soc/fsl/qe/qe_io.c                    |  70 ++--
 drivers/soc/fsl/qe/qe_tdm.c                   |   8 +-
 drivers/soc/fsl/qe/ucc.c                      |  27 +-
 drivers/soc/fsl/qe/ucc_fast.c                 |  86 ++--
 drivers/soc/fsl/qe/ucc_slow.c                 |  60 ++-
 drivers/soc/fsl/qe/usb.c                      |   2 +-
 drivers/tty/serial/ucc_uart.c                 | 385 +++++++++---------
 include/soc/fsl/cpm.h                         | 171 ++++++++
 include/soc/fsl/qe/qe.h                       |  59 ++-
 include/soc/fsl/qe/qe_ic.h                    | 135 ------
 include/soc/fsl/qe/ucc_fast.h                 |   4 +-
 include/soc/fsl/qe/ucc_slow.h                 |   6 +-
 35 files changed, 775 insertions(+), 1156 deletions(-)
 delete mode 100644 drivers/soc/fsl/qe/qe_ic.h
 create mode 100644 include/soc/fsl/cpm.h
 delete mode 100644 include/soc/fsl/qe/qe_ic.h
Signature · 7 lines
2.23.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel