PCI: mediatek-gen3: Assert resets to ensure expected init state
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Mon, 4 Apr 2022 14:48:58 +0000 (16:48 +0200)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 11 May 2022 14:25:26 +0000 (15:25 +0100)
commit1d565935e3b9ccc682631e0bc6e415a7f48295d9
treeabcf88c1e319c78ade33fb0bade6b70152a3d71c
parent214e0d8fe4a813ae6ffd62bc2dfe7544c20914f4
PCI: mediatek-gen3: Assert resets to ensure expected init state

The controller may have been left out of reset by the bootloader,
in which case, before the powerup sequence, the controller will be
found preconfigured with values that were set before booting the
kernel: this produces a controller failure, with the result of
a failure during the mtk_pcie_startup_port() sequence as the PCIe
link never gets up.

To ensure that we get a clean start in an expected state, assert
both the PHY and MAC resets before executing the controller
power-up sequence.

Link: https://lore.kernel.org/r/20220404144858.92390-1-angelogioacchino.delregno@collabora.com
Fixes: d3bf75b579b9 ("PCI: mediatek-gen3: Add MediaTek Gen3 driver for MT8192")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/pcie-mediatek-gen3.c