a question on "iowrite32()"

Ming Liu eemingliu at hotmail.com
Thu Jun 7 05:30:28 EST 2007


Dear all,
I am writing a device driver for my customized PLB hardware module on my 
PPC405 & Xilinx ML403 architecture. In the driver code, I use a 
"iowrite32()" function to initiate a DMA transfer. However, I found that if 
I program as "iowrite32(0x12345678, address);", actually I am writing 
0x87654321 to that address. However if I write a standalone program without 
a Linux OS, the Xilinx function "XIo_Out32()" just write the correct value 
0x12345678 into address. Can anyone explain my why this happens? I know 
that PPC405 is a big-endian system. But I don't think this is a endian 
problem. After all endian is only an issue of the CPU architecture, not the 
OS. Am I right?

Thanks for your hints.

BR
Ming

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  




More information about the Linuxppc-embedded mailing list