lkml.org 
[lkml]   [2019]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] firmware: imx: Add support to start/stop a CPU
On Wed, Jan 30, 2019 at 9:12 PM Daniel Baluta <daniel.baluta@nxp.com> wrote:
>
> Thanks Aisheng for the comments!
>
> <snip>
>
> +int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource,
> > > + bool enable, u64 address)
> > > +{
> > > + struct imx_sc_msg_req_cpu_start msg;
> > > + struct imx_sc_rpc_msg *hdr = &msg.hdr;
> > > +
> > > + hdr->ver = IMX_SC_RPC_VERSION;
> > > + hdr->svc = (uint8_t)IMX_SC_RPC_SVC_PM;
> > > + hdr->func = (uint8_t)IMX_SC_PM_FUNC_CPU_START;
> >
> > pls drop the unneccesary unit8_t
>
> Ok, I can do that. I had borrowed it from the already existing
> functions imx_sc_misc_get_control / imx_sc_misc_set_control
>

Yes, i know, we need remove them later to avoid confusing.

Regards
Dong Aisheng

> >
> > > + hdr->size = 4;
> > > +
> > > + msg.address_hi = address >> 32;
> > > + msg.address_lo = address;
> > > + msg.resource = resource;
> > > + msg.enable = enable;
> > > +
> > > + return imx_scu_call_rpc(ipc, &msg, false);
> >
> > s/false/true
>
> Nice catch!
>
> Inded, the old API had a different semantic for this parameter.
> >
> > > +}
> > > +EXPORT_SYMBOL(imx_sc_pm_cpu_start);
> > > diff --git a/include/linux/firmware/imx/svc/misc.h
> > > b/include/linux/firmware/imx/svc/misc.h
> > > index e21c49aba92f..c03bf2a23add 100644
> > > --- a/include/linux/firmware/imx/svc/misc.h
> > > +++ b/include/linux/firmware/imx/svc/misc.h
> > > @@ -52,4 +52,7 @@ int imx_sc_misc_set_control(struct imx_sc_ipc
> > > *ipc, u32 resource,
> > > int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
> > > u8 ctrl, u32 *val);
> > >
> > > +int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource,
> > > + bool enable, u64 address);
> >
> > Nitpick: phy_addr
>
> Ok, will fix.
>
>

\
 
 \ /
  Last update: 2019-01-30 14:15    [W:0.038 / U:3.044 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site