summaryrefslogtreecommitdiffstats
path: root/drivers/soc/samsung/exynos-pmu.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-28soc: samsung: exynos-pmu: instantiate clkout driver as MFDKrzysztof Kozlowski1-0/+11
The Exynos clock output (clkout) driver uses same register address space (Power Management Unit address space) as Exynos PMU driver and same set of compatibles. It was modeled as clock provider instantiated with CLK_OF_DECLARE_DRIVER(). This however brings ordering problems and lack of probe deferral, therefore clkout driver should be converted to a regular module and instantiated as a child of PMU driver to be able to use existing compatibles and address space. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Reviewed-by: Stephen Boyd <sboyd@kernel.org> Link: https://lore.kernel.org/r/20201001165646.32279-2-krzk@kernel.org
2020-01-07soc: samsung: Rename Samsung and Exynos to lowercaseKrzysztof Kozlowski1-1/+1
Fix up inconsistent usage of upper and lowercase letters in "Samsung" and "Exynos" names. "SAMSUNG" and "EXYNOS" are not abbreviations but regular trademarked names. Therefore they should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2019-12-15soc: samsung: exynos-pmu: Convert to devm_platform_ioremap_resourceYangtao Li1-3/+1
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2018-02-13soc: samsung: pmu: Populate children syscon nodesKrzysztof Kozlowski1-0/+7
The syscon poweroff and restart nodes logically belong to the Power Management Unit so populate possible children. This also requires providing compatibles for Exynos5410 and Exynos7 so the PMU device and its children will be instantiated for them as well. Just like Exynos5433, these chipsets are not yet supported by the PMU driver. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Rob Herring <robh@kernel.org> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
2018-01-03soc: samsung: Add SPDX license identifiersKrzysztof Kozlowski1-10/+6
Replace GPL license statements with SPDX GPL-2.0 license identifiers. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-10-08soc: samsung: Remove Exynos4212 related dead codeMarek Szyprowski1-9/+0
Support for Exynos4212 SoCs has been removed by commit bca9085e0ae9 ("ARM: dts: exynos: remove Exynos4212 support (dead code)"), so there is no need to keep remaining dead code related to this SoC version. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-03-21soc: samsung: Do not build ARMv7 PMU drivers on ARMv8Krzysztof Kozlowski1-6/+16
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-01-26soc: samsung: pmu: Add dummy support for Exynos5433 SoCMarek Szyprowski1-2/+4
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-20soc: samsung: pmu: Remove messages for failed memory allocationMarek Szyprowski1-3/+1
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-20soc: samsung: pmu: Use of_device_get_match_data helperMarek Szyprowski1-5/+2
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-20soc: samsung: pmu: Provide global function to get PMU regmapMarek Szyprowski1-0/+11
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>
2016-02-25drivers: soc: Add support for Exynos PMU driverPankaj Dubey1-0/+141
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>