Re: [PATCH v4 26/37] MIPS,clk: migrate JZ4740 to common clock framework

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

 



On Tue, May 12, 2015 at 07:52:04PM -0700, Michael Turquette wrote:
> Hi Paul,
> 
> Quoting Paul Burton (2015-04-24 06:17:26)
> > +static void __init jz4740_cgu_init(struct device_node *np)
> > +{
> > +       int retval;
> > +
> > +       cgu = ingenic_cgu_new(jz4740_cgu_clocks,
> > +                             ARRAY_SIZE(jz4740_cgu_clocks), np);
> > +       if (!cgu) {
> > +               pr_err("%s: failed to initialise CGU\n", __func__);
> > +               return;
> > +       }
> > +
> > +       retval = ingenic_cgu_register_clocks(cgu);
> > +       if (retval)
> > +               pr_err("%s: failed to register CGU Clocks\n", __func__);
> > +}
> > +CLK_OF_DECLARE(jz4740_cgu, "ingenic,jz4740-cgu", jz4740_cgu_init);
> > -- 
> > 2.3.5
> > 
> 
> Patch looks good to me, but I have one question. Is it possible for you
> to have a proper platform_device for the cgu instead of relying on
> CLK_OF_DECLARE?
> 
> For an example of a clock driver that does this, check out the bottom of
> drivers/clk/qcom/gcc-msm8660.c.
> 
> Regards,
> Mike

Hi Mike,

Thanks for your review. I gave that a try but unfortunately it didn't
work out because the code in plat_time_init (arch/mips/jz4740/time.c)
needs to obtain the rate of the ext clock at a point before any
initcalls have been run, and therefore before the platform device has
been registered.

Thanks,
    Paul

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux