PCI: rockchip: fix failed to enter L2 link state

The ioremap operation for the msg_region move to the bottom of the
rockchip_cfg_atu to make msg_region make sense which used for sending
PME_TURN_OFF message to make PCIe link enter L2 state

Change-Id: I50d1bef5d534102ed5b7db474c3f819e656fd626
Signed-off-by: Simon Xue <xxm@rock-chips.com>
This commit is contained in:
Simon Xue
2019-02-15 10:04:36 +08:00
committed by Tao Huang
parent 646ffe1fc1
commit 9642bc8824

View File

@@ -1311,6 +1311,11 @@ static int rockchip_cfg_atu(struct rockchip_pcie *rockchip)
rockchip->msg_bus_addr = rockchip->mem_bus_addr +
((reg_no + offset) << 20);
rockchip->msg_region = devm_ioremap(dev, rockchip->msg_bus_addr, SZ_1M);
if (!rockchip->msg_region)
err = -ENOMEM;
return err;
}
@@ -1598,13 +1603,6 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
}
}
rockchip->msg_region = devm_ioremap(rockchip->dev,
rockchip->msg_bus_addr, SZ_1M);
if (!rockchip->msg_region) {
err = -ENOMEM;
goto err_free_res;
}
if (rockchip->deferred) {
err = sysfs_create_group(&pdev->dev.kobj, &pcie_attr_group);
if (err) {