clk: socfpga: add divider registers to the main pll outputs
The C0(mpu_clk), C1(main_clk), and C2(dbg_base_clk) outputs from the main PLL go through a pre-divider before coming into the system. These registers were hidden for the CycloneV platform, but are now used for the ArriaV platform. This patch updates the clock driver to read the div-reg property for the socfpga-periph-clk clocks. Also moves the div_mask define to clk.h for re-use. Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#define CLKMGR_PERPLL_SRC 0xAC
|
||||
|
||||
#define SOCFPGA_MAX_PARENTS 3
|
||||
#define div_mask(width) ((1 << (width)) - 1)
|
||||
|
||||
extern void __iomem *clk_mgr_base_addr;
|
||||
|
||||
@@ -52,6 +53,9 @@ struct socfpga_periph_clk {
|
||||
struct clk_gate hw;
|
||||
char *parent_name;
|
||||
u32 fixed_div;
|
||||
void __iomem *div_reg;
|
||||
u32 width; /* only valid if div_reg != 0 */
|
||||
u32 shift; /* only valid if div_reg != 0 */
|
||||
};
|
||||
|
||||
#endif /* SOCFPGA_CLK_H */
|
||||
|
Reference in New Issue
Block a user