[PATCH v2 1/3] net: emaclite: fix broken build
samuel.obuch at codasip.com
samuel.obuch at codasip.com
Fri Sep 23 14:31:19 CEST 2022
From: Samuel Obuch <samuel.obuch at codasip.com>
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 riscv.
v2: Use ioremap function instead of ioremap_nocache. Switch to linux/io.h
which automatically creates ioremap if not defined by the architecture.
Signed-off-by: Samuel Obuch <samuel.obuch at codasip.com>
---
drivers/net/xilinx_emaclite.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 6c9f1f7c27..2e152bf873 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -20,8 +20,8 @@
#include <fdtdec.h>
#include <linux/delay.h>
#include <linux/errno.h>
+#include <linux/io.h>
#include <linux/kernel.h>
-#include <asm/io.h>
#include <eth_phy.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -615,8 +615,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;
--
2.31.1
More information about the U-Boot
mailing list