public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb•de>
To: linuxppc-embedded@ozlabs•org
Cc: linuxppc@ozlabs•org, Domen Puncer <domen.puncer@telargo•com>
Subject: Re: a question on "iowrite32()"
Date: Thu, 7 Jun 2007 12:01:46 +0200	[thread overview]
Message-ID: <200706071201.46637.arnd@arndb.de> (raw)
In-Reply-To: <20070607062054.GD23294@moe.telargo.com>

On Thursday 07 June 2007, Domen Puncer wrote:
> out_be32?
> I recall something about iowrite32 being PCI stuff and therefore little
> endian, but don't count on this being right.

You're completely right, out_be32 is the correct one. The primitives
we have for writing 32 bit I/O space are:

writel(): PCI memory space from ioremap
outl(): PCI I/O space from a struct resource
iowrite32(): PCI memory or I/O space from pci_iomap
iowrite32be(): defined but not useful anywhere currently
out_be32(): big-endian memory address from of_address_to_resource or of_iomap
out_le32(): like out_be32(), but little-endian
__raw_writel(): always broken, don't use

Since of_iomap() is rather new and hardly used by any drivers, we
could still redefine it so that you would use iowrite32{,be}() instead
of out_{be,le}32, but currently that doesn't work.

I also thought about changing of_iomap() to use the devres functions,
which basically attach information about the mapping to the device
structure, and automatically unmap those when the of_platform_driver
gets unregistered.

	Arnd <><

  reply	other threads:[~2007-06-07 10:07 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
2007-06-07 10:01   ` Arnd Bergmann [this message]
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=200706071201.46637.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=domen.puncer@telargo$(echo .)com \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    --cc=linuxppc@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