aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorSamuel Obuch <samuel.obuch@codasip.com>2022-09-27 13:21:01 +0200
committerMichal Simek <michal.simek@amd.com>2022-10-05 11:36:54 +0200
commit078d8eb5bbb770bcf55c0f70b3da4df2c1362659 (patch)
treebf86841ddbd8b4211525a52f5ab09df82e9342f0 /drivers/net
parentef2896a4d218fe54b261ba63ea0ec3682b2eea29 (diff)
downloadu-boot-078d8eb5bbb770bcf55c0f70b3da4df2c1362659.tar.gz
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 <samuel.obuch@codasip.com> Link: https://lore.kernel.org/r/20220927112103.155689-1-samuel.obuch@codasip.com Signed-off-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/xilinx_emaclite.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 6c9f1f7c272..29e8271c63b 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -14,14 +14,13 @@
#include <console.h>
#include <malloc.h>
#include <asm/global_data.h>
-#include <asm/io.h>
#include <phy.h>
#include <miiphy.h>
#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 +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;