summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ixp4xx/ixp4xx_npe.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-01-27 14:08:36 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-04-23 16:02:15 +0200
commit9540724ca29d54b65aaea120072166ebc2d5f4a1 (patch)
treee65284e2e52bb78d60e0b9a7dfeb0c8d02d5908c /arch/arm/mach-ixp4xx/ixp4xx_npe.c
parent50d2c8d29106a6309b97d7ca75b48f2c42850d1f (diff)
ARM: ixp4xx: Add device tree boot support
This adds a minimal support for booting IXP4xx systems from device tree. We have to add hacks to the QMGR, NPE and notably also ethernet and watchdog drivers so that they don't crash the platform: these drivers are unconditionally starting to grab regions of statically remapped IO space with no concern of the device model or other platforms. We will go in and properly fix these drivers as we go along but for now this hack gets us to a place where we can start working on proper device tree support for these platforms. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ixp4xx/ixp4xx_npe.c')
-rw-r--r--arch/arm/mach-ixp4xx/ixp4xx_npe.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_npe.c b/arch/arm/mach-ixp4xx/ixp4xx_npe.c
index d4eb09a62863..e0ce22cd9bfc 100644
--- a/arch/arm/mach-ixp4xx/ixp4xx_npe.c
+++ b/arch/arm/mach-ixp4xx/ixp4xx_npe.c
@@ -20,6 +20,7 @@
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <mach/npe.h>
#define DEBUG_MSG 0
@@ -688,6 +689,10 @@ static int __init npe_init_module(void)
int i, found = 0;
+ /* This driver does not work with device tree */
+ if (of_have_populated_dt())
+ return -ENODEV;
+
for (i = 0; i < NPE_COUNT; i++) {
struct npe *npe = &npe_tab[i];
if (!(ixp4xx_read_feature_bits() &