public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Domen Puncer <domen.puncer@telargo•com>
To: Ming Liu <eemingliu@hotmail•com>
Cc: linuxppc-embedded@ozlabs•org
Subject: Re: a question on "iowrite32()"
Date: Thu, 7 Jun 2007 08:20:54 +0200	[thread overview]
Message-ID: <20070607062054.GD23294@moe.telargo.com> (raw)
In-Reply-To: <BAY138-F6B2DA6BEF021C7026E522B2270@phx.gbl>

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

  reply	other threads:[~2007-06-07  6:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-06 19:30 a question on "iowrite32()" Ming Liu
2007-06-07  6:20 ` Domen Puncer [this message]
2007-06-07 10:01   ` Arnd Bergmann
2007-06-07 11:20     ` Ming Liu
2007-06-07 14:09       ` Arnd Bergmann
2007-06-08 13:51         ` Ming Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070607062054.GD23294@moe.telargo.com \
    --to=domen.puncer@telargo$(echo .)com \
    --cc=eemingliu@hotmail$(echo .)com \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox