* [U-Boot] [PATCH v2] net: macb: fix mapping of registers
@ 2018-12-18 20:49 Ramon Fried
2018-12-19 15:19 ` Daniel Schwierzeck
2018-12-27 2:35 ` [U-Boot] [U-Boot,v2] " Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Ramon Fried @ 2018-12-18 20:49 UTC (permalink / raw)
To: u-boot
Some architectures (MIPS) needs mapping to access IOMEM.
Fix that.
Fixes: f1dcc19b213d ("net: macb: Convert to driver model")
Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
---
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(-)
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 94c89c762b..ede1277901 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -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);
}
--
2.19.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] net: macb: fix mapping of registers
2018-12-18 20:49 [U-Boot] [PATCH v2] net: macb: fix mapping of registers Ramon Fried
@ 2018-12-19 15:19 ` Daniel Schwierzeck
2018-12-27 2:35 ` [U-Boot] [U-Boot,v2] " Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Schwierzeck @ 2018-12-19 15:19 UTC (permalink / raw)
To: u-boot
Am 18.12.18 um 21:49 schrieb 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 <ramon.fried@gmail.com>
> ---
> 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(-)
>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
--
- Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [U-Boot,v2] net: macb: fix mapping of registers
2018-12-18 20:49 [U-Boot] [PATCH v2] net: macb: fix mapping of registers Ramon Fried
2018-12-19 15:19 ` Daniel Schwierzeck
@ 2018-12-27 2:35 ` Tom Rini
2018-12-27 10:08 ` Ramon Fried
1 sibling, 1 reply; 4+ messages in thread
From: Tom Rini @ 2018-12-27 2:35 UTC (permalink / raw)
To: u-boot
On Tue, Dec 18, 2018 at 10:49:03PM +0200, Ramon Fried wrote:
> Some architectures (MIPS) needs mapping to access IOMEM.
> Fix that.
>
> Fixes: f1dcc19b213d ("net: macb: Convert to driver model")
>
> Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> ---
> v2: switched to use dev_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]
--
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [U-Boot,v2] net: macb: fix mapping of registers
2018-12-27 2:35 ` [U-Boot] [U-Boot,v2] " Tom Rini
@ 2018-12-27 10:08 ` Ramon Fried
0 siblings, 0 replies; 4+ messages in thread
From: Ramon Fried @ 2018-12-27 10:08 UTC (permalink / raw)
To: u-boot
On Thu, Dec 27, 2018 at 4:35 AM Tom Rini <trini@konsulko.com> wrote:
>
> On Tue, Dec 18, 2018 at 10:49:03PM +0200, Ramon Fried wrote:
>
> > Some architectures (MIPS) needs mapping to access IOMEM.
> > Fix that.
> >
> > Fixes: f1dcc19b213d ("net: macb: Convert to driver model")
> >
> > Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
> > Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> > ---
> > v2: switched to use dev_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]
>
> --
> Tom
Thanks Tom,
I'll look into it.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-27 10:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-18 20:49 [U-Boot] [PATCH v2] net: macb: fix mapping of registers Ramon Fried
2018-12-19 15:19 ` Daniel Schwierzeck
2018-12-27 2:35 ` [U-Boot] [U-Boot,v2] " Tom Rini
2018-12-27 10:08 ` Ramon Fried
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.