[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdaAyupUrosjWPP0AFOPYh5HXEkEHdew+A9A+yvvd0m2RA@mail.gmail.com>
Date: Tue, 5 Nov 2019 11:27:36 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: David Miller <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>, Arnd Bergmann <arnd@...db.de>,
Jakub Kicinski <jakub.kicinski@...ronome.com>
Subject: Re: [PATCH net-next 09/10 v2] net: ethernet: ixp4xx: Get port ID from
base address
On Mon, Nov 4, 2019 at 2:43 AM David Miller <davem@...emloft.net> wrote:
> From: Linus Walleij <linus.walleij@...aro.org>
> Date: Fri, 1 Nov 2019 14:02:23 +0100
>
> > @@ -1388,13 +1387,15 @@ static int ixp4xx_eth_probe(struct platform_device *pdev)
> > regs_phys = res->start;
> > port->regs = devm_ioremap_resource(dev, res);
> >
> > - switch (port->id) {
> > - case IXP4XX_ETH_NPEA:
> > + switch (res->start) {
> > + case 0xc800c000:
>
> This is extremely non-portable.
>
> The resource values are %100 opaque architecture specific values.
>
> On sparc64 for example, it is absolutely not the bus address but rather
> the physical address that the cpu needs to use to perform MMIO's to what
> is behind that resource.
>
> I'm not applying this, sorry.
No problem, I'll think of something better, like adapting
Arnd's approach.
Could you apply patches 1-8?
Yours,
Linus Walleij
Powered by blists - more mailing lists