Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752239AbdHHLNO (ORCPT ); Tue, 8 Aug 2017 07:13:14 -0400 Received: from mail-dm3nam03on0046.outbound.protection.outlook.com ([104.47.41.46]:53952 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752138AbdHHLND (ORCPT ); Tue, 8 Aug 2017 07:13:03 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; windriver.com; dkim=none (message not signed) header.d=none;windriver.com; dmarc=bestguesspass action=none header.from=xilinx.com; From: Ravi Shankar Jonnalagadda To: , , , , , , , , , , , , Subject: [PATCH 1/4] PCI:xilinx-nwl: Enable Root DMA Date: Tue, 8 Aug 2017 16:42:16 +0530 Message-ID: <1502190739-13474-2-git-send-email-vjonnal@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1502190739-13474-1-git-send-email-vjonnal@xilinx.com> References: <1502190739-13474-1-git-send-email-vjonnal@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23244.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(39450400003)(39860400002)(39840400002)(39410400002)(39850400002)(39400400002)(2980300002)(438002)(189002)(199003)(2950100002)(2906002)(76176999)(189998001)(50986999)(5660300001)(575784001)(6666003)(356003)(90966002)(6266002)(106466001)(48376002)(33646002)(36756003)(45336002)(50466002)(46386002)(8676002)(478600001)(50226002)(8936002)(42186005)(38730400002)(63266004)(305945005)(2201001)(103686004)(47776003)(626005)(5003940100001)(52956003)(81166006)(36386004)(81156014)(107986001)(921003)(1121003)(5001870100001)(83996005)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR02MB2452;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;SN1NAM02FT011;1:0G26i0Jx5JfCcmB0IlUwkroepXN4GBjJiy/JO1s5/NEOTh74h4Z4f2GyTKO9dPHhGJ8OlPND5Qu+iaWUzIIEmUdajuuCdID39eV8M2JO7rxnajIbpSTR4KJM5XYBW8fYCSHaeo9YY5qJTFi3pTeLAUltNMyCoBIljv18EKeXSrbxZ77BOINNB1kIvlnbyZJ5b0usCpLK5z9HV1lak8tNnpSYi/XjnjkD5xB4sg7ehcNV30PslqhA14t1OpTX6U0bQGN2T2uNXwRZ2sLUwg7beOIbitLz2Q3U7t0rqmC8BkZxN9WQcyMr2WGV2TJY4DtIC51UwDrstNefKdfMNR1WJig2amBwhvQDZQ9XFcALqnmmjtAjiO/VxYWKL9G9amNpc4Vjx5sAE6GaIw4qjl7rk5Zk2MFEE5cyQ46pYnnH20OLe1Ix3EYey4xWcGgqFsfo1XHbB2pDFpFmdUxmJVtO47iBfSbLddLJZZQun8QTW7l/KEnm5SY7WudTFf+5kMBw6F7ZlHZXtu+pHhWkCB65bxiltT/mIyriVtTUf2WgI6lBp402MisLCd1Br2KXhYUgsGVm5spRQwl4waNjxtlGZyK6t+AidkxXkzzYLXF5wqGouKOXreZGvC2xbqULKIk7x41hDAlsQ8QFkX5QQYNPCToGqz7IGP2DsyOPA8TkH74IgPSlMtqVuzEdhzvS8GhzGGgx5hyRdPZY3pfx7UFS5K1HvaDLscVkOsA2L9N27xqn3BFAl5NxniunsEIv3f7Dk4AsSicDdYHcf/XUNVuSZQ5zAJXJpbMXDYcN77gnea48ayGON/uACjZVVz5gqgyaaCOunM88YD6rUepi2tgStfW5k1WN36JTdmRx1PMBV3cfekpZgUT5j62eyx4oRtd9 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f62410d0-469f-411e-ba2b-08d4de4e6e42 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BN6PR02MB2452; X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2452;3:bvRNp9cvJ7zN7Doc3p9+eMOBd090mWyDhX4BhBrEjH34Vxdk/uAfdmVxCpZ+v4qnfprEij1UXZES2N22mY+3j4BIDGIP287ECl44abYL6FYCjxnbDj7nirgzA2gSQrsJ3oy6r24fMrBPsXcYmAI3ov5Hjr4xrRgaN6n5ytAaFTXHGk9vZpyrPDA1TKr0E57Oscr/iegivmmDyUqYop9XKEsHZk9B8ZVeqBOg4lnyJiJ7xAu0r3ODbGEETo02nCzpW+PY2464WnflZiRUcPtFvazCYuPgKEprnTzJKrgXJKj6lAjOFOsQf2LfAFXb+GmhzUYWUoBukKDRX366ESejjtMWru/kOk7r64EHrucYX7c=;25:cPCLHZiH7cXvuGT9SRWhdsRRiNDTYxbOQpqrf8GrgjnZPAP77GeJh4j/gn8FUgwXWSeB3oiled4ybQKleCYbiFCRnFx6iHg0iJ1kT5DAdnQZs9zXQnM8DlVSFz4vj70umN8H9smymvOxpey2vhcBxfp859Ex5vrQu81UZ/pzsOT6OM3A5PWIN/nwDykdkTGG+oOZji1u6N3s/LEYCkVwWilKEyWMbYPp4MMoriyanwi7eRgfeFcKGtajkjs0eT5L0HdYs1kFC77GIeu3aj/gAnTaqvX6SA4cvTqNlY9nkvEVbs0zSvDuj1WTm0ydSOcN5FTpFprPhhTzKG16WKG3eA== X-MS-TrafficTypeDiagnostic: BN6PR02MB2452: X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2452;31:C4IKdEjfnJJrWejwKjpv7ZmaXiKe0QmwnqlIrX2N/nkQCVTLH85UlQdzgeSyiZN5VZGUlRYruMoBFNFsoBpLIWFmNpOYaHgz/j816sCI73QmXoe2VEud+W+068aZphq93QacxUbvfR2eBKK2JX7Mazq4BXfzoUB9LS7wpq59VU9CgWJTE8b0jesAjdbo6ugzIEIwP+jSv6f0PPCqxPFtWs7OKsU6ecjNlE78GrCgsyQ=;20:GESjnOkMO7B8xhU1+APH6jCWvpvIxHW2uVgMCXKsDeihVQRNNNzKiYKHyla0r6B3hcP+miYXpxUBNq7b7dDIQdzoHFNacmKcG1j2XHYNNQNCJbKDwY4p5+2tbJ9tUcSdc6mYbGyzWjAmaIDPqLNaEiKt0vc7/6IzL6bleKAEYyFVcta1pFCXoSx1pDgKXMTPp3GY7+h2hqeCbCzc5toG3YGAsbuit3Py+VicyYzjAQZtjX0uGXtDv4vnbZdCKAE51bXfPeiLJ/1zGoHkxMwNbBnJPvx7QC/EQn5WmQMdUxgcarg5JdLlCd0a8SKVjk33VKlsKs4Qd2QSK60kDSpih2mwbQ8xZyaNDfdYowosQUkQS3izOc8rguLpJa87fn0qt7l3e/GGjLujk2OGHc8EpM2mxAsxAQHm7UAo3D4PZv2r8RWb9ODYejvhcS7LcZOYsIBgIQgINFhS5xdVD8B77RuV+3NO8+JEdEqhqHFLRH7ymdKrUfLE3gsXBcWzNk5s X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13018025)(5005006)(13016025)(8121501046)(100000703101)(100105400095)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN6PR02MB2452;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN6PR02MB2452; X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2452;4:pZMLuXYHBaSgHlgXF2WtIRmr+crj0i/lxVbzZ14LTVgMccjwCCFK4yLpy3MClOZV5AzChSsZMVCjeY8CJ/gSBXmsoLjzngs8aDYnq+48fpox9LD/h6TgIrwrHTpZvImljgrw5ltuhc3wwQHXTXVQnFu1SYjL2f3dw0XeTSUbJ0IN/qLCc2btOtMAS9nBY5mY7yuj8cuTGBV/kHkPVZAomYHy9Xhh7Tw4CSjMAoW3rIr+iX1UzjAe84HCNDNFveBUd1F1auf/5AW1NMvzVnqhcSEe7MSp8NERGjkOxdMS02E= X-Forefront-PRVS: 03932714EB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN6PR02MB2452;23:5OzUpSnyCro0Kq8xTLoOFe5kxvO0Dl0tjh253qBGG?= =?us-ascii?Q?qGkRzhfMETSjZxLrPp0MO4AQc1QvQddFAy9+YJmnOZMpgk8KMoCovE6DNrso?= =?us-ascii?Q?iDf6SGhZHWBz97GcBclTKhBIH2h/3U6qLDKGDNSbgSrsg5xjj10kk0Cq+Lw5?= =?us-ascii?Q?Wn9mezBuyQC6LLS51IsFFI6/yZxIKWcSJbvgjWek0dNcoYpnMiObiGnKN3hd?= =?us-ascii?Q?UYMZBDWWgNf7a/cHDAFz1HFWFp+URG79ToPz2WqEOawyy5+10JN+Uyjo6ETZ?= =?us-ascii?Q?4P8rGIL+1wnwiAMne3HgghxoIhUMrzU5F+WnXXPkEmaIWe/e2qheX9itzq8X?= =?us-ascii?Q?wdYvHfj0CD4wxwFVMKevBlMHqF2R4zfhWA8vCmE0vKfOE3cdBBvD9eHZ7kGw?= =?us-ascii?Q?ihB/1EfIbMOOOw8MV8VViHLGWtI6oCGw9s+75zwsh1bT1fD7XxHp++14QPye?= =?us-ascii?Q?h4S2K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LshYtf+v+2Gkfxii50g7I9Hfn1JpPJdXGi1dHQ7prFXlDKdklUfRtKezZHYIWEIeCibSnTA3LVN3R6zSlRTil/iy/KxaK75XoYixniqz0qHIQJOipqHju1QO+JtpqvYPoPduLF4otb89o5yxPqxoZuHzc3oxQDz07xdQ3USkTyFVAVmRTKKm5BqNqbdgw/h78Ny/+/qH+NnBU5ieYfN1fOumiejxTgNGlGiqNGnRssAajGNGLrN3jIt6VrTGyU9O6NSn4lLFx9HG0plXY7yrhTLIIiYm6/tqyuPwAg==;5:on27OjTp/Nbmrie2r5WZVYK8oPSg2mKKjTJuNsN8opHp6LcY0NwkwXA1NOjot0uGT8sbm3unJavRCLjXcy40J/+0zYfbVYGzi/gOjPTgnVJyWqNDtfI5MTyLRINF0gXqdDWh6r05328XRBJdT773IQ==;24:eo9tuMnGPwaHNgXHSkO1mx1UEZm1DG+Mv7tD3yt5LQRztPSfQhEpM2GvIr/s3EJP0zvTELD1QJNE27uR/Lf4SnaU/eonuw5pWK/4FB3ilt8=;7:g3E1aH8DT1UnCtgRsEavv9upw2qak5+tKCUgDkMt6HG12h1qT6nYIHpYaF0wab68VrUInovy/A6VGmMY7Aj8E/AI2jnxBUZuAUefKLDt0Gp6hZdwjgnAr3CXhR6DwOFOMTJkEp4G6T+8qx2NWGHfsMcEM4h5wDAOfwzCsrMeV4ujXiiYcLSkbXpFawB9ZhbSXzGXOOGXza296P6y/oreh5zlh0CwEmNdHCdjUOf187A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2017 11:12:59.9608 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB2452 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1652 Lines: 51 Enabling Root DMA interrupts Adding Root DMA translations to bridge for Register Access Signed-off-by: Ravi Shankar Jonnalagadda --- drivers/pci/host/pcie-xilinx-nwl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c index eec641a..5766582 100644 --- a/drivers/pci/host/pcie-xilinx-nwl.c +++ b/drivers/pci/host/pcie-xilinx-nwl.c @@ -39,6 +39,11 @@ #define E_ECAM_CONTROL 0x00000228 #define E_ECAM_BASE_LO 0x00000230 #define E_ECAM_BASE_HI 0x00000234 +#define E_DREG_CTRL 0x00000288 +#define E_DREG_BASE_LO 0x00000290 + +#define DREG_DMA_EN BIT(0) +#define DREG_DMA_BASE_LO 0xFD0F0000 /* Ingress - address translations */ #define I_MSII_CAPABILITIES 0x00000300 @@ -57,6 +62,10 @@ #define MSGF_MSI_STATUS_HI 0x00000444 #define MSGF_MSI_MASK_LO 0x00000448 #define MSGF_MSI_MASK_HI 0x0000044C +/* Root DMA Interrupt register */ +#define MSGF_DMA_MASK 0x00000464 + +#define MSGF_INTR_EN BIT(0) /* Msg filter mask bits */ #define CFG_ENABLE_PM_MSG_FWD BIT(1) @@ -766,6 +775,12 @@ static int nwl_pcie_bridge_init(struct nwl_pcie *pcie) nwl_bridge_writel(pcie, nwl_bridge_readl(pcie, MSGF_LEG_STATUS) & MSGF_LEG_SR_MASKALL, MSGF_LEG_STATUS); + /* Enabling DREG translations */ + nwl_bridge_writel(pcie, DREG_DMA_EN, E_DREG_CTRL); + nwl_bridge_writel(pcie, DREG_DMA_BASE_LO, E_DREG_BASE_LO); + /* Enabling Root DMA interrupts */ + nwl_bridge_writel(pcie, MSGF_INTR_EN, MSGF_DMA_MASK); + /* Enable all legacy interrupts */ nwl_bridge_writel(pcie, MSGF_LEG_SR_MASKALL, MSGF_LEG_MASK); -- 2.1.1