From: James Simmons <jsimmons@transvirtual.com>
To: David T Eger <eger@cc.gatech.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: readl() / writel() on PowerPC
Date: Mon, 2 Jul 2001 19:39:05 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.10.10107021935590.8156-100000@transvirtual.com> (raw)
In-Reply-To: <Pine.SOL.4.21.0107022017370.23357-100000@oscar.cc.gatech.edu>
> I have been working on a driver for a PowerPC PCI card/framebuffer device,
> and noticed that the standard readl() and writel() for this platform to
> byte swapping, since PowerPC runs big-endian. However, at least for my
> hardware it's *really* not needed, and should just do a regular load
> store, as is done for CONFIG_APUS. Looking at another driver
> (drivers/char/bttv.h) I notice that Mr. Metzler redefines his read and
> write routines for PowerPC as well to do simple loads and stores to IO
> regions.
>
> Am I missing something? Is there some reason that readl() and
> writel() should byte-swap by default?
Use the fb_writeX/fb_readX functions in fbcon.h. They take care of these
issues.
P.S
Watchout for userland programs. You can NOT use memset on the
framebuffer on PPC due to caching issues. Use have to use tricks similar
to what is done in fbcon.h with fb_memset.
next prev parent reply other threads:[~2001-07-03 2:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-18 13:00 New Linux Drivers - Configure question Modular Forms Boy
2001-06-18 13:20 ` Chakir Ettayebi
2001-06-18 21:56 ` James Simmons
2001-07-03 0:22 ` readl() / writel() on PowerPC David T Eger
2001-07-03 0:54 ` David Schleef
2001-07-03 2:39 ` James Simmons [this message]
2001-07-04 7:50 ` Paul Mackerras
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=Pine.LNX.4.10.10107021935590.8156-100000@transvirtual.com \
--to=jsimmons@transvirtual.com \
--cc=eger@cc.gatech.edu \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®