Commit graph

30 commits

Author SHA1 Message Date
Geert Uytterhoeven 91c719f5ec soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend
If an R-Car SYSC slave device is part of the CPG/MSTP or CPG/MSSR Clock
Domain and to be used as a wakeup source, it must be kept active during
system suspend.

Currently this is handled in device-specific drivers by explicitly
increasing the use count of the module clock when the device is
configured as a wakeup source.  However, the proper way to prevent the
device from being stopped is to inform this requirement to the genpd
core, by setting the GENPD_FLAG_ACTIVE_WAKEUP flag.

Note that this will only affect devices configured as wakeup sources.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-12-20 11:16:05 +01:00
Sergei Shtylyov bab9b2a74f soc: renesas: rcar-sysc: add R8A77970 support
Add support for R-Car V3M (R8A77970) SoC power areas to the R-Car SYSC
driver.

Based on the original (and large) patch by Daisuke Matsushita
<daisuke.matsushita.ns@hitachi.com>.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-09-18 09:46:50 +02:00
Arnd Bergmann f822e60085 Renesas ARM Based SoC Drivers Updates for v4.14
Add R-Car D3 (r8a77995) support to the Renesas-specific SoC drivers
 - SoC identification
 - System controller
 - Reset controller
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZf0DrAAoJENfPZGlqN0++LacP/jcymVeUMDpkkPTcoM6b37Qq
 ADSDdiR+1Szu29wtfNDTFUoAlh4UvlpAN93GGJLZ/iYsMDyZYIhcUhnE4l119fdy
 6iMwDhctXHlQ8VNhY0Z9MUXZyyN2Fu/9L2ZDJ2briM2xoNiMgdUYvMlsZI8ZaN1/
 JRmfP+lzCM25Rkdi9sLYolj8szaxbW9RgLBgvXD7ERJ5bsJRKGs6aDrJ2AXMZpwn
 BVOeughlPTxvv+NVFA1qZXWh63/7RjW5t6OMgHw3eNOABKv+o5YfdqOZAa8PHgn9
 LhNAkR90Il9hsGesWwHMKPuCgGHE0R/2nQppWM0xBWO/HfMRnpx8DEt+em/Kjpep
 uxex+bqMOJB0GksVWPM73ci1CQmQxKS6xrTXeTE9kiN+6WD+b0Fsntoz2XN62uJO
 df0z46N6T3I4jFc00vOBnXxCdgDCBCJLxtU8NFg8jzmGP+NkKxxYiwCEs1auKlLF
 CUVX+o8H4V9FKnD3h0/mNsNyw/gCw6TWXlyr/Ba6AjBuZ8TghhMjQ+zbY+xCN9sb
 IFONbr69pVBJ9N2ssGWdf2iLfa+JNcaJdEPZUkumgUlZ9M5RgS+yg3YoTFtlAO6R
 JN2uP1E20qBLlrvAu7pv9HQEim80RyDT2DU2a1qFNx32vhqfl6g3sccJJvGpzodj
 7y7per6KkpvUGrck0kAI
 =AO//
 -----END PGP SIGNATURE-----

Merge tag 'renesas-drivers-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers

Pull "Renesas ARM Based SoC Drivers Updates for v4.14" from Simon Horman:

Add R-Car D3 (r8a77995) support to the Renesas-specific SoC drivers
- SoC identification
- System controller
- Reset controller

* tag 'renesas-drivers-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  soc: renesas: rcar-rst: Add support for R-Car D3
  soc: renesas: rcar-sysc: Add support for R-Car D3 power areas
  soc: renesas: Add r8a77995 SYSC PM Domain Binding Definitions
  soc: renesas: Identify R-Car D3
2017-08-16 21:55:03 +02:00
Rob Herring 37c342cba5 soc: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Cc: Scott Wood <oss@buserror.net>
Cc: Qiang Zhao <qiang.zhao@nxp.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-08-16 21:32:36 +02:00
Geert Uytterhoeven eed17c427f soc: renesas: rcar-sysc: Add support for R-Car D3 power areas
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-07-27 17:08:04 +02:00
Olof Johansson a32e6a353d Renesas ARM Based SoC R-Car SYSC Updates for v4.13
Use GENPD_FLAG_ALWAYS_ON in R-Car SYSC driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZQ9m5AAoJENfPZGlqN0++ZnkP/A1awxW1NlFq0MYydJFUiNgl
 uqN0Cfliws5VvghxKsX5VMNdKYZCqCsK8LPkIsY/TsVbeyTmV5EIAq1Mgr1QbtT6
 AxgAc1SfAziLkMDTR0/Yy+xv8cvcb5HbneABHWsT2BrLPAeOeLC5yd6yICxff+Vn
 r1YQBB44J/IJQQBrRxOOuZDyWO/E4tGhtU54+tU6aRJ/uPgN/MzXlwSZikWOiHpY
 a8w2u3xcViJE+6HBtTpK31xrJqIIEQsjpK1U48Y+hrq6CKxZ0ZJLk5Xn4drehMNw
 F47qXi4PJXeNwDpPY/H01zauP8fB8jo4oUHZCePps2K4OrtMvTY7vMbxvsxxVxlW
 jjJXbDT+y/Wi6WJZAujqnBubFjbZTDboNjjQAMfVpPABYZmqWx1NsLBHvWsVgr0+
 HkViencpsxTe1qgVwEoGbTZtG0pJ+T6d6bid7MFyq4cIlYObJz+R4TnuuVlj2CYe
 AidLlL7F1tGZUAweBmdRUXo789n83sBtNF6rzOc8p+Oxva6qgEH6UyZe1AUV9dtL
 uSInCh1ES7m8S+aYu/8PaqFyij3wOiwFUYSx3wMfOqrVIqMt0ck5MELU0BUvg5AX
 6wskdIZD6OMbLiDNjWaZdLpgYe/K0613bNo4eKfEKjk+fM6AyM1SWio3o+wsRknf
 04SPy0L6Nknhyf3S5wXl
 =QQgo
 -----END PGP SIGNATURE-----

Merge tag 'renesas-rcar-sysc-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers

Renesas ARM Based SoC R-Car SYSC Updates for v4.13

Use GENPD_FLAG_ALWAYS_ON in R-Car SYSC driver

* tag 'renesas-rcar-sysc-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-06-18 22:51:43 -07:00
Olof Johansson 8c5c250670 Renesas ARM Based SoC Drivers Updates for v4.13
* Rework Kconfig and Makefile logic
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZQ9Q5AAoJENfPZGlqN0++duQP/RRlA5AHw73sYUrRyKm4LUrC
 tPQkRvLHPgGYOKT5KH6Oh6ElgBzniY5sMjT9oz7Lgdn5J+DtJbBeXX9kafCVMgj0
 7Ur9FeTS9Y+TzLq7GC4mbaDmGBWdOObH8RXyz5xRENNWqMeNni6CwBOwFQ/uuVpu
 fjpbspJHJ21X6+M0Jyznh7Yp/A5JFPNJG69felo5cqVmBlO6RO9S3WGyk2zzFgbl
 s1dYJiHBHQ56gu4V9/APNRRsYQICSilj+7tCuLOzflbtdCCbdFitIoKzmm3zPTqC
 xnugWlg+UssczDLM2zBa7XPeWnFxWPM0K8r7q7Pvrm8S8O/DsFkkAiDGG7AxYmXq
 79efnO6WjuINi4K2sinJncQBs6KT0OuvXGWlMc/Uzp9nmoLlYAC/nzPqefsKPtIz
 4i+J9c66+BYLjXceFdfZC0/Er3R2Zk5ehVWUFQeJZOeQ+LrDOeVoDrvUws4MXsdH
 agP47c0o4Ppw5DiFLObtuPvOseOMktDSjrtBVRZtBj1cqAVFVJo6HUveCmkCEjLD
 mzFclgUa26Og28qNR4BTfvEKSQLYTfazCSxJUmVw0MbNHn/8GRK3QzHXo5sietzQ
 rXo4ZRbjixjuC9lvqOE7M+fBqNDjCgnQQr20uo0Xp84gR7HzXy3imeCjEGepN5ai
 ndrwMF65x1tTsZo9cyLh
 =bRbS
 -----END PGP SIGNATURE-----

Merge tag 'renesas-drivers-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers

Renesas ARM Based SoC Drivers Updates for v4.13

* Rework Kconfig and Makefile logic

