* [PATCH v2] firmware: imx: Add support to start/stop a CPU
@ 2019-01-30 9:58 ` Daniel Baluta
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Baluta @ 2019-01-30 9:58 UTC (permalink / raw)
To: shawnguo
Cc: s.hauer, kernel, festevam, dl-linux-imx, daniel.baluta,
Aisheng Dong, linux-arm-kernel, linux-kernel, S.j. Wang,
Daniel Baluta
This is done via RPC call to SCU.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
Changes since v1:
- remove unused variable ret
- add documentation for imx_sc_pm_cpu_start function
drivers/firmware/imx/misc.c | 38 +++++++++++++++++++++++++++
include/linux/firmware/imx/svc/misc.h | 3 +++
2 files changed, 41 insertions(+)
diff --git a/drivers/firmware/imx/misc.c b/drivers/firmware/imx/misc.c
index 97f5424dbac9..f511d6f624fd 100644
--- a/drivers/firmware/imx/misc.c
+++ b/drivers/firmware/imx/misc.c
@@ -18,6 +18,14 @@ struct imx_sc_msg_req_misc_set_ctrl {
u16 resource;
} __packed;
+struct imx_sc_msg_req_cpu_start {
+ struct imx_sc_rpc_msg hdr;
+ u32 address_hi;
+ u32 address_lo;
+ u16 resource;
+ u8 enable;
+} __packed;
+
struct imx_sc_msg_req_misc_get_ctrl {
struct imx_sc_rpc_msg hdr;
u32 ctrl;
@@ -97,3 +105,33 @@ int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
return 0;
}
EXPORT_SYMBOL(imx_sc_misc_get_control);
+
+/*
+ * This function starts/stops a CPU identified by @resource
+ *
+ * @param[in] ipc IPC handle
+ * @param[in] resource resource the control is associated with
+ * @param[in] enable true for start, false for stop
+ * @param[out] address initial instruction address to be executed
+ *
+ * @return Returns 0 for success and < 0 for errors.
+ */
+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;
+ 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);
+}
+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);
+
#endif /* _SC_MISC_API_H */
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2] firmware: imx: Add support to start/stop a CPU
@ 2019-01-30 9:58 ` Daniel Baluta
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Baluta @ 2019-01-30 9:58 UTC (permalink / raw)
To: shawnguo
Cc: Aisheng Dong, daniel.baluta, Daniel Baluta, s.hauer,
linux-kernel, dl-linux-imx, kernel, festevam, S.j. Wang,
linux-arm-kernel
This is done via RPC call to SCU.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
Changes since v1:
- remove unused variable ret
- add documentation for imx_sc_pm_cpu_start function
drivers/firmware/imx/misc.c | 38 +++++++++++++++++++++++++++
include/linux/firmware/imx/svc/misc.h | 3 +++
2 files changed, 41 insertions(+)
diff --git a/drivers/firmware/imx/misc.c b/drivers/firmware/imx/misc.c
index 97f5424dbac9..f511d6f624fd 100644
--- a/drivers/firmware/imx/misc.c
+++ b/drivers/firmware/imx/misc.c
@@ -18,6 +18,14 @@ struct imx_sc_msg_req_misc_set_ctrl {
u16 resource;
} __packed;
+struct imx_sc_msg_req_cpu_start {
+ struct imx_sc_rpc_msg hdr;
+ u32 address_hi;
+ u32 address_lo;
+ u16 resource;
+ u8 enable;
+} __packed;
+
struct imx_sc_msg_req_misc_get_ctrl {
struct imx_sc_rpc_msg hdr;
u32 ctrl;
@@ -97,3 +105,33 @@ int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
return 0;
}
EXPORT_SYMBOL(imx_sc_misc_get_control);
+
+/*
+ * This function starts/stops a CPU identified by @resource
+ *
+ * @param[in] ipc IPC handle
+ * @param[in] resource resource the control is associated with
+ * @param[in] enable true for start, false for stop
+ * @param[out] address initial instruction address to be executed
+ *
+ * @return Returns 0 for success and < 0 for errors.
+ */
+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;
+ 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);
+}
+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);
+
#endif /* _SC_MISC_API_H */
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] firmware: imx: Add support to start/stop a CPU
2019-01-30 9:58 ` Daniel Baluta
@ 2019-01-30 12:46 ` Dong Aisheng
-1 siblings, 0 replies; 8+ messages in thread
From: Dong Aisheng @ 2019-01-30 12:46 UTC (permalink / raw)
To: Daniel Baluta
Cc: shawnguo, s.hauer, kernel, festevam, dl-linux-imx, daniel.baluta,
Aisheng Dong, linux-arm-kernel, linux-kernel, S.j. Wang
On Wed, Jan 30, 2019 at 5:59 PM Daniel Baluta <daniel.baluta@nxp.com> wrote:
>
> This is done via RPC call to SCU.
>
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
> Changes since v1:
> - remove unused variable ret
> - add documentation for imx_sc_pm_cpu_start function
>
> drivers/firmware/imx/misc.c | 38 +++++++++++++++++++++++++++
> include/linux/firmware/imx/svc/misc.h | 3 +++
> 2 files changed, 41 insertions(+)
>
> diff --git a/drivers/firmware/imx/misc.c b/drivers/firmware/imx/misc.c
> index 97f5424dbac9..f511d6f624fd 100644
> --- a/drivers/firmware/imx/misc.c
> +++ b/drivers/firmware/imx/misc.c
> @@ -18,6 +18,14 @@ struct imx_sc_msg_req_misc_set_ctrl {
> u16 resource;
> } __packed;
>
> +struct imx_sc_msg_req_cpu_start {
> + struct imx_sc_rpc_msg hdr;
> + u32 address_hi;
> + u32 address_lo;
> + u16 resource;
> + u8 enable;
> +} __packed;
> +
> struct imx_sc_msg_req_misc_get_ctrl {
> struct imx_sc_rpc_msg hdr;
> u32 ctrl;
> @@ -97,3 +105,33 @@ int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
> return 0;
> }
> EXPORT_SYMBOL(imx_sc_misc_get_control);
> +
> +/*
> + * This function starts/stops a CPU identified by @resource
> + *
> + * @param[in] ipc IPC handle
> + * @param[in] resource resource the control is associated with
> + * @param[in] enable true for start, false for stop
> + * @param[out] address initial instruction address to be executed
> + *
> + * @return Returns 0 for success and < 0 for errors.
> + */
> +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
> + 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
> +}
> +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
Otherwise, looks good to me.
Regards
Dong Aisheng
> +
> #endif /* _SC_MISC_API_H */
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] firmware: imx: Add support to start/stop a CPU
@ 2019-01-30 12:46 ` Dong Aisheng
0 siblings, 0 replies; 8+ messages in thread
From: Dong Aisheng @ 2019-01-30 12:46 UTC (permalink / raw)
To: Daniel Baluta
Cc: Aisheng Dong, daniel.baluta, shawnguo, s.hauer, linux-kernel,
dl-linux-imx, kernel, festevam, S.j. Wang, linux-arm-kernel
On Wed, Jan 30, 2019 at 5:59 PM Daniel Baluta <daniel.baluta@nxp.com> wrote:
>
> This is done via RPC call to SCU.
>
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
> Changes since v1:
> - remove unused variable ret
> - add documentation for imx_sc_pm_cpu_start function
>
> drivers/firmware/imx/misc.c | 38 +++++++++++++++++++++++++++
> include/linux/firmware/imx/svc/misc.h | 3 +++
> 2 files changed, 41 insertions(+)
>
> diff --git a/drivers/firmware/imx/misc.c b/drivers/firmware/imx/misc.c
> index 97f5424dbac9..f511d6f624fd 100644
> --- a/drivers/firmware/imx/misc.c
> +++ b/drivers/firmware/imx/misc.c
> @@ -18,6 +18,14 @@ struct imx_sc_msg_req_misc_set_ctrl {
> u16 resource;
> } __packed;
>
> +struct imx_sc_msg_req_cpu_start {
> + struct imx_sc_rpc_msg hdr;
> + u32 address_hi;
> + u32 address_lo;
> + u16 resource;
> + u8 enable;
> +} __packed;
> +
> struct imx_sc_msg_req_misc_get_ctrl {
> struct imx_sc_rpc_msg hdr;
> u32 ctrl;
> @@ -97,3 +105,33 @@ int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
> return 0;
> }
> EXPORT_SYMBOL(imx_sc_misc_get_control);
> +
> +/*
> + * This function starts/stops a CPU identified by @resource
> + *
> + * @param[in] ipc IPC handle
> + * @param[in] resource resource the control is associated with
> + * @param[in] enable true for start, false for stop
> + * @param[out] address initial instruction address to be executed
> + *
> + * @return Returns 0 for success and < 0 for errors.
> + */
> +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
> + 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
> +}
> +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
Otherwise, looks good to me.
Regards
Dong Aisheng
> +
> #endif /* _SC_MISC_API_H */
> --
> 2.17.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] firmware: imx: Add support to start/stop a CPU
2019-01-30 12:46 ` Dong Aisheng
@ 2019-01-30 13:12 ` Daniel Baluta
-1 siblings, 0 replies; 8+ messages in thread
From: Daniel Baluta @ 2019-01-30 13:12 UTC (permalink / raw)
To: dongas86
Cc: dl-linux-imx, Aisheng Dong, linux-kernel, daniel.baluta,
festevam, shawnguo, linux-arm-kernel, S.j. Wang, kernel, s.hauer
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
>
> > + 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] firmware: imx: Add support to start/stop a CPU
@ 2019-01-30 13:12 ` Daniel Baluta
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Baluta @ 2019-01-30 13:12 UTC (permalink / raw)
To: dongas86
Cc: Aisheng Dong, daniel.baluta, festevam, S.j. Wang, linux-kernel,
dl-linux-imx, kernel, shawnguo, s.hauer, linux-arm-kernel
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
>
> > + 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.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] firmware: imx: Add support to start/stop a CPU
2019-01-30 13:12 ` Daniel Baluta
@ 2019-01-30 13:14 ` Dong Aisheng
-1 siblings, 0 replies; 8+ messages in thread
From: Dong Aisheng @ 2019-01-30 13:14 UTC (permalink / raw)
To: Daniel Baluta
Cc: dl-linux-imx, Aisheng Dong, linux-kernel, daniel.baluta,
festevam, shawnguo, linux-arm-kernel, S.j. Wang, kernel, s.hauer
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.
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] firmware: imx: Add support to start/stop a CPU
@ 2019-01-30 13:14 ` Dong Aisheng
0 siblings, 0 replies; 8+ messages in thread
From: Dong Aisheng @ 2019-01-30 13:14 UTC (permalink / raw)
To: Daniel Baluta
Cc: Aisheng Dong, daniel.baluta, festevam, S.j. Wang, linux-kernel,
dl-linux-imx, kernel, shawnguo, s.hauer, linux-arm-kernel
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.
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-01-30 13:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30 9:58 [PATCH v2] firmware: imx: Add support to start/stop a CPU Daniel Baluta
2019-01-30 9:58 ` Daniel Baluta
2019-01-30 12:46 ` Dong Aisheng
2019-01-30 12:46 ` Dong Aisheng
2019-01-30 13:12 ` Daniel Baluta
2019-01-30 13:12 ` Daniel Baluta
2019-01-30 13:14 ` Dong Aisheng
2019-01-30 13:14 ` Dong Aisheng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.