diff mbox series

[2/7] PCI: imx6: Initialize ATU unroll offset

Message ID 20210510141509.929120-2-l.stach@pengutronix.de (mailing list archive)
State New, archived
Delegated to: Lorenzo Pieralisi
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
This gets rid of a warning printed when the common code tries to get
this address via non-existent DT reg region, before falling back to
the default offset.

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

Comments

Rob Herring May 11, 2021, 8:03 p.m. UTC | #1
On Mon, May 10, 2021 at 04:15:04PM +0200, Lucas Stach wrote:
> This gets rid of a warning printed when the common code tries to get
> this address via non-existent DT reg region, before falling back to
> the default offset.

I guess I caused this... If this is a problem for i.MX, then isn't it a 
problem for everyone without a separate 'atu' region? I think the right 
fix is having an optional variant like we do with other resources.

> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/pci/controller/dwc/pci-imx6.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 46b5f070939e..922c14361cd3 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1063,6 +1063,8 @@ static int imx6_pcie_probe(struct platform_device *pdev)
>  		if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
>  			imx6_pcie->controller_id = 1;
>  
> +		pci->atu_base =  pci->dbi_base + DEFAULT_DBI_ATU_OFFSET;
> +
>  		fallthrough;
>  	case IMX7D:
>  		imx6_pcie->pciephy_reset = devm_reset_control_get_exclusive(dev,
> -- 
> 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 46b5f070939e..922c14361cd3 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1063,6 +1063,8 @@  static int imx6_pcie_probe(struct platform_device *pdev)
 		if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
 			imx6_pcie->controller_id = 1;
 
+		pci->atu_base =  pci->dbi_base + DEFAULT_DBI_ATU_OFFSET;
+
 		fallthrough;
 	case IMX7D:
 		imx6_pcie->pciephy_reset = devm_reset_control_get_exclusive(dev,