summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/common.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-02-10 19:35:08 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-04-23 16:02:15 +0200
commit0b458d7b10f83eb34b84957e6cf47cee2a97bc49 (patch)
tree397eb85bdccefa37098499ca04cd3a251ab382e9 /arch/arm/mach-ixp4xx/common.c
parentARM: ixp4xx: Turn the QMGR into a platform device (diff)
downloadlinux-0b458d7b10f83eb34b84957e6cf47cee2a97bc49.tar.xz
linux-0b458d7b10f83eb34b84957e6cf47cee2a97bc49.zip
soc: ixp4xx: npe: Pass addresses as resources
Instead of using hardcoded base addresses implicitly obtained through <linux/io.h>, pass the physical base for the three NPE blocks as memory resources and remap these in the driver. Drop the memory request region business, this will anyways be done by devm_* remapping functions. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ixp4xx/common.c')
-rw-r--r--arch/arm/mach-ixp4xx/common.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index cdcd6d6b6d3d..07c3cb312a92 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -150,9 +150,30 @@ static struct platform_device ixp4xx_udc_device = {
},
};
+static struct resource ixp4xx_npe_resources[] = {
+ {
+ .start = IXP4XX_NPEA_BASE_PHYS,
+ .end = IXP4XX_NPEA_BASE_PHYS + 0xfff,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .start = IXP4XX_NPEB_BASE_PHYS,
+ .end = IXP4XX_NPEB_BASE_PHYS + 0xfff,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .start = IXP4XX_NPEC_BASE_PHYS,
+ .end = IXP4XX_NPEC_BASE_PHYS + 0xfff,
+ .flags = IORESOURCE_MEM,
+ },
+
+};
+
static struct platform_device ixp4xx_npe_device = {
.name = "ixp4xx-npe",
.id = -1,
+ .num_resources = ARRAY_SIZE(ixp4xx_npe_resources),
+ .resource = ixp4xx_npe_resources,
};
static struct platform_device ixp4xx_qmgr_device = {