summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ixp4xx
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-02-10 17:05:29 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-04-23 16:02:15 +0200
commitbc4d7eafb7ad590f546b58c40cd7856990fbb303 (patch)
tree2538b36b5190f5ac7def7e62da0c004a24c99664 /arch/arm/mach-ixp4xx
parent4af20dc583b364fad45df6fb81873606af8b70fb (diff)
ARM: ixp4xx: Turn the NPE into a platform device
Instead of registering everything related to the NPE unconditionally in the module_init() call (which will never work with multiplatform) create a platform device and probe the NPE like any other device. Put the device first in the list of devices added for the platform so it is there when the dependent network and crypto drivers probe later on. This probe() path will not be taken unconditionally on device tree boots, so remove the DT guard. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r--arch/arm/mach-ixp4xx/common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index fc4c9b21ca96..e7789d06c39b 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -150,7 +150,13 @@ static struct platform_device ixp4xx_udc_device = {
},
};
+static struct platform_device ixp4xx_npe_device = {
+ .name = "ixp4xx-npe",
+ .id = -1,
+};
+
static struct platform_device *ixp4xx_devices[] __initdata = {
+ &ixp4xx_npe_device,
&ixp4xx_gpio_device,
&ixp4xx_udc_device,
};