Loading arch/sh/boards/board-sh7785lcr.c +9 −2 Original line number Diff line number Diff line Loading @@ -332,8 +332,15 @@ static void __init sh7785lcr_setup(char **cmdline_p) pm_power_off = sh7785lcr_power_off; /* sm501 DRAM configuration */ sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL; writel(0x000307c2, sm501_reg); sm501_reg = ioremap_fixed(SM107_REG_ADDR, SM501_DRAM_CONTROL, PAGE_KERNEL); if (!sm501_reg) { printk(KERN_ERR "%s: ioremap error.\n", __func__); return; } writel(0x000307c2, sm501_reg + SM501_DRAM_CONTROL); iounmap_fixed(sm501_reg); } /* Return the board specific boot mode pin configuration */ Loading arch/sh/include/asm/fixmap.h +9 −0 Original line number Diff line number Diff line Loading @@ -60,11 +60,20 @@ enum fixed_addresses { FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, #endif /* * FIX_IOREMAP entries are useful for mapping physical address * space before ioremap() is useable, e.g. really early in boot * before kmalloc() is working. */ #define FIX_N_IOREMAPS 32 FIX_IOREMAP_BEGIN, FIX_IOREMAP_END = FIX_IOREMAP_BEGIN + FIX_N_IOREMAPS, __end_of_fixed_addresses }; extern void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t flags); extern void __clear_fixmap(enum fixed_addresses idx, pgprot_t flags); #define set_fixmap(idx, phys) \ __set_fixmap(idx, phys, PAGE_KERNEL) Loading arch/sh/include/asm/io.h +6 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,12 @@ void __iomem *__ioremap_caller(unsigned long offset, unsigned long size, unsigned long flags, void *caller); void __iounmap(void __iomem *addr); #ifdef CONFIG_IOREMAP_FIXED extern void __iomem *ioremap_fixed(resource_size_t, unsigned long, pgprot_t); extern void iounmap_fixed(void __iomem *); extern void ioremap_fixed_init(void); #endif static inline void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags) { Loading arch/sh/include/asm/page.h +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ typedef struct { unsigned long pgd; } pgd_t; #define __pte(x) ((pte_t) { (x) } ) #else typedef struct { unsigned long long pte_low; } pte_t; typedef struct { unsigned long pgprot; } pgprot_t; typedef struct { unsigned long long pgprot; } pgprot_t; typedef struct { unsigned long pgd; } pgd_t; #define pte_val(x) ((x).pte_low) #define __pte(x) ((pte_t) { (x) } ) Loading arch/sh/include/asm/pgtable_32.h +4 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ #define _PAGE_EXT_KERN_WRITE 0x1000 /* EPR4-bit: Kernel space writable */ #define _PAGE_EXT_KERN_READ 0x2000 /* EPR5-bit: Kernel space readable */ #define _PAGE_EXT_WIRED 0x4000 /* software: Wire TLB entry */ /* Wrapper for extended mode pgprot twiddling */ #define _PAGE_EXT(x) ((unsigned long long)(x) << 32) Loading Loading @@ -164,6 +166,8 @@ static inline unsigned long copy_ptea_attributes(unsigned long x) (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \ _PAGE_DIRTY | _PAGE_SPECIAL) #define _PAGE_WIRED (_PAGE_EXT(_PAGE_EXT_WIRED)) #ifndef __ASSEMBLY__ #if defined(CONFIG_X2TLB) /* SH-X2 TLB */ Loading Loading
arch/sh/boards/board-sh7785lcr.c +9 −2 Original line number Diff line number Diff line Loading @@ -332,8 +332,15 @@ static void __init sh7785lcr_setup(char **cmdline_p) pm_power_off = sh7785lcr_power_off; /* sm501 DRAM configuration */ sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL; writel(0x000307c2, sm501_reg); sm501_reg = ioremap_fixed(SM107_REG_ADDR, SM501_DRAM_CONTROL, PAGE_KERNEL); if (!sm501_reg) { printk(KERN_ERR "%s: ioremap error.\n", __func__); return; } writel(0x000307c2, sm501_reg + SM501_DRAM_CONTROL); iounmap_fixed(sm501_reg); } /* Return the board specific boot mode pin configuration */ Loading
arch/sh/include/asm/fixmap.h +9 −0 Original line number Diff line number Diff line Loading @@ -60,11 +60,20 @@ enum fixed_addresses { FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, #endif /* * FIX_IOREMAP entries are useful for mapping physical address * space before ioremap() is useable, e.g. really early in boot * before kmalloc() is working. */ #define FIX_N_IOREMAPS 32 FIX_IOREMAP_BEGIN, FIX_IOREMAP_END = FIX_IOREMAP_BEGIN + FIX_N_IOREMAPS, __end_of_fixed_addresses }; extern void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t flags); extern void __clear_fixmap(enum fixed_addresses idx, pgprot_t flags); #define set_fixmap(idx, phys) \ __set_fixmap(idx, phys, PAGE_KERNEL) Loading
arch/sh/include/asm/io.h +6 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,12 @@ void __iomem *__ioremap_caller(unsigned long offset, unsigned long size, unsigned long flags, void *caller); void __iounmap(void __iomem *addr); #ifdef CONFIG_IOREMAP_FIXED extern void __iomem *ioremap_fixed(resource_size_t, unsigned long, pgprot_t); extern void iounmap_fixed(void __iomem *); extern void ioremap_fixed_init(void); #endif static inline void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags) { Loading
arch/sh/include/asm/page.h +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ typedef struct { unsigned long pgd; } pgd_t; #define __pte(x) ((pte_t) { (x) } ) #else typedef struct { unsigned long long pte_low; } pte_t; typedef struct { unsigned long pgprot; } pgprot_t; typedef struct { unsigned long long pgprot; } pgprot_t; typedef struct { unsigned long pgd; } pgd_t; #define pte_val(x) ((x).pte_low) #define __pte(x) ((pte_t) { (x) } ) Loading
arch/sh/include/asm/pgtable_32.h +4 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ #define _PAGE_EXT_KERN_WRITE 0x1000 /* EPR4-bit: Kernel space writable */ #define _PAGE_EXT_KERN_READ 0x2000 /* EPR5-bit: Kernel space readable */ #define _PAGE_EXT_WIRED 0x4000 /* software: Wire TLB entry */ /* Wrapper for extended mode pgprot twiddling */ #define _PAGE_EXT(x) ((unsigned long long)(x) << 32) Loading Loading @@ -164,6 +166,8 @@ static inline unsigned long copy_ptea_attributes(unsigned long x) (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \ _PAGE_DIRTY | _PAGE_SPECIAL) #define _PAGE_WIRED (_PAGE_EXT(_PAGE_EXT_WIRED)) #ifndef __ASSEMBLY__ #if defined(CONFIG_X2TLB) /* SH-X2 TLB */ Loading