On Monday 14 March 2011, Manjunath Hadli wrote:
> Current devices.c file has a number of instances where
> IO_ADDRESS() is used for system module register
> access. Eliminate this in favor of a ioremap()
> based access.
> 
> Consequent to this, a new global pointer davinci_sysmodbase
> has been introduced which gets initialized during
> the initialization of each relevant SoC
> 
> Signed-off-by: Manjunath Hadli <[email protected]>

The change looks good, it's definitely a step in the right
direction.

Acked-by: Arnd Bergmann <[email protected]>


I think you can go even further:

* A straightforward change would be to move davinci_sysmodbase
  into a local variable of the davinci_setup_mmc function,
  which I believe is the only user. Then you can ioremap
  and iounmap it directly there.

* If you need to access sysmod in multiple places, a nicer
  way would be to make the virtual address pointer static,
  and export the accessor functions for it, rather than
  having a global pointer.

        Arnd
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to