From: Ramon Fried <ramon.fried@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] net: macb: fix mapping of registers
Date: Tue, 18 Dec 2018 22:49:03 +0200 [thread overview]
Message-ID: <20181218204903.7211-1-ramon.fried@gmail.com> (raw)
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
next reply other threads:[~2018-12-18 20:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 20:49 Ramon Fried [this message]
2018-12-19 15:19 ` [U-Boot] [PATCH v2] net: macb: fix mapping of registers Daniel Schwierzeck
2018-12-27 2:35 ` [U-Boot] [U-Boot,v2] " Tom Rini
2018-12-27 10:08 ` Ramon Fried
-- strict thread matches above, loose matches on Subject: below --
2018-12-27 17:58 [U-Boot] [PATCH v2] " Ramon Fried
2019-01-22 22:00 ` Joe Hershberger
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=20181218204903.7211-1-ramon.fried@gmail.com \
--to=ramon.fried@gmail.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox