1
0
Fork 0
Commit Graph

41 Commits (9a4dc80399b1630cea0f1ad8ef0417436cbb95d0)

Author SHA1 Message Date
Geert Uytterhoeven be32bcbbd1 soc: renesas: Move pm-rcar to drivers/soc/renesas/rcar-sysc
Move the pm-rcar driver from arch/arm/mach-shmobile/ to
drivers/soc/renesas/, and its header file to include/linux/soc/renesas/,
so it can be shared between arm32 (R-Car H1 and Gen2) and arm64 (R-Car
Gen3). Rename it to rcar-sysc as it's really a driver for the R-Car
System Controller (SYSC).

Kill the intermediate PM_RCAR config symbol, as it's not user
configurable anymore, and to prepare for SoC-specific make rules.

Add the missing #include <linux/types.h> to rcar-sysc.h, which was
exposed by different include order.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-04-22 17:23:13 +10:00
Geert Uytterhoeven 8701d8083d 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>
2016-02-17 21:24:29 +09:00
Geert Uytterhoeven b1568d8012 ARM: shmobile: r8a7779: Remove remainings of removed SCU boot setup code
Commit 0ca2894b5a ("ARM: shmobile: Use shared SCU SMP boot code on
r8a7779") obsoleted the r8a7779-specific SCU boot code, but forgot to
remove the setup of shmobile_boot_fn and shmobile_boot_arg, which is
overwritten by shmobile_smp_scu_prepare_cpus().

Note that shmobile_scu_base wasn't initialized at that point yet anyway.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-02-17 18:27:21 +09:00
Masahiro Yamada 75305275a7 ARM: use const and __initconst for smp_operations
These smp_operations structures are not over-written, so add "const"
qualifier and replace __initdata with __initconst.

Also, add "static" where it is possible.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Moritz Fischer <moritz.fischer@ettus.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org> # qcom part
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Wei Xu <xuwei5@hisilicon.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Liviu Dudau <Liviu.Dudau@arm.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-12-01 22:17:45 +01:00
Olof Johansson ff20775d18 Renesas ARM Based SoC Marzen Board Removal for v4.3
* Remove legacy r8a7779 SoC code
 * Remove legacy marzen board code
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVvwN/AAoJENfPZGlqN0++xRUP/1lVK2q2ixR2B/7jqPyvcrai
 6RwXT99cwGSpUe7X7AcpWRW39EhRmt89ZPlQvkLF/Ylx9+XUBG3lsyIoaa40YW6x
 mNvbiKTJCFILh7K4YshibFtJPzj7sL+Vhy8xV6zVIBn5oA9rSBfEteTUt5JWik0b
 2QZYZix8STU52k/djQ4vUbAwJfFNwmO4PDqY9B/XXE5a9ETUeEPecBB94xaJCyv+
 ULFmPEHxfvdUug2tLJUTazdtDgQlxRczZ7vYMKpmUeQTPTvx/2L3scz36JpjTFx9
 +U1KSPUzUKwonhS9/TEAeqbU1hDkOvIx7d9lJgd2zxnMrwCyTuJuvmaFV8dZlftu
 8v5cTbdr8InLVdqDM4GzjrL5RhPl1F3MYtfUdT50duzcRTiwyOkKCbjQakV2rgKZ
 aQp4RdDxl1DBlqxyYW16o9Q5figecfqsxzNvAmveM+GOA19a2h9hLNTotZUvDGCC
 AXFrdXMCwzxpIy/LeWcIDs5ycHE0hrD1y68vH4vJp3pWr+dJ0p+QUgjtK5poXvLe
 9RJnYtqJ0cXaYZj0DR64X3TUB2VpCbnK2pNv1/O1TJysiRUGlffRohaGv/UC5am2
 y/kRYOX3qay0a60wWkGQzm/cMB4Zg8fa0ktXj5W/PIhGBLYXTPIQHkSfdFjpkyR6
 WVXodsZdANGIlwQSCeLa
 =VPyl
 -----END PGP SIGNATURE-----

Merge tag 'renesas-marzen-board-removal-for-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/cleanup

Renesas ARM Based SoC Marzen Board Removal for v4.3

* Remove legacy r8a7779 SoC code
* Remove legacy marzen board code

* tag 'renesas-marzen-board-removal-for-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7779: Remove legacy SoC code
  ARM: shmobile: marzen: Remove legacy board code
  ARM: shmobile: r8a7779: Cleanup header file
  ARM: shmobile: marzen-reference: Remove C board code
  ARM: shmobile: r8a7779: Generic SMP ops
  ARM: shmobile: r8a7779: Generic CCF and timer support

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-08-06 10:09:08 +02:00
Magnus Damm c99cd90d98 ARM: shmobile: r8a7779: Remove legacy SoC code
Now when the Marzen legacy board code is gone this patch
removes the unused r8a7779 legacy SoC code.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-07-28 09:27:16 +09:00
Geert Uytterhoeven 5afcd90f65 ARM: shmobile: r8a7779: Make struct rcar_sysc_ch const
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-07-06 09:35:23 +09:00
Stephen Boyd fd9454ab51 ARM: shmobile: r8a7779: Remove redundant cpu_disable implementation
By default only the non-boot CPUs can be hotplugged if the
smp_operations structure doesn't have the cpu_disable function
pointer set. r8a7779_cpu_disable() implements the same logic,
only non-boot CPUs can be hotplugged, so it's redundant to
override the default behavior.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-24 07:12:16 +09:00
Magnus Damm 1dc13eee3a ARM: shmobile: r8a7779: No TWD setup in C for Multiplatform
Skip the TWD setup in C for r8a7779 Multiplatform.
We should use DTS for the TWD device anyway.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-21 17:11:20 +09:00
Laurent Pinchart 335204dfb8 ARM: shmobile: Remove FSF address from copyright headers
The information is already included in the COPYING file in the kernel
sources root directory, we don't want to modify all source files when
the FSF will move to a new address, and I'm tired of seeing the related
checkpatch.pl warnings.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-10-27 09:48:07 +09:00
Geert Uytterhoeven 1b55353c92 ARM: shmobile: Move r8a7779.h
Change location of r8a7779.h so it can be included as "r8a7779.h"
instead of the old style <mach/r8a7779.h>

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-06-25 16:52:39 +09:00
Magnus Damm 585c09df37 ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case
Change location of pm-rcar.h so it can be used as #include "pm-rcar.h"
instead of the old style #include <mach/pm-rcar.h>. Also clean up
the r8a7779 case to move some unused header file cruft into a C
file.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-06-17 17:09:40 +09:00
Magnus Damm fd44aa5e57 ARM: shmobile: Move common.h
Change location for common.h so it can be used as #include "common.h"
instead of the old style #include <mach/common.h>.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-06-17 17:09:39 +09:00
Magnus Damm a6557eb795 ARM: shmobile: Break out R-Car SYSC PM code
Break out the R-Car SYSC power management code from
the r8a7779 SoC code. With this new shared R-Car SYSC
code base it is possible to hook in Generation 2 SoCs
as well.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-02-24 08:55:46 +09:00
Magnus Damm deb4928ea3 ARM: shmobile: Let r8a7779 rely on SCU CPU notifier
Now when CPU notifiers are used for SCU boot vector
setup shmobile_smp_scu_boot_secondary() is no longer
needed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-09-30 17:56:10 +09:00
Olof Johansson 25475030ec Renesas ARM based SoC SMP updates for v3.12
* Per-CPU SMP boot and sleep code on SoCs that use SCU
 * Shared SCU CPU Hotplug code on r8a7779 and sh73a0 SoCs
 * Shared SCU CPU boot code on emev2, r8a7779 and sh73a0 SoCs
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSAawzAAoJENfPZGlqN0++MRgP/0TDYa+QhVd6h43a6tZ7OBGp
 +sln2YQOrQFSSSVxnqIwFAfISoG0Fb0upvlalvPueLSUP4NCNDAIgNVilUMkOwZq
 qkDr3QAIcp+tJq/jzI+y7gK0T6DWAIgutLX8n/GbR9ZAGl4huRZiM1kRnRotUA89
 mhK0I8B2xNFeqdqhFm9UqslCctuQDxCdFSJhDl+mV+cM6cQyXfbP4XFXI53x5i7d
 91YDa6/zVeGGL9sqVFthEESXmZMpjWgO3Rnw0QByp/hvXDRF+AsMxUQx2B+65zm7
 SsUEBdUTXTtarqVr5oiqYOzMiFQ8tJXNXUxghRcN5RET5KsdHye/uwWzV01qtcBj
 d917baHS3Po5EQ6TxOseaRLSHmNVfeDn00esxRz+KywnTjZzhKh3AcZq640a0UPf
 ljjKLAiQvWLcdawG6rp24TA4nOS3jwIyALvgrRL0k74oie5O/yV307+n/m46iJvA
 d08+mBNkKTWV+uZQXo9cxyRITD/b3Wv27AXS+hPdRwCX3BtA81Y2w7u5LnlskuZr
 H3HvvJ3G9OzkvXZTdqolntqBUn9Fr++ptJjzZG+WYPM8KGngKeSBR9a3NrwSCa2v
 xprAEXb8hg1h3E721xGckIk7b6IJbGdN7euSEy4T/XNaj2wI4jLfGE/5adZk54+H
 MxumRYYdhJqudCJs0lhy
 =6QVN
 -----END PGP SIGNATURE-----

Merge tag 'renesas-smp-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/renesas

From Simon Horman:
Renesas ARM based SoC SMP updates for v3.12

* Per-CPU SMP boot and sleep code on SoCs that use SCU
* Shared SCU CPU Hotplug code on r8a7779 and sh73a0 SoCs
* Shared SCU CPU boot code on emev2, r8a7779 and sh73a0 SoCs

* tag 'renesas-smp-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: Per-CPU SMP boot / sleep code for SCU SoCs
  ARM: shmobile: Introduce per-CPU SMP boot / sleep code
  ARM: shmobile: Use shared SCU CPU Hotplug code on r8a7779
  ARM: shmobile: Use shared SCU CPU Hotplug code on sh73a0
  ARM: shmobile: Add shared SCU CPU Hotplug code
  ARM: shmobile: Use shared SCU SMP boot code on emev2
  ARM: shmobile: Use shared SCU SMP boot code on r8a7779
  ARM: shmobile: Use shared SCU SMP boot code on sh73a0
  ARM: shmobile: Introduce shared SCU SMP boot code

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-08-28 10:04:38 -07:00
Olof Johansson e707bb338b Third round of Renesas ARM based SoC cleanups for v3.12
* Remove global GPIO_NR definition from sh73a0 SoC
 * Remove unnecessary nfsroot settings from bootargs of
   kzm9d and armadillo800eva
 * Rename irq initialisation functions of r8a7779 SoC
   to make them consistent with other SoCs
 * Simplify irq initialisation of r8a7740 SoC
 * Add missing __initdata annotations to bockw board, and
   r8a7790 and r8a7779 SoCs
 * Refactor time initialisation and remove shmobile_init_time.
   - This affects the following boards: kzm9g, marzen, ape6evm,
     armadillo800eva and bockw
   - This affects the following SoCs: r8a7790, r8a7779, r7a7740, r7a73a4
 * Cleanup device registration code of r8a7778 SoC
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSAaigAAoJENfPZGlqN0++6dIQAJmaeKd/6QsHXy1Yc0h6knMk
 J2Jf1gL4lHM9FrsmFKVLqY6W6b0ctRPxBJXhpLEr2nfNnml924LHVKaxMXSnqvea
 Bn5U44L6X/Tpx04+I1KLkWRcLmej+1xULra15yZvb1YgtCueJcgzxAaZN+6vgIle
 NHK+gQsGqGnIIXAXawXF7p6v4SwSoUrcuqYd6IekmIKGYhxTNFKpyLZd6MY6I+Tp
 F14ulRnewAJWG5HrXbtLJlE2MOcd5IAvsRtMEizZO+3vmzf8esM+Fw9s39+2v0zg
 8+lpucb68vaovjaP9TPgDTT9ddELL/0xrzfWnPFYWtaGiLOV//BEZYkOUhRqZy5I
 P55PZnlpjacSLDeJpsQxQGOx8RERhVKrNVycr1+XN0RnalLXI7lNepV7+j4cXUZw
 kFr2hEzRKwJ820rZNKmzGQEVLWypLtFxVdA9JBX3SP3vPe4QvuK1IWfb0VSs5L5s
 7h8Cwvshb1jnULM1LhNobpQzQ2WTljghUiZU1omGOvQh8qzPn0+Iy9POVa5wBwCk
 PPYUJaL+aJYeikWMrxX757X1SYWKvuQ6pnNSEZSJm35HY4ESRg7gO/M56Ns1L62z
 lrcIf2OKbN8wUyqp1lZSg2HgJ+Du9N5mlSBVVw4sZBPN/Iukl+Jb0MznWhttEq2P
 dCb+bon+o5CS1+9xPGjI
 =Sbjt
 -----END PGP SIGNATURE-----

Merge tag 'renesas-cleanup3-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/renesas

From Simon Horman:
Third round of Renesas ARM based SoC cleanups for v3.12

* Remove global GPIO_NR definition from sh73a0 SoC
* Remove unnecessary nfsroot settings from bootargs of
  kzm9d and armadillo800eva
* Rename irq initialisation functions of r8a7779 SoC
  to make them consistent with other SoCs
* Simplify irq initialisation of r8a7740 SoC
* Add missing __initdata annotations to bockw board, and
  r8a7790 and r8a7779 SoCs
* Refactor time initialisation and remove shmobile_init_time.
  - This affects the following boards: kzm9g, marzen, ape6evm,
    armadillo800eva and bockw
  - This affects the following SoCs: r8a7790, r8a7779, r7a7740, r7a73a4
* Cleanup device registration code of r8a7778 SoC

* tag 'renesas-cleanup3-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (45 commits)
  ARM: shmobile: sh73a0: Remove global GPIO_NR definition
  ARM: shmobile: kzm9d: remove nfsroot settings from bootargs
  ARM: shmobile: armadillo800eva: remove nfsroot settings from bootargs
  ARM: shmobile: r8a7779: move r8a7779_init_irq_xxx() to setup
  ARM: shmobile: r8a7740: move r8a7740_init_irq_of() to setup
  ARM: shmobile: bockw: add missing __initdata
  ARM: shmobile: r8a7790: add missing __initdata
  ARM: shmobile: r8a7779: add missing __initdata
  ARM: shmobile: Remove unused shmobile_init_time()
  ARM: shmobile: Use clocksource_of_init() on r8a7790
  ARM: shmobile: Use default ->init_time() on KZM9G DT ref
  ARM: shmobile: Use default ->init_time() on Marzen DT ref
  ARM: shmobile: Use default ->init_time() on APE6EVM DT ref
  ARM: shmobile: Use default ->init_time() on APE6EVM
  ARM: shmobile: Use default ->init_time() on Armadillo DT ref
  ARM: shmobile: Use default ->init_time() on Bockw DT ref
  ARM: shmobile: Use default ->init_time() on Bockw
  ARM: shmobile: Use default ->init_time() on r8a7779
  ARM: shmobile: Use default ->init_time() on r8a7778
  ARM: shmobile: Use default ->init_time() on r8a7740
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-08-28 10:00:24 -07:00
Magnus Damm e9e7c4fbf4 ARM: shmobile: Use shared SCU CPU Hotplug code on r8a7779
Update the r8a7779 specific CPU Hotplug code to make use of
the recently introduced shared SCU functions. The r8a7779
power domain hardware requires special power down handling
at ->kill() time.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:25 +09:00
Magnus Damm 0ca2894b5a ARM: shmobile: Use shared SCU SMP boot code on r8a7779
Use shared SCU code on r8a7779 for SMP boot.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:25 +09:00
Simon Horman afad20105a ARM: shmobile: r8a7779: Rely on DT for SMP CPU info
Remove r8a7779 specific ->smp_init_cpus() callback and
instead of relying on shmobile_smp_init_cpus() simply
use DT for CPU core information.

Based on work for the sh73a0 by Magnus Damm.

Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-30 13:28:07 +09:00
Paul Gortmaker 8bd26e3a7e arm: delete __cpuinit/__CPUINIT usage from all ARM users
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications.  For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.

After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out.  Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.

Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
and are flagged as __cpuinit  -- so if we remove the __cpuinit from
the arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
related content into no-ops as early as possible, since that will get
rid of these warnings.  In any case, they are temporary and harmless.

This removes all the ARM uses of the __cpuinit macros from C code,
and all __CPUINIT from assembly code.  It also had two ".previous"
section statements that were paired off against __CPUINIT
(aka .section ".cpuinit.text") that also get removed here.

[1] https://lkml.org/lkml/2013/5/20/589

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2013-07-14 19:36:52 -04:00
Magnus Damm af642310aa ARM: shmobile: r8a7779 SMP with SCU boot fn and args
Let r8a7779 make use of shmobile_boot_fn and shmobile_boot_arg
together with shmobile_boot_scu and the SCU base address.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-17 16:07:27 +09:00
Olof Johansson e0d20b69d3 Merge branch 'gic/cleanup' into next/soc
Merge in the gic cleanup since it has a handful of annoying internal conflicts
with soc development branches. All of them are delete/delete conflicts.

* gic/cleanup:
  irqchip: vic: add include of linux/irq.h
  irqchip: gic: Perform the gic_secondary_init() call via CPU notifier
  irqchip: gic: Call handle_bad_irq() directly
  arm: Move chained_irq_(enter|exit) to a generic file
  arm: Move the set_handle_irq and handle_arch_irq declarations to asm/irq.h

Signed-off-by: Olof Johansson <olof@lixom.net>

Conflicts:
	arch/arm/mach-shmobile/smp-emev2.c
	arch/arm/mach-shmobile/smp-r8a7779.c
	arch/arm/mach-shmobile/smp-sh73a0.c
	arch/arm/mach-socfpga/platsmp.c
2013-04-28 15:06:56 -07:00
Catalin Marinas c0114709ed irqchip: gic: Perform the gic_secondary_init() call via CPU notifier
All the calls to gic_secondary_init() pass 0 as the first argument.
Since this function is called on each CPU when starting, it can be done
in a platform-independent way via a CPU notifier registered by the GIC
code.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Tested-by: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: David Brown <davidb@codeaurora.org>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Barry Song <baohua.song@csr.com>
2013-03-26 16:12:02 +00:00
Magnus Damm fd0865c3f7 ARM: shmobile: Rearrange r8a7779 cpu hotplug code
Update the r8a7779 SMP code and CPU Hotplug in particular
to follow the same style as sh73a0. This means dropping
__maybe_unused for #ifdef CONFIG_HOTPLUG_CPU.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-13 02:13:21 +09:00
Magnus Damm 8bbcd729d2 ARM: shmobile: Update r8a7779 to use scu_power_mode()
Update the SMP code for R8A7779 to make use of the
shared SCU function scu_power_mode() together with
the early setup code in shmobile_secondary_vector_scu.

With this patch in place the secondary CPUs modify the
SCU setting during early boot instead of letting other
CPUs deal with the coherency setting before boot. In
other words, we used to setup coherency before boot
in r8a7779_boot_secondary() but that bit is now instead
handled by the code in shmobile_secondary_vector_scu.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-13 02:13:21 +09:00
Magnus Damm bbf2627c77 ARM: shmobile: Update r8a7779 to check SCU for hotplug
Update the r8a7779 CPU Hotplug code to use SCU PSR
to wait for the target CPU core. Previously the
shared code in hotplug.c was used to let cpu_kill()
wait for cpu_die(). With this change in place the
r8a7779 SMP code does not depend on hotplug.c anymore.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-13 02:13:21 +09:00
Magnus Damm abf88136f7 ARM: shmobile: Use R8A7779_SCU_BASE with TWD
Rework the IOMEM() usage for the SCU base address in the
case of r8a7779. Adjusts the TWD to use R8A7779_SCU_BASE.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-13 02:13:20 +09:00
Magnus Damm 4c8228455d ARM: shmobile: Common shmobile_scu_base in headsmp-scu.S
Update the code in headsmp-scu.S to use a global
shmobile_scu_base variable both for convenient SCU
base address storage and for the early SCU setup
code in shmobile_secondary_vector_scu.

With this patch applied r8a7779, sh73a0 and EMEV2
all make use of the global shmobile_scu_base
variable. However only sh73a0 makes use of the SCU
bring up code in shmobile_secondary_vector_scu.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-13 02:13:19 +09:00
Magnus Damm 3b94afa383 ARM: shmobile: Kill off r8a7779 scu_base_addr() function
Replace scu_base_addr() with a static shmobile_scu_base
variable and introduce R8A7779_SCU_BASE.

Later in the series the shmobile_scu_base variable will be
made into a global variable so this is preparation only.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-13 02:13:19 +09:00
Magnus Damm 0ae56a951d ARM: shmobile: Remove r8a7779_get_core_count()
Reduce the number of lines of code in smp-r8a7779.c
by getting rid of the r8a7779_get_core_count() function.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-03-13 02:13:18 +09:00
Rob Herring 520f7bd733 irqchip: Move ARM gic.h to include/linux/irqchip/arm-gic.h
Now that we have GIC moved to drivers/irqchip and all GIC DT init for
platforms using irqchip_init, move gic.h and update the remaining
includes.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Anton Vorontsov <avorontsov@mvista.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Viresh Kumar <viresh.linux@gmail.com>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
2013-01-12 10:47:32 -06:00
Simon Horman 872b59832d Revert "ARM: shmobile: r8a7779: Replace modify_scu_cpu_psr with scu_power_mode"
This reverts commit cdc7594e5c.

The code changes the flags of the wrong cpus - which breaks the whole
bootup of secondary CPUs.

Cc: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2012-11-13 11:42:54 +09:00
Bastian Hecht cdc7594e5c ARM: shmobile: r8a7779: Replace modify_scu_cpu_psr with scu_power_mode
We can remove the extra code of modify_scu_cpu_psr() and use the cleaner
generic ARM helper scu_power_mode(). As every CPU only deals with its
own power register and scu_power_mode() operates with 8-bit accesses,
we save the locking overhead too.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2012-11-06 13:47:21 +09:00
Marc Zyngier a62580e580 ARM: SoC: convert shmobile SMP to SMP operations
Convert shmobile SMP platforms to use struct smp_operations to provide
their SMP and CPU hotplug operations.

Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-09-14 11:14:58 +02:00
Magnus Damm b759bd114e ARM / mach-shmobile: r8a7779 SMP TWD boot regression fix
Fix SMP TWD boot regression on r8a7779 based platforms caused by:

4200b16 ARM: shmobile: convert to twd_local_timer_register() interface

After the merge of the above commit it has been impossible to boot
r8a7779 based SoCs with SMP enabled and CONFIG_HAVE_ARM_TWD=y. The
kernel crashes at smp_init_cpus() timing which is before the console
has been initialized, so to the user this looks like a kernel lock up
without any particular error message.

This patch fixes the regression on r8a7779 by moving the TWD
registration code from smp_init_cpus() to sys_timer->init() time.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-05-12 22:13:38 +02:00
Linus Torvalds 820d41cf0c ARM: cleanups of io includes
Rob Herring has done a sweeping change cleaning up all of the mach/io.h includes,
 moving some of the oft-repeated macros to a common location and removing a bunch of
 boiler plate. This is another step closer to a common zImage for multiple platforms.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPcpqHAAoJEIwa5zzehBx3xCMP/2evrPQyorzMBztrFB4Ry9Ol
 qNkSVNsemZjdtkY2dnJv+zJ/Xb0PPDU9EuBHr/SpqmVrRZEZeJND42wZK/OTFCBZ
 Ufi7KP1qE30daO5H3YmL+58/Ixir5fTHqggqolHhTcEYU2hnHgLBI4rIFu92kSO7
 TMyrAUs14jSkTVZc6HSF83w3PfQWhMzWvspJVHQ6RebZRruETAr7v9weVMbgxcDk
 jQ5XJ9y73rGs2AF8bZTpUdFPzkcac7UiHn3/XyqoZs8RNCL98BGpskzhILyTARf5
 X90c9mqQF+AEbb9QSDDd52uYFsJ/5COJvWdlExRI9gZZDI8Pd05ijZBR9IdGJg/B
 NsVsl98wvZ/zjHJ/Sb2qt5ruet7PiQUGhkshB42jVHsaWfRM030sKGYxQ8pX5Tsa
 cSagnfBCvAZ9VjDLkXrnEbWRNTz8LSwn9l63z0jmtm5D8+vbpMtgvtWARtuZ4RNn
 D8wIWoyT0ytVZnosu5441TEgCejtcKOEFzThvKDYMeMJZ/rqVkAbcznapoC2qUd4
 fceNlLfQFvW7xpY1MY8mhlwC0ki4hM9MSDieaXUyefvAU/hoSp8MveVUH5UspYfb
 0FpkEhzklW/g0/fuq0DJQIrMn7dajjUvVZIUQtiVQuFHOr6RUbFG5vmXuCbAyx10
 PE2K4rnKz+PC8bKab7v9
 =YIsn
 -----END PGP SIGNATURE-----

Merge tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull "ARM: cleanups of io includes" from Olof Johansson:
 "Rob Herring has done a sweeping change cleaning up all of the
  mach/io.h includes, moving some of the oft-repeated macros to a common
  location and removing a bunch of boiler plate.  This is another step
  closer to a common zImage for multiple platforms."

Fix up various fairly trivial conflicts (<mach/io.h> removal vs changes
around it, tegra localtimer.o is *still* gone, yadda-yadda).

* tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (29 commits)
  ARM: tegra: Include assembler.h in sleep.S to fix build break
  ARM: pxa: use common IOMEM definition
  ARM: dma-mapping: convert ARCH_HAS_DMA_SET_COHERENT_MASK to kconfig symbol
  ARM: __io abuse cleanup
  ARM: create a common IOMEM definition
  ARM: iop13xx: fix missing declaration of iop13xx_init_early
  ARM: fix ioremap/iounmap for !CONFIG_MMU
  ARM: kill off __mem_pci
  ARM: remove bunch of now unused mach/io.h files
  ARM: make mach/io.h include optional
  ARM: clps711x: remove unneeded include of mach/io.h
  ARM: dove: add explicit include of dove.h to addr-map.c
  ARM: at91: add explicit include of hardware.h to uncompressor
  ARM: ep93xx: clean-up mach/io.h
  ARM: tegra: clean-up mach/io.h
  ARM: orion5x: clean-up mach/io.h
  ARM: davinci: remove unneeded mach/io.h include
  [media] davinci: remove includes of mach/io.h
  ARM: OMAP: Remove remaining includes for mach/io.h
  ARM: msm: clean-up mach/io.h
  ...
2012-03-29 18:02:10 -07:00
Rob Herring a2a47ca366 ARM: __io abuse cleanup
Several platforms incorrectly use __io() for casting to 'void __iomem *'.
This converts all of those uses to use the common IOMEM macro.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-sh@vger.kernel.org
Acked-by: Arnd Bergmann <arnd@arndb.de>
2012-03-13 21:25:21 -05:00
Marc Zyngier 4200b16d58 ARM: shmobile: convert to twd_local_timer_register() interface
Add support for the new smp_twd runtime registration interface
to the shmobile platforms, and remove the old compile-time support.

Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:30:31 +00:00
Will Deacon eb50439b92 ARM: 7293/1: logical_cpu_map: decouple CPU mapping from SMP
It turns out that the logical CPU mapping is useful even when !CONFIG_SMP
for manipulation of devices like interrupt and power controllers when
running a UP kernel on a CPU other than 0. This can happen when kexecing
a UP image from an SMP kernel.

In the future, multi-cluster systems running AMP configurations will
require something similar for mapping cluster IDs, so it makes sense to
decouple this logic in preparation for this support.

Acked-by: Yang Bai <hamo.by@gmail.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reported-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-01-23 10:20:05 +00:00
Magnus Damm f40aaf6da1 ARM: mach-shmobile: r8a7779 SMP support V3
This patch contains r8a7779 SMP support V3 - now including
CPU hotplug offine and online support. The r8a7779 power
domain code is tied together with SMP glue code which allows
us to control the power domains via CPU hotplug.

At this point the kernel boots with the 4 Cortex-A9 cores in
SMP mode and all CPU cores except CPU0 can be hotplugged.

The code in platsmp.c is quite far from pretty, but it is
kept like that intentionally to avoid creating layers of
code that will go away in the near future anyway. The code
needs to be updated when some per-SoC handling code will be
added to the ARM architecture, see the following patch for
more information:
 "[RFC PATCH 0/3] Per SoC descriptor"

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-01-12 11:00:27 +09:00