From 73286563468869f5844da8a6a939f9ed4fd5af12 Mon Sep 17 00:00:00 2001 From: Siddartha Mohanadoss Date: Fri, 22 Jan 2021 12:04:03 -0800 Subject: [PATCH] msm: pcie-ep: Use default PCIe CLKREQ# settings Use default settings for CLKREQ# from pinctrl DTSI. Configuring the GPIO in the HLOS driver is causing the PCIe controller to go down and any DBI access is causing a NOC error. Since this GPIO is not configured during resume or sleep the driver can rely on the pinctrl settings that is programmed as part of the TLMM driver initialization of the GPIO as default. Change-Id: Ib6a62e6aa471c39858302fdc0e575fc7ab5abff4 Signed-off-by: Siddartha Mohanadoss --- drivers/platform/msm/ep_pcie/ep_pcie_core.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/platform/msm/ep_pcie/ep_pcie_core.c b/drivers/platform/msm/ep_pcie/ep_pcie_core.c index 7c50a643b135..7e4f8bcecf4f 100644 --- a/drivers/platform/msm/ep_pcie/ep_pcie_core.c +++ b/drivers/platform/msm/ep_pcie/ep_pcie_core.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -/* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.*/ +/* Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.*/ /* * MSM PCIe endpoint core driver. @@ -206,22 +206,14 @@ static int ep_pcie_gpio_init(struct ep_pcie_dev_t *dev) EP_PCIE_DBG(dev, "PCIe V%d\n", dev->rev); - for (i = 0; i < EP_PCIE_MAX_GPIO; i++) { + for (i = 0; i < EP_PCIE_GPIO_CLKREQ; i++) { info = &dev->gpio[i]; if (!info->num) { - if (i == EP_PCIE_GPIO_MDM2AP) { - EP_PCIE_DBG(dev, - "PCIe V%d: gpio %s does not exist\n", - dev->rev, info->name); - continue; - } else { - EP_PCIE_ERR(dev, - "PCIe V%d: the number of gpio %s is invalid\n", - dev->rev, info->name); - rc = -EINVAL; - break; - } + EP_PCIE_DBG(dev, + "PCIe V%d: gpio %s does not exist\n", + dev->rev, info->name); + continue; } rc = gpio_request(info->num, info->name);