]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
net: emaclite: Use ioremap_nocache
authorZubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Wed, 27 Jul 2016 11:25:07 +0000 (12:25 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 21 Sep 2016 12:55:14 +0000 (14:55 +0200)
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>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/xilinx_emaclite.c

index 7b85aa0463851d22e0c8f6e45f56eb11e62b59ca..6df222bf74044c40bd8f319bf9a6111641f9a3ec 100644 (file)
@@ -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;