mxc: i2c register mapped twice?
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
Quoted 7 lines · Richard Zhao
Hi Sascha,
I just realized i2c registers are mapped twice. It's first static mapped at
mx5x_io_descand 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
Signature · 4 lines
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 |
Quoted 7 lines · Richard Zhao
Hi Sascha,
I just realized i2c registers are mapped twice. It's first static mapped at
mx5x_io_descand 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.