All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
	Krzysztof Halasa <khalasa@piap.pl>
Subject: Re: [PATCH 4/8] ARM/net: ixp4xx: Pass ethernet physical base as resource
Date: Fri, 24 May 2019 22:00:12 +0200	[thread overview]
Message-ID: <20190524200012.GP21208@lunn.ch> (raw)
In-Reply-To: <20190524162023.9115-5-linus.walleij@linaro.org>

On Fri, May 24, 2019 at 06:20:19PM +0200, Linus Walleij 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@linaro.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.

	Andrew

  reply	other threads:[~2019-05-24 20:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24 16:20 [PATCH 0/8] Xscale IXP4xx ethernet refurbishing Linus Walleij
2019-05-24 16:20 ` [PATCH 1/8] net: ethernet: ixp4xx: Standard module init Linus Walleij
2019-05-24 19:46   ` Andrew Lunn
2019-05-29  7:10     ` Linus Walleij
2019-05-24 16:20 ` [PATCH 2/8] net: ethernet: ixp4xx: Use distinct local variable Linus Walleij
2019-05-24 16:20 ` [PATCH 3/8] net: ehernet: ixp4xx: Use devm_alloc_etherdev() Linus Walleij
2019-05-24 19:52   ` Andrew Lunn
2019-05-24 16:20 ` [PATCH 4/8] ARM/net: ixp4xx: Pass ethernet physical base as resource Linus Walleij
2019-05-24 20:00   ` Andrew Lunn [this message]
2019-05-25  9:14     ` Sergei Shtylyov
2019-05-28 13:21       ` Andrew Lunn
2019-05-24 16:20 ` [PATCH 5/8] net: ethernet: ixp4xx: Get port ID from base address Linus Walleij
2019-05-24 16:20 ` [PATCH 6/8] net: ethernet: ixp4xx: Use parent dev for DMA pool Linus Walleij
2019-05-24 16:20 ` [PATCH 7/8] net: ethernet: ixp4xx: Add DT bindings Linus Walleij
2019-05-24 20:06   ` Andrew Lunn
2019-05-29  7:13     ` Linus Walleij
2019-05-24 16:20 ` [PATCH 8/8] net: ethernet: ixp4xx: Support device tree probing Linus Walleij
2019-05-24 20:21   ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190524200012.GP21208@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=khalasa@piap.pl \
    --cc=linus.walleij@linaro.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.