From: Samuel Obuch Date: Tue, 27 Sep 2022 11:21:01 +0000 (+0200) Subject: net: emaclite: enable for more architectures X-Git-Tag: v2025.01-rc5-pxa1908~1254^2~25 X-Git-Url: http://git.dujemihanovic.xyz/%22/img/sics.gif/%22/static/git-favicon.png?a=commitdiff_plain;h=078d8eb5bbb770bcf55c0f70b3da4df2c1362659;p=u-boot.git net: emaclite: enable for more architectures Function ioremap_nocache seems to be defined only for MIPS and Microblaze architectures. Therefore, the function call in the emaclite driver causes this driver to be unusable with other architectures, for example RISC-V. Use ioremap function instead of ioremap_nocache, and include linux/io.h instead of asm/io.h, so that ioremap function is automatically created, if not defined by the architecture. We can switch to the ioremap function, as Microblaze's ioremap_nocache is just empty and in MIPS implementations of ioremap_nocache and ioremap are the same. Signed-off-by: Samuel Obuch Link: https://lore.kernel.org/r/20220927112103.155689-1-samuel.obuch@codasip.com Signed-off-by: Michal Simek --- diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 6c9f1f7c27..29e8271c63 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -14,14 +14,13 @@ #include #include #include -#include #include #include #include #include #include +#include #include -#include #include DECLARE_GLOBAL_DATA_PTR; @@ -615,8 +614,8 @@ static int emaclite_of_to_plat(struct udevice *dev) int offset = 0; pdata->iobase = dev_read_addr(dev); - emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase, - 0x10000); + emaclite->regs = (struct emaclite_regs *)ioremap(pdata->iobase, + 0x10000); emaclite->phyaddr = -1;