summaryrefslogtreecommitdiff
path: root/arch/nds32/include/asm
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-08-13 11:52:20 +0200
committerChristoph Hellwig <hch@lst.de>2019-11-12 11:37:58 +0100
commiteafee59440623e06b0ce4a0e49f814a8cf31d8ca (patch)
tree4d7b2dc7e65b8d4a9ddd86420fc9c532d88a28f8 /arch/nds32/include/asm
parent0055f67b596c3a8963192a42e25797b0e7fc0e92 (diff)
nds32: use generic ioremap
Use the generic ioremap_prot and iounmap helpers. Note that the io.h include in pgtable.h had to be removed to not create an include loop. As far as I can tell there was no need for it to start with. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Greentime Hu <green.hu@gmail.com>
Diffstat (limited to 'arch/nds32/include/asm')
-rw-r--r--arch/nds32/include/asm/io.h3
-rw-r--r--arch/nds32/include/asm/pgtable.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/nds32/include/asm/io.h b/arch/nds32/include/asm/io.h
index fb0e8a24c7af..e57378d04006 100644
--- a/arch/nds32/include/asm/io.h
+++ b/arch/nds32/include/asm/io.h
@@ -6,8 +6,6 @@
#include <linux/types.h>
-void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
-extern void iounmap(volatile void __iomem *addr);
#define __raw_writeb __raw_writeb
static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
{
@@ -80,6 +78,7 @@ static inline u32 __raw_readl(const volatile void __iomem *addr)
#define writeb(v,c) ({ __iowmb(); writeb_relaxed((v),(c)); })
#define writew(v,c) ({ __iowmb(); writew_relaxed((v),(c)); })
#define writel(v,c) ({ __iowmb(); writel_relaxed((v),(c)); })
+
#include <asm-generic/io.h>
#endif /* __ASM_NDS32_IO_H */
diff --git a/arch/nds32/include/asm/pgtable.h b/arch/nds32/include/asm/pgtable.h
index 0588ec99725c..6fbf251cfc26 100644
--- a/arch/nds32/include/asm/pgtable.h
+++ b/arch/nds32/include/asm/pgtable.h
@@ -12,7 +12,6 @@
#include <asm/nds32.h>
#ifndef __ASSEMBLY__
#include <asm/fixmap.h>
-#include <asm/io.h>
#include <nds32_intrinsic.h>
#endif
@@ -130,6 +129,9 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
#define _PAGE_CACHE _PAGE_C_MEM_WB
#endif
+#define _PAGE_IOREMAP \
+ (_PAGE_V | _PAGE_M_KRW | _PAGE_D | _PAGE_G | _PAGE_C_DEV)
+
/*
* + Level 1 descriptor (PMD)
*/