Xilinx LLTEMAC driver issues

Xiaochang Duan xiaochang.duan at xilinx.com
Fri Apr 4 02:42:50 EST 2008

According to C operator precedence ((http://www.difranco.net/cop2220/op-prec.htm), the following patch should not be needed as operator “<<” has higher precedence than operator “|”.


-    XLlDma_mBdWrite((BdPtr), XLLDMA_BD_USR1_OFFSET, (Start) << 16 | (Insert))

+    XLlDma_mBdWrite((BdPtr), XLLDMA_BD_USR1_OFFSET, ((Start) << 16) | 

+ (Insert))


Also FYI, the XLlDma_mBdWrite currently is defined in xlldma driver as:


#define XLlDma_mBdWrite(BaseAddress, Offset, Data)                \

            (*(u32*)((u32)(BaseAddress) + (u32)(Offset)) = (Data))


So I don’t understand why the patch could help.





From: MingLiu [mailto:eemingliu at hotmail.com] 
Sent: Thursday, April 03, 2008 2:29 AM
To: John Bonesio; Johann Baudy
Cc: linuxppc-embedded at ozlabs.org; John Linn; git
Subject: RE: Xilinx LLTEMAC driver issues


Dear all,

> The change with the extra parenthesis (in the patch starting with line 133) seems unecessary. I looked at the XLlDma_mBdWrite macro and it appeared to have the correct use of parethesis in the implementation.
> So, assuming there's nothing subtle that I missed, it's not needed. However, it does no harm either.

However it really helps after I tried this patch. So there should be some difference after it is used. 
One more question, does this mean that the problem is not on the hardware timing, but the device driver? 


Windows Live Writer,支持离线撰写博客内容,随时随地想写就写。 立即使用! <http://get.live.cn/product/writer.html> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20080403/aaf372d1/attachment-0001.htm>

More information about the Linuxppc-embedded mailing list