]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: ixp4xx: Move NPE and QMGR to drivers/soc
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 10 Feb 2019 13:45:47 +0000 (14:45 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 23 Apr 2019 14:02:15 +0000 (16:02 +0200)
The Network Processing Engine and Queue Manager are
versatile firmware components used by several IXP4xx
drivers.

Drivers are relying on getting access to these components
using <mach/*> headers which does not work with
multiplatform. We need to find a better place for the
drivers to live.

Let's first move them to drivers/soc and the start to
refactor a bit by passing resources and moving headers.

This patch introduce static IRQ assignments but that
will be fixed by later patches in this series.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
MAINTAINERS
arch/arm/mach-ixp4xx/Kconfig
arch/arm/mach-ixp4xx/Makefile
drivers/soc/Kconfig
drivers/soc/Makefile
drivers/soc/ixp4xx/Kconfig [new file with mode: 0644]
drivers/soc/ixp4xx/Makefile [new file with mode: 0644]
drivers/soc/ixp4xx/ixp4xx-npe.c [moved from arch/arm/mach-ixp4xx/ixp4xx_npe.c with 100% similarity]
drivers/soc/ixp4xx/ixp4xx-qmgr.c [moved from arch/arm/mach-ixp4xx/ixp4xx_qmgr.c with 98% similarity]

index 49052de0567b0e1fd8688977f5dbe2c9a35b2081..dbbd7594a9b83cb792daee909e1017fdb0e280f5 100644 (file)
@@ -7888,8 +7888,8 @@ M:        Krzysztof Halasa <khalasa@piap.pl>
 S:     Maintained
 F:     arch/arm/mach-ixp4xx/include/mach/qmgr.h
 F:     arch/arm/mach-ixp4xx/include/mach/npe.h
 S:     Maintained
 F:     arch/arm/mach-ixp4xx/include/mach/qmgr.h
 F:     arch/arm/mach-ixp4xx/include/mach/npe.h
-F:     arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
-F:     arch/arm/mach-ixp4xx/ixp4xx_npe.c
+F:     drivers/soc/ixp4xx/ixp4xx-qmgr.c
+F:     drivers/soc/ixp4xx/ixp4xx-npe.c
 F:     drivers/net/ethernet/xscale/ixp4xx_eth.c
 F:     drivers/net/wan/ixp4xx_hss.c
 
 F:     drivers/net/ethernet/xscale/ixp4xx_eth.c
 F:     drivers/net/wan/ixp4xx_hss.c
 
index 0973270f48632deffd3fea895b167e91fc2b84e7..83afb80d38a8b6bf07292f3bae5eb01372c13882 100644 (file)
@@ -236,19 +236,6 @@ config IXP4XX_INDIRECT_PCI
          need to use the indirect method instead. If you don't know
          what you need, leave this option unselected.
 
          need to use the indirect method instead. If you don't know
          what you need, leave this option unselected.
 
-config IXP4XX_QMGR
-       tristate "IXP4xx Queue Manager support"
-       help
-         This driver supports IXP4xx built-in hardware queue manager
-         and is automatically selected by Ethernet and HSS drivers.
-
-config IXP4XX_NPE
-       tristate "IXP4xx Network Processor Engine support"
-       select FW_LOADER
-       help
-         This driver supports IXP4xx built-in network coprocessors
-         and is automatically selected by Ethernet and HSS drivers.
-
 endmenu
 
 endif
 endmenu
 
 endif
index 5f63b3012826c2d95a2471eca4051d4f4b55bb92..1fa4e66057823c6bcee8278e229cf008440c867a 100644 (file)
@@ -43,5 +43,3 @@ obj-$(CONFIG_MACH_GORAMO_MLR) += goramo_mlr.o
 obj-$(CONFIG_MACH_ARCOM_VULCAN)        += vulcan-setup.o
 
 obj-$(CONFIG_PCI)              += $(obj-pci-$(CONFIG_PCI)) common-pci.o
 obj-$(CONFIG_MACH_ARCOM_VULCAN)        += vulcan-setup.o
 
 obj-$(CONFIG_PCI)              += $(obj-pci-$(CONFIG_PCI)) common-pci.o
-obj-$(CONFIG_IXP4XX_QMGR)      += ixp4xx_qmgr.o
-obj-$(CONFIG_IXP4XX_NPE)       += ixp4xx_npe.o
index c07b4a85253f223bf46bf35c7199ed21e31dd643..ae9bf20b26fae6d5d9c919731c16525dab43caed 100644 (file)
@@ -6,6 +6,7 @@ source "drivers/soc/atmel/Kconfig"
 source "drivers/soc/bcm/Kconfig"
 source "drivers/soc/fsl/Kconfig"
 source "drivers/soc/imx/Kconfig"
 source "drivers/soc/bcm/Kconfig"
 source "drivers/soc/fsl/Kconfig"
 source "drivers/soc/imx/Kconfig"
+source "drivers/soc/ixp4xx/Kconfig"
 source "drivers/soc/mediatek/Kconfig"
 source "drivers/soc/qcom/Kconfig"
 source "drivers/soc/renesas/Kconfig"
 source "drivers/soc/mediatek/Kconfig"
 source "drivers/soc/qcom/Kconfig"
 source "drivers/soc/renesas/Kconfig"
index 90b686e586c667e381121fa038903ab54099b6c8..c7c1a139ad8dbe8e99366a0cfd2ea053e99b1c35 100644 (file)
@@ -11,6 +11,7 @@ obj-$(CONFIG_MACH_DOVE)               += dove/
 obj-y                          += fsl/
 obj-$(CONFIG_ARCH_GEMINI)      += gemini/
 obj-$(CONFIG_ARCH_MXC)         += imx/
 obj-y                          += fsl/
 obj-$(CONFIG_ARCH_GEMINI)      += gemini/
 obj-$(CONFIG_ARCH_MXC)         += imx/
+obj-$(CONFIG_ARCH_IXP4XX)      += ixp4xx/
 obj-$(CONFIG_SOC_XWAY)         += lantiq/
 obj-y                          += mediatek/
 obj-y                          += amlogic/
 obj-$(CONFIG_SOC_XWAY)         += lantiq/
 obj-y                          += mediatek/
 obj-y                          += amlogic/
diff --git a/drivers/soc/ixp4xx/Kconfig b/drivers/soc/ixp4xx/Kconfig
new file mode 100644 (file)
index 0000000..de6becd
--- /dev/null
@@ -0,0 +1,16 @@
+menu "IXP4xx SoC drivers"
+
+config IXP4XX_QMGR
+       tristate "IXP4xx Queue Manager support"
+       help
+         This driver supports IXP4xx built-in hardware queue manager
+         and is automatically selected by Ethernet and HSS drivers.
+
+config IXP4XX_NPE
+       tristate "IXP4xx Network Processor Engine support"
+       select FW_LOADER
+       help
+         This driver supports IXP4xx built-in network coprocessors
+         and is automatically selected by Ethernet and HSS drivers.
+
+endmenu
diff --git a/drivers/soc/ixp4xx/Makefile b/drivers/soc/ixp4xx/Makefile
new file mode 100644 (file)
index 0000000..d20d99e
--- /dev/null
@@ -0,0 +1,2 @@
+obj-$(CONFIG_IXP4XX_QMGR)      += ixp4xx-qmgr.o
+obj-$(CONFIG_IXP4XX_NPE)       += ixp4xx-npe.o
similarity index 98%
rename from arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
rename to drivers/soc/ixp4xx/ixp4xx-qmgr.c
index 2665347a2c6fa48c724f9d1d712fe0fed0da1bf6..2e6d33534afecc37dd9887a0f0f0a922505b0b2d 100644 (file)
 #include <linux/of.h>
 #include <mach/qmgr.h>
 
 #include <linux/of.h>
 #include <mach/qmgr.h>
 
-#include "irqs.h"
+/* FIXME: get rid of these static assigments */
+#define IRQ_IXP4XX_BASE                16
+#define IRQ_IXP4XX_QM1         (IRQ_IXP4XX_BASE + 3)
+#define IRQ_IXP4XX_QM2         (IRQ_IXP4XX_BASE + 4)
 
 static struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT;
 static struct resource *mem_res;
 
 static struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT;
 static struct resource *mem_res;