Skip to content

Commit 3eb9621

Browse files
saba-kareembroonie
authored andcommitted
ASoC: amd: acp: remove acp poweroff function
BIOS invokes ACP Power off sequence based on ACP device state. Remove redundant code from ACP PCI driver for ACP Power off sequence. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/Message-Id: <20230622152406.3709231-4-Syed.SabaKareem@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent ad60672 commit 3eb9621

2 files changed

Lines changed: 0 additions & 42 deletions

File tree

sound/soc/amd/acp/acp-rembrandt.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -204,23 +204,6 @@ static int acp6x_power_on(void __iomem *base)
204204
return -ETIMEDOUT;
205205
}
206206

207-
static int acp6x_power_off(void __iomem *base)
208-
{
209-
u32 val;
210-
int timeout;
211-
212-
writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
213-
base + ACP6X_PGFSM_CONTROL);
214-
timeout = 0;
215-
while (++timeout < 500) {
216-
val = readl(base + ACP6X_PGFSM_STATUS);
217-
if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF)
218-
return 0;
219-
udelay(1);
220-
}
221-
return -ETIMEDOUT;
222-
}
223-
224207
static int acp6x_reset(void __iomem *base)
225208
{
226209
u32 val;
@@ -299,14 +282,6 @@ static int rmb_acp_deinit(void __iomem *base)
299282
}
300283

301284
writel(0x00, base + ACP_CONTROL);
302-
303-
/* power off */
304-
ret = acp6x_power_off(base);
305-
if (ret) {
306-
pr_err("ACP power off failed\n");
307-
return ret;
308-
}
309-
310285
return 0;
311286
}
312287

sound/soc/amd/acp/acp-renoir.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,6 @@ static int acp3x_power_on(void __iomem *base)
169169
return readl_poll_timeout(base + ACP_PGFSM_STATUS, val, !val, DELAY_US, ACP_TIMEOUT);
170170
}
171171

172-
static int acp3x_power_off(void __iomem *base)
173-
{
174-
u32 val;
175-
176-
writel(ACP_PWR_OFF_MASK, base + ACP_PGFSM_CONTROL);
177-
178-
return readl_poll_timeout(base + ACP_PGFSM_STATUS, val,
179-
(val & ACP_PGFSM_STAT_MASK) == ACP_POWERED_OFF,
180-
DELAY_US, ACP_TIMEOUT);
181-
}
182-
183172
static int acp3x_reset(void __iomem *base)
184173
{
185174
u32 val;
@@ -246,12 +235,6 @@ static int rn_acp_deinit(void __iomem *base)
246235
return ret;
247236

248237
writel(0x00, base + ACP_CONTROL);
249-
250-
/* power off */
251-
ret = acp3x_power_off(base);
252-
if (ret)
253-
return ret;
254-
255238
return 0;
256239
}
257240
static int renoir_audio_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)