[Top] [All Lists]

Re: IDE DMA mode in Big endian for mips

To: Atsushi Nemoto <>
Subject: Re: IDE DMA mode in Big endian for mips
From: Geert Uytterhoeven <>
Date: Thu, 18 Oct 2001 07:54:18 +0200 (MEST)
Cc:,, Linux/MIPS Development <>
In-reply-to: <>
On Thu, 18 Oct 2001, Atsushi Nemoto wrote:
> >>>>> On Wed, 17 Oct 2001 20:43:58 +0900 (JST), Atsushi Nemoto 
> >>>>> <> said:
> nemoto> Yes, I depend on hardware swapping on word/dword access.  It
> nemoto> seems many pci drivers depend on this swapping too.
> Sorry, last sentence might be wrong.  I doubt I have been
> misunderstanding long time...
> Can anybody explain me a PCI driver's policy of endianness?  Should we
> use cpu_to_le32 with outl/writel?  Should we use cpu_to_le32 to write
> 32bit data to DMA area?

The PCI bus is little-endian.
All accesses should be done using one of
  - {read,write}[bwlq]: PCI memory space
  - {in,out}[bwl]: PCI (and ISA) I/O space
  - isa_{read,write}[bwl]: ISA memory space

The functions above should take care of endian conversion.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds

<Prev in Thread] Current Thread [Next in Thread>