Commit graph

20 commits

Author SHA1 Message Date
Krzysztof Kozlowski a0ebf66267 soc: samsung: Do not build ARMv7 PMU drivers on ARMv8
The Exynos Power Management Unit (PMU) drivers contain quite large
static arrays of register values necessary for given Exynos SoC to enter
low power mode.  All this data is useless for ARMv8 SoC like
Exynos5433, because the image will not be shared between ARMv7 and
ARMv8.

Add additional Kconfig symbol for selecting the SoC-specific driver
addons thus skipping the useless data in the final image (this is
similar approach to chosen for Exynos clock controller drivers):
 - exynos-pmu driver will be compiled on both architectures ARMv7
   and ARMv8,
 - additional driver_data for ARMv7 SoCs will not be built on ARMv8
   and a macro will return NULL for them in of_device_id - this should
   be safe as these compatibles cannot match on ARMv7 and driver
   anyway handles NULL driver_data,
 - on ARMv8 compile only exynos-pmu driver which exposes the
   syscon-regmap for PMU address space.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
2017-03-21 19:03:39 +02:00
Arnd Bergmann 28eedd15ec Improve the PM domains driver for Exynos by displaying a user-friendly name of
power domain.  Till now, the name of node from DT was used which mostly is just
 "power-domain".  We need more than that.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJYk3brAAoJEME3ZuaGi4PXlLQP/jmi+uKo+1Ofc/X4r5flKuy7
 s66sklaVUTFdZVDe7WjR8TW8alau90yM7mXSLi6iQkSBzoRgmkfB1j97PdzKiYj8
 TKVGOfQSLcL/PqD0og+4yicPgaD2YfIJyeE5E0k3ETxQDi3+EVxdvcsjNEsYKA3n
 V4TuWlTTbdOSRlqQBmH+VvECWMaYrT0Fn2j7lUX4jeAqlAj6NsQ7Ogq8pGPhikmF
 rp2e/SMP1ZdylPsmHTTynpLE0PlkQ8Rwz2vYAu0YDL0rTCgqhIqctwZqPJ1pHwHW
 /pw6X2nssPz3nzySWAvRQ3oyW2akWMq2Xibuu7RVI+iEj+rR5AeI6UUTZJ8DyY1H
 uhzvXLMJ0XgkN5sobC+WUmA8T17s9tsYQHyFIOZdG8RmPwNa8zP4lJmBG4xOyfNG
 xAJl/KhGJHIOrDotGpiovf8MqNEn/jPuiSK0jsFo2sLDNhdxJnOkcchAyGIGUGh1
 b74TCgtMNTES50BZbWm0ijaSqk10CrI8wgkVomNLXdW7eGLLvISzLD5Fz/SNQev7
 OJporWHONEFWWiH90hPns1ENW3KuEK29yZto9KtyojPAgWBCjSN2/X4vjH3h3rTv
 Vca8ArtboFmLA1175oqvX+g6BGw4A0iCvQCgrZoTNRZSTwrbC4IEgImtWpg+n6YO
 E5CNm5MIGjPlz9tSu1mX
 =1AMJ
 -----END PGP SIGNATURE-----

Merge tag 'samsung-drivers-soc-pm-domains-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers

Pull "soc: samsung: pm_domains for v4.11" from Krzysztof Kozłowski:

Improve the PM domains driver for Exynos by displaying a user-friendly name of
power domain.  Till now, the name of node from DT was used which mostly is just
"power-domain".  We need more than that.

* tag 'samsung-drivers-soc-pm-domains-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  soc: samsung: pm_domains: Read domain name from the new label property
  soc: samsung: pm_domains: Remove message about failed memory allocation
  soc: samsung: pm_domains: Remove unused name field
  soc: samsung: pm_domains: Use full names in subdomains registration log
2017-02-07 17:20:07 +01:00
Marek Szyprowski b13b2330aa soc: samsung: pm_domains: Read domain name from the new label property
Device tree nodes for each power domain should use generic "power-domain"
name, so using it as a domain name doesn't give much benefits. This patch
adds support for human readable names defined in 'label' property. Such
names are visible to userspace and makes debugging much easier. When no
'label' property is found, driver keeps using the name constructed from
full node name.

Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-31 21:30:07 +02:00
Marek Szyprowski d1a09872fe soc: samsung: pm_domains: Remove message about failed memory allocation
Memory subsystem already prints message about failed memory
allocation, there is no need to do it in the drivers.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-31 21:30:06 +02:00
Marek Szyprowski 066502d483 soc: samsung: pm_domains: Remove unused name field
Name is now in generic pm domain structure, so there is no need to
duplicate it in private data.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-31 21:30:04 +02:00
Marek Szyprowski 402e73c519 soc: samsung: pm_domains: Use full names in subdomains registration log
Device tree none name for each power domain should be "power-domain", so
use a bit more descriptive full node name in messages about subdomain
registration. This way the following meaningless message:

