[U-Boot] About the volatile data type in include/net.h

Mike Frysinger vapier at gentoo.org
Wed Nov 23 23:27:42 CET 2011


On Wednesday 23 November 2011 14:21:20 Simon Glass wrote:
> On Mon, Nov 21, 2011 at 7:06 PM, Macpaul Lin wrote:
> > I have found there are some variables declared as volatile in
> > include/net.h. Some of them are used as in send and receive functions.
> > Since some of them seems won't be update by hardware, like sending
> > functions. Should we check and clean them up?
> 
> I think so, since any access should go through read()l/writel() anyway.

i don't think so ... there's no reason to use readl/writel on packet buffers 
sitting in external memory

readl/writel would make sense if you were reading hardware buffers that are 
mapped into the cpu's address space, but that's not what these packet buffers 
are in the eth_device's api.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111123/ffcaa4aa/attachment-0001.pgp>


More information about the U-Boot mailing list