Merge branches 'clk-doc', 'clk-more-critical', 'clk-meson' and 'clk-basic-be' into clk-next
- Remove clk_readl() and introduce BE versions of basic clk types * clk-doc: clk: Drop duplicate clk_register() documentation clk: Document and simplify clk_core_get_rate_nolock() clk: Remove 'flags' member of struct clk_fixed_rate clk: nxp: Drop 'flags' on fixed_rate clk macro clk: Document __clk_mux_determine_rate() clk: Document CLK_MUX_READ_ONLY mux flag clk: Document deprecated things clk: Collapse gpio clk kerneldoc * clk-more-critical: clk: highbank: Convert to CLK_IS_CRITICAL * clk-meson: (21 commits) clk: meson: axg-audio: add g12a support clk: meson: axg-audio: don't register inputs in the onecell data clk: meson: axg_audio: replace prefix axg by aud dt-bindings: clk: axg-audio: add g12a support clk: meson: meson8b: add the video decoder clock trees clk: meson: meson8b: add the VPU clock trees clk: meson: meson8b: add support for the GP_PLL clock on Meson8m2 clk: meson: meson8b: use a separate clock table for Meson8m2 dt-bindings: clock: meson8b: export the video decoder clocks clk: meson-g12a: add video decoder clocks dt-bindings: clock: meson8b: export the VPU clock clk: meson-g12a: add PCIE PLL clocks dt-bindings: clock: g12a-aoclk: expose CLKID_AO_CTS_OSCIN clk: meson-pll: add reduced specific clk_ops for G12A PCIe PLL dt-bindings: clock: meson8b: drop the "ABP" clock definition clk: meson: g12a: add cpu clocks dt-bindings: clk: g12a-clkc: add VDEC clock IDs dt-bindings: clock: axg-audio: unexpose controller inputs dt-bindings: clk: g12a-clkc: add PCIE PLL clock ID clk: g12a-aoclk: re-export CLKID_AO_SAR_ADC_SEL clock id ... * clk-basic-be: clk: core: replace clk_{readl,writel} with {readl,writel} clk: core: remove powerpc special handling powerpc/512x: mark clocks as big endian clk: mux: add explicit big endian support clk: multiplier: add explicit big endian support clk: gate: add explicit big endian support clk: fractional-divider: add explicit big endian support clk: divider: add explicit big endian support
This commit is contained in:
@@ -142,7 +142,7 @@ static int lpc18xx_ccu_gate_endisable(struct clk_hw *hw, bool enable)
|
||||
* Divider field is write only, so divider stat field must
|
||||
* be read so divider field can be set accordingly.
|
||||
*/
|
||||
val = clk_readl(gate->reg);
|
||||
val = readl(gate->reg);
|
||||
if (val & LPC18XX_CCU_DIVSTAT)
|
||||
val |= LPC18XX_CCU_DIV;
|
||||
|
||||
@@ -155,12 +155,12 @@ static int lpc18xx_ccu_gate_endisable(struct clk_hw *hw, bool enable)
|
||||
* and the next write should clear the RUN bit.
|
||||
*/
|
||||
val |= LPC18XX_CCU_AUTO;
|
||||
clk_writel(val, gate->reg);
|
||||
writel(val, gate->reg);
|
||||
|
||||
val &= ~LPC18XX_CCU_RUN;
|
||||
}
|
||||
|
||||
clk_writel(val, gate->reg);
|
||||
writel(val, gate->reg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -352,9 +352,9 @@ static unsigned long lpc18xx_pll0_recalc_rate(struct clk_hw *hw,
|
||||
struct lpc18xx_pll *pll = to_lpc_pll(hw);
|
||||
u32 ctrl, mdiv, msel, npdiv;
|
||||
|
||||
ctrl = clk_readl(pll->reg + LPC18XX_CGU_PLL0USB_CTRL);
|
||||
mdiv = clk_readl(pll->reg + LPC18XX_CGU_PLL0USB_MDIV);
|
||||
npdiv = clk_readl(pll->reg + LPC18XX_CGU_PLL0USB_NP_DIV);
|
||||
ctrl = readl(pll->reg + LPC18XX_CGU_PLL0USB_CTRL);
|
||||
mdiv = readl(pll->reg + LPC18XX_CGU_PLL0USB_MDIV);
|
||||
npdiv = readl(pll->reg + LPC18XX_CGU_PLL0USB_NP_DIV);
|
||||
|
||||
if (ctrl & LPC18XX_PLL0_CTRL_BYPASS)
|
||||
return parent_rate;
|
||||
@@ -415,25 +415,25 @@ static int lpc18xx_pll0_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
m |= lpc18xx_pll0_msel2seli(m) << LPC18XX_PLL0_MDIV_SELI_SHIFT;
|
||||
|
||||
/* Power down PLL, disable clk output and dividers */
|
||||
ctrl = clk_readl(pll->reg + LPC18XX_CGU_PLL0USB_CTRL);
|
||||
ctrl = readl(pll->reg + LPC18XX_CGU_PLL0USB_CTRL);
|
||||
ctrl |= LPC18XX_PLL0_CTRL_PD;
|
||||
ctrl &= ~(LPC18XX_PLL0_CTRL_BYPASS | LPC18XX_PLL0_CTRL_DIRECTI |
|
||||
LPC18XX_PLL0_CTRL_DIRECTO | LPC18XX_PLL0_CTRL_CLKEN);
|
||||
clk_writel(ctrl, pll->reg + LPC18XX_CGU_PLL0USB_CTRL);
|
||||
writel(ctrl, pll->reg + LPC18XX_CGU_PLL0USB_CTRL);
|
||||
|
||||
/* Configure new PLL settings */
|
||||
clk_writel(m, pll->reg + LPC18XX_CGU_PLL0USB_MDIV);
|
||||
clk_writel(LPC18XX_PLL0_NP_DIVS_1, pll->reg + LPC18XX_CGU_PLL0USB_NP_DIV);
|
||||
writel(m, pll->reg + LPC18XX_CGU_PLL0USB_MDIV);
|
||||
writel(LPC18XX_PLL0_NP_DIVS_1, pll->reg + LPC18XX_CGU_PLL0USB_NP_DIV);
|
||||
|
||||
/* Power up PLL and wait for lock */
|
||||
ctrl &= ~LPC18XX_PLL0_CTRL_PD;
|
||||
clk_writel(ctrl, pll->reg + LPC18XX_CGU_PLL0USB_CTRL);
|
||||
writel(ctrl, pll->reg + LPC18XX_CGU_PLL0USB_CTRL);
|
||||
do {
|
||||
udelay(10);
|
||||
stat = clk_readl(pll->reg + LPC18XX_CGU_PLL0USB_STAT);
|
||||
stat = readl(pll->reg + LPC18XX_CGU_PLL0USB_STAT);
|
||||
if (stat & LPC18XX_PLL0_STAT_LOCK) {
|
||||
ctrl |= LPC18XX_PLL0_CTRL_CLKEN;
|
||||
clk_writel(ctrl, pll->reg + LPC18XX_CGU_PLL0USB_CTRL);
|
||||
writel(ctrl, pll->reg + LPC18XX_CGU_PLL0USB_CTRL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -458,8 +458,8 @@ static unsigned long lpc18xx_pll1_recalc_rate(struct clk_hw *hw,
|
||||
bool direct, fbsel;
|
||||
u32 stat, ctrl;
|
||||
|
||||
stat = clk_readl(pll->reg + LPC18XX_CGU_PLL1_STAT);
|
||||
ctrl = clk_readl(pll->reg + LPC18XX_CGU_PLL1_CTRL);
|
||||
stat = readl(pll->reg + LPC18XX_CGU_PLL1_STAT);
|
||||
ctrl = readl(pll->reg + LPC18XX_CGU_PLL1_CTRL);
|
||||
|
||||
direct = (ctrl & LPC18XX_PLL1_CTRL_DIRECT) ? true : false;
|
||||
fbsel = (ctrl & LPC18XX_PLL1_CTRL_FBSEL) ? true : false;
|
||||
|
@@ -1085,13 +1085,12 @@ struct clk_hw_proto {
|
||||
};
|
||||
};
|
||||
|
||||
#define LPC32XX_DEFINE_FIXED(_idx, _rate, _flags) \
|
||||
#define LPC32XX_DEFINE_FIXED(_idx, _rate) \
|
||||
[CLK_PREFIX(_idx)] = { \
|
||||
.type = CLK_FIXED, \
|
||||
{ \
|
||||
.f = { \
|
||||
.fixed_rate = (_rate), \
|
||||
.flags = (_flags), \
|
||||
}, \
|
||||
}, \
|
||||
}
|
||||
@@ -1225,7 +1224,7 @@ struct clk_hw_proto {
|
||||
}
|
||||
|
||||
static struct clk_hw_proto clk_hw_proto[LPC32XX_CLK_HW_MAX] = {
|
||||
LPC32XX_DEFINE_FIXED(RTC, 32768, 0),
|
||||
LPC32XX_DEFINE_FIXED(RTC, 32768),
|
||||
LPC32XX_DEFINE_PLL(PLL397X, pll_397x, HCLKPLL_CTRL, BIT(1)),
|
||||
LPC32XX_DEFINE_PLL(HCLK_PLL, hclk_pll, HCLKPLL_CTRL, PLL_CTRL_ENABLE),
|
||||
LPC32XX_DEFINE_PLL(USB_PLL, usb_pll, USB_CTRL, PLL_CTRL_ENABLE),
|
||||
@@ -1468,7 +1467,7 @@ static struct clk * __init lpc32xx_clk_register(u32 id)
|
||||
struct clk_fixed_rate *fixed = &clk_hw->f;
|
||||
|
||||
clk = clk_register_fixed_rate(NULL, lpc32xx_clk->name,
|
||||
parents[0], fixed->flags, fixed->fixed_rate);
|
||||
parents[0], 0, fixed->fixed_rate);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Fai riferimento in un nuovo problema
Block a user