bus_space_(write|read)_X cleanup
    Oleksandr Tymoshenko 
    gonzo at bluezbox.com
       
    Wed Jan 16 19:44:50 UTC 2013
    
    
  
Hello,
One of the practices in ARM codebase that caught my eye recently
was using bus_space_write_4 (and read) where it's not strictly required.
The way it usually goes: memory resource is allocated in driver's attach
method then busspace tag/handle obtained by calling rman_get_bustag
and rman_get_bushandle, stored in softc and used as a parameters  of
bus_space calls. No other operations on handle/tag are performed.
There are bus_read/bus_write wrappers that provide cleaner API
and reduce code complexity. I believe it might be worth going through
the code and fixing cases of excessive use of bus_space_  functions.
Unless I missed something.
    
    
More information about the freebsd-arm
mailing list