Re: [PATCH v7 4/5] remoteproc: ingenic: Added remoteproc driver

From: Bjorn Andersson
Date: Sun Jun 21 2020 - 15:33:13 EST


On Fri 12 Jun 04:47 PDT 2020, Paul Cercueil wrote:
> Le jeu. 11 juin 2020 à 19:21, Suman Anna <s-anna@xxxxxx> a écrit :
> > On 6/11/20 5:21 PM, Paul Cercueil wrote:
> > > Le jeu. 11 juin 2020 à 16:47, Suman Anna <s-anna@xxxxxx> a écrit :
> > > > On 5/15/20 5:43 AM, Paul Cercueil wrote:
[..]
> > > > > diff --git a/drivers/remoteproc/ingenic_rproc.c
> > > > > b/drivers/remoteproc/ingenic_rproc.c
[..]
> > > > > + /* The clocks must be enabled for the firmware to be
> > > > > loaded in TCSM */
> > > > > + ret = clk_bulk_prepare_enable(ARRAY_SIZE(vpu->clks),
> > > > > vpu->clks);
> > > > > + if (ret) {
> > > > > + dev_err(dev, "Unable to start clocks\n");
> > > > > + return ret;
> > > > > + }
> > > >
> > > > You are enabling the clocks directly here and also trying to
> > > > manage them through pm_runtime callbacks again.
> > >
> > > Yes. The clocks need to be enabled in the probe.
> >
> > For the preferred non CONFIG_PM case now and lack of
> > prepare/unprepare().
>
> I want to make it clear that I'm not against having .prepare/.unprepare, but
> I want to see what maintainers have to say.
>

I think it's perfectly reasonable to enable all the resources here and
then if CONFIG_PM isn't set you just leave them enabled throughout.

Regards,
Bjorn