power-domain has as child subdomain: power-domain.

is changed to a bit more meaningful one:

/soc/power-domain@105c40a0 has as child subdomain: /soc/power-domain@105c4020.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-31 21:30:02 +02:00
Krzysztof Kozlowski ee55ae6194 soc: samsung: pmu: Remove duplicated define for ARM_L2_OPTION register
The register ARM_L2_OPTION (0x2608 in Exynos4 and Exynos5 PMU) was
defined twice.  Both names were used in the Exynos542x code.  Simplify
this.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-27 11:32:31 +02:00
Chanwoo Choi 6bce1974f6 soc: samsung: pm_domains: Add new Exynos5433 compatible
Add a new compatible string for Exynos5433 because it uses the 0xf
value instead of 0x7 for domain on/off registers.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-27 09:38:54 +02:00
Marek Szyprowski fa59aa7090 soc: samsung: pmu: Add dummy support for Exynos5433 SoC
Add compatible for Exynos5433 SoC, so the driver will bind and let other
drivers to use PMU regmap.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-26 21:50:56 +02:00
Marek Szyprowski 1da6de33e4 soc: samsung: pmu: Remove messages for failed memory allocation
Memory subsystem already prints message about failed memory
allocation, there is no need to do it in the driver.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-20 18:37:27 +02:00
Marek Szyprowski ec7cc5b15e soc: samsung: pmu: Use of_device_get_match_data helper
Replace custom code with generic helper to retrieve driver data.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-20 18:37:13 +02:00
Marek Szyprowski 76640b84bd soc: samsung: pmu: Provide global function to get PMU regmap
PMU is something like a SoC wide service, so add a helper function to get
PMU regmap. This will be used by other Exynos device drivers. This way it
can be avoided to model this dependency in device tree (as phandles to PMU
node) for almost every device in the SoC.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-20 18:35:36 +02:00
Jon Hunter 8d68c3713a ARM: EXYNOS: Remove calls to of_genpd_get_from_provider()
Update the EXYNOS PM domain code to use the of_genpd_add_subdomain()
and remove any calls to of_genpd_get_from_provider().

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-09-13 02:49:33 +02:00
Linus Torvalds 43a0a98aa8 ARM: SoC driver updates for v4.8
Driver updates for ARM SoCs.
 
 A slew of changes this release cycle. The reset driver tree, that we merge
 through arm-soc for historical reasons, is also sizable this time around.
 
 Among the changes:
 
  - clps711x: Treewide changes to compatible strings, merged here for simplicity.
  - Qualcomm: SCM firmware driver cleanups, move to platform driver
  - ux500: Major cleanups, removal of old mach-specific infrastructure.
  - Atmel external bus memory driver
  - Move of brcmstb platform to the rest of bcm
  - PMC driver updates for tegra, various fixes and improvements
  - Samsung platform driver updates to support 64-bit Exynos platforms
  - Reset controller cleanups moving to devm_reset_controller_register() APIs
  - Reset controller driver for Amlogic Meson
  - Reset controller driver for Hisilicon hi6220
  - ARM SCPI power domain support
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXnm1XAAoJEIwa5zzehBx35lcP/ApuQarIXeZCQZtjlUBV9McW
 o3o7FhKFHePmEPeoYCvVeK5D8NykTkQv3WpnCknoxPJzxGJF7jbPWQJcVnXfKOXD
 kTcyIK15WL2HHtSE3lYyLfyUPz8AbJyRt0l0cxgcg6jvo+uzlWooNz1y78rLIYzg
 UwRssj7OiHv4dsyYRHZIsjnB8gMWw8rYMk154gP2xy6MnNXXzzOVVnOiVqxSZBm+
 EgIIcROMOqkkHuFlClMYKluIgrmgz1Ypjf+FuAg7dqXZd+TGRrmGXeI7SkGThfLu
 nyvY3N18NViNu7xOUkI9zg7+ifyYM8Si9ylalSICSJdIAxZfiwFqFaLJvVWKU1rY
 rBOBjKckQI0/X9WYusFNFHcijhIFV8/FgGAnVRRMPdvlCss7Zp03C9mR4AEhmKMX
 rLG49x81hU1C+LftC59ml3iB8dhZrrRkbxNHjLFHVGWNrKMrmJKa8JhXGRAoNM+u
 LRauiuJZatqvLfISNvpfcoW2EashVoU3f+uC8ymT3QCyME3wZm0t7T4tllxhMfBl
 sOgJqNkTKDmPLofwm/dASiLML7ZF1WePScrFyOACnj9K4mUD+OaCnowtWoQPu0eI
 aNmT84oosJ2S9F/iUDPtFHXdzQ+1QPPfSiQ9FXMoauciVq/2F+pqq68yYgqoxFOG
 vmkmG2YM4Wyq43u0BONR
 =O8+y
 -----END PGP SIGNATURE-----

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