* tag 'renesas-drivers-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  soc: renesas: Rework Kconfig and Makefile logic

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-06-18 22:45:08 -07:00
Geert Uytterhoeven 980532a5dd soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON
Improve handling of always-on PM domains by using the
GENPD_FLAG_ALWAYS_ON flag introduced in commit ffaa42e8a4 ("PM /
Domains: Enable users of genpd to specify always on PM domains").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-06-15 21:10:41 +02:00
Geert Uytterhoeven 8be381a131 soc: renesas: Rework Kconfig and Makefile logic
The goals are to:
  - Allow precise control over and automatic selection of which
    (sub)drivers are used for which SoC,
  - Allow adding support for new SoCs easily,
  - Allow compile-testing of all (sub)drivers,
  - Keep driver selection logic in the subsystem-specific Kconfig,
    independent from the architecture-specific Kconfig (i.e. no "select"
    from arch/arm64/Kconfig.platforms), to avoid dependencies.

This is implemented by:
  - Introducing Kconfig symbols for all drivers and sub-drivers,
  - Introducing the Kconfig symbol SOC_RENESAS, which is enabled
    automatically when building for a Renesas ARM platform, and which
    enables all required drivers without interaction of the user, based
    on SoC-specific ARCH_* symbols,
  - Allowing the user to enable any Kconfig symbol manually if
    COMPILE_TEST is enabled,
  - Using the new Kconfig symbols instead of the ARCH_* symbols to
    control compilation in the Makefile,
  - Always entering drivers/soc/renesas/ during the build.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-06-12 11:31:07 +02:00
Geert Uytterhoeven afa6f53df6 soc: renesas: rcar-sysc: Add support for fixing up power area tables
The same SoC may have different power areas, depending on SoC revision.
One option is to use different sets of power area tables for each SoC
revision.  However, if the differences are small, it is much more
space-efficient to have a single set of tables, and fix those up at
runtime instead.

Hence provide a helper to NULLify power areas that do not exist on some
revisions (NULLified power areas are skipped during the registration
phase), and support for an optional initialization callback to e.g. fix
up power area tables.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-04-07 13:53:40 -04:00
Arnd Bergmann d319fc6dc1 Renesas ARM Based SoC r8a7745 SYSC Driver Updates for v4.10
* Add support for the r8a7745 SoC to rcar-sysc
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJYNfAfAAoJENfPZGlqN0++t14P/RukycPu2VgJ+F3G+OJoD2WS
 ltEYrhhZxIL9cjyLmiA7Mj7Ig9dMtzmiBC0W3HY5zvZN2OiOrzmNykfFdu9UN8rX
 iMZ6lDrq7o+Qsm1Q4Ab2miatqOqM7JPSacJPixLZFpvs6T79CCRMYaEeIB8AYD3O
 ij/tRDtxdvfY97iy5la9XvtA/63EmP6DZ2SxfqPXd6W0GaBg+QKBOLlcCR0yDrKh
 NosHdbiAbMapBSPbsnbhKLebpnPw159iu7VA73JbsrsFZ9IDRkwoA+wcgEEWnF8C
 b9S31TAglhL04AysUowlHjhEOU2hWPcF8rm3lisDghoUC6Rb/3gCPII+KnU6d5Z4
 QNCbY6IlWqya9wR3kavHmJHOowGt/LqrmLCnJSoTTbKgo6xPxN3kis6oRo2sY9w1
 KUJWgt9vfQ/H6ik2epkMg7sQbkBcsONUDUgVhFyaAqTKEgeIz5OggfNsYkQYYT37
 qlQkLgKweKYJmmr/ilCeVdmkdhPegII8aiYWdwb8N2cUY4I0nyUwnE+v9cdPRhxr
 LpONUZV+GtCz8O/Y2XtjxwhYoYUtHbUzSax+aw4qtBBmdyKcaQ1VIyn27gfofmht
 Q3itzk/eGp0GgnsadknYK9eOvWWjPf07/jvYgSVfL6rWGR+4/vcEht/kU+O9dnpP
 HMZ6/PrbmYoxWkY49sH7
 =pOb+
 -----END PGP SIGNATURE-----

Merge tag 'renesas-r8a7745-sysc-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers

Pull "Renesas ARM Based SoC r8a7745 SYSC Driver Updates for v4.10" from Simon Horman:

* Add support for the r8a7745 SoC to rcar-sysc

* tag 'renesas-r8a7745-sysc-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  soc: renesas: rcar-sysc: add R8A7745 support
  ARM: shmobile: r8a7745: add power domain index macros

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2016-11-30 16:39:48 +01:00
Sergei Shtylyov 141723e0cb soc: renesas: rcar-sysc: add R8A7745 support
Add support for RZ/G1E (R8A7745) SoC power areas to the R-Car SYSC driver.

Based on the original (and large) patch by Dmitry Shifrin
<dmitry.shifrin@cogentembedded.com>.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-11-23 14:28:41 +01:00
Sergei Shtylyov 603311ba97 soc: renesas: rcar-sysc: add R8A7743 support
Add support for RZ/G1M (R8A7743) SoC power areas to the R-Car SYSC driver.

Based on the original (and large) patch by Dmitry Shifrin
<dmitry.shifrin@cogentembedded.com>.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-10-17 08:21:20 +02:00
Geert Uytterhoeven ced42730d1 soc: renesas: rcar-sysc: Improve SYSC interrupt config in legacy wrapper
Align SYSC interrupt configuration in the legacy wrapper with the DT
version:
  - Mask SYSC interrupt sources before enabling them (doesn't matter
    much as they're disabled at the GIC level anyway),
  - Make sure not to clear reserved SYSCIMR bits that were set before.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-06-29 14:37:24 +02:00
Geert Uytterhoeven 053239987f soc: renesas: rcar-sysc: Move SYSC interrupt config to rcar-sysc driver
On R-Car H1 and Gen2, the SYSC interrupt registers are always configured
using hardcoded values in platform code. For R-Car Gen2, values are
provided for H2 and M2-W only, other SoCs are not yet supported, and
never will be.

Move this configuration from SoC-specific platform code to the
rcar_sysc_init() wrapper, so it can be skipped if the SYSC is configured
from DT. This would be the case not only for H1, H2, and M2-W using a
modern DTS, but also for other R-Car Gen2 SoCs not supported by the
platform code, relying purely on DT.

There is no longer a need to return the mapped register block, hence
make the function return void.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-06-29 14:37:08 +02:00
Geert Uytterhoeven b1e52287a2 soc: renesas: rcar-sysc: Make rcar_sysc_init() init the PM domains
Let rcar_sysc_init() trigger initialization of the SYSC PM domains from
DT if called before the early_initcall.
On failure, it falls back to mapping the passed register block, as
before.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-06-29 14:36:51 +02:00
Geert Uytterhoeven 1023578ec3 soc: renesas: rcar-sysc: Fix uninitialized error code in rcar_sysc_pd_init()
On success, rcar_sysc_pd_init() returns an uninitialized error code.
Use the return value of of_genpd_add_provider_onecell() to fix this.

This went unnoticed, as early_initcall() doesn't care about the return
value.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-06-29 14:36:37 +02:00
Sergei Shtylyov 7e49c84598 soc: renesas: rcar-sysc: add R8A7792 support
Add support for R-Car V2H (R8A7792) SoC power areas to the SYSC driver.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-06-16 10:53:57 +09:00
Geert Uytterhoeven e0c98b9171 soc: renesas: rcar-sysc: Add support for R-Car M3-W power areas
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-06-06 10:14:21 +09:00
Geert Uytterhoeven 23f1e2ecde soc: renesas: rcar-sysc: Add support for R-Car H3 power areas
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-26 09:56:38 +10:00
Geert Uytterhoeven 9af1dbcc30 soc: renesas: rcar-sysc: Add support for R-Car E2 power areas
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-26 09:56:37 +10:00
Geert Uytterhoeven a247eb93ef soc: renesas: rcar-sysc: Add support for R-Car M2-N power areas
R-Car M2-N is identical to R-Car M2-W w.r.t. power domains, so reuse the
definitions from the latter.

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-26 09:56:37 +10:00
Geert Uytterhoeven c5fbb3c088 soc: renesas: rcar-sysc: Add support for R-Car M2-W power areas
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-26 09:56:36 +10:00
Geert Uytterhoeven ad7c9dbc25 soc: renesas: rcar-sysc: Add support for R-Car H2 power areas
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-26 09:56:35 +10:00
Geert Uytterhoeven 9b83ea17b0 soc: renesas: rcar-sysc: Add support for R-Car H1 power areas
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-26 09:56:35 +10:00
Geert Uytterhoeven 1c8c77f52d soc: renesas: rcar-sysc: Enable Clock Domain for I/O devices
On R-Car H3, some power areas (e.g. A3VP) contain I/O devices, which are
also part of the CPG/MSSR Clock Domain.
On all R-Car SoCs, devices in the "always-on" PM Domain are part of the
Clock Domain served by the CPG/MSSR or CPG/MSTP driver.

Hook up the CPG/MSTP or CPG/MSSR Clock Domain attach/detach callbacks to
enable power management using module clocks. Which callback to hook up
depends on the presence of device nodes compatible with
"renesas,cpg-mstp-clocks". This clears the path for a future migration
from the CPG/MSTP to the CPG/MSSR driver on R-Car H1 and
Gen2.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-04-26 09:56:27 +10:00
Geert Uytterhoeven 2f024cef5b soc: renesas: rcar-sysc: Make rcar_sysc_power_is_off() static
As of commit b12ff41658 ("ARM: shmobile: r8a7779: Remove legacy PM
Domain remainings"), rcar_sysc_power_is_off() is no longer used from
SoC-specific code.

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:30:53 +10:00
Geert Uytterhoeven dcc09fd143 soc: renesas: rcar-sysc: Add DT support for SYSC PM domains
Populate the SYSC PM domains from DT, based on the presence of a device
node for the System Controller. The actual power area hiearchy, and
features of specific areas are obtained from tables in the C code.

The SYSCIER and SYSCIMR register values are derived from the power areas
present, which will help to get rid of the hardcoded values in R-Car H1
and R-Car Gen2 platform code later.

Initialization is done from an early_initcall(), to make sure the PM
Domains are initialized before secondary CPU bringup.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-04-22 17:30:37 +10:00
Geert Uytterhoeven 68667cebfc soc: renesas: rcar-sysc: Improve rcar_sysc_power() debug info
Print requested power domain state.

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:31 +10:00
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
Renamed from arch/arm/mach-shmobile/pm-rcar.c (Browse further)