mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-10 20:44:09 +08:00
clk: at91: utmi: use pmc_read when the at91_pmc is available
at91_pmc_read is a workaround to allow external drivers to acces some registers of the PMC. There is no need for it in clk-utmi.c as we aready have a pointer to the struct at91_pmc. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
parent
8ee9c7de01
commit
de661d0022
@ -47,7 +47,7 @@ static int clk_utmi_prepare(struct clk_hw *hw)
|
||||
{
|
||||
struct clk_utmi *utmi = to_clk_utmi(hw);
|
||||
struct at91_pmc *pmc = utmi->pmc;
|
||||
u32 tmp = at91_pmc_read(AT91_CKGR_UCKR) | AT91_PMC_UPLLEN |
|
||||
u32 tmp = pmc_read(pmc, AT91_CKGR_UCKR) | AT91_PMC_UPLLEN |
|
||||
AT91_PMC_UPLLCOUNT | AT91_PMC_BIASEN;
|
||||
|
||||
pmc_write(pmc, AT91_CKGR_UCKR, tmp);
|
||||
@ -73,7 +73,7 @@ static void clk_utmi_unprepare(struct clk_hw *hw)
|
||||
{
|
||||
struct clk_utmi *utmi = to_clk_utmi(hw);
|
||||
struct at91_pmc *pmc = utmi->pmc;
|
||||
u32 tmp = at91_pmc_read(AT91_CKGR_UCKR) & ~AT91_PMC_UPLLEN;
|
||||
u32 tmp = pmc_read(pmc, AT91_CKGR_UCKR) & ~AT91_PMC_UPLLEN;
|
||||
|
||||
pmc_write(pmc, AT91_CKGR_UCKR, tmp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user