Pull ARM SoC driver updates from Olof Johansson:
 "Driver updates for ARM SoCs.

  A slew of changes this release cycle.  The reset driver tree, that we
  merge through arm-soc for historical reasons, is also sizable this
  time around.

  Among the changes:

   - clps711x: Treewide changes to compatible strings, merged here for simplicity.
   - Qualcomm: SCM firmware driver cleanups, move to platform driver
   - ux500: Major cleanups, removal of old mach-specific infrastructure.
   - Atmel external bus memory driver
   - Move of brcmstb platform to the rest of bcm
   - PMC driver updates for tegra, various fixes and improvements
   - Samsung platform driver updates to support 64-bit Exynos platforms
   - Reset controller cleanups moving to devm_reset_controller_register() APIs
   - Reset controller driver for Amlogic Meson
   - Reset controller driver for Hisilicon hi6220
   - ARM SCPI power domain support"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (100 commits)
  ARM: ux500: consolidate base platform files
  ARM: ux500: move soc_id driver to drivers/soc
  ARM: ux500: call ux500_setup_id later
  ARM: ux500: consolidate soc_device code in id.c
  ARM: ux500: remove cpu_is_u* helpers
  ARM: ux500: use CLK_OF_DECLARE()
  ARM: ux500: move l2x0 init to .init_irq
  mfd: db8500 stop passing around platform data
  ASoC: ab8500-codec: remove platform data based probe
  ARM: ux500: move ab8500_regulator_plat_data into driver
  ARM: ux500: remove unused regulator data
  soc: raspberrypi-power: add CONFIG_OF dependency
  firmware: scpi: add CONFIG_OF dependency
  video: clps711x-fb: Changing the compatibility string to match with the smallest supported chip
  input: clps711x-keypad: Changing the compatibility string to match with the smallest supported chip
  pwm: clps711x: Changing the compatibility string to match with the smallest supported chip
  serial: clps711x: Changing the compatibility string to match with the smallest supported chip
  irqchip: clps711x: Changing the compatibility string to match with the smallest supported chip
  clocksource: clps711x: Changing the compatibility string to match with the smallest supported chip
  clk: clps711x: Changing the compatibility string to match with the smallest supported chip
  ...
2016-08-01 18:36:01 -04:00
Krzysztof Kozlowski aec6341e2a soc: samsung: pmu: Constify arrays with PMU data
Arrays storing values for Power Management Unit for given sleep mode can
be made const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2016-07-06 10:35:45 +02:00
Krzysztof Kozlowski 9479f7cc91 soc: samsung: pm_domains: Enable COMPILE_TEST for build coverage
Introduce a platform selectable symbol EXYNOS_PM_DOMAINS which can be
also toggled on by COMPILE_TEST for some build coverage.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2016-05-30 09:12:57 +02:00
Krzysztof Kozlowski c028e17571 soc: samsung: pm_domains: Prepare for supporting ARMv8 Exynos
The ARMv8 Exynos family (Exynos5433 and Exynos7420) uses different value
(0xf instead of 0x7) for controlling the power domain on/off registers
(both for control and for status).

Choose the value depending on the compatible. This prepares the driver
for supporting ARMv8 SoCs.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
2016-05-30 09:12:53 +02:00
Krzysztof Kozlowski e465007a7a ARM: EXYNOS: Move pm_domains driver to drivers/soc/samsung
Exynos PM domains driver does not have mach-specific dependencies so it
can be safely moved out of arm/mach-exynos to drivers/soc. This in
future will allow re-using it on ARM64 boards.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
2016-05-30 09:12:49 +02:00
Krzysztof Kozlowski b11301d5ad drivers: soc: samsung: Enable COMPILE_TEST
Get some build coverage of Exynos PMU driver. It depends on
asm/cputype.h so its compilation is limited to ARM architectures.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
2016-02-25 11:25:40 +09:00
Pankaj Dubey bfce552d0b drivers: soc: Add support for Exynos PMU driver
This patch moves Exynos PMU driver implementation from "arm/mach-exynos"
to "drivers/soc/samsung". This driver is mainly used for setting misc
bits of register from PMU IP of Exynos SoC which will be required to
configure before Suspend/Resume. Currently all these settings are done
in "arch/arm/mach-exynos/pmu.c" but moving ahead for ARM64 based SoC
support, there is a need of this PMU driver in driver/* folder.

This driver uses existing DT binding information and there should
be no functionality change in the supported platforms.

Signed-off-by: Amit Daniel Kachhap <amitdanielk@gmail.com>
[tested on Peach-Pi (Exynos5880)]
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
[for testing on Trats2 (Exynos4412) and Odroid XU3 (Exynos5422)]
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
[k.kozlowski: Rebased, add necessary infrastructure for building and
selecting drivers/soc because original patchset was on top of movement
SROMc to drivers/soc]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2016-02-25 10:18:07 +09:00