From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from asavdk3.altibox.net ([109.247.116.14]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fKmOd-0006CS-9B for barebox@lists.infradead.org; Mon, 21 May 2018 15:06:49 +0000 Date: Mon, 21 May 2018 17:04:29 +0200 From: Sam Ravnborg Message-ID: <20180521150429.GA12008@ravnborg.org> References: <20180521115438.26493-1-pmamonov@gmail.com> <20180521115438.26493-7-pmamonov@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180521115438.26493-7-pmamonov@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v2 06/12] common.h: fix IOMEM() for MIPS64 To: Peter Mamonov Cc: barebox@lists.infradead.org On Mon, May 21, 2018 at 02:54:32PM +0300, Peter Mamonov wrote: > Signed-off-by: Peter Mamonov > --- > 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 > > +#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@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox