[PATCH 03/15] ARM: provide runtime hook for ioremap
H Hartley Sweeten
hartleys at visionengravers.com
Mon Feb 13 17:13:58 EST 2012
On Monday, February 13, 2012 2:43 PM, Rob Herring wrote:
>
> We have compile time over-ride of ioremap, but an run-time override is
> needed for multi-platform builds.
>
> Signed-off-by: Rob Herring <rob.herring at calxeda.com>
> ---
> arch/arm/include/asm/io.h | 5 ++++-
> arch/arm/mm/ioremap.c | 3 +++
> 2 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
> index 9275828..f5c6968 100644
> --- a/arch/arm/include/asm/io.h
> +++ b/arch/arm/include/asm/io.h
> @@ -264,8 +264,11 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
> * Documentation/io-mapping.txt.
> *
> */
> +
> +extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int);
> +
> #ifndef __arch_ioremap
> -#define __arch_ioremap __arm_ioremap
> +#define __arch_ioremap arch_ioremap
> #define __arch_iounmap __iounmap
> #endif
>
> diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
> index 80632e8..f551c13 100644
> --- a/arch/arm/mm/ioremap.c
> +++ b/arch/arm/mm/ioremap.c
> @@ -314,6 +314,9 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
> }
> EXPORT_SYMBOL(__arm_ioremap);
>
> +void __iomem * (*arch_ioremap)(unsigned long , size_t , unsigned int ) = __arm_ioremap;
> +EXPORT_SYMBOL(arch_ioremap);
> +
> /*
> * Remap an arbitrary physical address space into the kernel virtual
> * address space as memory. Needed when the kernel wants to execute
On EP93xx:
Tested-by: H Hartley Sweeten <hsweeten at visionengravers.com>
More information about the linux-arm-kernel
mailing list