Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264654
b: refs/heads/master
c: 6c5482d
h: refs/heads/master
v: v3
  • Loading branch information
Tony Lindgren authored and Russell King committed Oct 22, 2011
1 parent d8db800 commit 8e0f928
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee3f615819404a9438b2dd01b7a39f276d2737f2
refs/heads/master: 6c5482d53f195d3ca61c9ec1be25b0f4a92575fe
1 change: 1 addition & 0 deletions trunk/arch/arm/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ extern void __iomem *__arm_ioremap_caller(unsigned long, size_t, unsigned int,

extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsigned int);
extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int);
extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached);
extern void __iounmap(volatile void __iomem *addr);

/*
Expand Down
21 changes: 21 additions & 0 deletions trunk/arch/arm/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,27 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
}
EXPORT_SYMBOL(__arm_ioremap);

/*
* Remap an arbitrary physical address space into the kernel virtual
* address space as memory. Needed when the kernel wants to execute
* code in external memory. This is needed for reprogramming source
* clocks that would affect normal memory for example. Please see
* CONFIG_GENERIC_ALLOCATOR for allocating external memory.
*/
void __iomem *
__arm_ioremap_exec(unsigned long phys_addr, size_t size, bool cached)
{
unsigned int mtype;

if (cached)
mtype = MT_MEMORY;
else
mtype = MT_MEMORY_NONCACHED;

return __arm_ioremap_caller(phys_addr, size, mtype,
__builtin_return_address(0));
}

void __iounmap(volatile void __iomem *io_addr)
{
void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr);
Expand Down

0 comments on commit 8e0f928

Please sign in to comment.