mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-06 11:46:41 +07:00
ARM: mxc: audmux-v2: add clk_prepare/clk_unprepare
It's for migrating to generic clk framework API. Signed-off-by: Richard Zhao <richard.zhao@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
bcab50102c
commit
bac59328c8
@ -73,13 +73,13 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
|
||||
return -ENOMEM;
|
||||
|
||||
if (audmux_clk)
|
||||
clk_enable(audmux_clk);
|
||||
clk_prepare_enable(audmux_clk);
|
||||
|
||||
ptcr = readl(audmux_base + MXC_AUDMUX_V2_PTCR(port));
|
||||
pdcr = readl(audmux_base + MXC_AUDMUX_V2_PDCR(port));
|
||||
|
||||
if (audmux_clk)
|
||||
clk_disable(audmux_clk);
|
||||
clk_disable_unprepare(audmux_clk);
|
||||
|
||||
ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
|
||||
pdcr, ptcr);
|
||||
@ -172,13 +172,13 @@ int mxc_audmux_v2_configure_port(unsigned int port, unsigned int ptcr,
|
||||
return -ENOSYS;
|
||||
|
||||
if (audmux_clk)
|
||||
clk_enable(audmux_clk);
|
||||
clk_prepare_enable(audmux_clk);
|
||||
|
||||
writel(ptcr, audmux_base + MXC_AUDMUX_V2_PTCR(port));
|
||||
writel(pdcr, audmux_base + MXC_AUDMUX_V2_PDCR(port));
|
||||
|
||||
if (audmux_clk)
|
||||
clk_disable(audmux_clk);
|
||||
clk_disable_unprepare(audmux_clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user