val = readl(socfpgaclk->div_reg) >> socfpgaclk->shift;
val &= GENMASK(socfpgaclk->width - 1, 0);
/* Check for GPIO_DB_CLK by its offset */
---- if ((int) socfpgaclk->div_reg & SOCFPGA_GPIO_DB_CLK_OFFSET)
++++ if ((uintptr_t) socfpgaclk->div_reg & SOCFPGA_GPIO_DB_CLK_OFFSET)
div = val + 1;
else
div = (1 << val);
u32 div_reg[3];
u32 clk_phase[2];
u32 fixed_div;
-- -- struct clk *clk;
++ ++ struct clk_hw *hw_clk;
struct socfpga_gate_clk *socfpga_clk;
const char *clk_name = node->name;
const char *parent_name[SOCFPGA_MAX_PARENTS];
struct clk_init_data init;
struct clk_ops *ops;
int rc;
++ ++ int err;
socfpga_clk = kzalloc(sizeof(*socfpga_clk), GFP_KERNEL);
if (WARN_ON(!socfpga_clk))
init.parent_names = parent_name;
socfpga_clk->hw.hw.init = &init;
-- -- clk = clk_register(NULL, &socfpga_clk->hw.hw);
-- -- if (WARN_ON(IS_ERR(clk))) {
++ ++ hw_clk = &socfpga_clk->hw.hw;
++ ++
++ ++ err = clk_hw_register(NULL, hw_clk);
++ ++ if (err) {
kfree(socfpga_clk);
return;
}
-- -- rc = of_clk_add_provider(node, of_clk_src_simple_get, clk);
++ ++ rc = of_clk_add_provider(node, of_clk_src_simple_get, hw_clk);
if (WARN_ON(rc))
return;
}