From: Anand Moon <linux.amoon@gmail.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: "Shawn Lin" <shawn.lin@rock-chips.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Heiko Stuebner" <heiko@sntech.de>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"open list:PCIE DRIVER FOR ROCKCHIP" <linux-pci@vger.kernel.org>,
"open list:PCIE DRIVER FOR ROCKCHIP"
<linux-rockchip@lists.infradead.org>,
"moderated list:ARM/Rockchip SoC support"
<linux-arm-kernel@lists.infradead.org>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 2/3] PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function
Date: Tue, 15 Oct 2024 14:30:23 +0530 [thread overview]
Message-ID: <CANAwSgSEkFtY6-i3TOPZbwB5EuD4BHboh_jsTwByQw7NLLrstQ@mail.gmail.com> (raw)
In-Reply-To: <20241015051141.g6fh222zrkvnn4l6@thinkpad>
Hi Manivannan,
Thanks for your review comments.
On Tue, 15 Oct 2024 at 10:41, Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> wrote:
>
> On Mon, Oct 14, 2024 at 07:22:03PM +0530, Anand Moon wrote:
> > Refactor the reset control handling in the Rockchip PCIe driver,
> > introduce a more robust and efficient method for assert and
> > deassert reset controller using reset_control_bulk*() API. Using the
> > reset_control_bulk APIs, the reset handling for the core clocks reset
> > unit becomes much simpler.
> >
> > Spilt the reset controller in two groups as per the
> > RK3399 TM 17.5.8.1 PCIe Initialization Sequence
> > 17.5.8.1.1 PCIe as Root Complex.
> >
> > 6. De-assert the PIPE_RESET_N/MGMT_STICKY_RESET_N/MGMT_RESET_N/RESET_N
> > simultaneously.
> >
>
> I'd reword it slightly:
>
> Following the recommendations in 'Rockchip RK3399 TRM v1.3 Part2':
>
> 1. Split the reset controls into two groups as per section '17.5.8.1.1 PCIe
> as Root Complex'.
>
> 2. Deassert the 'Pipe, MGMT Sticky, MGMT, Core' resets in groups as per section
> '17.5.8.1.1 PCIe as Root Complex'. This is accomplished using the
> reset_control_bulk APIs.
>
> > - devm_reset_control_bulk_get_exclusive(): Allows the driver to get all
> > resets defined in the DT thereby removing the hardcoded reset names
> > in the driver.
> > - reset_control_bulk_assert(): Allows the driver to assert the resets
> > defined in the driver.
> > - reset_control_bulk_deassert(): Allows the driver to deassert the resets
> > defined in the driver.
> >
>
> No need to list out the APIs. Just add them to the first paragraph itself to
> explain how they are used.
>
Here is a short version of the commit message.
Introduce a more robust and efficient method for assert and deassert
the reset controller using the reset_control_bulk*() API.
Simplify reset handling for the core clocks reset unit with the
reset_control_bulk APIs.
devm_reset_control_bulk_get_exclusive(): Obtain all resets from the
device tree, removing hardcoded names.
reset_control_bulk_assert(): assert the resets defined in the driver.
reset_control_bulk_deassert(): deassert the resets defined in the driver..
Following the recommendations in 'Rockchip RK3399 TRM v1.3 Part2':
1. Split the reset controls into two groups as per section '17.5.8.1.1 PCIe
as Root Complex'.
2. Deassert the 'Pipe, MGMT Sticky, MGMT, Core' resets in groups as per section
'17.5.8.1.1 PCIe as Root Complex'. This is accomplished using the
reset_control_bulk APIs.
Does this look good to you? Let me know if you need any further adjustments!
I will fix this for CLK bulk as well.
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
>
> Some nitpicks below. Rest looks good.
I will fix these in the next version.
> - Mani
>
> --
> மணிவண்ணன் சதாசிவம்
Thanks
-Anand
next prev parent reply other threads:[~2024-10-15 9:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 13:52 [PATCH v8 0/3] PCIe RK3399 clock and reset using new helper functions Anand Moon
2024-10-14 13:52 ` [PATCH v8 1/3] PCI: rockchip: Simplify clock handling by using clk_bulk*() function Anand Moon
2024-10-14 13:52 ` [PATCH v8 2/3] PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function Anand Moon
2024-10-15 5:11 ` Manivannan Sadhasivam
2024-10-15 9:00 ` Anand Moon [this message]
2024-10-15 12:59 ` Manivannan Sadhasivam
2024-10-15 13:28 ` Anand Moon
2024-10-14 13:52 ` [PATCH v8 3/3] PCI: rockchip: Refactor rockchip_pcie_disable_clocks() function signature Anand Moon
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=CANAwSgSEkFtY6-i3TOPZbwB5EuD4BHboh_jsTwByQw7NLLrstQ@mail.gmail.com \
--to=linux.amoon@gmail.com \
--cc=bhelgaas@google.com \
--cc=heiko@sntech.de \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=shawn.lin@rock-chips.com \
/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;
as well as URLs for NNTP newsgroup(s).