net: macb: fix mapping of registers
PATCH v2 1/1 net: macb: fix mapping of registers
Some architectures (MIPS) needs mapping to access IOMEM. Fix that.
---
v2: switched to use dev_reamp_addr() to reduce boilerplate code.
(as suggested by Daniel Schwierzeck)
drivers/net/macb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/macb.c +3 -1
@@ -1151,7 +1151,9 @@ static int macb_eth_ofdata_to_platdata(struct udevice *dev) {struct eth_pdata *pdata =dev_get_platdata (dev); - pdata->iobase =devfdt_get_addr (dev); + pdata->iobase =dev_remap_addr (dev); +if (!pdata->iobase) +return -EINVAL ;return macb_late_eth_ofdata_to_platdata (dev); }
Signature · 1 line
2.19.2
PATCH v2 1/1 net: macb: fix mapping of registers
Am 18.12.18 um 21:49 schrieb Ramon Fried:
Quoted 5 lines
Some architectures (MIPS) needs mapping to access IOMEM. Fix that.
Fixes f1dcc19b213d ("net: macb: Convert to driver model")
Quoted 9 lines
Signed-off-by Ramon Fried <[email protected]>---
v2: switched to usedev_reamp_addr()to reduce boilerplate code.
(as suggested by Daniel Schwierzeck)drivers/net/macb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
- Daniel
PATCH v2 1/1 net: macb: fix mapping of registers
In reply to Ramon FriedQuoted 10 lines · Ramon Fried
Some architectures (MIPS) needs mapping to access IOMEM. Fix that.
Fixes f1dcc19b213d ("net: macb: Convert to driver model")Signed-off-by Ramon Fried <[email protected]>Reviewed-by Daniel Schwierzeck <[email protected]>---
v2: switched to usedev_reamp_addr()to reduce boilerplate code.
(as suggested by Daniel Schwierzeck)
On many platforms:
arm: w+ sama5d36ek_cmp_nandflash
+(sama5d36ek_cmp_nandflash) pdata->iobase = dev_remap_addr(dev);
+(sama5d36ek_cmp_nandflash) ^
w+(sama5d36ek_cmp_nandflash) drivers/net/macb.c: In function 'macb_eth_ofdata_to_platdata':
w+(sama5d36ek_cmp_nandflash) drivers/net/macb.c:1154:16: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181226/2e76d08f/attachment.sig>
PATCH v2 1/1 net: macb: fix mapping of registers
Quoted 21 lines · Tom Rini
Quoted 10 lines · Ramon Fried
Some architectures (MIPS) needs mapping to access IOMEM. Fix that.
Fixes f1dcc19b213d ("net: macb: Convert to driver model")Signed-off-by Ramon Fried <[email protected]>Reviewed-by Daniel Schwierzeck <[email protected]>---
v2: switched to usedev_reamp_addr()to reduce boilerplate code.
(as suggested by Daniel Schwierzeck)On many platforms:
arm: w+sama5d36ek_cmp_nandflash(quoted diff) +2
-0+(sama5d36ek_cmp_nandflash) pdata->iobase = dev_remap_addr(dev); +(sama5d36ek_cmp_nandflash) ^w+(sama5d36ek_cmp_nandflash)
drivers/net/macb.c: In function 'macb_eth_ofdata_to_platdata':
w+(sama5d36ek_cmp_nandflash)drivers/net/macb.c:1154:16: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
Quoted 2 lines
--
Tom
Thanks Tom,
I'll look into it.