From: Bjorn Helgaas <helgaas@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: "Ryder Lee" <ryder.lee@mediatek.com>,
"Jianjun Wang" <jianjun.wang@mediatek.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Michael Turquette" <mturquette@baylibre.com>,
"Stephen Boyd" <sboyd@kernel.org>,
linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v5 1/6] PCI: mediatek-gen3: Add missing reset_control_deassert() for mac_rst in mtk_pcie_en7581_power_up()
Date: Mon, 30 Dec 2024 11:57:54 -0600 [thread overview]
Message-ID: <20241230175754.GA3958277@bhelgaas> (raw)
In-Reply-To: <20241130-pcie-en7581-fixes-v5-1-dbffe41566b3@kernel.org>
On Sat, Nov 30, 2024 at 12:20:10AM +0100, Lorenzo Bianconi wrote:
> Even if this is not a real issue since Airoha EN7581 SoC does not require
> the mac reset line, add missing reset_control_deassert() for mac reset
> line in mtk_pcie_en7581_power_up() callback.
s/mac/MAC/ in English text since "mac" is an acronym, not a real word
This doesn't really say why we need this patch.
This adds both assert and deassert, so it doesn't really look like
adding a *missing* deassert.
On EN7581, is mac_reset optional or always absent?
If mac_reset is always absent for EN7581, why add this patch at all?
If it's optional, say so.
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/pci/controller/pcie-mediatek-gen3.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
> index 64ef8ff71b0357b9bf9ad8484095b7aa60c22271..4d1c797a32c236faf79428eb8a83708e9c4f21d8 100644
> --- a/drivers/pci/controller/pcie-mediatek-gen3.c
> +++ b/drivers/pci/controller/pcie-mediatek-gen3.c
> @@ -942,6 +942,9 @@ static int mtk_pcie_en7581_power_up(struct mtk_gen3_pcie *pcie)
> */
> mdelay(PCIE_EN7581_RESET_TIME_MS);
>
> + /* MAC power on and enable transaction layer clocks */
> + reset_control_deassert(pcie->mac_reset);
> +
> pm_runtime_enable(dev);
> pm_runtime_get_sync(dev);
>
> @@ -976,6 +979,7 @@ static int mtk_pcie_en7581_power_up(struct mtk_gen3_pcie *pcie)
> err_clk_prepare:
> pm_runtime_put_sync(dev);
> pm_runtime_disable(dev);
> + reset_control_assert(pcie->mac_reset);
> reset_control_bulk_assert(pcie->soc->phy_resets.num_resets, pcie->phy_resets);
> err_phy_deassert:
> phy_power_off(pcie->phy);
>
> --
> 2.47.0
>
next prev parent reply other threads:[~2024-12-30 17:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 23:20 [PATCH v5 0/6] PCI: mediatek-gen3: mtk_pcie_en7581_power_up() code refactoring Lorenzo Bianconi
2024-11-29 23:20 ` [PATCH v5 1/6] PCI: mediatek-gen3: Add missing reset_control_deassert() for mac_rst in mtk_pcie_en7581_power_up() Lorenzo Bianconi
2024-12-30 17:57 ` Bjorn Helgaas [this message]
2025-01-02 11:21 ` Lorenzo Bianconi
2024-11-29 23:20 ` [PATCH v5 2/6] PCI: mediatek-gen3: rely on clk_bulk_prepare_enable() " Lorenzo Bianconi
2024-11-29 23:20 ` [PATCH v5 3/6] PCI: mediatek-gen3: Move reset/assert callbacks in .power_up() Lorenzo Bianconi
2024-11-29 23:20 ` [PATCH v5 4/6] PCI: mediatek-gen3: Add comment about initialization order in mtk_pcie_en7581_power_up() Lorenzo Bianconi
2024-11-29 23:20 ` [PATCH v5 5/6] PCI: mediatek-gen3: Add reset delay " Lorenzo Bianconi
2025-01-03 18:35 ` Bjorn Helgaas
2025-01-08 9:41 ` Lorenzo Bianconi
2024-11-29 23:20 ` [PATCH v5 6/6] PCI: mediatek-gen3: rely on msleep() " Lorenzo Bianconi
2024-12-22 21:15 ` [PATCH v5 0/6] PCI: mediatek-gen3: mtk_pcie_en7581_power_up() code refactoring Krzysztof Wilczyński
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=20241230175754.GA3958277@bhelgaas \
--to=helgaas@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bhelgaas@google.com \
--cc=jianjun.wang@mediatek.com \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=matthias.bgg@gmail.com \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=ryder.lee@mediatek.com \
--cc=sboyd@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 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.