Re: [PATCH v2 4/6] clk: ingenic: Add JZ47xx TCU clocks driver

2018-01-02 Thread Stephen Boyd
On 01/02, Paul Cercueil wrote: > >> + goto err_free_tcu; > >> + } > >> + > >> + tcu->clocks.clk_num = nb_clks; > >> + tcu->clocks.clks = kcalloc(nb_clks, sizeof(struct clk *), > >>GFP_KERNEL); > >> + if (!tcu->clocks.clks) { > >> + pr_err("%s: cannot allocate memory\n",

Re: [PATCH v2 4/6] clk: ingenic: Add JZ47xx TCU clocks driver

2018-01-02 Thread Stephen Boyd
On 01/02, Paul Cercueil wrote: > >> + goto err_free_tcu; > >> + } > >> + > >> + tcu->clocks.clk_num = nb_clks; > >> + tcu->clocks.clks = kcalloc(nb_clks, sizeof(struct clk *), > >>GFP_KERNEL); > >> + if (!tcu->clocks.clks) { > >> + pr_err("%s: cannot allocate memory\n",

Re: [PATCH v2 4/6] clk: ingenic: Add JZ47xx TCU clocks driver

2018-01-02 Thread Paul Cercueil
Hi, [...] + +static void __init ingenic_tcu_init(struct device_node *np, + enum ingenic_version id) +{ + struct ingenic_tcu *tcu; + size_t i, nb_clks; + int ret = -ENOMEM; + + if (id >= ID_JZ4770) + nb_clks = (JZ4770_CLK_LAST -

Re: [PATCH v2 4/6] clk: ingenic: Add JZ47xx TCU clocks driver

2018-01-02 Thread Paul Cercueil
Hi, [...] + +static void __init ingenic_tcu_init(struct device_node *np, + enum ingenic_version id) +{ + struct ingenic_tcu *tcu; + size_t i, nb_clks; + int ret = -ENOMEM; + + if (id >= ID_JZ4770) + nb_clks = (JZ4770_CLK_LAST -

Re: [PATCH v2 4/6] clk: ingenic: Add JZ47xx TCU clocks driver

2018-01-02 Thread Stephen Boyd
On 01/01, Paul Cercueil wrote: > diff --git a/drivers/clk/ingenic/tcu.c b/drivers/clk/ingenic/tcu.c > new file mode 100644 > index ..36afe3f02f91 > --- /dev/null > +++ b/drivers/clk/ingenic/tcu.c > @@ -0,0 +1,336 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Ingenic JZ47xx SoC

Re: [PATCH v2 4/6] clk: ingenic: Add JZ47xx TCU clocks driver

2018-01-02 Thread Stephen Boyd
On 01/01, Paul Cercueil wrote: > diff --git a/drivers/clk/ingenic/tcu.c b/drivers/clk/ingenic/tcu.c > new file mode 100644 > index ..36afe3f02f91 > --- /dev/null > +++ b/drivers/clk/ingenic/tcu.c > @@ -0,0 +1,336 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Ingenic JZ47xx SoC

[PATCH v2 4/6] clk: ingenic: Add JZ47xx TCU clocks driver

2018-01-01 Thread Paul Cercueil
The TCU (Timer Counter Unit) of the Ingenic JZ47xx SoCs features 8 channels, each one having its own clock, that can be started and stopped, reparented, and reclocked. This driver only modifies the bits of the registers of the TCU that are related to clocks control. It provides one clock per TCU

[PATCH v2 4/6] clk: ingenic: Add JZ47xx TCU clocks driver

2018-01-01 Thread Paul Cercueil
The TCU (Timer Counter Unit) of the Ingenic JZ47xx SoCs features 8 channels, each one having its own clock, that can be started and stopped, reparented, and reclocked. This driver only modifies the bits of the registers of the TCU that are related to clocks control. It provides one clock per TCU