|
@@ -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);
|