diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-18 23:34:38 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-18 23:34:38 -0500 |
commit | d57d64080ddc0ff13fcffc898b6251074a482ba1 (patch) | |
tree | c38fd506a30d56de84a39285412ffc1b45cc8d33 /arch/sh/boards | |
parent | af1415314a4190b8ea06e53808d392fcf91555af (diff) |
sh: Prevent 64-bit pgprot clobbering across ioremap implementations.
Presently 'flags' gets passed around a lot between the various ioremap
helpers and implementations, which is only 32-bits. In the X2TLB case
we use 64-bit pgprots which presently results in the upper 32bits being
chopped off (which handily include our read/write/exec permissions).
As such, we convert everything internally to using pgprot_t directly and
simply convert over with pgprot_val() where needed. With this in place,
transparent fixmap utilization for early ioremap works as expected.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/board-sh7785lcr.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/mach-landisk/setup.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-lboxre2/setup.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-sh03/setup.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c index 511de38d2046..fe7e686c94ac 100644 --- a/arch/sh/boards/board-sh7785lcr.c +++ b/arch/sh/boards/board-sh7785lcr.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/i2c-algo-pca.h> | 21 | #include <linux/i2c-algo-pca.h> |
22 | #include <linux/usb/r8a66597.h> | 22 | #include <linux/usb/r8a66597.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/io.h> | ||
24 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
25 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
26 | #include <mach/sh7785lcr.h> | 27 | #include <mach/sh7785lcr.h> |
@@ -332,15 +333,14 @@ static void __init sh7785lcr_setup(char **cmdline_p) | |||
332 | pm_power_off = sh7785lcr_power_off; | 333 | pm_power_off = sh7785lcr_power_off; |
333 | 334 | ||
334 | /* sm501 DRAM configuration */ | 335 | /* sm501 DRAM configuration */ |
335 | sm501_reg = ioremap_fixed(SM107_REG_ADDR, SM501_DRAM_CONTROL, | 336 | sm501_reg = ioremap_nocache(SM107_REG_ADDR, SM501_DRAM_CONTROL); |
336 | PAGE_KERNEL); | ||
337 | if (!sm501_reg) { | 337 | if (!sm501_reg) { |
338 | printk(KERN_ERR "%s: ioremap error.\n", __func__); | 338 | printk(KERN_ERR "%s: ioremap error.\n", __func__); |
339 | return; | 339 | return; |
340 | } | 340 | } |
341 | 341 | ||
342 | writel(0x000307c2, sm501_reg + SM501_DRAM_CONTROL); | 342 | writel(0x000307c2, sm501_reg + SM501_DRAM_CONTROL); |
343 | iounmap_fixed(sm501_reg); | 343 | iounmap(sm501_reg); |
344 | } | 344 | } |
345 | 345 | ||
346 | /* Return the board specific boot mode pin configuration */ | 346 | /* Return the board specific boot mode pin configuration */ |
diff --git a/arch/sh/boards/mach-landisk/setup.c b/arch/sh/boards/mach-landisk/setup.c index db22ea2e6d49..59816355d199 100644 --- a/arch/sh/boards/mach-landisk/setup.c +++ b/arch/sh/boards/mach-landisk/setup.c | |||
@@ -63,7 +63,7 @@ static int __init landisk_devices_setup(void) | |||
63 | /* open I/O area window */ | 63 | /* open I/O area window */ |
64 | paddrbase = virt_to_phys((void *)PA_AREA5_IO); | 64 | paddrbase = virt_to_phys((void *)PA_AREA5_IO); |
65 | prot = PAGE_KERNEL_PCC(1, _PAGE_PCC_IO16); | 65 | prot = PAGE_KERNEL_PCC(1, _PAGE_PCC_IO16); |
66 | cf_ide_base = p3_ioremap(paddrbase, PAGE_SIZE, prot.pgprot); | 66 | cf_ide_base = p3_ioremap(paddrbase, PAGE_SIZE, prot); |
67 | if (!cf_ide_base) { | 67 | if (!cf_ide_base) { |
68 | printk("allocate_cf_area : can't open CF I/O window!\n"); | 68 | printk("allocate_cf_area : can't open CF I/O window!\n"); |
69 | return -ENOMEM; | 69 | return -ENOMEM; |
diff --git a/arch/sh/boards/mach-lboxre2/setup.c b/arch/sh/boards/mach-lboxre2/setup.c index 2b0b5818e1e4..408dd5df7d45 100644 --- a/arch/sh/boards/mach-lboxre2/setup.c +++ b/arch/sh/boards/mach-lboxre2/setup.c | |||
@@ -57,7 +57,7 @@ static int __init lboxre2_devices_setup(void) | |||
57 | paddrbase = virt_to_phys((void*)PA_AREA5_IO); | 57 | paddrbase = virt_to_phys((void*)PA_AREA5_IO); |
58 | psize = PAGE_SIZE; | 58 | psize = PAGE_SIZE; |
59 | prot = PAGE_KERNEL_PCC( 1 , _PAGE_PCC_IO16); | 59 | prot = PAGE_KERNEL_PCC( 1 , _PAGE_PCC_IO16); |
60 | cf0_io_base = (u32)p3_ioremap(paddrbase, psize, prot.pgprot); | 60 | cf0_io_base = (u32)p3_ioremap(paddrbase, psize, prot); |
61 | if (!cf0_io_base) { | 61 | if (!cf0_io_base) { |
62 | printk(KERN_ERR "%s : can't open CF I/O window!\n" , __func__ ); | 62 | printk(KERN_ERR "%s : can't open CF I/O window!\n" , __func__ ); |
63 | return -ENOMEM; | 63 | return -ENOMEM; |
diff --git a/arch/sh/boards/mach-sh03/setup.c b/arch/sh/boards/mach-sh03/setup.c index 74cfb4b8b03d..f14ba0fa950b 100644 --- a/arch/sh/boards/mach-sh03/setup.c +++ b/arch/sh/boards/mach-sh03/setup.c | |||
@@ -82,7 +82,7 @@ static int __init sh03_devices_setup(void) | |||
82 | /* open I/O area window */ | 82 | /* open I/O area window */ |
83 | paddrbase = virt_to_phys((void *)PA_AREA5_IO); | 83 | paddrbase = virt_to_phys((void *)PA_AREA5_IO); |
84 | prot = PAGE_KERNEL_PCC(1, _PAGE_PCC_IO16); | 84 | prot = PAGE_KERNEL_PCC(1, _PAGE_PCC_IO16); |
85 | cf_ide_base = p3_ioremap(paddrbase, PAGE_SIZE, prot.pgprot); | 85 | cf_ide_base = p3_ioremap(paddrbase, PAGE_SIZE, prot); |
86 | if (!cf_ide_base) { | 86 | if (!cf_ide_base) { |
87 | printk("allocate_cf_area : can't open CF I/O window!\n"); | 87 | printk("allocate_cf_area : can't open CF I/O window!\n"); |
88 | return -ENOMEM; | 88 | return -ENOMEM; |