From: samuel.obuch@codasip.com
To: u-boot@lists.denx.de
Cc: rfried.dev@gmail.com, michal.simek@amd.com,
Samuel Obuch <samuel.obuch@codasip.com>
Subject: [PATCH v3 1/3] net: emaclite: enable for more architectures
Date: Tue, 27 Sep 2022 13:21:01 +0200 [thread overview]
Message-ID: <20220927112103.155689-1-samuel.obuch@codasip.com> (raw)
From: Samuel Obuch <samuel.obuch@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 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>
---
v3: Fix commit message, remove addtional asm/io.h include.
v2: Use ioremap instead of ioremap_nocache, switch to linux/io.h.
v1: Do not use ioremap_nocache for archs other than MIPS and Microblaze.
drivers/net/xilinx_emaclite.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
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 <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;
--
2.31.1
next reply other threads:[~2022-09-27 11:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 11:21 samuel.obuch [this message]
2022-09-27 11:21 ` [PATCH v3 2/3] net: emaclite: fix xemaclite_alignedread/write functions samuel.obuch
2022-09-27 11:21 ` [PATCH v3 3/3] net: emaclite: fix handling for IP packets with specific lengths samuel.obuch
2022-10-04 12:14 ` [PATCH v3 1/3] net: emaclite: enable for more architectures Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220927112103.155689-1-samuel.obuch@codasip.com \
--to=samuel.obuch@codasip.com \
--cc=michal.simek@amd.com \
--cc=rfried.dev@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox