summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorThomas Chou <thomas@wytron.com.tw>2015-10-05 10:37:19 +0800
committerThomas Chou <thomas@wytron.com.tw>2015-10-23 07:37:20 +0800
commita64be6124a069c2eae87656175c4c2e479e901cb (patch)
tree1d41226950a40bc162670a7750ffe6081aff5b67 /arch
parent121e36dacdfa0ef68414effea4d758e8fc2f3b60 (diff)
downloadu-boot-a64be6124a069c2eae87656175c4c2e479e901cb.tar.gz
u-boot-a64be6124a069c2eae87656175c4c2e479e901cb.tar.bz2
u-boot-a64be6124a069c2eae87656175c4c2e479e901cb.zip
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: Thomas Chou <thomas@wytron.com.tw>
Diffstat (limited to 'arch')
-rw-r--r--arch/nios2/include/asm/io.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h
index 2200dab5b3..d0adf08cd6 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))