Re: [PATCH v1 2/3] PCI: imx6: move the wait for clock stabilization to enable ref clk

Stefan Eichenberger
2024-08-20T07:07:55Z

On Mon, Aug 19, 2024 at 10:45:13AM -0400, Frank Li wrote:
> On Mon, Aug 19, 2024 at 11:03:18AM +0200, Stefan Eichenberger wrote:
> > From: Stefan Eichenberger <stefan.eichenberger@toradex.com>
> >
> > After enabling the ref clock, we should wait for the clock to stabilize.
> > To eliminate the need for code duplication in the future, move the
> > usleep to the enable_ref_clk function.
>
> Logically, it's better wait in imx6_pcie_clk_enable(). But not sure why
> it can reduce duplication.

I'm using the imx6_pcie_clk_enable in the if statement on resume for the
i.MX6Q. If the sleep is not in there I have to add it there as well. I
will check if this is still necessary with your changes and if so would
update the commit message.