Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4022743yba; Wed, 17 Apr 2019 02:57:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnMrsN0Zb1MiGCFdhxEpMNW+UpZIQQNhvKOml+BwIFX5MEhRi/fGS1F5CyquBtzdHJSy+5 X-Received: by 2002:a63:720e:: with SMTP id n14mr80889905pgc.93.1555495065847; Wed, 17 Apr 2019 02:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555495065; cv=none; d=google.com; s=arc-20160816; b=MeZZv6oyFmIror3gGqQ2VQymcphdhc9shnZwsIcbLmlOq5SAn5J2y8fllST6e9DSqD 9QJ42djLBfCKFVHWoolauI36Crmerg6uHybkkFqu3HiZ8Rhbvevq70dqWAnZWgA4Lneu fQNCIeiL8W8AcHADJHyAO6FfiBj4O8VBmXhiqa3yRYFP2Oe3tk/vXud9SEkXL16e67yH FNYFwVNK+K/Xo1L8oPOtrjQOGwQ9fQFFViXm2Bj+dk8DEfWkE2Y5Hd47CtCiK0SQ8yKn cd3MvfJVHlbWbXynVf1vU5zr88djW9zyia9AjzZIhAAAsirEwfZ+9abtCHWiZIRgqKRY jh0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=aF+0xGY1AdHAX64ZZoG0XM7AXpmdUQsq7ybuRRmUWQo=; b=rhBQRTW3phMN+El2Al0LGhauwFUBmaXaM1kpCaj9v6pejWBrpXOkkoOPBATGE4BZB2 lcMhF2GvYpeD03H6gKFiG7wFCKcD3nZT1R/tgieydzDrxZo7iBMx/6WsIXlIDrReYwvR QWYZ8rZXAvjXxsY9V4r+31QSQoWpq0D/BcNJE07eFughqrQXz3zTCKNjYK1Cf5TVZutl csKrrBNO6Ip6GVwBsjsJzWsXWCEy5UGh2epJuJMFXgxQ4q0kIKn/hIweu5/Xbg14c449 rVArh4gbuLzseEk10Zrgodvohpt5kUoqb4fliymTeAVZOoNh3nsRYHjd1+XHgJPCnFxG yfrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=TO3HQS+I; 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=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l11si27251446plb.370.2019.04.17.02.57.30; Wed, 17 Apr 2019 02:57:45 -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=@synopsys.com header.s=mail header.b=TO3HQS+I; 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=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731579AbfDQJ4i (ORCPT + 99 others); Wed, 17 Apr 2019 05:56:38 -0400 Received: from dc2-smtprelay2.synopsys.com ([198.182.61.142]:50340 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727013AbfDQJ4h (ORCPT ); Wed, 17 Apr 2019 05:56:37 -0400 Received: from mailhost.synopsys.com (dc2-mailhost2.synopsys.com [10.12.135.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 6FC9EC0AB9; Wed, 17 Apr 2019 09:56:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1555494996; bh=6Zbp5BtzkyyeHc6qsBg6EXLVJRfzDZZ7gq/QFHkuLAU=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=TO3HQS+II4b5e7PMdy0MXybqxMu0xcgzVzOn0ia3zgOr4WVi7wHcd6gmGIh5JND7V YXX6cXmuSyxor9COXLVQt1YWjbWTj7MjFB/IkwbA6Ak2UUhWq6PPkWiWXiJcPARhcX 5zGIV+l9N9j3XCTa7arTq9yyVC77EzEiBjRLmVrr334G2kglt5our2NEWAHxix7MG4 If3obezsdTT7Mcz0vw/88aryZKjBVh6rHnE2vHmroLueGP7YlcMEFB9c6sfr7jP6it EW4fVbTIvFH4F9jt/iWnB+U189HhzbE+M5R0w7OIS4FyXKefGsYX8dcb6cs8GLhF7z EI3cLXLX4O/0g== Received: from US01WEHTC2.internal.synopsys.com (us01wehtc2.internal.synopsys.com [10.12.239.237]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mailhost.synopsys.com (Postfix) with ESMTPS id 5B8E4A0096; Wed, 17 Apr 2019 09:56:36 +0000 (UTC) Received: from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by US01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 17 Apr 2019 02:56:36 -0700 Received: from DE02WEMBXA.internal.synopsys.com ([fe80::a014:7216:77d:d55c]) by DE02WEHTCB.internal.synopsys.com ([::1]) with mapi id 14.03.0415.000; Wed, 17 Apr 2019 11:56:34 +0200 From: Gustavo Pimentel To: Vidya Sagar , "bhelgaas@google.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "thierry.reding@gmail.com" , "jonathanh@nvidia.com" , "kishon@ti.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "lorenzo.pieralisi@arm.com" , "jingoohan1@gmail.com" , "gustavo.pimentel@synopsys.com" CC: "mperttunen@nvidia.com" , "linux-pci@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "kthota@nvidia.com" , "mmaddireddy@nvidia.com" , "sagar.tv@gmail.com" Subject: RE: [PATCH V3 04/16] PCI: dwc: Perform dbi regs write lock towards the end Thread-Topic: [PATCH V3 04/16] PCI: dwc: Perform dbi regs write lock towards the end Thread-Index: AQHU9IqKd2QC8WkfMUGD8rhulPpCxqZAHDUQ Date: Wed, 17 Apr 2019 09:56:33 +0000 Message-ID: <305100E33629484CBB767107E4246BBB0A22C127@de02wembxa.internal.synopsys.com> References: <20190416192730.15681-1-vidyas@nvidia.com> <20190416192730.15681-5-vidyas@nvidia.com> In-Reply-To: <20190416192730.15681-5-vidyas@nvidia.com> Accept-Language: pt-PT, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-ref: =?us-ascii?Q?PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNcZ3VzdGF2b1xh?= =?us-ascii?Q?cHBkYXRhXHJvYW1pbmdcMDlkODQ5YjYtMzJkMy00YTQwLTg1ZWUtNmI4NGJh?= =?us-ascii?Q?MjllMzViXG1zZ3NcbXNnLTEzNDc5ZDI4LTYwZjctMTFlOS05ODdkLWY4OTRj?= =?us-ascii?Q?MjczODA0MlxhbWUtdGVzdFwxMzQ3OWQyOS02MGY3LTExZTktOTg3ZC1mODk0?= =?us-ascii?Q?YzI3MzgwNDJib2R5LnR4dCIgc3o9IjE5MjYiIHQ9IjEzMTk5OTY4NTkyNDEx?= =?us-ascii?Q?NjIwMSIgaD0iU04zaCs3NmlYRVNlUTNYRmsvZk1WL1hnL0E4PSIgaWQ9IiIg?= =?us-ascii?Q?Ymw9IjAiIGJvPSIxIiBjaT0iY0FBQUFFUkhVMVJTUlVGTkNnVUFBQlFKQUFE?= =?us-ascii?Q?cFZ2alZBL1hVQVNRZnl6R2twanhZSkIvTE1hU21QRmdPQUFBQ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QUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUJBQUFBQUFBQUFBSUFBQUFBQUo0QUFB?= =?us-ascii?Q?QnpBRzRBY0FCekFGOEFiQUJwQUdNQVpRQnVBSE1BWlFCZkFIUUFaUUJ5QUcw?= =?us-ascii?Q?QVh3QnpBSFFBZFFCa0FHVUFiZ0IwQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFFQUFBQUFBQUFBQWdBQUFBQUFuZ0FBQUhZQVp3QmZBR3NBWlFC?= =?us-ascii?Q?NUFIY0Fid0J5QUdRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?us-ascii?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBUUFBQUFB?= =?us-ascii?Q?QUFBQUNBQUFBQUFBPSIvPjwvbWV0YT4=3D?= x-originating-ip: [10.107.25.131] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 16, 2019 at 20:27:18, Vidya Sagar wrote: > Remove multiple write enable and disable sequences of dbi registers as > Tegra194 implements writes to BAR-0 register (offset: 0x10) controlled by > DBI write-lock enable bit thereby not allowing any further writes to BAR-= 0 > register in config space to take place. Hence disabling write permission > only towards the end. >=20 > Signed-off-by: Vidya Sagar > --- > Changes since [v2]: > * None >=20 > Changes since [v1]: > * None >=20 > drivers/pci/controller/dwc/pcie-designware-host.c | 3 --- > 1 file changed, 3 deletions(-) >=20 > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/= pci/controller/dwc/pcie-designware-host.c > index 2a5332e5ccfa..c0334c92c1a6 100644 > --- a/drivers/pci/controller/dwc/pcie-designware-host.c > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c > @@ -683,7 +683,6 @@ void dw_pcie_setup_rc(struct pcie_port *pp) > val &=3D 0xffff00ff; > val |=3D 0x00000100; > dw_pcie_writel_dbi(pci, PCI_INTERRUPT_LINE, val); > - dw_pcie_dbi_ro_wr_dis(pci); > =20 > /* Setup bus numbers */ > val =3D dw_pcie_readl_dbi(pci, PCI_PRIMARY_BUS); > @@ -723,8 +722,6 @@ void dw_pcie_setup_rc(struct pcie_port *pp) > =20 > dw_pcie_wr_own_conf(pp, PCI_BASE_ADDRESS_0, 4, 0); > =20 > - /* Enable write permission for the DBI read-only register */ > - dw_pcie_dbi_ro_wr_en(pci); > /* Program correct class for RC */ > dw_pcie_wr_own_conf(pp, PCI_CLASS_DEVICE, 2, PCI_CLASS_BRIDGE_PCI); > /* Better disable write permission right after the update */ > --=20 > 2.17.1 This setup sequence was written by Jingoo Han, let's check if he did this=20 by some particular reason. Jingoo do you remember why you wrote the code like this? Regards, Gustavo