[U-Boot] [PATCH v4 1/4] Introduce virt_to_phys()

Haavard Skinnemoen haavard.skinnemoen at atmel.com
Wed Dec 17 17:00:57 CET 2008


Kumar Gala wrote:
> > /* virt_to_phys will only work when address is in P1 or P2 */
> > -static __inline__ unsigned long virt_to_phys(volatile void *address)
> > +static inline phys_addr_t virt_to_phys(volatile void *address)
> > {  
> 
> Is the volatile really needed?

The problem is that the 'packet' parameter to struct eth_device.send()
is volatile, and it propagates into this function. So if I remove the
volatile, I have to either add ugly casts elsewhere or change the
eth_device API...

I have no idea why the network subsystem feels the need to enforce the
use of volatile in all drivers, though...

Haavard


More information about the U-Boot mailing list