Message ID | 1469618709-27153-2-git-send-email-Zubair.Kakakhel@imgtec.com |
---|---|
State | Accepted |
Commit | 39e020ef163d7ca6e73294a3ae4ded2867c9bc75 |
Delegated to: | Daniel Schwierzeck |
Headers | show |
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 <Zubair.Kakakhel@imgtec.com> > Reviewed-by: Paul Burton <paul.burton@imgtec.com> looks okay because this driver is only used by Microblaze which has ioremap_nocache() defined. Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> > --- > 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 <fdtdec.h> > #include <asm-generic/errno.h> > #include <linux/kernel.h> > +#include <asm/io.h> > > 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; > >
On Wed, Jul 27, 2016 at 6:25 AM, Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> wrote: > 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 <Zubair.Kakakhel@imgtec.com> > Reviewed-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
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 <Zubair.Kakakhel@imgtec.com> > Reviewed-by: Paul Burton <paul.burton@imgtec.com> > --- > drivers/net/xilinx_emaclite.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > applied to u-boot-mips/next, thanks
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 <fdtdec.h> #include <asm-generic/errno.h> #include <linux/kernel.h> +#include <asm/io.h> 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;