]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ARM: shmobile: Consolidate SCU mapping code
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 28 Jan 2016 15:13:32 +0000 (16:13 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 17 Feb 2016 12:24:29 +0000 (21:24 +0900)
commit8701d8083d1e4b9210b9cf4f420bcf7b4b36bd6d
treea0fb20fcf199f498b9669150a0e1b6f542b02f5d
parent901c5ffaaed117a38be9d0c29247c4888d6c8636
ARM: shmobile: Consolidate SCU mapping code

Currently the SCU registers are mapped in SoC-specific code, using
different methods, all involving the static mapping set up from
machine_desc.map_io():
  - On emev2, a static (non-identity) mapping is used, with ioremap().
    As the static mapping uses the MT_DEVICE type, ioremap() reuses it,
    and the returned virtual address is suitable for passing to
    shmobile_smp_hook(),
  - On sh73a0 and r8a7779, a static identity mapping is used, with the
    legacy IOMEM() macro.
    As the static mapping uses the MT_DEVICE_NONSHARED type, replacing
    IOMEM() by ioremap() would create a new mapping, whose virtual
    address cannot be passed to shmobile_smp_hook().

Move the mapping of the SCU registers from SoC-specific code to common
code, always using ioremap(). To work in the absence of a static
mapping, this requires passing the physical SCU base address to
shmobile_smp_hook().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/common.h
arch/arm/mach-shmobile/platsmp-scu.c
arch/arm/mach-shmobile/smp-emev2.c
arch/arm/mach-shmobile/smp-r8a7779.c
arch/arm/mach-shmobile/smp-sh73a0.c