linux-mips
[Top] [All Lists]

Re: Preliminary patch for ip32 ttyS* device

To: Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>
Subject: Re: Preliminary patch for ip32 ttyS* device
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Wed, 7 Nov 2007 17:21:22 +0000 (GMT)
Cc: mips kernel list <linux-mips@linux-mips.org>
In-reply-to: <1194446585.5849.21.camel@scarafaggio>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20071030214015.050b7950.giuseppe@eppesuigoccas.homedns.org> <20071031130828.GE14187@linux-mips.org> <1194446585.5849.21.camel@scarafaggio>
Sender: linux-mips-bounce@linux-mips.org
On Wed, 7 Nov 2007, Giuseppe Sacco wrote:

> I have been investigating about it for one week and I am still not
> convinced that mapbase must be initialised. I tried to understand the
> meaning of mapbase and membase, but I am unsure about the value I should
> set mapbase to.
> 
> I learnt that when specifying mapbase its region would be registered and
> reserved using request_mem_region(). Otherwise, if you do not specify
> mapbase, the region is not reserved. Apart from reserving the memory
> region, mapbase isn't use anymore. Is mapbase mandatory? 
> 
> If mapbase isn't mandatory, the second part of my patch is probably
> right and fixes a bug.

 You ought to use mapbase and ioremap() with new code as you are not 
allowed to use readb()/writeb()/etc. on addresses obtained otherwise than 
by calling ioremap().  The use of request_mem_region(), etc. is not 
strictly mandatory, but it is nice to have.  Many serial drivers use these 
functions, so I cannot see a reason why it would be a hassle for ip32.

  Maciej

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