mbox series

[00/31,v3] ARM: ixp4xx: Modernize and DT support

Message ID 20190408062831.16422-1-linus.walleij@linaro.org
Headers show
Series ARM: ixp4xx: Modernize and DT support | expand

Message

Linus Walleij April 8, 2019, 6:28 a.m. UTC
This modernizes the IXP4xx platform and adds initial Device Tree
Support. We migrate to MULTI_IRQ_HANDLER, bumps the IRQs to
offset 16, converts to SPARSE_IRQ, then we add proper subsystem
drivers in each subsystem for irqchip, GPIO and clocksource and
switch over to using these new drivers.

I will follow up with a pull request to the ARM SoC shortly.

A working set of base patches that boots to prompt from
initramfs on NSLU2 and GW2358-4 and also includes the
series for ethernet support is provided on this branch:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/log/?h=ixp4

Obviously I am looking for the IXP4xx maintainers to ACK
the patch set.

Linus Walleij (31):
  ARM: ixp4xx: Add myself as maintainer
  ARM: ixp4xx: Convert to MULTI_IRQ_HANDLER
  ARM: ixp4xx: Pass IRQ resource to beeper
  ARM: ixp4xx: Convert to SPARSE_IRQ
  irqchip: Add driver for IXP4xx
  gpio: ixp4xx: Add driver for the IXP4xx GPIO
  ARM: ixp4xx: Switch to use new IRQ+GPIO drivers
  clocksource/drivers/ixp4xx: Add driver
  ARM: ixp4xx: Switch to use new timer driver
  irqchip: ixp4xx: Add DT bindings
  irqchip: ixp4xx: Add OF initialization support
  clocksource/drivers/ixp4xx: Add DT bindings
  clocksource/drivers/ixp4xx: Add OF initialization support
  gpio: ixp4xx: Add DT bindings
  gpio: ixp4xx: Add OF probing support
  ARM: ixp4xx: Add DT bindings
  ARM: ixp4xx: Add device tree boot support
  ARM: dts: Add some initial IXP4xx device trees
  ARM: ixp4xx: Move NPE and QMGR to drivers/soc
  ARM: ixp4xx: Move IXP4xx QMGR and NPE headers
  ARM: ixp4xx: Turn the NPE into a platform device
  ARM: ixp4xx: Turn the QMGR into a platform device
  soc: ixp4xx: npe: Pass addresses as resources
  soc: ixp4xx: Uninline several functions
  soc: ixp4xx: Remove unused functions
  soc: ixp4xx: qmgr: Pass resources
  soc: ixp4xx: Add DT bindings for IXP4xx NPE
  soc: ixp4xx: npe: Add DT probe code
  soc: ixp4xx: qmgr: Add DT bindings for IXP4xx qmgr
  soc: ixp4xx: qmgr: Add DT probe code
  ARM: dts: Add queue manager and NPE to the IXP4xx DTSI

 .../devicetree/bindings/arm/intel-ixp4xx.yaml |  22 +
 ...ntel,ixp4xx-network-processing-engine.yaml |  44 ++
 .../intel,ixp4xx-interrupt.yaml               |  54 ++
 .../misc/intel,ixp4xx-queue-manager.yaml      |  54 ++
 .../bindings/timer/intel,ixp4xx-timer.yaml    |  42 ++
 MAINTAINERS                                   |  18 +-
 arch/arm/Kconfig                              |   5 +-
 arch/arm/boot/dts/Makefile                    |   3 +
 .../boot/dts/intel-ixp42x-linksys-nslu2.dts   | 109 ++++
 arch/arm/boot/dts/intel-ixp42x.dtsi           |  25 +
 .../dts/intel-ixp43x-gateworks-gw2358.dts     |  94 ++++
 arch/arm/boot/dts/intel-ixp43x.dtsi           |  15 +
 arch/arm/boot/dts/intel-ixp45x-ixp46x.dtsi    |  34 ++
 arch/arm/boot/dts/intel-ixp4xx.dtsi           |  70 +++
 arch/arm/mach-ixp4xx/Kconfig                  |  27 +-
 arch/arm/mach-ixp4xx/Makefile                 |   5 +-
 arch/arm/mach-ixp4xx/avila-pci.c              |   2 +
 arch/arm/mach-ixp4xx/avila-setup.c            |   2 +
 arch/arm/mach-ixp4xx/common.c                 | 484 +++---------------
 arch/arm/mach-ixp4xx/coyote-pci.c             |   2 +
 arch/arm/mach-ixp4xx/coyote-setup.c           |   2 +
 arch/arm/mach-ixp4xx/dsmg600-pci.c            |   2 +
 arch/arm/mach-ixp4xx/dsmg600-setup.c          |   5 +-
 arch/arm/mach-ixp4xx/fsg-pci.c                |   2 +
 arch/arm/mach-ixp4xx/fsg-setup.c              |   2 +
 arch/arm/mach-ixp4xx/gateway7001-pci.c        |   2 +
 arch/arm/mach-ixp4xx/gateway7001-setup.c      |   2 +
 arch/arm/mach-ixp4xx/gtwx5715-pci.c           |   2 +
 arch/arm/mach-ixp4xx/gtwx5715-setup.c         |   2 +
 .../mach-ixp4xx/include/mach/entry-macro.S    |  41 --
 arch/arm/mach-ixp4xx/include/mach/irqs.h      |  75 ---
 .../mach-ixp4xx/include/mach/ixp4xx-regs.h    |  94 ----
 arch/arm/mach-ixp4xx/include/mach/qmgr.h      | 204 --------
 arch/arm/mach-ixp4xx/irqs.h                   |  68 +++
 arch/arm/mach-ixp4xx/ixdp425-pci.c            |   2 +
 arch/arm/mach-ixp4xx/ixdp425-setup.c          |   2 +
 arch/arm/mach-ixp4xx/ixdpg425-pci.c           |   2 +
 arch/arm/mach-ixp4xx/ixp4xx-of.c              |  60 +++
 arch/arm/mach-ixp4xx/nas100d-pci.c            |   2 +
 arch/arm/mach-ixp4xx/nas100d-setup.c          |   5 +-
 arch/arm/mach-ixp4xx/nslu2-pci.c              |   2 +
 arch/arm/mach-ixp4xx/nslu2-setup.c            |  12 +-
 arch/arm/mach-ixp4xx/wg302v2-pci.c            |   2 +
 arch/arm/mach-ixp4xx/wg302v2-setup.c          |   2 +
 drivers/clocksource/Kconfig                   |   7 +
 drivers/clocksource/Makefile                  |   1 +
 drivers/clocksource/timer-ixp4xx.c            | 284 ++++++++++
 drivers/crypto/ixp4xx_crypto.c                |   4 +-
 drivers/gpio/Kconfig                          |  13 +
 drivers/gpio/Makefile                         |   1 +
 drivers/gpio/gpio-ixp4xx.c                    | 474 +++++++++++++++++
 drivers/input/misc/ixp4xx-beeper.c            |  20 +-
 drivers/irqchip/Kconfig                       |   6 +
 drivers/irqchip/Makefile                      |   1 +
 drivers/irqchip/irq-ixp4xx.c                  | 403 +++++++++++++++
 drivers/net/ethernet/xscale/ixp4xx_eth.c      |  14 +-
 drivers/net/wan/ixp4xx_hss.c                  |   4 +-
 drivers/soc/Kconfig                           |   1 +
 drivers/soc/Makefile                          |   1 +
 drivers/soc/ixp4xx/Kconfig                    |  16 +
 drivers/soc/ixp4xx/Makefile                   |   2 +
 .../soc/ixp4xx/ixp4xx-npe.c                   |  66 ++-
 .../soc/ixp4xx/ixp4xx-qmgr.c                  | 186 +++++--
 drivers/watchdog/ixp4xx_wdt.c                 |   9 +
 include/linux/irqchip/irq-ixp4xx.h            |  12 +
 include/linux/platform_data/timer-ixp4xx.h    |  11 +
 .../mach => include/linux/soc/ixp4xx}/npe.h   |   2 -
 include/linux/soc/ixp4xx/qmgr.h               |  91 ++++
 68 files changed, 2421 insertions(+), 913 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/intel-ixp4xx.yaml
 create mode 100644 Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/intel,ixp4xx-interrupt.yaml
 create mode 100644 Documentation/devicetree/bindings/misc/intel,ixp4xx-queue-manager.yaml
 create mode 100644 Documentation/devicetree/bindings/timer/intel,ixp4xx-timer.yaml
 create mode 100644 arch/arm/boot/dts/intel-ixp42x-linksys-nslu2.dts
 create mode 100644 arch/arm/boot/dts/intel-ixp42x.dtsi
 create mode 100644 arch/arm/boot/dts/intel-ixp43x-gateworks-gw2358.dts
 create mode 100644 arch/arm/boot/dts/intel-ixp43x.dtsi
 create mode 100644 arch/arm/boot/dts/intel-ixp45x-ixp46x.dtsi
 create mode 100644 arch/arm/boot/dts/intel-ixp4xx.dtsi
 delete mode 100644 arch/arm/mach-ixp4xx/include/mach/entry-macro.S
 delete mode 100644 arch/arm/mach-ixp4xx/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-ixp4xx/include/mach/qmgr.h
 create mode 100644 arch/arm/mach-ixp4xx/irqs.h
 create mode 100644 arch/arm/mach-ixp4xx/ixp4xx-of.c
 create mode 100644 drivers/clocksource/timer-ixp4xx.c
 create mode 100644 drivers/gpio/gpio-ixp4xx.c
 create mode 100644 drivers/irqchip/irq-ixp4xx.c
 create mode 100644 drivers/soc/ixp4xx/Kconfig
 create mode 100644 drivers/soc/ixp4xx/Makefile
 rename arch/arm/mach-ixp4xx/ixp4xx_npe.c => drivers/soc/ixp4xx/ixp4xx-npe.c (94%)
 rename arch/arm/mach-ixp4xx/ixp4xx_qmgr.c => drivers/soc/ixp4xx/ixp4xx-qmgr.c (66%)
 create mode 100644 include/linux/irqchip/irq-ixp4xx.h
 create mode 100644 include/linux/platform_data/timer-ixp4xx.h
 rename {arch/arm/mach-ixp4xx/include/mach => include/linux/soc/ixp4xx}/npe.h (95%)
 create mode 100644 include/linux/soc/ixp4xx/qmgr.h

