Re: [PATCH 5/6] clk: samsung: exynos850: Register clocks early

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 22 Nov 2021 at 12:00, Sylwester Nawrocki <s.nawrocki@xxxxxxxxxxx> wrote:
>
> On 22.11.2021 00:27, Sam Protsenko wrote:
> > /* Register Offset definitions for CMU_CORE (0x12000000) */
> > @@ -1014,24 +1060,12 @@ static int __init exynos850_cmu_probe(struct platform_device *pdev)
> >  {
> >       const struct samsung_cmu_info *info;
> >       struct device *dev = &pdev->dev;
> > -     struct device_node *np = dev->of_node;
> >
> >       info = of_device_get_match_data(dev);
> > -     exynos850_init_clocks(np, info->clk_regs, info->nr_clk_regs);
> > -     samsung_cmu_register_one(np, info);
> >
> > -     /* Keep bus clock running, so it's possible to access CMU registers */
> > -     if (info->clk_name) {
> > -             struct clk *bus_clk;
> > -
> > -             bus_clk = clk_get(dev, info->clk_name);
> > -             if (IS_ERR(bus_clk)) {
> > -                     pr_err("%s: could not find bus clock %s; err = %ld\n",
> > -                            __func__, info->clk_name, PTR_ERR(bus_clk));
> > -             } else {
> > -                     clk_prepare_enable(bus_clk);
> > -             }
> > -     }
>
>
> > +     /* Early clocks are already registered using CLK_OF_DECLARE_DRIVER() */
> > +     if (info != &peri_cmu_info)
> > +             exynos850_register_cmu(dev, dev->of_node, info);
> >
>
> Do you still need this test? How about just removing "samsung,exynos850-cmu-peri"
> from exynos850_cmu_of_match[] ?
>

It'll be needed later, when I get to adding PM ops to platform driver,
as CMU_PERI is part of Power Domains. But you are right, it's not
needed right now. Will re-send this patch separately soon.

> --
> Regards,
> Sylwester



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux