Re: [PATCH v2 07/15] PCI: rcar-gen4: Separate hardware setup from resource acquisition

From: Marek Vasut

Date: Sat Oct 03 2026 - 19:41:31 EST


On 9/28/26 6:52 PM, Koichiro Den wrote:
Factor out the hardware setup needed by Root Port recovery into helpers.
Recovery needs to reset and restore the controller while keeping its
clocks enabled and the Gen5 PHY initialized.

- From rcar_gen4_pcie_common_init(), extract the power reset and mode
setup. Leave clock enabling and Application/Local reset control in
common_init(), so recovery can keep the APP registers accessible.

- From the V4H/V4M and Gen5 .init() callbacks, extract the SoC-specific
register setup. This allows recovery to restore those settings without
taking another clock or PHY initialization reference.

- From rcar_gen4_pcie_host_init(), extract the Root Port register setup
and PERST# release. Both paths need this host-specific sequence after
the per-SoC initialization or reset.

No functional changes.

Signed-off-by: Koichiro Den <den@xxxxxxxxxxxxx>

Reviewed-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxxxx>