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

soc: samsung: exynos-pmu: Re-introduce Exynos4212 support

Support for the Exynos4212 SoC was originally dropped as there were
no boards using it. We will be adding a device that uses it, so add
it back.

This reverts commit c40610198f35e8264f9175dafe74db6288a07eda.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
Link: https://lore.kernel.org/r/20230501195525.6268-5-aweber.kernel@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

authored by

Artur Weber and committed by
Krzysztof Kozlowski
514a935f 8a19d4a1

+22 -2
+9
drivers/soc/samsung/exynos-pmu.c
··· 57 57 58 58 if (pmu_data->powerdown_conf_extra) 59 59 pmu_data->powerdown_conf_extra(mode); 60 + 61 + if (pmu_data->pmu_config_extra) { 62 + for (i = 0; pmu_data->pmu_config_extra[i].offset != PMU_TABLE_END; i++) 63 + pmu_raw_writel(pmu_data->pmu_config_extra[i].val[mode], 64 + pmu_data->pmu_config_extra[i].offset); 65 + } 60 66 } 61 67 62 68 /* ··· 85 79 }, { 86 80 .compatible = "samsung,exynos4210-pmu", 87 81 .data = exynos_pmu_data_arm_ptr(exynos4210_pmu_data), 82 + }, { 83 + .compatible = "samsung,exynos4212-pmu", 84 + .data = exynos_pmu_data_arm_ptr(exynos4212_pmu_data), 88 85 }, { 89 86 .compatible = "samsung,exynos4412-pmu", 90 87 .data = exynos_pmu_data_arm_ptr(exynos4412_pmu_data),
+2
drivers/soc/samsung/exynos-pmu.h
··· 20 20 21 21 struct exynos_pmu_data { 22 22 const struct exynos_pmu_conf *pmu_config; 23 + const struct exynos_pmu_conf *pmu_config_extra; 23 24 24 25 void (*pmu_init)(void); 25 26 void (*powerdown_conf)(enum sys_powerdown); ··· 33 32 /* list of all exported SoC specific data */ 34 33 extern const struct exynos_pmu_data exynos3250_pmu_data; 35 34 extern const struct exynos_pmu_data exynos4210_pmu_data; 35 + extern const struct exynos_pmu_data exynos4212_pmu_data; 36 36 extern const struct exynos_pmu_data exynos4412_pmu_data; 37 37 extern const struct exynos_pmu_data exynos5250_pmu_data; 38 38 extern const struct exynos_pmu_data exynos5420_pmu_data;
+11 -2
drivers/soc/samsung/exynos4-pmu.c
··· 86 86 { PMU_TABLE_END,}, 87 87 }; 88 88 89 - static const struct exynos_pmu_conf exynos4412_pmu_config[] = { 89 + static const struct exynos_pmu_conf exynos4x12_pmu_config[] = { 90 90 { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } }, 91 91 { S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } }, 92 92 { S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } }, ··· 191 191 { S5P_GPS_ALIVE_LOWPWR, { 0x7, 0x0, 0x0 } }, 192 192 { S5P_CMU_SYSCLK_ISP_LOWPWR, { 0x1, 0x0, 0x0 } }, 193 193 { S5P_CMU_SYSCLK_GPS_LOWPWR, { 0x1, 0x0, 0x0 } }, 194 + { PMU_TABLE_END,}, 195 + }; 196 + 197 + static const struct exynos_pmu_conf exynos4412_pmu_config[] = { 194 198 { S5P_ARM_CORE2_LOWPWR, { 0x0, 0x0, 0x2 } }, 195 199 { S5P_DIS_IRQ_CORE2, { 0x0, 0x0, 0x0 } }, 196 200 { S5P_DIS_IRQ_CENTRAL2, { 0x0, 0x0, 0x0 } }, ··· 208 204 .pmu_config = exynos4210_pmu_config, 209 205 }; 210 206 207 + const struct exynos_pmu_data exynos4212_pmu_data = { 208 + .pmu_config = exynos4x12_pmu_config, 209 + }; 210 + 211 211 const struct exynos_pmu_data exynos4412_pmu_data = { 212 - .pmu_config = exynos4412_pmu_config, 212 + .pmu_config = exynos4x12_pmu_config, 213 + .pmu_config_extra = exynos4412_pmu_config, 213 214 };