All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Porter <mporter@kernel.crashing.org>
To: Shawn Jin <shawnxjin@gmail.com>
Cc: ppcembed <linuxppc-embedded@ozlabs.org>
Subject: Re: writel(), readl() in <asm-ppc/io.h>
Date: Sun, 14 Aug 2005 09:14:16 -0700	[thread overview]
Message-ID: <20050814091416.B20320@cox.net> (raw)
In-Reply-To: <c3d0340b0508132056651e8c97@mail.gmail.com>; from shawnxjin@gmail.com on Sat, Aug 13, 2005 at 08:56:50PM -0700

On Sat, Aug 13, 2005 at 08:56:50PM -0700, Shawn Jin wrote:
> > read*()/write*() are accessors for PCI and PCI only.  PCI is little
> 
> If read*()/write*() are designed for PCI access only as you claimed,
> that explains why they call in/out_leXX() funcitons.
> 
> The problem is that read*()/write*() are misused in some places, e.g.,
> serial drivers such as serial8250. The serial_in() and serial_out()
> call read*() and write*() respectively. So what's your recommendation
> in such a case?

Keep misusing them. There's no generic accessors for memory mapped
I/O.  People just started using them in generic drivers because they
are convenient. I use the the __raw_read*() for non byte swapped access
(or in/outbe32() depending on my memory barrier requirements.

Also, portions of the 8250 serial driver using readl/writel are
assuming that the serial port in on PCI or other little endian bus.
readb/writeb usage doesn't matter in that driver.

-Matt

  parent reply	other threads:[~2005-08-14 16:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-13  1:11 writel(), readl() in <asm-ppc/io.h> Shawn Jin
2005-08-13  3:33 ` Matt Porter
2005-08-14  3:56   ` Shawn Jin
2005-08-14  4:25     ` Eugene Surovegin
2005-08-14 18:16       ` Shawn Jin
2005-08-14 16:14     ` Matt Porter [this message]
2005-08-14 16:36     ` Arthur Othieno
2005-08-14 18:53       ` Shawn Jin

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=20050814091416.B20320@cox.net \
    --to=mporter@kernel.crashing.org \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=shawnxjin@gmail.com \
    /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.