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>
This commit is contained in:
Родитель
ad60672394
Коммит
3eb96217c1
|
@ -204,23 +204,6 @@ static int acp6x_power_on(void __iomem *base)
|
|||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int acp6x_power_off(void __iomem *base)
|
||||
{
|
||||
u32 val;
|
||||
int timeout;
|
||||
|
||||
writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
|
||||
base + ACP6X_PGFSM_CONTROL);
|
||||
timeout = 0;
|
||||
while (++timeout < 500) {
|
||||
val = readl(base + ACP6X_PGFSM_STATUS);
|
||||
if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF)
|
||||
return 0;
|
||||
udelay(1);
|
||||
}
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int acp6x_reset(void __iomem *base)
|
||||
{
|
||||
u32 val;
|
||||
|
@ -299,14 +282,6 @@ static int rmb_acp_deinit(void __iomem *base)
|
|||
}
|
||||
|
||||
writel(0x00, base + ACP_CONTROL);
|
||||
|
||||
/* power off */
|
||||
ret = acp6x_power_off(base);
|
||||
if (ret) {
|
||||
pr_err("ACP power off failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -169,17 +169,6 @@ static int acp3x_power_on(void __iomem *base)
|
|||
return readl_poll_timeout(base + ACP_PGFSM_STATUS, val, !val, DELAY_US, ACP_TIMEOUT);
|
||||
}
|
||||
|
||||
static int acp3x_power_off(void __iomem *base)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
writel(ACP_PWR_OFF_MASK, base + ACP_PGFSM_CONTROL);
|
||||
|
||||
return readl_poll_timeout(base + ACP_PGFSM_STATUS, val,
|
||||
(val & ACP_PGFSM_STAT_MASK) == ACP_POWERED_OFF,
|
||||
DELAY_US, ACP_TIMEOUT);
|
||||
}
|
||||
|
||||
static int acp3x_reset(void __iomem *base)
|
||||
{
|
||||
u32 val;
|
||||
|
@ -246,12 +235,6 @@ static int rn_acp_deinit(void __iomem *base)
|
|||
return ret;
|
||||
|
||||
writel(0x00, base + ACP_CONTROL);
|
||||
|
||||
/* power off */
|
||||
ret = acp3x_power_off(base);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int renoir_audio_probe(struct platform_device *pdev)
|
||||
|
|
Загрузка…
Ссылка в новой задаче