Re: [PATCH v2 06/12] common.h: fix IOMEM() for MIPS64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 21, 2018 at 02:54:32PM +0300, Peter Mamonov wrote:
> Signed-off-by: Peter Mamonov <pmamonov@xxxxxxxxx>
> ---
>  include/common.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/common.h b/include/common.h
> index 60e5005b8..4b3bcae40 100644
> --- a/include/common.h
> +++ b/include/common.h
> @@ -142,7 +142,11 @@ void barebox_set_hostname_no_overwrite(const char *);
>  #if defined(CONFIG_MIPS)
>  #include <asm/addrspace.h>
>  
> +#ifdef CONFIG_64BIT
> +#define IOMEM(addr)	((void __force __iomem *)PHYS_TO_XKSEG_UNCACHED(addr))
> +#else
>  #define IOMEM(addr)	((void __force __iomem *)CKSEG1ADDR(addr))
> +#endif
>  #else
>  #define IOMEM(addr)	((void __force __iomem *)(addr))
>  #endif

Another way to handle this would be to move the definition of IOMEM to asm/common.h
and then in this file define IOMEM only if not already defined.

Then we could avoid this MIPS specific stuff in the middle of a common file.

	Sam

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux