diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2020-01-12 13:04:49 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-01-12 12:59:53 -0800 |
commit | f458ac479777c627c9b92ab640afec3bfa150660 (patch) | |
tree | 0e01d6af77d9021d30dc2e1acd5cc4df2349d810 /arch/arm/mach-ixp4xx/nslu2-setup.c | |
parent | 3cb5b0ee72b8b9ff0827b1edb40b6c4b00d5ab2e (diff) | |
download | linux-f458ac479777c627c9b92ab640afec3bfa150660.tar.gz |
ARM/net: ixp4xx: Pass ethernet physical base as resource
In order to probe this ethernet interface from the device tree
all physical MMIO regions must be passed as resources. Begin
this rewrite by first passing the port base address as a
resource for all platforms using this driver, remap it in
the driver and avoid using any reference of the statically
mapped virtual address in the driver.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'arch/arm/mach-ixp4xx/nslu2-setup.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/nslu2-setup.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index ee1877fcfafe..a428bb918703 100644 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c @@ -185,6 +185,14 @@ static struct platform_device nslu2_uart = { }; /* Built-in 10/100 Ethernet MAC interfaces */ +static struct resource nslu2_eth_resources[] = { + { + .start = IXP4XX_EthB_BASE_PHYS, + .end = IXP4XX_EthB_BASE_PHYS + 0x0fff, + .flags = IORESOURCE_MEM, + }, +}; + static struct eth_plat_info nslu2_plat_eth[] = { { .phy = 1, @@ -198,6 +206,8 @@ static struct platform_device nslu2_eth[] = { .name = "ixp4xx_eth", .id = IXP4XX_ETH_NPEB, .dev.platform_data = nslu2_plat_eth, + .num_resources = ARRAY_SIZE(nslu2_eth_resources), + .resource = nslu2_eth_resources, } }; |