Comments

Rob Herring (Arm) April 9, 2019, 1:12 p.m. UTC | #1
On Mon, Apr 8, 2019 at 1:29 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> This adds device tree bindings for the Intel IXP4xx AHB
> Queue Manager.
>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v2->v3:
> - Rebased on v5.1-rc1
> - Drop oneOf in compatible, just list items.
> - Drop description on reg, just use maxItems: 1
> - Set '#queue-cells' as required
> ---
>  .../misc/intel,ixp4xx-queue-manager.yaml      | 54 +++++++++++++++++++
>  1 file changed, 54 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/misc/intel,ixp4xx-queue-manager.yaml
>
> diff --git a/Documentation/devicetree/bindings/misc/intel,ixp4xx-queue-manager.yaml b/Documentation/devicetree/bindings/misc/intel,ixp4xx-queue-manager.yaml
> new file mode 100644
> index 000000000000..346707936a2f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/intel,ixp4xx-queue-manager.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright 2019 Linaro Ltd.
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/misc/intel-ixp4xx-ahb-queue-manager.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Intel IXP4xx AHB Queue Manager
> +
> +maintainers:
> +  - Linus Walleij <linus.walleij@linaro.org>
> +
> +description: |
> +  The IXP4xx AHB Queue Manager maintains queues as circular buffers in
> +  an 8KB embedded SRAM along with hardware pointers. It is used by both
> +  the XScale processor and the NPEs (Network Processing Units) in the
> +  IXP4xx for accelerating queues, especially for networking. Clients pick
> +  queues from the queue manager with foo-queue = <&qmgr N> where the
> +  &qmgr is a phandle to the queue manager and N is the queue resource
> +  number. The queue resources available and their specific purpose
> +  on a certain IXP4xx system will vary.
> +
> +properties:
> +  compatible:
> +    items:
> +      - const: intel,ixp4xx-ahb-queue-manager
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    items:
> +      - description: Interrupt for queues 0-31
> +      - description: Interrupt for queues 32-63
> +
> +  '#queue-cells':
> +    const: 1

Not sure why I didn't notice this earlier... You don't need '#*-cells'
unless it's variable and this should have a vendor prefix as it could
collide with a generic binding if we came up with a 'queue' binding.
So I'd just drop it as it seems specific to this binding.

Rob
Rob Herring (Arm) April 9, 2019, 1:44 p.m. UTC | #2
On Mon, Apr 8, 2019 at 1:29 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> This adds DT bindings for the Intel IXP4xx Network Processing
> Engine (NPE). These are three firmware-executing units found in
> the IXP4xx SoC. These bindings use YAML.
>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v2->v3:
> - Rebased on v5.1-rc1
> ---
>  ...ntel,ixp4xx-network-processing-engine.yaml | 44 +++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/firmware/intel,ixp4xx-network-processing-engine.yaml

Reviewed-by: Rob Herring <robh@kernel.org>