public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 0/9] MIPS: sync asm header files with linux-4.4
Date: Mon, 11 Jan 2016 18:56:19 +0100	[thread overview]
Message-ID: <1452534979.3871.21.camel@gmail.com> (raw)
In-Reply-To: <BLU436-SMTP1347A40A8ADE56D90878DDFFC90@phx.gbl>

Am Montag, den 11.01.2016, 22:29 +0800 schrieb Wills Wang:
> 
> On 01/11/2016 06:55 PM, Purna Chandra Mandal wrote:
> > On 01/09/2016 10:02 PM, Daniel Schwierzeck wrote:
> > 
> > > This patch series updates all MIPS asm header files containing
> > > I/O code as well as processor, register and assembly definitions.
> > > The source of the update are the MIPS asm header files of linux
> > > -4.4.
> > > 
> > > The main goal is to get a complete set of I/O accessors on MIPS
> > > and
> > > to support platform-specific address spaces and mappings. Also a
> > > working ioremap() implementation will be added, which supports
> > > platform-specific callbacks. Furthermore support for bit
> > > manipulating
> > > I/O accessors (clrbits_X, setbits_X, clrsetbits_X) will be added.
> > > 
> > > The patch series is also available on git://git.denx.de/u-boot
> > > -mips.git
> > > in branch mips_io_v1 and based on next branch.
> > > 
> > > @Wills
> > > I changed map_physmem() and used the new and working ioremap()
> > > function.
> > > Thus you can discard your patch.
> > > 
> > > @Wills, Purna
> > > You can use now ioremap() directly in your drivers. You can also
> > > use the
> > > new bit manipulating I/O accessors as requested by Marek. Please
> > > rebase
> > > and test your patch series against this series, thanks.
> > Thanks Daniel.
> > Rebased my PIC32 patches on 'mips_io_v1' branch and tested
> > functionality to work fine.
> > Also updated drivers to use ioremap() (instead of pic32_ioremap())
> > and clrsetbits_le()
> > wherever applicable.
> > 
> Should we use these macros with the explicitly endianess in driver?
> if 
> chip can
> select big-endian and little-endian by hardware pin, i think driver
> may 
> not work
> properly, what's your idea?

that depends on the SoC and the peripheral. 

Peripherals usually have a fixed endianess and the bus between CPU and
peripheral converts the CPU endianess to peripheral one in hardware. In
that case a driver should never swap. You could use the
__raw_readX/__raw_writeX variants. Or you could implement this
explicitely with readX/writeX resp. readX_be/writeX_be and make this
configurable at compile time or runtime. 

For an example you could look at kernel commit
 37786c7fee40771d13901de129af7e084ed48b55.

If the bus does not convert the endianess, a driver must explicitely
use I/O accessors according to the peripheral endianess.

-- 
- Daniel

      reply	other threads:[~2016-01-11 17:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09 16:32 [U-Boot] [PATCH v1 0/9] MIPS: sync asm header files with linux-4.4 Daniel Schwierzeck
2016-01-09 16:32 ` [U-Boot] [PATCH v1 1/9] MIPS: malta: do not pull in target header files in config.h Daniel Schwierzeck
2016-01-09 16:32 ` [U-Boot] [PATCH v1 2/9] MIPS: malta: fix IO accessor call Daniel Schwierzeck
2016-01-09 16:32 ` [U-Boot] [PATCH v1 3/9] MIPS: vct: fix I/O accessor calls Daniel Schwierzeck
2016-01-09 16:32 ` [U-Boot] [PATCH v1 4/9] MIPS: sync I/O related header files with linux-4.4 Daniel Schwierzeck
2016-01-10 20:36   ` [U-Boot] [PATCH v2 " Daniel Schwierzeck
2016-01-09 16:32 ` [U-Boot] [PATCH v1 5/9] MIPS: sync processor and register definitions " Daniel Schwierzeck
2016-01-09 16:32 ` [U-Boot] [PATCH v1 6/9] MIPS: fix SPDX license identifier in remaining arch header files Daniel Schwierzeck
2016-01-09 16:32 ` [U-Boot] [PATCH v1 7/9] MIPS: kconfig: add option for MIPS_L1_CACHE_SHIFT Daniel Schwierzeck
2016-01-09 16:32 ` [U-Boot] [PATCH v1 8/9] MIPS: implement bit manipulating I/O accessors Daniel Schwierzeck
2016-01-09 16:32 ` [U-Boot] [PATCH v1 9/9] MIPS: DO NOT MERGE: test " Daniel Schwierzeck
2016-01-11 10:55 ` [U-Boot] [PATCH v1 0/9] MIPS: sync asm header files with linux-4.4 Purna Chandra Mandal
2016-01-11 14:29   ` Wills Wang
2016-01-11 17:56     ` Daniel Schwierzeck [this message]

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=1452534979.3871.21.camel@gmail.com \
    --to=daniel.schwierzeck@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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