[linux-yocto] [PATCH 44/87] arm/asm/io.h: let ioremap() fall back to platform specific one
Bruce Ashfield
bruce.ashfield at windriver.com
Mon May 27 12:08:58 PDT 2013
On 13-05-27 12:56 PM, Paul Butler wrote:
> Signed-off-by: Paul Butler <paul.butler at windriver.com>
This looks like it should be in a common branch, and upstream
sooner rather than later.
Something to consider while working through this board.
> ---
> arch/arm/include/asm/io.h | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
> index 9af5563..1b37696 100644
> --- a/arch/arm/include/asm/io.h
> +++ b/arch/arm/include/asm/io.h
> @@ -264,11 +264,21 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
> * Documentation/io-mapping.txt.
> *
> */
> -#define ioremap(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE)
> -#define ioremap_nocache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE)
> -#define ioremap_cached(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_CACHED)
> -#define ioremap_wc(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_WC)
> -#define iounmap __arm_iounmap
> +
> +#ifndef __arch_ioremap
> +#define __arch_ioremap __arm_ioremap
> +#define __arch_iounmap __iounmap
> +#endif
> +
> +#define ioremap(cookie, size) \
> + __arch_ioremap((cookie), (size), MT_DEVICE)
> +#define ioremap_nocache(cookie, size) \
> + __arch_ioremap((cookie), (size), MT_DEVICE)
> +#define ioremap_cached(cookie, size) \
> + __arch_ioremap((cookie), (size), MT_DEVICE_CACHED)
> +#define ioremap_wc(cookie, size) \
> + __arch_ioremap((cookie), (size), MT_DEVICE_WC)
> +#define iounmap __arch_iounmap
minor 'nit. Why change the formatting from how the #define's were originally
in the file ? This just makes the change bigger than it needs to
be.
Cheers,
Bruce
>
> /*
> * io{read,write}{8,16,32} macros
>
More information about the linux-yocto
mailing list