]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: pcnet: Replace mips-specific accessors
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Sat, 18 Apr 2020 00:32:19 +0000 (02:32 +0200)
committermarex <marex@desktop.lan>
Fri, 1 May 2020 10:35:21 +0000 (12:35 +0200)
Replace mips-specific UNCACHED_SDRAM() macro with standard
map_physmem(), which permits the driver to work on other
systems than mips.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/pcnet.c

index 59241c95bcdb054287bbe3d674021c5ec65efb4d..e7d6c8d714c4e5948b76fd7d8c9bd68201ef89a2 100644 (file)
@@ -332,7 +332,9 @@ static int pcnet_init(struct eth_device *dev, bd_t *bis)
                addr = (unsigned long)memalign(ARCH_DMA_MINALIGN,
                                               sizeof(*lp->uc));
                flush_dcache_range(addr, addr + sizeof(*lp->uc));
-               addr = UNCACHED_SDRAM(addr);
+               addr = (unsigned long)map_physmem(addr,
+                               roundup(sizeof(*lp->uc), ARCH_DMA_MINALIGN),
+                               MAP_NOCACHE);
                lp->uc = (struct pcnet_uncached_priv *)addr;
 
                addr = (unsigned long)memalign(ARCH_DMA_MINALIGN,