From patchwork Mon Oct 9 09:03:36 2017 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: 115192 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2319243qgn; Mon, 9 Oct 2017 02:03:48 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAuUYaUR1Qux+Nbb59hKLj32CyoUCyKWvCXUxJYtnBrB+vouEM3rG1FbWQ3RRn6RA0CRskc X-Received: by 10.99.114.92 with SMTP id c28mr8725911pgn.342.1507539828452; Mon, 09 Oct 2017 02:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507539828; cv=none; d=google.com; s=arc-20160816; b=Nk9u3NgJ8gYcGF+lqvN3gRFqUjnf6AP1hll/GkwnUbxVdVzyei9a/mGnJWemAyAQfC Er2bPF2iL5jCBlOWjvYpCcNGbXRCvzK5XxSpyXtD+tYB6MeYwUEDX0bOAGKqSg4WwrmF GwQqI+yeIhNBjZk0vXkXzg++/RgEPdzCDgptSxdoiIbUE2hv+foBVOAqW7idNef/CBKi jn+brJDlRyhd6nUb7RC8DxaEt1/VBkvmbZUJRXhFMr3ehK+A9ggHBPksfRUsP2YJ9us6 l7vXGGvZnds00qiaxILXZw0hrQufp05AVZdXMQM+Sk+gVP/tDxWSOcEOKg0cNDUUKLdJ I/Rw== 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:arc-authentication-results; bh=dVfzn6qJMIw8kxuIgUEx95e1ayTAXxleABRVsjf/cr8=; b=lvCdfdeknwTIa7tA4TLEddeJsG6x2ZFsoAS14R4ZeEYdT7OoDvNloKNrcp1zk1GcHJ CIYaigsaiqX962P/0rS/41RJY9JH/o9yKydUYtiATMhtznkbrCs5vhI5jr+iiYP74eIn vg3d8Jc7aOlzOaRutioNzSQh9TjSHuFbowXJggnYEjQeauQbG2BugLE0U6IWGjnuivfY dmKege/CYqY6WsiDZo4oG0QstorT3fkwuKRnAU8MdM8Yi9t0cZZipZJaipAL63sLK9JG IhFZ+hVDWUJMkJi2y3ycmoU1VLTqqlfi00gyC6Rq50ZKDYO3ktOcmA86PXEe3OjJShWo XWOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=H1kxay8J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 w14si4687138pfi.426.2017.10.09.02.03.48; Mon, 09 Oct 2017 02:03:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=H1kxay8J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1753728AbdJIJDq (ORCPT + 26 others); Mon, 9 Oct 2017 05:03:46 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:37612 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751598AbdJIJDo (ORCPT ); Mon, 9 Oct 2017 05:03:44 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v9993hHe010629; Mon, 9 Oct 2017 04:03:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1507539823; bh=09anHANy/Ifme1wKQvb8lya9L3zUbPvHn1AxO8BrOv8=; h=From:To:CC:Subject:Date; b=H1kxay8JQRYH8FoSqeretHh6KPhdH9xHm02/PycdrpfcGY1byNUI+5kNBUwXXcoXJ 0IGLRVabVyiP8sw75Tbwyjhqv8muUY2tXvLUt1m+sFTxvXlQB9KybjHq/xjBAVJwLQ xRGSwOZrhvHlhb/dc7bcD9A5CElJjFbrYeHDOD9g= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9993hDV027385; Mon, 9 Oct 2017 04:03:43 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Mon, 9 Oct 2017 04:03:42 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Mon, 9 Oct 2017 04:03:42 -0500 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 v9993eJX002737; Mon, 9 Oct 2017 04:03:40 -0500 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Bjorn Helgaas CC: Roger Quadros , , , , Subject: [PATCH 0/2] phy: ti-pipe3: Update PCIe PHY settings Date: Mon, 9 Oct 2017 14:33:36 +0530 Message-ID: <20171009090338.26033-1-kishon@ti.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This was supposed to only update ti-pipe3 PHY registers. However because of the way the ti-pipe3 PHY, OCP2SCP and PCIe controller are connected in dra7xx where PCIe controller --------------> ti-pipe3 PHY --------------> OCP2SCP depends on depends on updating ti-pipe3 PHY registers results in an abort. Though the dependency between ti-pipe3 PHY and OCP2SCP is created (OCP2SCP is parent of ti-pipe3 PHY), and enabling ti-pipe3 PHY clocks should in turn enable OCP2SCP (with the help of pm_runtime framework), this doesn't work in no_irq stage since pm_runtime is disabled during no_irq stage. Since pci-dra7xx enables/initializes ti-pipe3 phy in no_irq stage, OCP2SCP is not enabled resulting in an abort with ti-pipe3 PHY registers are accessed. In order to solve this a functional dependency is created between PCIe and ti-pipe3 PHY so that PCIe is suspended before PHY/OCP2SCP and resumed after PCIe PHY/OCP2SCP Kishon Vijay Abraham I (2): PCI: dwc: dra7xx: Create functional dependency between PCIe and PHY phy: ti-pipe3: Update pcie phy settings drivers/pci/dwc/pci-dra7xx.c | 16 +++++++ drivers/phy/ti/phy-ti-pipe3.c | 101 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 116 insertions(+), 1 deletion(-) -- 2.11.0 Acked-by: Bjorn Helgaas