]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: mediatek: Fixup MSI enablement logic by enabling MSI before clocks
authorHonghui Zhang <honghui.zhang@mediatek.com>
Mon, 15 Oct 2018 08:08:56 +0000 (16:08 +0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 17 Oct 2018 14:36:17 +0000 (15:36 +0100)
commita354435b3413232b21af011693ac6f113423e20d
tree57d2c65fca775d50058b8c16baa711988bd2e908
parente93320b78dd22dd43f4bf1dad4b4b317afc9eda9
PCI: mediatek: Fixup MSI enablement logic by enabling MSI before clocks

Commit 28aaa5046c1f ("PCI: mediatek: Add MSI support for MT2712 and
MT7622") added MSI support but enabled MSI in the wrong place, at a step
in the probe sequence where clocks were not still enabled.

Fix this issue by calling mtk_pcie_enable_msi() in mtk_pcie_startup_port_v2()
since clocks are enabled when mtk_pcie_startup_port_v2() is called.

To avoid forward declaration of mtk_pcie_enable_msi(), move the
mtk_pcie_startup_port_v2() function definition in the file.

Fixes: 28aaa5046c1f ("PCI: mediatek: Add MSI support for MT2712 and MT7622")
Signed-off-by: Honghui Zhang <honghui.zhang@mediatek.com>
[lorenzo.pieralisi@arm.com: squashed commit and adapted log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Ryder Lee <ryder.lee@mediatek.com>
drivers/pci/controller/pcie-mediatek.c