Optional properties:
- clocks : as described in the clock bindings
- clock-names : as described in the clock bindings
+ - fclk-enable : Bit mask to enable FCLKs in cases no proper CCF compatible
+ driver is available. Bit [0..3] correspond to FCLK0..FCLK3.
Clock inputs:
The following strings are optional parameters to the 'clock-names' property in
int ret;
struct clk *clk;
char *clk_name;
+ unsigned int fclk_enable;
const char *clk_output_name[clk_max];
const char *cpu_parents[4];
const char *periph_parents[4];
ps_clk = clk_register_fixed_rate(NULL, "ps_clk", NULL, CLK_IS_ROOT,
tmp);
+ ret = of_property_read_u32(np, "fclk-enable", &fclk_enable);
+ if (ret)
+ fclk_enable = 0;
+
/* PLLs */
clk = clk_register_zynq_pll("armpll_int", "ps_clk", SLCR_ARMPLL_CTRL,
SLCR_PLL_STATUS, 0, &armpll_lock);
clk_prepare_enable(clks[dci]);
/* Peripheral clocks */
- for (i = fclk0; i <= fclk3; i++)
+ for (i = fclk0; i <= fclk3; i++) {
zynq_clk_register_fclk(i, clk_output_name[i],
SLCR_FPGA0_CLK_CTRL + 0x10 * (i - fclk0),
periph_parents);
+ if (fclk_enable & BIT(i - fclk0)) {
+ if (clk_prepare_enable(clks[i]))
+ pr_warn("%s: FCLK%u enable failed\n",
+ __func__, i - fclk0);
+ }
+ }
+
zynq_clk_register_periph_clk(lqspi, 0, clk_output_name[lqspi], NULL,
SLCR_LQSPI_CLK_CTRL, periph_parents, 0);