Skip to content

Commit facb87a

Browse files
claudiubezneabebarino
authored andcommitted
clk: at91: sama7g5: remove prescaler part of master clock
On SAMA7G5 the prescaler part of master clock has been implemented as a changeable one. Everytime the prescaler is changed the PMC_SR.MCKRDY bit must be polled. Value 1 for PMC_SR.MCKRDY means the prescaler update is done. Driver polls for this bit until it becomes 1. On SAMA7G5 it has been discovered that in some conditions the PMC_SR.MCKRDY is not rising but the rate it provides it's stable. The workaround is to add a timeout when polling for PMC_SR.MCKRDY. At the moment, for SAMA7G5, the prescaler will be removed from Linux clock tree as all the frequencies for CPU could be obtained from PLL and also there will be less overhead when changing frequency via DVFS. Signed-off-by: Claudiu Beznea <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 7029db0 commit facb87a

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

drivers/clk/at91/sama7g5.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -992,16 +992,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np)
992992
}
993993

994994
parent_names[0] = "cpupll_divpmcck";
995-
hw = at91_clk_register_master_pres(regmap, "cpuck", 1, parent_names,
996-
&mck0_layout, &mck0_characteristics,
997-
&pmc_mck0_lock,
998-
CLK_SET_RATE_PARENT, 0);
999-
if (IS_ERR(hw))
1000-
goto err_free;
1001-
1002-
sama7g5_pmc->chws[PMC_CPU] = hw;
1003-
1004-
hw = at91_clk_register_master_div(regmap, "mck0", "cpuck",
995+
hw = at91_clk_register_master_div(regmap, "mck0", "cpupll_divpmcck",
1005996
&mck0_layout, &mck0_characteristics,
1006997
&pmc_mck0_lock, CLK_GET_RATE_NOCACHE, 5);
1007998
if (IS_ERR(hw))

0 commit comments

Comments
 (0)