All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Peter Korsgaard <jacmet@sunsite.dk>
Cc: sfr@canb.auug.org.au, linuxppc-dev@ozlabs.org
Subject: Re: Recently removed io accessors
Date: Fri, 13 Oct 2006 19:30:59 +1000	[thread overview]
Message-ID: <1160731859.4792.249.camel@localhost.localdomain> (raw)
In-Reply-To: <87slhstxlk.fsf@sleipner.barco.com>


> Endian register set to little endian (default at powerup):
> RedBoot> x -b 0x8e000064 -2 -l 4
> 8E000064: 4321 8765
> RedBoot> x -b 0x8e000064 -4 -l 4
> 8E000064: 43218765
> 
> And with it set to big endian:
> RedBoot> x -b 0x8e000064 -2 -l 4
> 8E000064: 8765 4321
> RedBoot> x -b 0x8e000064 -4 -l 4
> 8E000064: 87654321
> 
> So with this setup I need to enable the big endian mode to read
> registers without byteswapping and use byteswapping for the packet
> fifos.

That's what bothers me... usually, if the registers are little endian
and you need a byteswap to read them, then you don't need a byteswap to
pump the fifo. For example, things like IDE, sound cards, wireless chips
etc... have LE registers (we use byteswap to access them) and we are
fine not swapping on the fifo read/writes.

I'll read the chip spec and try to figure out what can be done. Maybe an
option is to use the per-page little endian flag available on 4xx parts,
I think you may have that in your xilinx, and thus have automatic
byteswapping. We don't support that bit but it shouldn't be too hard to
add it so that you can pass it to __ioremap. But again, I'm surprised
that's necessary.

Ben.

  reply	other threads:[~2006-10-13  9:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-12 15:44 Recently removed io accessors Peter Korsgaard
2006-10-13  0:04 ` Benjamin Herrenschmidt
2006-10-13  6:56   ` Peter Korsgaard
2006-10-13  7:31     ` Benjamin Herrenschmidt
2006-10-13  8:43       ` Peter Korsgaard
2006-10-13  9:30         ` Benjamin Herrenschmidt [this message]
2006-10-13  9:55           ` Peter Korsgaard
2006-10-13 12:18             ` Benjamin Herrenschmidt
2006-10-13 12:38               ` Peter Korsgaard
2006-10-13 23:20         ` Paul Mackerras
2006-10-14 11:57           ` Peter Korsgaard
2006-10-16 16:51             ` Linas Vepstas
2006-10-16 18:54               ` Peter Korsgaard

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=1160731859.4792.249.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=jacmet@sunsite.dk \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    /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.