diff options
Diffstat (limited to 'arch/sh/include/asm')
-rw-r--r-- | arch/sh/include/asm/addrspace.h | 4 | ||||
-rw-r--r-- | arch/sh/include/asm/io.h | 4 | ||||
-rw-r--r-- | arch/sh/include/asm/page.h | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/arch/sh/include/asm/addrspace.h b/arch/sh/include/asm/addrspace.h index 36736c7e93db..80d40813e057 100644 --- a/arch/sh/include/asm/addrspace.h +++ b/arch/sh/include/asm/addrspace.h | |||
@@ -31,7 +31,7 @@ | |||
31 | /* Returns the physical address of a PnSEG (n=1,2) address */ | 31 | /* Returns the physical address of a PnSEG (n=1,2) address */ |
32 | #define PHYSADDR(a) (((unsigned long)(a)) & 0x1fffffff) | 32 | #define PHYSADDR(a) (((unsigned long)(a)) & 0x1fffffff) |
33 | 33 | ||
34 | #ifdef CONFIG_29BIT | 34 | #if defined(CONFIG_29BIT) || defined(CONFIG_PMB_FIXED) |
35 | /* | 35 | /* |
36 | * Map an address to a certain privileged segment | 36 | * Map an address to a certain privileged segment |
37 | */ | 37 | */ |
@@ -43,7 +43,7 @@ | |||
43 | ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P3SEG)) | 43 | ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P3SEG)) |
44 | #define P4SEGADDR(a) \ | 44 | #define P4SEGADDR(a) \ |
45 | ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P4SEG)) | 45 | ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P4SEG)) |
46 | #endif /* 29BIT */ | 46 | #endif /* 29BIT || PMB_FIXED */ |
47 | #endif /* P1SEG */ | 47 | #endif /* P1SEG */ |
48 | 48 | ||
49 | /* Check if an address can be reached in 29 bits */ | 49 | /* Check if an address can be reached in 29 bits */ |
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 61f6dae40534..0454f8d68059 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h | |||
@@ -238,7 +238,7 @@ extern void onchip_unmap(unsigned long vaddr); | |||
238 | static inline void __iomem * | 238 | static inline void __iomem * |
239 | __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) | 239 | __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) |
240 | { | 240 | { |
241 | #ifdef CONFIG_SUPERH32 | 241 | #if defined(CONFIG_SUPERH32) && !defined(CONFIG_PMB_FIXED) |
242 | unsigned long last_addr = offset + size - 1; | 242 | unsigned long last_addr = offset + size - 1; |
243 | #endif | 243 | #endif |
244 | void __iomem *ret; | 244 | void __iomem *ret; |
@@ -247,7 +247,7 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) | |||
247 | if (ret) | 247 | if (ret) |
248 | return ret; | 248 | return ret; |
249 | 249 | ||
250 | #ifdef CONFIG_SUPERH32 | 250 | #if defined(CONFIG_SUPERH32) && !defined(CONFIG_PMB_FIXED) |
251 | /* | 251 | /* |
252 | * For P1 and P2 space this is trivial, as everything is already | 252 | * For P1 and P2 space this is trivial, as everything is already |
253 | * mapped. Uncached access for P1 addresses are done through P2. | 253 | * mapped. Uncached access for P1 addresses are done through P2. |
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h index 5871d78e47e5..9c6d21ec0240 100644 --- a/arch/sh/include/asm/page.h +++ b/arch/sh/include/asm/page.h | |||
@@ -129,7 +129,12 @@ typedef struct page *pgtable_t; | |||
129 | * is not visible (it is part of the PMB mapping) and so needs to be | 129 | * is not visible (it is part of the PMB mapping) and so needs to be |
130 | * added or subtracted as required. | 130 | * added or subtracted as required. |
131 | */ | 131 | */ |
132 | #ifdef CONFIG_32BIT | 132 | #if defined(CONFIG_PMB_FIXED) |
133 | /* phys = virt - PAGE_OFFSET - (__MEMORY_START & 0xe0000000) */ | ||
134 | #define PMB_OFFSET (PAGE_OFFSET - PXSEG(__MEMORY_START)) | ||
135 | #define __pa(x) ((unsigned long)(x) - PMB_OFFSET) | ||
136 | #define __va(x) ((void *)((unsigned long)(x) + PMB_OFFSET)) | ||
137 | #elif defined(CONFIG_32BIT) | ||
133 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET+__MEMORY_START) | 138 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET+__MEMORY_START) |
134 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET-__MEMORY_START)) | 139 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET-__MEMORY_START)) |
135 | #else | 140 | #else |