public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] arm: mvebu: add basic address decoding support to Armada 370/XP
Date: Fri, 3 Aug 2012 14:45:09 +0000	[thread overview]
Message-ID: <201208031445.10102.arnd@arndb.de> (raw)
In-Reply-To: <1344003237-13575-5-git-send-email-thomas.petazzoni@free-electrons.com>

On Friday 03 August 2012, Thomas Petazzoni wrote:
> +static void __iomem *
> +armada_cfg_base(const struct orion_addr_map_cfg *cfg, int win)
> +{
> +       unsigned int offset;
> +
> +       /* The register layout is a bit annoying and the below code
> +        * tries to cope with it.
> +        * - At offset 0x0, there are the registers for the first 8
> +        *   windows, with 4 registers of 32 bits per window (ctrl,
> +        *   base, remap low, remap high)
> +        * - Then at offset 0x80, there is a hole of 0x10 bytes for
> +        *   the internal registers base address and internal units
> +        *   sync barrier register.
> +        * - Then at offset 0x90, there the registers for 12
> +        *   windows, with only 2 registers of 32 bits per window
> +        *   (ctrl, base).
> +        */
> +       if (win < 8)
> +               offset = (win << 4);
> +       else
> +               offset = ARMADA_WINDOW_8_PLUS_OFFSET + (win << 3);
> +
> +       return (void __iomem *)(cfg->bridge_virt_base + offset);
> +}
> +

This cast can go away now that the type is already correct. Other
than that, the patch looks fine.

	Arnd

  reply	other threads:[~2012-08-03 14:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03 14:13 [v2] arm: mvebu: Add basic address decoding support for Marvell 370/XP Thomas Petazzoni
2012-08-03 14:13 ` [PATCH 1/5] arm: plat-orion: use 'void __iomem *' in addr-map code Thomas Petazzoni
2012-09-09 20:45   ` Jason Cooper
2012-09-11 12:54     ` Thomas Petazzoni
2012-08-03 14:13 ` [PATCH 2/5] arm: plat-orion: introduce PLAT_ORION_LEGACY hidden config option Thomas Petazzoni
2012-08-03 14:13 ` [PATCH 3/5] arm: plat-orion: make bridge_virt_base non-const to support DT use case Thomas Petazzoni
2012-08-03 14:13 ` [PATCH 4/5] arm: mvebu: add basic address decoding support to Armada 370/XP Thomas Petazzoni
2012-08-03 14:45   ` Arnd Bergmann [this message]
2012-08-03 14:13 ` [PATCH 5/5] arm: mvebu: add address decoding controller to the DT Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2012-08-06  9:42 [v3] Add basic address decoding support for Marvell 370/XP Thomas Petazzoni
2012-08-06  9:42 ` [PATCH 4/5] arm: mvebu: add basic address decoding support to Armada 370/XP Thomas Petazzoni

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=201208031445.10102.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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