lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y4CXtn/o3aNvBNh5@hovoldconsulting.com>
Date:   Fri, 25 Nov 2022 11:23:50 +0100
From:   Johan Hovold <johan@...nel.org>
To:     Luca Weiss <luca.weiss@...rphone.com>
Cc:     linux-arm-msm@...r.kernel.org,
        ~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        Vinod Koul <vkoul@...nel.org>,
        Kishon Vijay Abraham I <kishon@...nel.org>,
        linux-phy@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v2 2/3] phy: qcom-qmp-combo: Add config for SM6350

On Fri, Nov 25, 2022 at 11:14:53AM +0100, Luca Weiss wrote:
> Hi Johan,
> 
> On Fri Nov 25, 2022 at 11:01 AM CET, Johan Hovold wrote:
> > On Fri, Nov 25, 2022 at 10:27:48AM +0100, Luca Weiss wrote:
> > > Add the tables and config for the combo phy found on SM6350.
> > > 
> > > Signed-off-by: Luca Weiss <luca.weiss@...rphone.com>
> > > ---
> > > @Johan Hovold, here I've added dp_txa & dp_txb, I believe otherwise
> > > qmp->dp_tx would be wrong. Is this different on sc8280xp or was this a
> > > mistake on your side? I think this should probably be split out to
> > > another patch to not mix things up too much.
> >
> > Yeah, that's a difference in sc8280xp which does not have dedicated TX
> > registers for DP.
> 
> Good to know.
> 
> >
> > This is probably best handled explicitly when parsing the DT by using
> > dp_txa/b if they are set and otherwise fallback to txa/txb (e.g.
> > instead of hiding it in the v5 table by using the same offset in two
> > places).
> 
> Are you thinking about something like this?
> 
> if (offs->dp_txa)
>     qmp->dp_tx = base + offs->dp_txa
> else
>     qmp->dp_tx = base + offs->txa;
> 
> if (offs->dp_txb)
>     qmp->dp_tx2 = base + offs->dp_txb;
> else
>     qmp->dp_tx2 = base + offs->txb;
> 
> This wouldn't handle ".dp_txa = 0x0000" but I don't think this should be
> a problem, right?

Yeah, that should be fine. I'd even merge the branches:

	if (offs->dp_txa) {
		qmp->dp_tx = base + offs->dp_txa;
		qmp->dp_tx2 = base + offs->dp_txb;
	} else {
		qmp->dp_tx = base + offs->txa;
		qmp->dp_tx2 = base + offs->txb;
	}

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