[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da114d45-5649-b525-039a-470f45d50386@cogentembedded.com>
Date: Sat, 25 May 2019 12:14:04 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Andrew Lunn <andrew@...n.ch>,
Linus Walleij <linus.walleij@...aro.org>
Cc: netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
Krzysztof Halasa <khalasa@...p.pl>
Subject: Re: [PATCH 4/8] ARM/net: ixp4xx: Pass ethernet physical base as
resource
Hello!
On 24.05.2019 23:00, Andrew Lunn wrote:
>> 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@...aro.org>
>> ---
>> arch/arm/mach-ixp4xx/fsg-setup.c | 20 ++++++++++++++++++++
>> arch/arm/mach-ixp4xx/goramo_mlr.c | 20 ++++++++++++++++++++
>> arch/arm/mach-ixp4xx/ixdp425-setup.c | 20 ++++++++++++++++++++
>> arch/arm/mach-ixp4xx/nas100d-setup.c | 10 ++++++++++
>> arch/arm/mach-ixp4xx/nslu2-setup.c | 10 ++++++++++
>> arch/arm/mach-ixp4xx/omixp-setup.c | 20 ++++++++++++++++++++
>> arch/arm/mach-ixp4xx/vulcan-setup.c | 20 ++++++++++++++++++++
>> drivers/net/ethernet/xscale/ixp4xx_eth.c | 20 +++++++++++---------
>> 8 files changed, 131 insertions(+), 9 deletions(-)
>>
>> diff --git a/arch/arm/mach-ixp4xx/fsg-setup.c b/arch/arm/mach-ixp4xx/fsg-setup.c
>> index 648932d8d7a8..507ee3878769 100644
>> --- a/arch/arm/mach-ixp4xx/fsg-setup.c
>> +++ b/arch/arm/mach-ixp4xx/fsg-setup.c
>> @@ -132,6 +132,22 @@ static struct platform_device fsg_leds = {
>> };
>>
>> /* Built-in 10/100 Ethernet MAC interfaces */
>> +static struct resource fsg_eth_npeb_resources[] = {
>> + {
>> + .start = IXP4XX_EthB_BASE_PHYS,
>> + .end = IXP4XX_EthB_BASE_PHYS + 0x0fff,
>
> Hi Linus
>
> It is a long time since i did resources. But i was always told to use
> the SZ_ macros, so SZ_4K. I also think 0xfff is wrong, it should be
> 0x1000.
No, 0x0fff is correct there, 0x1000 is not...
> Andrew
MBR, Sergei
Powered by blists - more mailing lists