Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Pankaj Dubey and committed by
Krzysztof Kozlowski
bfce552d 92c4bf04

+20 -3
+2
arch/arm/mach-exynos/Kconfig
··· 17 17 select ARM_GIC 18 18 select COMMON_CLK_SAMSUNG 19 19 select EXYNOS_THERMAL 20 + select EXYNOS_PMU 20 21 select HAVE_ARM_SCU if SMP 21 22 select HAVE_S3C2410_I2C if I2C 22 23 select HAVE_S3C2410_WATCHDOG if WATCHDOG ··· 26 25 select PINCTRL_EXYNOS 27 26 select PM_GENERIC_DOMAINS if PM 28 27 select S5P_DEV_MFC 28 + select SOC_SAMSUNG 29 29 select SRAM 30 30 select THERMAL 31 31 select MFD_SYSCON
+1 -3
arch/arm/mach-exynos/Makefile
··· 9 9 10 10 # Core 11 11 12 - obj-$(CONFIG_ARCH_EXYNOS) += exynos.o pmu.o exynos-smc.o firmware.o \ 13 - exynos3250-pmu.o exynos4-pmu.o \ 14 - exynos5250-pmu.o exynos5420-pmu.o 12 + obj-$(CONFIG_ARCH_EXYNOS) += exynos.o exynos-smc.o firmware.o 15 13 16 14 obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o sleep.o 17 15 obj-$(CONFIG_PM_SLEEP) += suspend.o
arch/arm/mach-exynos/exynos-pmu.h drivers/soc/samsung/exynos-pmu.h
arch/arm/mach-exynos/exynos3250-pmu.c drivers/soc/samsung/exynos3250-pmu.c
arch/arm/mach-exynos/exynos4-pmu.c drivers/soc/samsung/exynos4-pmu.c
arch/arm/mach-exynos/exynos5250-pmu.c drivers/soc/samsung/exynos5250-pmu.c
arch/arm/mach-exynos/exynos5420-pmu.c drivers/soc/samsung/exynos5420-pmu.c
arch/arm/mach-exynos/pmu.c drivers/soc/samsung/exynos-pmu.c
+1
drivers/soc/Kconfig
··· 6 6 source "drivers/soc/mediatek/Kconfig" 7 7 source "drivers/soc/qcom/Kconfig" 8 8 source "drivers/soc/rockchip/Kconfig" 9 + source "drivers/soc/samsung/Kconfig" 9 10 source "drivers/soc/sunxi/Kconfig" 10 11 source "drivers/soc/tegra/Kconfig" 11 12 source "drivers/soc/ti/Kconfig"
+1
drivers/soc/Makefile
··· 10 10 obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/ 11 11 obj-$(CONFIG_ARCH_QCOM) += qcom/ 12 12 obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/ 13 + obj-$(CONFIG_SOC_SAMSUNG) += samsung/ 13 14 obj-$(CONFIG_ARCH_SUNXI) += sunxi/ 14 15 obj-$(CONFIG_ARCH_TEGRA) += tegra/ 15 16 obj-$(CONFIG_SOC_TI) += ti/
+13
drivers/soc/samsung/Kconfig
··· 1 + # 2 + # SAMSUNG SoC drivers 3 + # 4 + menu "Samsung SOC driver support" 5 + 6 + config SOC_SAMSUNG 7 + bool 8 + 9 + config EXYNOS_PMU 10 + bool 11 + depends on ARM && ARCH_EXYNOS 12 + 13 + endmenu
+2
drivers/soc/samsung/Makefile
··· 1 + obj-$(CONFIG_EXYNOS_PMU) += exynos-pmu.o exynos3250-pmu.o exynos4-pmu.o \ 2 + exynos5250-pmu.o exynos5420-pmu.o