From: Daniel Schwierzeck Date: Wed, 27 Jul 2016 13:50:00 +0200 Subject: [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache In-Reply-To: <1469618709-27153-2-git-send-email-Zubair.Kakakhel@imgtec.com> References: <1469618709-27153-1-git-send-email-Zubair.Kakakhel@imgtec.com> <1469618709-27153-2-git-send-email-Zubair.Kakakhel@imgtec.com> Message-ID: <633ef4da-bb18-5d0b-c8ff-27e5e1d548d0@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 27.07.2016 um 13:25 schrieb Zubair Lutfullah Kakakhel: > Virtual to physical mapping isn't necessarily 1:1 for all architectures > > Using ioremap_nocache allows for the arch code to translate the > physical address to a virtual address. > > Signed-off-by: Zubair Lutfullah Kakakhel > Reviewed-by: Paul Burton looks okay because this driver is only used by Microblaze which has ioremap_nocache() defined. Reviewed-by: Daniel Schwierzeck > --- > drivers/net/xilinx_emaclite.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c > index 7b85aa0..6df222b 100644 > --- a/drivers/net/xilinx_emaclite.c > +++ b/drivers/net/xilinx_emaclite.c > @@ -19,6 +19,7 @@ > #include > #include > #include > +#include > > DECLARE_GLOBAL_DATA_PTR; > > @@ -595,7 +596,8 @@ static int emaclite_ofdata_to_platdata(struct udevice *dev) > int offset = 0; > > pdata->iobase = (phys_addr_t)dev_get_addr(dev); > - emaclite->regs = (struct emaclite_regs *)pdata->iobase; > + emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase, > + 0x10000); > > emaclite->phyaddr = -1; > > -- - Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: