[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191103.174311.1939967870267945019.davem@davemloft.net>
Date: Sun, 03 Nov 2019 17:43:11 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: linus.walleij@...aro.org
Cc: netdev@...r.kernel.org, arnd@...db.de, jakub.kicinski@...ronome.com
Subject: Re: [PATCH net-next 09/10 v2] net: ethernet: ixp4xx: Get port ID
from base address
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.
Powered by blists - more mailing lists