diff mbox series

[1/7] PCI: imx6: Move i.MX8MQ controller instance check to correct case statement

Message ID 20210510141509.929120-1-l.stach@pengutronix.de
State New
Headers show
Series [1/7] PCI: imx6: Move i.MX8MQ controller instance check to correct case statement | expand

Commit Message

Lucas Stach May 10, 2021, 2:15 p.m. UTC
While the i.MX8MQ case falls through to the i.MX7D case, it's quite confusing
to have the i.MX8MQ specific controller instance check in that statement.
Move it to the 8MQ case.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/pci/controller/dwc/pci-imx6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Lorenzo Pieralisi June 23, 2021, 1:46 p.m. UTC | #1
On Mon, May 10, 2021 at 04:15:03PM +0200, Lucas Stach wrote:
> While the i.MX8MQ case falls through to the i.MX7D case, it's quite confusing
> to have the i.MX8MQ specific controller instance check in that statement.
> Move it to the 8MQ case.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/pci/controller/dwc/pci-imx6.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Hi Lucas,

it looks like some of the patches in this series need a respin,
therefore I will mark it as "Changes Requested" unless there
are some patches I can cherry pick - please let me know your plan.

Thanks,
Lorenzo

> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 0cf1333c0440..46b5f070939e 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1060,11 +1060,11 @@ static int imx6_pcie_probe(struct platform_device *pdev)
>  		if (IS_ERR(imx6_pcie->pcie_aux))
>  			return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_aux),
>  					     "pcie_aux clock source missing or invalid\n");
> -		fallthrough;
> -	case IMX7D:
>  		if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
>  			imx6_pcie->controller_id = 1;
>  
> +		fallthrough;
> +	case IMX7D:
>  		imx6_pcie->pciephy_reset = devm_reset_control_get_exclusive(dev,
>  									    "pciephy");
>  		if (IS_ERR(imx6_pcie->pciephy_reset)) {
> -- 
> 2.29.2
>
diff mbox series

Patch

diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 0cf1333c0440..46b5f070939e 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1060,11 +1060,11 @@  static int imx6_pcie_probe(struct platform_device *pdev)
 		if (IS_ERR(imx6_pcie->pcie_aux))
 			return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_aux),
 					     "pcie_aux clock source missing or invalid\n");
-		fallthrough;
-	case IMX7D:
 		if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
 			imx6_pcie->controller_id = 1;
 
+		fallthrough;
+	case IMX7D:
 		imx6_pcie->pciephy_reset = devm_reset_control_get_exclusive(dev,
 									    "pciephy");
 		if (IS_ERR(imx6_pcie->pciephy_reset)) {