From patchwork Thu Jan 24 10:45:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 156468 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1793778jaa; Thu, 24 Jan 2019 02:46:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN7gxm99gZfbC2ORbCxv8eroo3u/8F/0JOLMnhXXmPhVrgCXtPzqeMoYUmTv3ZM70i0DMkn1 X-Received: by 2002:a17:902:201:: with SMTP id 1mr6009174plc.62.1548326776771; Thu, 24 Jan 2019 02:46:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548326776; cv=none; d=google.com; s=arc-20160816; b=JacP5UM4vhQO7Os7zut9xPdi7RF9Iy0rpWxk6HkH8X2pr3WZdBjE/w94oWdLp56zdl UG3xbjKCnWFwLeXTV9gd82dscOvhlYPBmtfhiHwIokwMl47fG91lZxocLmKkAsSYAqFT MxacSnnMd65uR9lqo/bkFdlG02OjekTev/XOoi8fnqrUK63zVzJzVYq4967OmskRpZBS SVoE5d20D9ifaYxdZo8KlqgLDrSk/Eie1GDa4pf9m8oGvLltkfGgEFf18xLvCkphk3Js eBUdfYuJ9lwKY4ecHWyO6f3HXTTXWWGoY9qVJz3QSC+RjPAF1x1QNGgas+f3edFDrZcf dLKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=LURlEazdlsViq/bSZlZwQimKeprMkOuAEx+h6N1PDkM=; b=yIxUtCecephr01KqCxLOU/7CEqO76LxdUi4E+2s0nhqhnROdfq9Qdd0ttLg6QO23h+ mY4GdYHi19qtOY8FxGL7HVFLYP/Ns8R05+pDYyn9I9JpzgpELH5RHDTs1m+L4gHKlsPD GtVmkhIhuevZ8kacUuBZ1M9faOXXiqs7tJ7WasIQDvReBXZJUaGxsZxUd50/vjee6YsZ WFyHR61u3NVs5uZ7K1yo8x2tpmLMqzXcotg1fnNziJ5gLcFWcGwTuxXhyXyR0nqhmRnk vd2zqsBmCHFkWtjvH2Sn9eGbKbj0IDYHPK5DyIrbXtRSVSirQgQ2eAB30ItGtky4dRQP IS9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=mFcoIGHV; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si22500142pgf.577.2019.01.24.02.46.16; Thu, 24 Jan 2019 02:46:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=mFcoIGHV; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727409AbfAXKqQ (ORCPT + 5 others); Thu, 24 Jan 2019 05:46:16 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:55352 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727363AbfAXKqP (ORCPT ); Thu, 24 Jan 2019 05:46:15 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0OAkB25015903; Thu, 24 Jan 2019 04:46:11 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1548326771; bh=LURlEazdlsViq/bSZlZwQimKeprMkOuAEx+h6N1PDkM=; h=From:To:CC:Subject:Date; b=mFcoIGHVFg6MclMIvWAmMGzkBNVhaN7gjna47o7PcBCUV/lfRirQYw6qc+3aldayq sSH1iw1b3D7JizremAcIM6yET6ainSdpE39NXDaZBqb2czza46+x1cHPxgs4nCx67N mxhhQxA8B3CSRLLYdmOcuTnpm3E7u5Cft0QClmFg= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0OAkBN6049658 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 24 Jan 2019 04:46:11 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Thu, 24 Jan 2019 04:46:10 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Thu, 24 Jan 2019 04:46:10 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0OAk8TC003193; Thu, 24 Jan 2019 04:46:08 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi CC: Bjorn Helgaas , , , Subject: [PATCH] PCI: dra7xx: Invoke phy_set_mode API to set PHY mode to PHY_MODE_PCIE Date: Thu, 24 Jan 2019 16:15:37 +0530 Message-ID: <20190124104537.22271-1-kishon@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Certain PHYs used with PCIe controller can also be used with other controllers such as USB or SATA. In order to configure the PHY to work with PCIe controller, invoke phy_set_mode API with mode set to PHY_MODE_PCIE. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/dwc/pci-dra7xx.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index efb26096ccb5..b287dbf6914c 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -517,6 +517,10 @@ static int dra7xx_pcie_enable_phy(struct dra7xx_pcie *dra7xx) int i; for (i = 0; i < phy_count; i++) { + ret = phy_set_mode(dra7xx->phy[i], PHY_MODE_PCIE); + if (ret < 0) + goto err_phy; + ret = phy_init(dra7xx->phy[i]); if (ret < 0) goto err_phy;