Skip to content

Commit f68cbb3

Browse files
Sowjanya Komatinenithierryreding
authored andcommitted
clk: tegra: Use fence_udelay() during PLLU init
This patch uses fence_udelay rather than udelay during PLLU initialization to ensure writes to clock registers happens before waiting for specified delay. Acked-by: Thierry Reding <[email protected]> Signed-off-by: Sowjanya Komatineni <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent a99d744 commit f68cbb3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/clk/tegra/clk-tegra210.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2842,15 +2842,15 @@ static int tegra210_enable_pllu(void)
28422842
reg = readl_relaxed(clk_base + pllu.params->ext_misc_reg[0]);
28432843
reg &= ~BIT(pllu.params->iddq_bit_idx);
28442844
writel_relaxed(reg, clk_base + pllu.params->ext_misc_reg[0]);
2845-
udelay(5);
2845+
fence_udelay(5, clk_base);
28462846

28472847
reg = readl_relaxed(clk_base + PLLU_BASE);
28482848
reg &= ~GENMASK(20, 0);
28492849
reg |= fentry->m;
28502850
reg |= fentry->n << 8;
28512851
reg |= fentry->p << 16;
28522852
writel(reg, clk_base + PLLU_BASE);
2853-
udelay(1);
2853+
fence_udelay(1, clk_base);
28542854
reg |= PLL_ENABLE;
28552855
writel(reg, clk_base + PLLU_BASE);
28562856

@@ -2896,12 +2896,12 @@ static int tegra210_init_pllu(void)
28962896
reg = readl_relaxed(clk_base + XUSB_PLL_CFG0);
28972897
reg &= ~XUSB_PLL_CFG0_PLLU_LOCK_DLY_MASK;
28982898
writel_relaxed(reg, clk_base + XUSB_PLL_CFG0);
2899-
udelay(1);
2899+
fence_udelay(1, clk_base);
29002900

29012901
reg = readl_relaxed(clk_base + PLLU_HW_PWRDN_CFG0);
29022902
reg |= PLLU_HW_PWRDN_CFG0_SEQ_ENABLE;
29032903
writel_relaxed(reg, clk_base + PLLU_HW_PWRDN_CFG0);
2904-
udelay(1);
2904+
fence_udelay(1, clk_base);
29052905

29062906
reg = readl_relaxed(clk_base + PLLU_BASE);
29072907
reg &= ~PLLU_BASE_CLKENABLE_USB;

0 commit comments

Comments
 (0)