diff options
| author | Richard Zhu <r65037@freescale.com> | 2014-08-07 10:00:25 +0800 | 
|---|---|---|
| committer | Richard Zhu <r65037@freescale.com> | 2014-08-07 11:28:36 +0800 | 
| commit | 94a7e472c47b800c001c0a5d17bb2f14a13e1980 (patch) | |
| tree | d28e1c75c29fde75b8899f7a8f6266e2d9a55ffe | |
| parent | ef3bce5feb2ed36c9f4483287454d35ae330dbe3 (diff) | |
ENGR00326135 pcie: pcie ep test fail on imx6q sdrel_imx_3.10.31_1.1.0_beta
Rootcause: doesn't get the correct mem ranges
from DT on imx6q after added imx6sx sdb pcie ep/rc
validation system support.
solution: Remove the imx6sx specification when get
the mem ranges from DT.
Signed-off-by: Richard Zhu <r65037@freescale.com>
(cherry picked from commit b42f60a06c77448a8a00b961fb8035c58a5ed8a1)
| -rw-r--r-- | drivers/pci/host/pci-imx6.c | 37 | 
1 files changed, 17 insertions, 20 deletions
| diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index 1ecc542037f9..9a0ae162e9b7 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c @@ -1055,30 +1055,27 @@ static int __init imx6_pcie_probe(struct platform_device *pdev)  	}  	if (IS_ENABLED(CONFIG_EP_MODE_IN_EP_RC_SYS)) { -		if (is_imx6sx_pcie(imx6_pcie)) { -			struct device_node *np = pp->dev->of_node; -			struct of_pci_range range; -			struct of_pci_range_parser parser; -			unsigned long restype; - -			if (of_pci_range_parser_init(&parser, np)) { -				dev_err(pp->dev, "missing ranges property\n"); -				return -EINVAL; -			} +		struct device_node *np = pp->dev->of_node; +		struct of_pci_range range; +		struct of_pci_range_parser parser; +		unsigned long restype; -			/* Get the memory ranges from DT */ -			for_each_of_pci_range(&parser, &range) { -				restype = range.flags & IORESOURCE_TYPE_BITS; -				if (restype == IORESOURCE_MEM) { -					of_pci_range_to_resource(&range, -							np, &pp->mem); -					pp->mem.name = "MEM"; -				} -			} +		if (of_pci_range_parser_init(&parser, np)) { +			dev_err(pp->dev, "missing ranges property\n"); +			return -EINVAL; +		} -			pp->mem_base = pp->mem.start; +		/* Get the memory ranges from DT */ +		for_each_of_pci_range(&parser, &range) { +			restype = range.flags & IORESOURCE_TYPE_BITS; +			if (restype == IORESOURCE_MEM) { +				of_pci_range_to_resource(&range, +						np, &pp->mem); +				pp->mem.name = "MEM"; +			}  		} +		pp->mem_base = pp->mem.start;  		if (IS_ENABLED(CONFIG_EP_SELF_IO_TEST)) {  			/* Prepare the test regions and data */  			test_reg1 = devm_kzalloc(&pdev->dev, | 
