mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 20:46:48 +02:00
clk: mediatek: clk-pll: Add set/clr regs for shared PLL enable control
On MT8196, there are set/clr registers to control a shared PLL enable register. These are intended to prevent different masters from manipulating the PLLs independently. Add the corresponding en_set_reg and en_clr_reg fields to the mtk_pll_data structure. Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: Laura Nao <laura.nao@collabora.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
5e121370a7
commit
aee9ffa010
|
|
@ -308,6 +308,10 @@ struct clk_hw *mtk_clk_register_pll_ops(struct mtk_clk_pll *pll,
|
|||
pll->en_addr = base + data->en_reg;
|
||||
else
|
||||
pll->en_addr = pll->base_addr + REG_CON0;
|
||||
if (data->en_set_reg)
|
||||
pll->en_set_addr = base + data->en_set_reg;
|
||||
if (data->en_clr_reg)
|
||||
pll->en_clr_addr = base + data->en_clr_reg;
|
||||
pll->hw.init = &init;
|
||||
pll->data = data;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ struct mtk_pll_data {
|
|||
const struct mtk_pll_div_table *div_table;
|
||||
const char *parent_name;
|
||||
u32 en_reg;
|
||||
u32 en_set_reg;
|
||||
u32 en_clr_reg;
|
||||
u8 pll_en_bit; /* Assume 0, indicates BIT(0) by default */
|
||||
u8 pcw_chg_bit;
|
||||
};
|
||||
|
|
@ -68,6 +70,8 @@ struct mtk_clk_pll {
|
|||
void __iomem *pcw_addr;
|
||||
void __iomem *pcw_chg_addr;
|
||||
void __iomem *en_addr;
|
||||
void __iomem *en_set_addr;
|
||||
void __iomem *en_clr_addr;
|
||||
const struct mtk_pll_data *data;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user