public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Cc: Andy Gross <agross@kernel.org>,
	MSM <linux-arm-msm@vger.kernel.org>,
	DTML <devicetree@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arm64: dts: qcom: msm8998-mtp: Add alias for blsp1_uart3
Date: Sun, 17 Nov 2019 18:41:45 -0800	[thread overview]
Message-ID: <20191118024145.GC25371@yoga> (raw)
In-Reply-To: <CAOCk7Nov_HvZe1Z6COd2z=VUf=mVbvqS4wjqU4Ee=F1qR_KKww@mail.gmail.com>

On Sat 16 Nov 14:24 PST 2019, Jeffrey Hugo wrote:

> On Fri, Nov 15, 2019 at 11:44 PM Bjorn Andersson
> <bjorn.andersson@linaro.org> wrote:
> >
> > The msm_serial driver uses a simple counter to determine which port to
> > use when no alias is defined, but there's no logic to prevent this from
> 
> Which port to use for what, the default console?
> 

The driver defines three (3) struct uart_ports (wrapped in struct
msm_ports), see msm_uart_port[] around line 1538 in msm_serial.c

This means that you can have a whooping 3 instances of msm_serial in the
system and per the logic found in msm_serial_probe() the allocation
follows the serial%d aliases defined and for entries without an alias a
simple counter, starting at 0 is used.

> > not colliding with what's defined by the aliases. As a result either
> > none or all of the active msm_serial instances must be listed as
> > aliases.
> >
> > Define blsp1_uart3 as "serial1" to mitigate this problem.
> >
> > Fixes: 4cffb9f2c700 ("arm64: dts: qcom: msm8998-mtp: Enable bluetooth")
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> 
> That driver behavior seems like a strange thing to be doing.
> 
> If you clarify the question above, -
> Reviewed-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
> 

Thanks, I'll respin the message to properly document this behavior.

Regards,
Bjorn

> > ---
> >  arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> > index 5f101a20a20a..e08fcb426bbf 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> > @@ -9,6 +9,7 @@
> >  / {
> >         aliases {
> >                 serial0 = &blsp2_uart1;
> > +               serial1 = &blsp1_uart3;
> >         };
> >
> >         chosen {
> > --
> > 2.23.0
> >

  reply	other threads:[~2019-11-18  2:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-16  6:44 [PATCH] arm64: dts: qcom: msm8998-mtp: Add alias for blsp1_uart3 Bjorn Andersson
2019-11-16 22:24 ` Jeffrey Hugo
2019-11-18  2:41   ` Bjorn Andersson [this message]
2019-11-18 15:03     ` Jeffrey Hugo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191118024145.GC25371@yoga \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jeffrey.l.hugo@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox