linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] Add basic address decoding support for Marvell 370/XP
@ 2012-09-11 12:27 Thomas Petazzoni
  2012-09-11 12:27 ` [PATCH v4 01/17] arm: mach-dove: use plus instead of or for address definitions Thomas Petazzoni
                   ` (19 more replies)
  0 siblings, 20 replies; 27+ messages in thread
From: Thomas Petazzoni @ 2012-09-11 12:27 UTC (permalink / raw)
  To: linux-arm-kernel

Andrew, Jason, Gr?gory,

Here is a patch set that introduces basic support for address decoding
on Armada 370 and Armada XP. The aim of this basic support is
essentially to be able to configure a window to remap the BootROM,
which is needed to startup the secondary CPUs for the SMP support.

As we had discussed already, the address decoding configuration is not
described in the Device Tree, it is for now hardcoded on a per-SoC
basis. We might later discuss how to extend this to the Device Tree.

The patch set is relatively long, as it refactors some existing
Dove/Kirkwood/MV78xx0/Orion code to use void __iomem pointers instead
of unsigned long, as per the request of Arnd Bergmann and Olof
Johansson.

This patch set is split in several parts:

 (1) Patches 1-4 replaces binary or operators used in register address
     definitions by plus operators. This is necessary because followup
     patches change the base addresses constants to void __iomem
     pointers, and binary or arithmetic on pointers is not
     allowed. Also, using the plus operator to add an offset to a base
     address is much more traditional. In our case, the binary or
     operator and plus operator seem equivalent, as the low-order bits
     of the base addresses that were being or'ed with an offset were
     all zero.

 (2) Patches 5-9 use the IOMEM() macro to turn the various base
     virtual addresses constants into void __iomem pointers. This
     naturally makes all derived constants (virtual addresses of
     specific registers or units) as void __iomem pointers as
     well. The patches also adjust the code to take into this
     change. It adds a few temporary "(unsigned long)" casts that are
     removed by the following patches that rework a few plat-orion
     APIs. These temporary casts are necessary to make the patch set
     properly bisectable, without having a single big patch that does
     the complete IOMEM() conversion. At the end of the patch set, the
     only (unsigned long) casts that remain are the one in the
     map_desc[] array definitions, and those ones are expected.

 (3) Patches 10-13 rework some plat-orion APIs so that they use void
     __iomem pointers instead of unsigned long for virtual
     addresses. Those patches also remove the now useless "(unsigned
     long)" casts added in step (2) above.

 (4) Patch 14 introduces PLAT_ORION_LEGACY, which allows the Marvell
     370/XP platforms to be part of PLAT_ORION, and therefore re-use
     the existing address decoding code.

 (5) Patch 15 makes a small change to an address decoding structure so
     that we can define at runtime the virtual address of the
     configuration registers. This is needed as on Armada 370/XP the
     address decoding "controller" is declared in the Device Tree.

 (6) Patch 16 adds the 370/XP address decoding code itself. For now,
     it only maps the BootROM on Armada XP.

 (7) Patch 17 adds the necessary DT code to instantiate the address
     decoding "controller".

This patch set has been:

 * Built, boot tested on Armada XP. The operation of the address
   mapping support has been tested as well.

 * Built tested only on Dove, Kirkwood, Orion5x and MV78xx0.

Changes since v3:
 * As per the request of Olof Johansson, use void __iomem pointers
   everywhere instead of introducing more casts in the patch set. This
   change has significantly increased the patch set size, though
   (going from 5 patches in v3 to 17 patches in v4)

Changes since v2:
 * Remove one more useless (void __iomem *) cast in the Armada 370/XP
   addr-map.c file, as noticed by Arnd Bergmann.

Changes since v1:
 * Use void __iomem * in addr-map code. Suggested by Arnd Bergmann.
 * Add Acked-by on patches 2->5 from Gr?gory Cl?ment

Thanks,

Thomas Petazzoni

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2012-10-17 15:07 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11 12:27 [PATCH v4] Add basic address decoding support for Marvell 370/XP Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 01/17] arm: mach-dove: use plus instead of or for address definitions Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 02/17] arm: mach-kirkwood: " Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 03/17] arm: mach-mv78xx0: " Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 04/17] arm: mach-orion5x: " Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 05/17] arm: mach-dove: use IOMEM() for base " Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 06/17] arm: mach-kirkwood: " Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 07/17] arm: mach-mv78xx0: " Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 08/17] arm: mach-orion5x: " Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 09/17] arm: mach-mvebu: " Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 10/17] arm: plat-orion: use void __iomem pointers for UART registration functions Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 11/17] arm: plat-orion: use void __iomem pointers for MPP functions Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 12/17] arm: plat-orion: use void __iomem pointers for time functions Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 13/17] arm: plat-orion: use void __iomem pointers for addr-map functions Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 14/17] arm: plat-orion: introduce PLAT_ORION_LEGACY hidden config option Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 15/17] arm: plat-orion: make bridge_virt_base non-const to support DT use case Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 16/17] arm: mvebu: add basic address decoding support to Armada 370/XP Thomas Petazzoni
2012-09-11 12:27 ` [PATCH v4 17/17] arm: mvebu: add address decoding controller to the DT Thomas Petazzoni
2012-09-11 13:10 ` [PATCH v4] Add basic address decoding support for Marvell 370/XP Arnd Bergmann
2012-09-11 13:49   ` Thomas Petazzoni
2012-09-11 15:45   ` Thomas Petazzoni
2012-09-11 19:29     ` Arnd Bergmann
2012-09-20  5:18 ` Thomas Petazzoni
2012-09-20 12:37   ` Jason Cooper
2012-09-21 13:14 ` Andrew Lunn
2012-09-21 19:04   ` Thomas Petazzoni
2012-10-17 15:07     ` Jason Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).