]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sh: ioremap_prot support.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 12 Sep 2008 11:41:05 +0000 (20:41 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 12 Sep 2008 11:41:05 +0000 (20:41 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/Kconfig
arch/sh/include/asm/io.h
arch/sh/include/asm/page.h
arch/sh/include/asm/pgtable.h

index bbdcd6418ef52d56e9e30b1db610719e73324a80..434183eb4f125f07bd5cde53a3fd13f161f12f8d 100644 (file)
@@ -12,6 +12,7 @@ config SUPERH
        select HAVE_IDE
        select HAVE_OPROFILE
        select HAVE_GENERIC_DMA_COHERENT
+       select HAVE_IOREMAP_PROT
        help
          The SuperH is a RISC processor targeted for use in embedded systems
          and consumer electronics; it was also used in the Sega Dreamcast
index e49cfee95fb262327042ef8d92904fc14819c8a2..1857666136f292d42ddd58c893fc00395134aee5 100644 (file)
@@ -347,6 +347,8 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
        __ioremap_mode((offset), (size), _PAGE_CACHABLE)
 #define p3_ioremap(offset, size, flags)                        \
        __ioremap((offset), (size), (flags))
+#define ioremap_prot(offset, size, flags)              \
+       __ioremap_mode((offset), (size), (flags))
 #define iounmap(addr)                                  \
        __iounmap((addr))
 
index 77fb8bf02e4e846b8dfcb969cac079e3009e768a..5871d78e47e529208e28a523abb30fd2e075f429 100644 (file)
@@ -104,6 +104,8 @@ typedef struct { unsigned long pgd; } pgd_t;
 
 typedef struct page *pgtable_t;
 
+#define pte_pgprot(x) __pgprot(pte_val(x) & PTE_FLAGS_MASK)
+
 #endif /* !__ASSEMBLY__ */
 
 /*
index a4a8f8b93463f000970baae167c1199ceb0005f5..52220d70a096a378f7dd9c4fbbda635177f4b808 100644 (file)
@@ -76,6 +76,7 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
 #endif
 
 #define PTE_PHYS_MASK          (PHYS_ADDR_MASK & PAGE_MASK)
+#define PTE_FLAGS_MASK         (~(PTE_PHYS_MASK) << PAGE_SHIFT)
 
 #ifdef CONFIG_SUPERH32
 #define VMALLOC_START  (P3SEG)