linux-mips
[Top] [All Lists]

Re: IDE DMA mode in Big endian for mips

To: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
Subject: Re: IDE DMA mode in Big endian for mips
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Thu, 18 Oct 2001 07:54:18 +0200 (MEST)
Cc: raiko@niisi.msk.ru, hli@quicklogic.com, Linux/MIPS Development <linux-mips@oss.sgi.com>
In-reply-to: <20011018.111843.41626947.nemoto@toshiba-tops.co.jp>
Sender: owner-linux-mips@oss.sgi.com
On Thu, 18 Oct 2001, Atsushi Nemoto wrote:
> >>>>> On Wed, 17 Oct 2001 20:43:58 +0900 (JST), Atsushi Nemoto 
> >>>>> <nemoto@toshiba-tops.co.jp> 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.

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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>