]> 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)
commit1d043bd14c6ee106c3f2ad94a2da6e4c5ca5e6c6
tree57d2c65fca775d50058b8c16baa711988bd2e908
parente4dc9de37c58dfe9dd32c7d3c3cf8f8558da79d8
PCI: mediatek: Fixup MSI enablement logic by enabling MSI before clocks

Commit 85dceaa716ac ("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: 85dceaa716ac ("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