From 94a7e472c47b800c001c0a5d17bb2f14a13e1980 Mon Sep 17 00:00:00 2001 From: Richard Zhu Date: Thu, 7 Aug 2014 10:00:25 +0800 Subject: ENGR00326135 pcie: pcie ep test fail on imx6q sd 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 (cherry picked from commit b42f60a06c77448a8a00b961fb8035c58a5ed8a1) --- drivers/pci/host/pci-imx6.c | 37 +++++++++++++++++-------------------- 1 file 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, -- cgit v1.2.3