u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Ramon Fried <rfried.dev@gmail.com>,
	Samuel Obuch <samuel.obuch@codasip.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH 1/3] net: emaclite: fix broken build
Date: Mon, 8 Aug 2022 09:35:59 +0200	[thread overview]
Message-ID: <42d81d97-f5ed-ff3d-928c-cead2de207d7@amd.com> (raw)
In-Reply-To: <CAGi-RUKXJU7uMsvQgwqkBZ3vwpvScL9ZGw1NvbzqZ=xWkVEAgw@mail.gmail.com>



On 8/6/22 19:31, Ramon Fried wrote:
> On Wed, Jul 13, 2022 at 5:02 PM Samuel Obuch <samuel.obuch@codasip.com> wrote:
>>
>> 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.
>>
>> Signed-off-by: Samuel Obuch <samuel.obuch@codasip.com>
>> ---
>>   drivers/net/xilinx_emaclite.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
>> index 6c9f1f7c27..5cd88e04fe 100644
>> --- a/drivers/net/xilinx_emaclite.c
>> +++ b/drivers/net/xilinx_emaclite.c
>> @@ -615,8 +615,12 @@ static int emaclite_of_to_plat(struct udevice *dev)
>>          int offset = 0;
>>
>>          pdata->iobase = dev_read_addr(dev);
>> +#if defined(CONFIG_MICROBLAZE) || defined(CONFIG_MIPS)
>>          emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase,
>>                                                                   0x10000);
>> +#else
>> +       emaclite->regs = (struct emaclite_regs *)pdata->iobase;
>> +#endif
>>
>>          emaclite->phyaddr = -1;
>>
>> --
>> 2.31.1
>>
> Hm...
> Well, this isn't right,The right solution is to replace
> ioremap_nocache() with ioremap().
> This way it will work both for MIPS and other architectures.
> I can do it myself, you can fix your patch. let me know.

Microblaze doesn't define it now. But I agree that using ioremap which has 
implicit nocache is the right way to go.
It means please create the first patch which creates ioremap for microblaze,
Then second to replace ioremap_nocache() in emaclite driver to ioremap. And 
third to remove ioremap_nocache from microblaze io.h.

Thanks,
Michal


  reply	other threads:[~2022-08-08  7:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 13:52 net: emaclite: Fixes, enable driver for other archs Samuel Obuch
2022-07-13 13:52 ` [PATCH 1/3] net: emaclite: fix broken build Samuel Obuch
2022-08-06 17:31   ` Ramon Fried
2022-08-08  7:35     ` Michal Simek [this message]
2022-08-08  7:44       ` Michal Simek
2022-09-23  9:29         ` Samuel Obuch
2022-07-13 13:52 ` [PATCH 2/3] net: emaclite: fix xemaclite_alignedread/write functions Samuel Obuch
2022-08-06 17:33   ` Ramon Fried
2022-08-08  8:04     ` Michal Simek
2022-09-19 17:03       ` Jan Remes
2022-09-20 14:23         ` Michal Simek
2022-09-23  9:17           ` Samuel Obuch
2022-09-23  9:36             ` Michal Simek
2022-10-05  2:09               ` Ramon Fried
2022-07-13 13:52 ` [PATCH 3/3] net: emaclite: fix handling for IP packets with specific lengths Samuel Obuch
2022-08-06 17:35   ` Ramon Fried
2022-08-08  7:54     ` Michal Simek
2022-08-08  8:08 ` net: emaclite: Fixes, enable driver for other archs Michal Simek
2022-08-08  8:33   ` Samuel Obuch
2022-09-19  7:31     ` 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=42d81d97-f5ed-ff3d-928c-cead2de207d7@amd.com \
    --to=michal.simek@amd.com \
    --cc=rfried.dev@gmail.com \
    --cc=samuel.obuch@codasip.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;
as well as URLs for NNTP newsgroup(s).