From: Bjorn Helgaas <helgaas@kernel.org>
To: Shawn Lin <shawn.lin@rock-chips.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
Rajat Jain <rajatja@google.com>,
Wenrui Li <wenrui.li@rock-chips.com>,
Brian Norris <briannorris@chromium.org>
Subject: Re: [PATCH 1/2] PCI: rockchip: improve the deassert sequence of four reset pins
Date: Tue, 4 Oct 2016 12:24:04 -0500 [thread overview]
Message-ID: <20161004172404.GC3449@localhost> (raw)
In-Reply-To: <1474596360-23483-1-git-send-email-shawn.lin@rock-chips.com>
On Fri, Sep 23, 2016 at 10:05:59AM +0800, Shawn Lin wrote:
> Per TRM, we need to deassert the four reset pins simultaneously.
> Currently the reset framework doesn't support that so we did it
> one by one. It seems no side effect found but it does impact the
> state machine of controller, so sometimes the change speed bit is
> not setted when sending training sequence from recover state.
> After the silicon RTL review from Soc guys, we don't need to do
> the sequence recommended by TRM, and could just move the deassert
> of mgmt_sticky_rst to the first place.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Applied both to pci/host-rockchip for v4.9, thanks!
> ---
>
> drivers/pci/host/pcie-rockchip.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
> index c3593e6..5e51121 100644
> --- a/drivers/pci/host/pcie-rockchip.c
> +++ b/drivers/pci/host/pcie-rockchip.c
> @@ -433,21 +433,25 @@ static int rockchip_pcie_init_port(struct rockchip_pcie *rockchip)
> return err;
> }
>
> - err = reset_control_deassert(rockchip->core_rst);
> + /*
> + * Please don't reorder the deassert sequence of the following
> + * four reset pins.
> + */
> + err = reset_control_deassert(rockchip->mgmt_sticky_rst);
> if (err) {
> - dev_err(dev, "deassert core_rst err %d\n", err);
> + dev_err(dev, "deassert mgmt_sticky_rst err %d\n", err);
> return err;
> }
>
> - err = reset_control_deassert(rockchip->mgmt_rst);
> + err = reset_control_deassert(rockchip->core_rst);
> if (err) {
> - dev_err(dev, "deassert mgmt_rst err %d\n", err);
> + dev_err(dev, "deassert core_rst err %d\n", err);
> return err;
> }
>
> - err = reset_control_deassert(rockchip->mgmt_sticky_rst);
> + err = reset_control_deassert(rockchip->mgmt_rst);
> if (err) {
> - dev_err(dev, "deassert mgmt_sticky_rst err %d\n", err);
> + dev_err(dev, "deassert mgmt_rst err %d\n", err);
> return err;
> }
>
> --
> 2.3.7
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2016-10-04 17:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-23 2:05 [PATCH 1/2] PCI: rockchip: improve the deassert sequence of four reset pins Shawn Lin
2016-09-23 2:06 ` [PATCH 2/2] PCI: rockchip: fix wrong transmitted FTS count Shawn Lin
2016-10-18 22:57 ` Brian Norris
2016-10-04 17:24 ` Bjorn Helgaas [this message]
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=20161004172404.GC3449@localhost \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=briannorris@chromium.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=rajatja@google.com \
--cc=shawn.lin@rock-chips.com \
--cc=wenrui.li@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