[{"id":1763999,"web_url":"http://patchwork.ozlabs.org/comment/1763999/","msgid":"<ab942ae4-5152-e041-4084-825a20d732be@ti.com>","list_archive_url":null,"date":"2017-09-06T10:53:39","subject":"Re: [PATCH] pci: dwc: dra7xx: Add shutdown handler to cleanly turn\n\toff clocks","submitter":{"id":14965,"url":"http://patchwork.ozlabs.org/api/people/14965/","name":"Kishon Vijay Abraham I","email":"kishon@ti.com"},"content":"Keerthy,\n\nOn Wednesday 06 September 2017 04:09 PM, Keerthy wrote:\n> Add shutdown handler to cleanly turn off clocks.\n\none minor comment below.. with that fixed you can add my\n\nAcked-by: Kishon Vijay Abraham I <kishon@ti.com>\n> \n> Signed-off-by: Keerthy <j-keerthy@ti.com>\n> ---\n>  drivers/pci/dwc/pci-dra7xx.c | 14 ++++++++++++++\n>  1 file changed, 14 insertions(+)\n> \n> diff --git a/drivers/pci/dwc/pci-dra7xx.c b/drivers/pci/dwc/pci-dra7xx.c\n> index d4e98f3..66d1cfe 100644\n> --- a/drivers/pci/dwc/pci-dra7xx.c\n> +++ b/drivers/pci/dwc/pci-dra7xx.c\n> @@ -874,6 +874,19 @@ static int dra7xx_pcie_suspend_noirq(struct device *dev)\n>  \treturn 0;\n>  }\n>  \n> +void dra7xx_pcie_shutdown(struct platform_device *pdev)\n> +{\n> +\tstruct dra7xx_pcie *dra7xx = dev_get_drvdata(&pdev->dev);\n\nUse struct device *dev = &pdev->dev, instead of de-referencing device pointer\nmultiple times.\n\nThanks\nKishon","headers":{"Return-Path":"<linux-pci-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-pci-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=ti.com header.i=@ti.com header.b=\"QwPJkKjw\";\n\tdkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnL6x6QS4z9s3T\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 20:54:01 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753326AbdIFKxs (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 6 Sep 2017 06:53:48 -0400","from lelnx193.ext.ti.com ([198.47.27.77]:24333 \"EHLO\n\tlelnx193.ext.ti.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752598AbdIFKxo (ORCPT\n\t<rfc822;linux-pci@vger.kernel.org>); Wed, 6 Sep 2017 06:53:44 -0400","from dlelxv90.itg.ti.com ([172.17.2.17])\n\tby lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v86ArhRL017648; \n\tWed, 6 Sep 2017 05:53:43 -0500","from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34])\n\tby dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v86ArhUL005552; \n\tWed, 6 Sep 2017 05:53:43 -0500","from DLEE112.ent.ti.com (157.170.170.23) by DLEE104.ent.ti.com\n\t(157.170.170.34) with Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34;\n\tWed, 6 Sep 2017 05:53:43 -0500","from dlep33.itg.ti.com (157.170.170.75) by DLEE112.ent.ti.com\n\t(157.170.170.23) with Microsoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend\n\tTransport; Wed, 6 Sep 2017 05:53:43 -0500","from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153])\n\tby dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v86Ardqd023837;\n\tWed, 6 Sep 2017 05:53:41 -0500"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com;\n\ts=ti-com-17Q1; t=1504695223;\n\tbh=QBT8CMjFqCJfzzsGyUt6ni0T2t19SjMFBnYgBl8eLQU=;\n\th=Subject:To:References:CC:From:Date:In-Reply-To;\n\tb=QwPJkKjwsmAS4v4BgVu2RiWjPCh5Jb5wQzwSRipXycCu48jTN4TbBgUIVBCis9qT8\n\tAtg7l8xqjbi5zvSWnFIlx3/4n7J62/6PjpLBGs2X3gZm4eOW6S9L1ty8IZu4NKTDzx\n\tIYPcRw45Kcbpq7wRFbjUQimMerZzwsx0cTY3X4II=","Subject":"Re: [PATCH] pci: dwc: dra7xx: Add shutdown handler to cleanly turn\n\toff clocks","To":"Keerthy <j-keerthy@ti.com>, <bhelgaas@google.com>","References":"<1504694351-32358-1-git-send-email-j-keerthy@ti.com>","CC":"<t-kristo@ti.com>, <linux-kernel@vger.kernel.org>,\n\t<linux-omap@vger.kernel.org>, <linux-pci@vger.kernel.org>","From":"Kishon Vijay Abraham I <kishon@ti.com>","Message-ID":"<ab942ae4-5152-e041-4084-825a20d732be@ti.com>","Date":"Wed, 6 Sep 2017 16:23:39 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.7.0","MIME-Version":"1.0","In-Reply-To":"<1504694351-32358-1-git-send-email-j-keerthy@ti.com>","Content-Type":"text/plain; charset=\"windows-1252\"","Content-Transfer-Encoding":"7bit","X-EXCLAIMER-MD-CONFIG":"e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180","Sender":"linux-pci-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-pci.vger.kernel.org>","X-Mailing-List":"linux-pci@vger.kernel.org"}},{"id":1764005,"web_url":"http://patchwork.ozlabs.org/comment/1764005/","msgid":"<f0ffc120-c655-70ec-3b79-5bccbd98f169@ti.com>","list_archive_url":null,"date":"2017-09-06T10:56:34","subject":"Re: [PATCH] pci: dwc: dra7xx: Add shutdown handler to cleanly turn\n\toff clocks","submitter":{"id":14965,"url":"http://patchwork.ozlabs.org/api/people/14965/","name":"Kishon Vijay Abraham I","email":"kishon@ti.com"},"content":"On Wednesday 06 September 2017 04:23 PM, Kishon Vijay Abraham I wrote:\n> Keerthy,\n> \n> On Wednesday 06 September 2017 04:09 PM, Keerthy wrote:\n>> Add shutdown handler to cleanly turn off clocks.\n> \n> one minor comment below.. with that fixed you can add my\n> \n> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>\n>>\n>> Signed-off-by: Keerthy <j-keerthy@ti.com>\n>> ---\n>>  drivers/pci/dwc/pci-dra7xx.c | 14 ++++++++++++++\n>>  1 file changed, 14 insertions(+)\n>>\n>> diff --git a/drivers/pci/dwc/pci-dra7xx.c b/drivers/pci/dwc/pci-dra7xx.c\n>> index d4e98f3..66d1cfe 100644\n>> --- a/drivers/pci/dwc/pci-dra7xx.c\n>> +++ b/drivers/pci/dwc/pci-dra7xx.c\n>> @@ -874,6 +874,19 @@ static int dra7xx_pcie_suspend_noirq(struct device *dev)\n>>  \treturn 0;\n>>  }\n>>  \n>> +void dra7xx_pcie_shutdown(struct platform_device *pdev)\n>> +{\n>> +\tstruct dra7xx_pcie *dra7xx = dev_get_drvdata(&pdev->dev);\n> \n> Use struct device *dev = &pdev->dev, instead of de-referencing device pointer\n> multiple times.\n\nYou might also have to dra7xx_pcie_stop_link() before disabling the clocks.\n\nThanks\nKishon","headers":{"Return-Path":"<linux-pci-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-pci-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=ti.com header.i=@ti.com header.b=\"C2TmE88q\";\n\tdkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnLBJ4clcz9s0g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 20:56:56 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753514AbdIFK4k (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 6 Sep 2017 06:56:40 -0400","from lelnx194.ext.ti.com ([198.47.27.80]:32472 \"EHLO\n\tlelnx194.ext.ti.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1753500AbdIFK4i (ORCPT\n\t<rfc822;linux-pci@vger.kernel.org>); Wed, 6 Sep 2017 06:56:38 -0400","from dflxv15.itg.ti.com ([128.247.5.124])\n\tby lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v86Aub8v009700; \n\tWed, 6 Sep 2017 05:56:37 -0500","from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26])\n\tby dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v86AubHr009512;\n\tWed, 6 Sep 2017 05:56:37 -0500","from DLEE105.ent.ti.com (157.170.170.35) by DLEE115.ent.ti.com\n\t(157.170.170.26) with Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34;\n\tWed, 6 Sep 2017 05:56:36 -0500","from dflp33.itg.ti.com (10.64.6.16) by DLEE105.ent.ti.com\n\t(157.170.170.35) with Microsoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend\n\tTransport; Wed, 6 Sep 2017 05:56:36 -0500","from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153])\n\tby dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v86AuYLN016141;\n\tWed, 6 Sep 2017 05:56:35 -0500"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com;\n\ts=ti-com-17Q1; t=1504695397;\n\tbh=FXZYoVls6KJB6q17nK3hDnOwXkuIzguB/lc0UwNk6D8=;\n\th=Subject:To:References:CC:From:Date:In-Reply-To;\n\tb=C2TmE88q74FaDoiFibCEzieYOu7ChrY22K44cwcrm96Z/5eYW2D4s0FRNMl4SIsu+\n\tDAfYPc5Wr5hMiuycrdmNaYsL5Wv0bl0D9S6ISZPumIqD0CbpiZ5mBfWpy3twBSdbhk\n\t3e5yKqoeTHlsSMajB4AxV6v4LBpGwbiw83Js7E6s=","Subject":"Re: [PATCH] pci: dwc: dra7xx: Add shutdown handler to cleanly turn\n\toff clocks","To":"Keerthy <j-keerthy@ti.com>, <bhelgaas@google.com>","References":"<1504694351-32358-1-git-send-email-j-keerthy@ti.com>\n\t<ab942ae4-5152-e041-4084-825a20d732be@ti.com>","CC":"<t-kristo@ti.com>, <linux-kernel@vger.kernel.org>,\n\t<linux-omap@vger.kernel.org>, <linux-pci@vger.kernel.org>","From":"Kishon Vijay Abraham I <kishon@ti.com>","Message-ID":"<f0ffc120-c655-70ec-3b79-5bccbd98f169@ti.com>","Date":"Wed, 6 Sep 2017 16:26:34 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.7.0","MIME-Version":"1.0","In-Reply-To":"<ab942ae4-5152-e041-4084-825a20d732be@ti.com>","Content-Type":"text/plain; charset=\"windows-1252\"","Content-Transfer-Encoding":"7bit","X-EXCLAIMER-MD-CONFIG":"e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180","Sender":"linux-pci-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-pci.vger.kernel.org>","X-Mailing-List":"linux-pci@vger.kernel.org"}},{"id":1764091,"web_url":"http://patchwork.ozlabs.org/comment/1764091/","msgid":"<02d56b4e-f1d0-e062-1833-28b9f4131622@ti.com>","list_archive_url":null,"date":"2017-09-06T12:59:32","subject":"Re: [PATCH] pci: dwc: dra7xx: Add shutdown handler to cleanly turn\n\toff clocks","submitter":{"id":47064,"url":"http://patchwork.ozlabs.org/api/people/47064/","name":"Keerthy","email":"j-keerthy@ti.com"},"content":"On Wednesday 06 September 2017 04:26 PM, Kishon Vijay Abraham I wrote:\n> \n> \n> On Wednesday 06 September 2017 04:23 PM, Kishon Vijay Abraham I wrote:\n>> Keerthy,\n>>\n>> On Wednesday 06 September 2017 04:09 PM, Keerthy wrote:\n>>> Add shutdown handler to cleanly turn off clocks.\n>>\n>> one minor comment below.. with that fixed you can add my\n>>\n>> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>\n>>>\n>>> Signed-off-by: Keerthy <j-keerthy@ti.com>\n>>> ---\n>>>  drivers/pci/dwc/pci-dra7xx.c | 14 ++++++++++++++\n>>>  1 file changed, 14 insertions(+)\n>>>\n>>> diff --git a/drivers/pci/dwc/pci-dra7xx.c b/drivers/pci/dwc/pci-dra7xx.c\n>>> index d4e98f3..66d1cfe 100644\n>>> --- a/drivers/pci/dwc/pci-dra7xx.c\n>>> +++ b/drivers/pci/dwc/pci-dra7xx.c\n>>> @@ -874,6 +874,19 @@ static int dra7xx_pcie_suspend_noirq(struct device *dev)\n>>>  \treturn 0;\n>>>  }\n>>>  \n>>> +void dra7xx_pcie_shutdown(struct platform_device *pdev)\n>>> +{\n>>> +\tstruct dra7xx_pcie *dra7xx = dev_get_drvdata(&pdev->dev);\n>>\n>> Use struct device *dev = &pdev->dev, instead of de-referencing device pointer\n>> multiple times.\n> \n> You might also have to dra7xx_pcie_stop_link() before disabling the clocks.\n\nThanks for the quick review. I will incorporate the above comments and\npost v2.\n\nRegards,\nKeerthy\n\n> \n> Thanks\n> Kishon\n>","headers":{"Return-Path":"<linux-pci-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-pci-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=ti.com header.i=@ti.com header.b=\"Uxrmp5ed\";\n\tdkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnNwy3CC4z9t2R\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 23:00:34 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754486AbdIFM7j (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 6 Sep 2017 08:59:39 -0400","from fllnx210.ext.ti.com ([198.47.19.17]:47738 \"EHLO\n\tfllnx210.ext.ti.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1754481AbdIFM7h (ORCPT\n\t<rfc822;linux-pci@vger.kernel.org>); Wed, 6 Sep 2017 08:59:37 -0400","from dlelxv90.itg.ti.com ([172.17.2.17])\n\tby fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v86CxZbZ015222; \n\tWed, 6 Sep 2017 07:59:35 -0500","from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29])\n\tby dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v86CxZaD012582; \n\tWed, 6 Sep 2017 07:59:35 -0500","from DFLE108.ent.ti.com (10.64.6.29) by DFLE108.ent.ti.com\n\t(10.64.6.29) with Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34;\n\tWed, 6 Sep 2017 07:59:35 -0500","from dlep32.itg.ti.com (157.170.170.100) by DFLE108.ent.ti.com\n\t(10.64.6.29) with Microsoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend\n\tTransport; Wed, 6 Sep 2017 07:59:35 -0500","from [172.24.191.45] (ileax41-snat.itg.ti.com [10.172.224.153])\n\tby dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v86CxXuU014960;\n\tWed, 6 Sep 2017 07:59:33 -0500"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com;\n\ts=ti-com-17Q1; t=1504702775;\n\tbh=xd5cYE9VQoFigdjW+iA473HeyeEAYCGaGKNxNMM+4Ms=;\n\th=Subject:To:References:CC:From:Date:In-Reply-To;\n\tb=Uxrmp5edJ8lOua3jqPFTRo8ofbLHRl9cijdpyVf028FkqHDMUryicx4FLouX0zKw8\n\t2U9YJjnL178Gg5bD9Wrp/kiL1064smSqVvQMCQWQ1qUyjgUksGgEoh7UvUBoTbjUGz\n\tXRzNZv0vnyTn0NX7xJyIcPKCmh5ptLXmNcDSPOiw=","Subject":"Re: [PATCH] pci: dwc: dra7xx: Add shutdown handler to cleanly turn\n\toff clocks","To":"Kishon Vijay Abraham I <kishon@ti.com>, <bhelgaas@google.com>","References":"<1504694351-32358-1-git-send-email-j-keerthy@ti.com>\n\t<ab942ae4-5152-e041-4084-825a20d732be@ti.com>\n\t<f0ffc120-c655-70ec-3b79-5bccbd98f169@ti.com>","CC":"<t-kristo@ti.com>, <linux-kernel@vger.kernel.org>,\n\t<linux-omap@vger.kernel.org>, <linux-pci@vger.kernel.org>","From":"Keerthy <j-keerthy@ti.com>","Message-ID":"<02d56b4e-f1d0-e062-1833-28b9f4131622@ti.com>","Date":"Wed, 6 Sep 2017 18:29:32 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.7.0","MIME-Version":"1.0","In-Reply-To":"<f0ffc120-c655-70ec-3b79-5bccbd98f169@ti.com>","Content-Type":"text/plain; charset=\"windows-1252\"","Content-Transfer-Encoding":"7bit","X-EXCLAIMER-MD-CONFIG":"e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180","Sender":"linux-pci-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-pci.vger.kernel.org>","X-Mailing-List":"linux-pci@vger.kernel.org"}}]