[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210914185228.GA1443558@bjorn-Precision-5520>
Date: Tue, 14 Sep 2021 13:52:28 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Prasad Malisetty <pmaliset@...eaurora.org>
Cc: agross@...nel.org, bjorn.andersson@...aro.org, bhelgaas@...gle.com,
robh+dt@...nel.org, swboyd@...omium.org, lorenzo.pieralisi@....com,
svarbanov@...sol.com, devicetree@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, dianders@...omium.org,
mka@...omium.org, vbadigan@...eaurora.org, sallenki@...eaurora.org,
manivannan.sadhasivam@...aro.org
Subject: Re: [PATCH v7 4/4] PCI: qcom: Switch pcie_1_pipe_clk_src after PHY
init in SC7280
On Tue, Sep 14, 2021 at 11:49:10PM +0530, Prasad Malisetty wrote:
> On the SC7280, the clock source for gcc_pcie_1_pipe_clk_src
> must be the TCXO while gdsc is enabled. After PHY init successful
> clock source should switch to pipe clock for gcc_pcie_1_pipe_clk_src.
>
> Signed-off-by: Prasad Malisetty <pmaliset@...eaurora.org>
> ---
> drivers/pci/controller/dwc/pcie-qcom.c | 90 +++++++++++++++++++++++++++++-----
> 1 file changed, 79 insertions(+), 11 deletions(-)
>
> +struct qcom_pcie_cfg {
> + const struct qcom_pcie_ops *ops;
> + bool pcie_1_pipe_clk_src_switch;
This is OK, but all things being equal I like "unsigned int x:1" a
little better. Here's some background:
https://lore.kernel.org/r/CA+55aFzKQ6Pj18TB8p4Yr0M4t+S+BsiHH=BJNmn=76-NcjTj-g@mail.gmail.com/
https://lore.kernel.org/r/CA+55aFxnePDimkVKVtv3gNmRGcwc8KQ5mHYvUxY8sAQg6yvVYg@mail.gmail.com/
> @@ -1467,6 +1531,7 @@ static int qcom_pcie_probe(struct platform_device *pdev)
> struct pcie_port *pp;
> struct dw_pcie *pci;
> struct qcom_pcie *pcie;
> + const struct qcom_pcie_cfg *pcie_cfg = NULL;
No need to initialize this, since you always assign it before using
it.
> int ret;
>
> pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL);
> @@ -1488,7 +1553,9 @@ static int qcom_pcie_probe(struct platform_device *pdev)
>
> pcie->pci = pci;
>
> - pcie->ops = of_device_get_match_data(dev);
> + pcie_cfg = of_device_get_match_data(dev);
> + pcie->ops = pcie_cfg->ops;
> + pcie->pcie_1_pipe_clk_src_switch = pcie_cfg->pcie_1_pipe_clk_src_switch;
>
> pcie->reset = devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_HIGH);
> if (IS_ERR(pcie->reset)) {
Looks good, thanks for working on this!
Powered by blists - more mailing lists