PCI: dwc: Perform host_init() before registering msi
authorBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 23 Aug 2021 15:49:57 +0000 (08:49 -0700)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 12 Oct 2021 12:46:02 +0000 (13:46 +0100)
commit7e919677bb392c765e0f86fda63191e517c0bd1f
tree3d220a0313356854e462cb14a7caf9bb29266d51
parent5b8402562e553983fc941bb955e2c14d1a69215f
PCI: dwc: Perform host_init() before registering msi

On the Qualcomm sc8180x platform the bootloader does something related
to PCI that leaves a pending "msi" interrupt, which with the current
ordering often fires before init has a chance to enable the clocks that
are necessary for the interrupt handler to access the hardware.

Move the host_init() call before the registration of the "msi" interrupt
handler to ensure the host driver has a chance to enable the clocks.

The assignment of the bridge's ops and child_ops is moved along, because
at least the TI Keystone driver overwrites these in its host_init
callback.

Link: https://lore.kernel.org/r/20210823154958.305677-1-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Rob Herring <robh@kernel.org>
drivers/pci/controller/dwc/pcie-designware-host.c