Subject: Re: a question on "iowrite32()"

From: Domen Puncer <[email-masked]>
Date: Thu, 7 Jun 2007 08:20:54 +0200

On 06/06/07 19:30 +0000, Ming Liu wrote:
> 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?

out_be32?
I recall something about iowrite32 being PCI stuff and therefore little
endian, but don't count on this being right.

	Domen