linux-mips
[Top] [All Lists]

Re: [PATCH] defined a macro for lemote 2e box IO base

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH] defined a macro for lemote 2e box IO base
From: Zhang Le <r0bertz@gentoo.org>
Date: Fri, 24 Oct 2008 15:27:46 +0800
Cc: linux-mips@linux-mips.org
In-reply-to: <20081022202812.GB10625@linux-mips.org>
Mail-followup-to: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1224722939-18557-1-git-send-email-r0bertz@gentoo.org> <20081022202812.GB10625@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.16 (2007-06-09)
On 21:28 Wed 22 Oct     , Ralf Baechle wrote:
> On Thu, Oct 23, 2008 at 12:48:58AM +0000, Zhang Le wrote:
> 
> > +#ifdef CONFIG_64BIT
> > +#define LEMOTE_IO_PORT_BASE 0xffffffffbfd00000
> > +#else
> > +#define LEMOTE_IO_PORT_BASE 0xbfd00000
> > +#endif
> 
> This sort of #ifdefery is one of the reasons why it's better to define
> physical addresses of devices, not virtual addresses in header files.

Thanks for the comment.
I have checked how other platforms handle this problem.
Many have used CKSEG1ADDR.
So I have posted another set of patches here:
http://www.linux-mips.org/archives/linux-mips/2008-10/msg00189.html
http://www.linux-mips.org/archives/linux-mips/2008-10/msg00190.html

Is it OK?

Zhang, Le

<Prev in Thread] Current Thread [Next in Thread>