[PATCH v9 5/9] clk: mmp: Add Marvell PXA1908 clock driver

Stephen Boyd sboyd at kernel.org
Thu Apr 11 01:00:13 PDT 2024


Quoting Duje Mihanović (2024-04-02 13:55:41)
> diff --git a/drivers/clk/mmp/clk-of-pxa1908.c b/drivers/clk/mmp/clk-of-pxa1908.c
> new file mode 100644
> index 000000000000..6f1f6e25a718
> --- /dev/null
> +++ b/drivers/clk/mmp/clk-of-pxa1908.c
> @@ -0,0 +1,328 @@
> +// SPDX-License-Identifier: GPL-2.0-only
[...]
> +static void __init pxa1908_apbc_clk_init(struct device_node *np)
> +{
> +       struct pxa1908_clk_unit *pxa_unit;
> +
> +       pxa_unit = kzalloc(sizeof(*pxa_unit), GFP_KERNEL);
> +       if (!pxa_unit)
> +               return;
> +
> +       pxa_unit->apbc_base = of_iomap(np, 0);
> +       if (!pxa_unit->apbc_base) {
> +               pr_err("failed to map apbc registers\n");
> +               kfree(pxa_unit);
> +               return;
> +       }
> +
> +       mmp_clk_init(np, &pxa_unit->unit, APBC_NR_CLKS);
> +
> +       pxa1908_apb_periph_clk_init(pxa_unit);
> +}
> +CLK_OF_DECLARE(pxa1908_apbc, "marvell,pxa1908-apbc", pxa1908_apbc_clk_init);

Is there a reason this file can't be a platform driver?



More information about the linux-arm-kernel mailing list