linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* mxc: i2c register mapped twice?
@ 2011-01-06 12:26 Richard Zhao
  2011-01-06 13:40 ` Sascha Hauer
  2011-01-07  1:31 ` Ben Dooks
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Zhao @ 2011-01-06 12:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sascha,

I just realized i2c registers are mapped twice. It's first static mapped at
mx5x_io_desc and second mapped in driver.
Drivers always feel happy to receive physical address in resource, and ioremap
it itself. We might static map too many register regions in machine level?
I'm sure it's not just i2c.

Thanks
Richard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* mxc: i2c register mapped twice?
  2011-01-06 12:26 mxc: i2c register mapped twice? Richard Zhao
@ 2011-01-06 13:40 ` Sascha Hauer
  2011-01-07  1:31 ` Ben Dooks
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2011-01-06 13:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 06, 2011 at 08:26:12PM +0800, Richard Zhao wrote:
> Hi Sascha,
> 
> I just realized i2c registers are mapped twice. It's first static mapped at
> mx5x_io_desc and second mapped in driver.
> Drivers always feel happy to receive physical address in resource, and ioremap
> it itself. We might static map too many register regions in machine level?
> I'm sure it's not just i2c.

There are some devices which use the static mappings, like watchdog (for
reset), irq controller, gpt. Otherwise you are right. Feel free to cleanup
here if you think there are unnecessary mappings.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 3+ messages in thread

* mxc: i2c register mapped twice?
  2011-01-06 12:26 mxc: i2c register mapped twice? Richard Zhao
  2011-01-06 13:40 ` Sascha Hauer
@ 2011-01-07  1:31 ` Ben Dooks
  1 sibling, 0 replies; 3+ messages in thread
From: Ben Dooks @ 2011-01-07  1:31 UTC (permalink / raw)
  To: linux-arm-kernel

On 06/01/11 12:26, Richard Zhao wrote:
> Hi Sascha,
> 
> I just realized i2c registers are mapped twice. It's first static mapped at
> mx5x_io_desc and second mapped in driver.
> Drivers always feel happy to receive physical address in resource, and ioremap
> it itself. We might static map too many register regions in machine level?
> I'm sure it's not just i2c.

either cleanup the mapping, or add a custom ioremap() to return this
region for the drivers.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-07  1:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-06 12:26 mxc: i2c register mapped twice? Richard Zhao
2011-01-06 13:40 ` Sascha Hauer
2011-01-07  1:31 ` Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).