From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] nios2: convert ioremap to use dm cpu data
Date: Tue, 13 Oct 2015 21:13:09 +0800 [thread overview]
Message-ID: <561D0365.3000701@wytron.com.tw> (raw)
In-Reply-To: <1444012688-5142-1-git-send-email-thomas@wytron.com.tw>
On 10/05/2015 10:38 AM, Thomas Chou wrote:
> Convert ioremap() to use io_region_base in dm cpu global data.
>
> Also remove three unused io functions, which have style issue
> and are replaced by macros already.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
> arch/nios2/include/asm/io.h | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
Applied to u-boot-nios.
> diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h
> index 2200dab..d0adf08 100644
> --- a/arch/nios2/include/asm/io.h
> +++ b/arch/nios2/include/asm/io.h
> @@ -44,13 +44,10 @@ static inline phys_addr_t virt_to_phys(void * vaddr)
>
> static inline void *ioremap(unsigned long physaddr, unsigned long size)
> {
> - return (void *)(IO_REGION_BASE | physaddr);
> + DECLARE_GLOBAL_DATA_PTR;
> + return (void *)(gd->arch.io_region_base | physaddr);
> }
>
> -extern unsigned char inb (unsigned char *port);
> -extern unsigned short inw (unsigned short *port);
> -extern unsigned inl (unsigned port);
> -
> #define __raw_writeb(v,a) (*(volatile unsigned char *)(a) = (v))
> #define __raw_writew(v,a) (*(volatile unsigned short *)(a) = (v))
> #define __raw_writel(v,a) (*(volatile unsigned int *)(a) = (v))
>
prev parent reply other threads:[~2015-10-13 13:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 2:38 [U-Boot] [PATCH] nios2: convert ioremap to use dm cpu data Thomas Chou
2015-10-13 13:13 ` Thomas Chou [this message]
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=561D0365.3000701@wytron.com.tw \
--to=thomas@wytron.com.tw \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.