public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache
Date: Wed, 27 Jul 2016 13:50:00 +0200	[thread overview]
Message-ID: <633ef4da-bb18-5d0b-c8ff-27e5e1d548d0@gmail.com> (raw)
In-Reply-To: <1469618709-27153-2-git-send-email-Zubair.Kakakhel@imgtec.com>



Am 27.07.2016 um 13:25 schrieb Zubair Lutfullah Kakakhel:
> Virtual to physical mapping isn't necessarily 1:1 for all architectures
> 
> Using ioremap_nocache allows for the arch code to translate the
> physical address to a virtual address.
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Reviewed-by: Paul Burton <paul.burton@imgtec.com>

looks okay because this driver is only used by Microblaze which has
ioremap_nocache() defined.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

> ---
>  drivers/net/xilinx_emaclite.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
> index 7b85aa0..6df222b 100644
> --- a/drivers/net/xilinx_emaclite.c
> +++ b/drivers/net/xilinx_emaclite.c
> @@ -19,6 +19,7 @@
>  #include <fdtdec.h>
>  #include <asm-generic/errno.h>
>  #include <linux/kernel.h>
> +#include <asm/io.h>
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> @@ -595,7 +596,8 @@ static int emaclite_ofdata_to_platdata(struct udevice *dev)
>  	int offset = 0;
>  
>  	pdata->iobase = (phys_addr_t)dev_get_addr(dev);
> -	emaclite->regs = (struct emaclite_regs *)pdata->iobase;
> +	emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase,
> +								 0x10000);
>  
>  	emaclite->phyaddr = -1;
>  
> 

-- 
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160727/c9a86e77/attachment.sig>

  reply	other threads:[~2016-07-27 11:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27 11:25 [U-Boot] [PATCH 0/3] net: emaclite: fixes and enable for MIPS Zubair Lutfullah Kakakhel
2016-07-27 11:25 ` [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache Zubair Lutfullah Kakakhel
2016-07-27 11:50   ` Daniel Schwierzeck [this message]
2016-08-01  7:10     ` Michal Simek
2016-07-29 14:18   ` Joe Hershberger
2016-07-31 12:27   ` Daniel Schwierzeck
2016-07-27 11:25 ` [U-Boot] [PATCH 2/3] net: emaclite: use __raw_readl/writel instead of weird define Zubair Lutfullah Kakakhel
2016-07-29 14:20   ` Joe Hershberger
2016-07-31 12:27   ` Daniel Schwierzeck
2016-07-27 11:25 ` [U-Boot] [PATCH 3/3] net: emaclite: Enable driver for MIPS Zubair Lutfullah Kakakhel
2016-07-29 14:20   ` Joe Hershberger
2016-07-31 12:27   ` Daniel Schwierzeck

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=633ef4da-bb18-5d0b-c8ff-27e5e1d548d0@gmail.com \
    --to=daniel.schwierzeck@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