Skip to content
Snippets Groups Projects
Commit a64be612 authored by Thomas Chou's avatar Thomas Chou
Browse files

nios2: convert ioremap to use dm cpu data


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: default avatarThomas Chou <thomas@wytron.com.tw>
parent 121e36da
No related branches found
No related tags found
No related merge requests found
...@@ -44,13 +44,10 @@ static inline phys_addr_t virt_to_phys(void * vaddr) ...@@ -44,13 +44,10 @@ static inline phys_addr_t virt_to_phys(void * vaddr)
static inline void *ioremap(unsigned long physaddr, unsigned long size) 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_writeb(v,a) (*(volatile unsigned char *)(a) = (v))
#define __raw_writew(v,a) (*(volatile unsigned short *)(a) = (v)) #define __raw_writew(v,a) (*(volatile unsigned short *)(a) = (v))
#define __raw_writel(v,a) (*(volatile unsigned int *)(a) = (v)) #define __raw_writel(v,a) (*(volatile unsigned int *)(a) = (v))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment