From: "Gleb O. Raiko" <raiko@niisi.msk.ru>
To: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
Cc: hli@quicklogic.com, linux-mips@oss.sgi.com
Subject: Re: IDE DMA mode in Big endian for mips
Date: Thu, 18 Oct 2001 14:33:33 +0400 [thread overview]
Message-ID: <3BCEAFFD.3EDDBE29@niisi.msk.ru> (raw)
In-Reply-To: 20011018.111843.41626947.nemoto@toshiba-tops.co.jp
Atsushi Nemoto wrote:
> Can anybody explain me a PCI driver's policy of endianness?
It depens on device and board. Most drivers assume PCI is little-endian,
but rely on outl implementation in byte swapping policy.
> Should we use cpu_to_le32 with outl/writel?
If you can't instruct hw to perform byte-swapping for PCI IO, you have
to add cpu_to_le32, it's clear. For writel, i.e. PCI MEM the situation
is a bit subtle. The problem is your videocard, that may or may not
support byte swapping. So, in order to suport videocards that aren't
able to swap bytes, you have to setup PCI MEM in big-endian mode.
Look, for example, at the tulip driver, it swaps bytes for DMA and
doesn't do it for register access.
> Should we use cpu_to_le32 to write 32bit data to DMA area?
DMA data is stream of bytes. I would treat a device/board as broken, if
it would need byte swapping for DMA data.
Regards,
Gleb.
next prev parent reply other threads:[~2001-10-18 10:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-12 16:26 Big endian problem Hanks Li
2001-10-12 16:26 ` Hanks Li
2001-10-12 17:45 ` Ralf Baechle
2001-10-12 17:47 ` Jun Sun
2001-10-12 20:13 ` Dan Aizenstros
2001-10-13 0:35 ` Jun Sun
2001-10-13 0:55 ` Thiemo Seufer
2001-10-13 5:54 ` H . J . Lu
2001-10-13 5:54 ` H . J . Lu
2001-10-13 21:02 ` MySQL Yoshi-K
2001-10-13 21:02 ` MySQL Yoshi-K
2001-10-14 16:30 ` MySQL H . J . Lu
2001-10-14 21:01 ` MySQL Ralf Baechle
2001-10-15 5:46 ` MySQL H . J . Lu
2001-10-16 14:28 ` IDE DMA mode in Big endian for mips Hanks Li
2001-10-16 14:28 ` Hanks Li
2001-10-16 17:30 ` Jun Sun
2001-10-17 2:38 ` Atsushi Nemoto
2001-10-17 5:48 ` Geert Uytterhoeven
2001-10-17 9:33 ` Gleb O. Raiko
2001-10-17 11:43 ` Atsushi Nemoto
2001-10-18 2:18 ` Atsushi Nemoto
2001-10-18 5:54 ` Geert Uytterhoeven
2001-10-18 10:33 ` Gleb O. Raiko [this message]
2001-10-17 17:52 ` Hanks Li
2001-10-17 17:52 ` Hanks Li
2001-10-19 9:54 ` Atsushi Nemoto
2001-10-21 16:50 ` Alan Cox
2001-10-21 16:50 ` Alan Cox
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=3BCEAFFD.3EDDBE29@niisi.msk.ru \
--to=raiko@niisi.msk.ru \
--cc=hli@quicklogic.com \
--cc=linux-mips@oss.sgi.com \
--cc=nemoto@toshiba-tops.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.