提交 bddbd134 编写于 作者: M Mike Turquette

Merge tag 'zynq-clk-for-3.12' of git://git.xilinx.com/linux-xlnx into clk-next

arm: Xilinx Zynq clock changes for v3.12

Just small two changes where the first fixes
documentation and the second improves
code readability.
...@@ -50,6 +50,9 @@ struct zynq_pll { ...@@ -50,6 +50,9 @@ struct zynq_pll {
#define PLLCTRL_RESET_MASK 1 #define PLLCTRL_RESET_MASK 1
#define PLLCTRL_RESET_SHIFT 0 #define PLLCTRL_RESET_SHIFT 0
#define PLL_FBDIV_MIN 13
#define PLL_FBDIV_MAX 66
/** /**
* zynq_pll_round_rate() - Round a clock frequency * zynq_pll_round_rate() - Round a clock frequency
* @hw: Handle between common and hardware-specific interfaces * @hw: Handle between common and hardware-specific interfaces
...@@ -63,10 +66,10 @@ static long zynq_pll_round_rate(struct clk_hw *hw, unsigned long rate, ...@@ -63,10 +66,10 @@ static long zynq_pll_round_rate(struct clk_hw *hw, unsigned long rate,
u32 fbdiv; u32 fbdiv;
fbdiv = DIV_ROUND_CLOSEST(rate, *prate); fbdiv = DIV_ROUND_CLOSEST(rate, *prate);
if (fbdiv < 13) if (fbdiv < PLL_FBDIV_MIN)
fbdiv = 13; fbdiv = PLL_FBDIV_MIN;
else if (fbdiv > 66) else if (fbdiv > PLL_FBDIV_MAX)
fbdiv = 66; fbdiv = PLL_FBDIV_MAX;
return *prate * fbdiv; return *prate * fbdiv;
} }
...@@ -182,7 +185,13 @@ static const struct clk_ops zynq_pll_ops = { ...@@ -182,7 +185,13 @@ static const struct clk_ops zynq_pll_ops = {
/** /**
* clk_register_zynq_pll() - Register PLL with the clock framework * clk_register_zynq_pll() - Register PLL with the clock framework
* @np Pointer to the DT device node * @name PLL name
* @parent Parent clock name
* @pll_ctrl Pointer to PLL control register
* @pll_status Pointer to PLL status register
* @lock_index Bit index to this PLL's lock status bit in @pll_status
* @lock Register lock
* Returns handle to the registered clock.
*/ */
struct clk *clk_register_zynq_pll(const char *name, const char *parent, struct clk *clk_register_zynq_pll(const char *name, const char *parent,
void __iomem *pll_ctrl, void __iomem *pll_status, u8 lock_index, void __iomem *pll_ctrl, void __iomem *pll_status, u8 lock_index,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册