diff mbox series

[v2,05/10] rpmsg: smd: allow opening rpm_requests even if already opened

Message ID 20220220201909.445468-6-luca@z3ntu.xyz (mailing list archive)
State Accepted
Headers show
Series Initial MSM8953 & Fairphone 3 support | expand

Commit Message

Luca Weiss Feb. 20, 2022, 8:18 p.m. UTC
On msm8953 the channel seems to be already opened when booting Linux but
we still need to open it for communication with regulators etc.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
Changes in v2:
- rework original patch, don't drop condition completely but allow force
  opening rpm_requests channel

 drivers/rpmsg/qcom_smd.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Luca Weiss March 14, 2022, 7:08 p.m. UTC | #1
Hi all,

any feedback on this patch? It's needed for msm8953 to boot properly.

Regards
Luca

On Sonntag, 20. Februar 2022 21:18:58 CET Luca Weiss wrote:
> On msm8953 the channel seems to be already opened when booting Linux but
> we still need to open it for communication with regulators etc.
> 
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> Changes in v2:
> - rework original patch, don't drop condition completely but allow force
>   opening rpm_requests channel
> 
>  drivers/rpmsg/qcom_smd.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
> index 540e027f08c4..887e21ca51f2 100644
> --- a/drivers/rpmsg/qcom_smd.c
> +++ b/drivers/rpmsg/qcom_smd.c
> @@ -1288,9 +1288,14 @@ static void qcom_channel_state_worker(struct
> work_struct *work) if (channel->state != SMD_CHANNEL_CLOSED)
>  			continue;
> 
> +		/*
> +		 * Always open rpm_requests, even when already opened 
which is
> +		 * required on some SoCs like msm8953.
> +		 */
>  		remote_state = GET_RX_CHANNEL_INFO(channel, state);
>  		if (remote_state != SMD_CHANNEL_OPENING &&
> -		    remote_state != SMD_CHANNEL_OPENED)
> +		    remote_state != SMD_CHANNEL_OPENED &&
> +		    strcmp(channel->name, "rpm_requests"))
>  			continue;
> 
>  		if (channel->registered)
Luca Weiss March 15, 2022, 8:14 p.m. UTC | #2
On Montag, 14. März 2022 20:08:20 CET Luca Weiss wrote:
> Hi all,
> 
> any feedback on this patch? It's needed for msm8953 to boot properly.

I was informed that the patch has already been applied and is now also present 
in linux-next, so please disregard my last email.

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?
id=a8f8cc6b39b7ee0dbaccbebd1268c9d3458ebf13

Regards
Luca

> 
> Regards
> Luca
> 
> On Sonntag, 20. Februar 2022 21:18:58 CET Luca Weiss wrote:
> > On msm8953 the channel seems to be already opened when booting Linux but
> > we still need to open it for communication with regulators etc.
> > 
> > Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> > ---
> > Changes in v2:
> > - rework original patch, don't drop condition completely but allow force
> > 
> >   opening rpm_requests channel
> >  
> >  drivers/rpmsg/qcom_smd.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
> > index 540e027f08c4..887e21ca51f2 100644
> > --- a/drivers/rpmsg/qcom_smd.c
> > +++ b/drivers/rpmsg/qcom_smd.c
> > @@ -1288,9 +1288,14 @@ static void qcom_channel_state_worker(struct
> > work_struct *work) if (channel->state != SMD_CHANNEL_CLOSED)
> > 
> >  			continue;
> > 
> > +		/*
> > +		 * Always open rpm_requests, even when already opened
> 
> which is
> 
> > +		 * required on some SoCs like msm8953.
> > +		 */
> > 
> >  		remote_state = GET_RX_CHANNEL_INFO(channel, state);
> >  		if (remote_state != SMD_CHANNEL_OPENING &&
> > 
> > -		    remote_state != SMD_CHANNEL_OPENED)
> > +		    remote_state != SMD_CHANNEL_OPENED &&
> > +		    strcmp(channel->name, "rpm_requests"))
> > 
> >  			continue;
> >  		
> >  		if (channel->registered)
diff mbox series

Patch

diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
index 540e027f08c4..887e21ca51f2 100644
--- a/drivers/rpmsg/qcom_smd.c
+++ b/drivers/rpmsg/qcom_smd.c
@@ -1288,9 +1288,14 @@  static void qcom_channel_state_worker(struct work_struct *work)
 		if (channel->state != SMD_CHANNEL_CLOSED)
 			continue;
 
+		/*
+		 * Always open rpm_requests, even when already opened which is
+		 * required on some SoCs like msm8953.
+		 */
 		remote_state = GET_RX_CHANNEL_INFO(channel, state);
 		if (remote_state != SMD_CHANNEL_OPENING &&
-		    remote_state != SMD_CHANNEL_OPENED)
+		    remote_state != SMD_CHANNEL_OPENED &&
+		    strcmp(channel->name, "rpm_requests"))
 			continue;
 
 		if (channel->registered)