aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2006-01-09 14:23:11 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-09 14:23:11 -0500
commit9d4ae7276ae26c5bfba6207cf05340af1931d8d4 (patch)
treebf6f09189541ac964365c68362e9915c48510eb5 /include
parent16ed926eee5497db52fbee4d2db2dedbcd23561c (diff)
[ARM] 3070/2: Add __ioremap_pfn() API
Patch from Deepak Saxena In working on adding 36-bit addressed supersection support to ioremap(), I came to the conclusion that it would be far simpler to do so by just splitting __ioremap() into a main external interface and adding an __ioremap_pfn() function that takes a pfn + offset into the page that __ioremap() can call. This way existing callers of __ioremap() won't have to change their code and 36-bit systems will just call __ioremap_pfn() and we will not have to deal with unsigned long long variables. Note that __ioremap_pfn() should _NOT_ be called directly by drivers but is reserved for use by arch_ioremap() implementations that map 32-bit resource regions into the real 36-bit address and then call this new function. Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/io.h6
-rw-r--r--include/asm-arm/mach/map.h3
-rw-r--r--include/asm-arm/memory.h6
3 files changed, 12 insertions, 3 deletions
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 0cf4d4f99600..fd0147e52dbb 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -56,7 +56,12 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);
56 56
57/* 57/*
58 * Architecture ioremap implementation. 58 * Architecture ioremap implementation.
59 *
60 * __ioremap takes CPU physical address.
61 *
62 * __ioremap_pfn takes a Page Frame Number and an offset into that page
59 */ 63 */
64extern void __iomem * __ioremap_pfn(unsigned long, unsigned long, size_t, unsigned long);
60extern void __iomem * __ioremap(unsigned long, size_t, unsigned long); 65extern void __iomem * __ioremap(unsigned long, size_t, unsigned long);
61extern void __iounmap(void __iomem *addr); 66extern void __iounmap(void __iomem *addr);
62 67
@@ -261,6 +266,7 @@ out:
261 * 266 *
262 * ioremap takes a PCI memory address, as specified in 267 * ioremap takes a PCI memory address, as specified in
263 * Documentation/IO-mapping.txt. 268 * Documentation/IO-mapping.txt.
269 *
264 */ 270 */
265#ifndef __arch_ioremap 271#ifndef __arch_ioremap
266#define ioremap(cookie,size) __ioremap(cookie,size,0) 272#define ioremap(cookie,size) __ioremap(cookie,size,0)
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h
index b338936bde4f..3351b77fab36 100644
--- a/include/asm-arm/mach/map.h
+++ b/include/asm-arm/mach/map.h
@@ -27,9 +27,6 @@ struct meminfo;
27#define MT_ROM 6 27#define MT_ROM 6
28#define MT_IXP2000_DEVICE 7 28#define MT_IXP2000_DEVICE 7
29 29
30#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT)
31#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
32
33extern void create_memmap_holes(struct meminfo *); 30extern void create_memmap_holes(struct meminfo *);
34extern void memtable_init(struct meminfo *); 31extern void memtable_init(struct meminfo *);
35extern void iotable_init(struct map_desc *, int); 32extern void iotable_init(struct map_desc *, int);
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h
index 3e572364ee73..3d7f08bd9030 100644
--- a/include/asm-arm/memory.h
+++ b/include/asm-arm/memory.h
@@ -58,6 +58,12 @@
58#endif 58#endif
59 59
60/* 60/*
61 * Convert a physical address to a Page Frame Number and back
62 */
63#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT)
64#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
65
66/*
61 * The module space lives between the addresses given by TASK_SIZE 67 * The module space lives between the addresses given by TASK_SIZE
62 * and PAGE_OFFSET - it must be within 32MB of the kernel text. 68 * and PAGE_OFFSET - it must be within 32MB of the kernel text.
63 */ 69 */