]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: mediatek-gen3: Move controller setup steps before PERST# control
authorChen-Yu Tsai <wenst@chromium.org>
Tue, 24 Mar 2026 05:19:55 +0000 (13:19 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 25 Mar 2026 18:47:42 +0000 (13:47 -0500)
commitcf417e61fc860c496eff37b87e06e8e107d343b5
treecb5927c68452ca435900a223210c561404ef091d
parenteddbac092e5f1edcf502056348d98acb811dbb31
PCI: mediatek-gen3: Move controller setup steps before PERST# control

Setting up the translation windows and enabling MSI involve only the
controller, not the link or any downstream device. These can be done before
the device is enabled.

Move these steps before the existing PERST# control and waiting for the
link to come up. This provides a cleaner separation of controller vs device
setup. This also allows the later commits that split out PERST# control and
add device power control to have cleaner teardown.

This change only moves code. No functional change is expected.

Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260324052002.4072430-4-wenst@chromium.org
drivers/pci/controller/pcie-mediatek-gen3.c