Thread (7 messages) 7 messages, 3 authors, 2011-08-22

Re: of_iomap() matched with plan iounmap()

From: David Brown <hidden>
Date: 2011-08-19 21:19:06
Also in: linux-arm-kernel, lkml

On Fri, Aug 19, 2011 at 02:26:18PM +0200, Arnd Bergmann wrote:
On Friday 19 August 2011, David Miller wrote:
quoted
From: David Brown <redacted>
Date: Thu, 18 Aug 2011 10:02:26 -0700
quoted
The SPARC target contains of_ioremap() and of_iounmap(), which various
drivers use (generally inside of CONFIG_SBUS).

include/linux/of_address.h contains a definition for of_iomap(), but
not corresponding unmap call.  Code using this calls the regular
iounmap().

Is it safe to assume that of_iomap() will always be based on ioremap()
and therefore it is safe to use iounmap(), or would it be better to
define another name for drivers to use as the inverse of of_iomap().
I'm not sure what to call it, since of_iounmap() is already taken by
SPARC.
It's better to define a matching of_iounmap() interface, even if for
now it is exactly iounmap()
But the problem is that we need conflicting prototypes for of_iounmap.
What if we left the SPARC calls alone, and changed of_iomap() into
of_dt_iomap() and could then make of_dt_iounmap().  Or, it could just
be of_dt_map(), and of_dt_unmap().

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help