Skip to content

Commit 514a935

Browse files
refractionwarekrzk
authored andcommitted
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 c406101. 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>
1 parent 8a19d4a commit 514a935

3 files changed

Lines changed: 22 additions & 2 deletions

File tree

drivers/soc/samsung/exynos-pmu.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ void exynos_sys_powerdown_conf(enum sys_powerdown mode)
5757

5858
if (pmu_data->powerdown_conf_extra)
5959
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+
}
6066
}
6167

6268
/*
@@ -79,6 +85,9 @@ static const struct of_device_id exynos_pmu_of_device_ids[] = {
7985
}, {
8086
.compatible = "samsung,exynos4210-pmu",
8187
.data = exynos_pmu_data_arm_ptr(exynos4210_pmu_data),
88+
}, {
89+
.compatible = "samsung,exynos4212-pmu",
90+
.data = exynos_pmu_data_arm_ptr(exynos4212_pmu_data),
8291
}, {
8392
.compatible = "samsung,exynos4412-pmu",
8493
.data = exynos_pmu_data_arm_ptr(exynos4412_pmu_data),

drivers/soc/samsung/exynos-pmu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct exynos_pmu_conf {
2020

2121
struct exynos_pmu_data {
2222
const struct exynos_pmu_conf *pmu_config;
23+
const struct exynos_pmu_conf *pmu_config_extra;
2324

2425
void (*pmu_init)(void);
2526
void (*powerdown_conf)(enum sys_powerdown);
@@ -32,6 +33,7 @@ extern void __iomem *pmu_base_addr;
3233
/* list of all exported SoC specific data */
3334
extern const struct exynos_pmu_data exynos3250_pmu_data;
3435
extern const struct exynos_pmu_data exynos4210_pmu_data;
36+
extern const struct exynos_pmu_data exynos4212_pmu_data;
3537
extern const struct exynos_pmu_data exynos4412_pmu_data;
3638
extern const struct exynos_pmu_data exynos5250_pmu_data;
3739
extern const struct exynos_pmu_data exynos5420_pmu_data;

drivers/soc/samsung/exynos4-pmu.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static const struct exynos_pmu_conf exynos4210_pmu_config[] = {
8686
{ PMU_TABLE_END,},
8787
};
8888

89-
static const struct exynos_pmu_conf exynos4412_pmu_config[] = {
89+
static const struct exynos_pmu_conf exynos4x12_pmu_config[] = {
9090
{ S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } },
9191
{ S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } },
9292
{ S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } },
@@ -191,6 +191,10 @@ static const struct exynos_pmu_conf exynos4412_pmu_config[] = {
191191
{ S5P_GPS_ALIVE_LOWPWR, { 0x7, 0x0, 0x0 } },
192192
{ S5P_CMU_SYSCLK_ISP_LOWPWR, { 0x1, 0x0, 0x0 } },
193193
{ S5P_CMU_SYSCLK_GPS_LOWPWR, { 0x1, 0x0, 0x0 } },
194+
{ PMU_TABLE_END,},
195+
};
196+
197+
static const struct exynos_pmu_conf exynos4412_pmu_config[] = {
194198
{ S5P_ARM_CORE2_LOWPWR, { 0x0, 0x0, 0x2 } },
195199
{ S5P_DIS_IRQ_CORE2, { 0x0, 0x0, 0x0 } },
196200
{ S5P_DIS_IRQ_CENTRAL2, { 0x0, 0x0, 0x0 } },
@@ -204,6 +208,11 @@ const struct exynos_pmu_data exynos4210_pmu_data = {
204208
.pmu_config = exynos4210_pmu_config,
205209
};
206210

211+
const struct exynos_pmu_data exynos4212_pmu_data = {
212+
.pmu_config = exynos4x12_pmu_config,
213+
};
214+
207215
const struct exynos_pmu_data exynos4412_pmu_data = {
208-
.pmu_config = exynos4412_pmu_config,
216+
.pmu_config = exynos4x12_pmu_config,
217+
.pmu_config_extra = exynos4412_pmu_config,
209218
};

0 commit comments

Comments
 (0)