Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95ace943 authored by Yan He's avatar Yan He
Browse files

msm: pcie: Assert PERST after link training failure



The PCIe endpoint may start link training if PERST is de-asserted,
and may fall into failure if Root Complex (RC) side is not ready
yet. Thus, RC side needs to assert PERST whenever link training
fails.

Change-Id: I973d2cbca7d6597b0e5ccfbcdf71c477f7aba461
Signed-off-by: default avatarYan He <yanhe@codeaurora.org>
parent 77f27f1d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -985,6 +985,8 @@ static int msm_pcie_enable(struct msm_pcie_dev_t *dev, u32 options)
	if (val & XMLH_LINK_UP) {
		pr_info("PCIe link initialized\n");
	} else {
		gpio_set_value(dev->gpio[MSM_PCIE_GPIO_PERST].num,
			dev->gpio[MSM_PCIE_GPIO_PERST].on);
		pr_err("PCIe link initialization failed\n");
		ret = -1;
		goto link_fail;