PCI: imx6: Simplify reset handling by using *_FLAG_HAS_*_RESET
authorFrank Li <Frank.Li@nxp.com>
Tue, 20 Feb 2024 16:19:13 +0000 (11:19 -0500)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Mon, 4 Mar 2024 08:54:17 +0000 (09:54 +0100)
commit0c9651c21f2a09672a983e4c43a74824eca3b174
treee264a1b716f05d6635c86ab514118ff340183155
parent4e37c2f48712d5874619685819e1cf7307f60840
PCI: imx6: Simplify reset handling by using *_FLAG_HAS_*_RESET

Refactor the reset handling logic in the imx6 PCI driver by adding
IMX6_PCIE_FLAG_HAS_*_RESET bitmask define for drvdata::flags.

The drvdata::flags and bitmask ensure a cleaner and more scalable
switch-case structure for handling reset.

Link: https://lore.kernel.org/r/20240220161924.3871774-4-Frank.Li@nxp.com
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/pci/controller/dwc/pci-imx6.c