Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755805AbdIHMZU (ORCPT ); Fri, 8 Sep 2017 08:25:20 -0400 Received: from mail-by2nam01on0042.outbound.protection.outlook.com ([104.47.34.42]:53408 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753202AbdIHMXa (ORCPT ); Fri, 8 Sep 2017 08:23:30 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; From: Ravi Shankar Jonnalagadda To: , , , , , , , , , , , , , , , Subject: [PATCH v2 1/5] PCI:xilinx-nwl: Enable Root DMA Date: Fri, 8 Sep 2017 17:53:03 +0530 Message-ID: <1504873388-29195-2-git-send-email-vjonnal@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1504873388-29195-1-git-send-email-vjonnal@xilinx.com> References: <1504873388-29195-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-23314.003 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.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(39860400002)(2980300002)(438002)(199003)(189002)(50226002)(7416002)(5660300001)(305945005)(356003)(103686004)(2950100002)(6636002)(6666003)(478600001)(2201001)(189998001)(575784001)(52956003)(45336002)(46386002)(47776003)(2906002)(106466001)(48376002)(42186005)(50986999)(8936002)(50466002)(36756003)(5003940100001)(33646002)(76176999)(63266004)(6266002)(81156014)(36386004)(81166006)(8676002)(90966002)(921003)(107986001)(2101003)(1121003)(83996005);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0201MB1931;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT017;1:MnFM5qYpAcRAVXEMq4SemGhHka4Mm3lH1WI27KKorvvTh5rhKx16GFPHI29rpieR7gH5iAYq7u93UBcaZ5ZYPcljxSQmcDJLYldY+cJakQj0LapDrAdxws5dlzuGcaVP MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d8fde19-49b8-43d8-3f79-08d4f6b4684f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR0201MB1931; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0201MB1931;3:dyQM93OgKhEDJ3iBs/l4MgLXz/zETIK4Sp9nru2M8wmsL/ihzPvKGDPQ2WGYXXl+FWGrjsK5gS5V1/+lOGkZaxZACqtuNGgwiyN+UXrkQzzrt34/uH2oQay1FRChhzx7ud7CPRcomFk0XbfsiXHp1eexOPlyYLtNPZHrLGPxRA9bA3zu9lecmwQjj7gmYuUb98JuNtfEBK7Waj2SQVEjSPK7c5MPEN8Nq3Z9HeLz0qRL3zuOhuec7OGA8wK2GvhaZ3o/y2EKp7j3Ucc5KrC5KSRamAm3ocivV7MDHWHES0a9078fPnLA8JM0xQu00YJQ/eHGUl6Mi+WFzBiiRlN3MaSVXTeIKc68EVSBtzBqlLM=;25:a2i1rO+EO+53wl7bXneGeZboz9N8EtWkvYy0m5L32v+gfdoCQsfJs1pitPrNNxzqQDSS9N0k9z4YpwiJFlH26AbMgMLj4O/WaQXMvWlYg848YdSSot1SMq0J3FoTQZLpi+ZVWCKTCeNrn15tiJ6oxczhdCYfqa05XGZu17bFd9YJM+4lH6nCqY1SPKOsteLlG5vQyYpiLoNtzgoFHbMFDShBj+T9FqdgMKudcNzhEZN1EDg6mreslp8QiLhPlGHZorjVpjCGYO8WKnjxZI3qmbW241C4QuPXaSM3hCIWrLkpOyP+yJpCb7xRqPLqF15UstQ3K3Cq4+fjDjTvGeWvwg== X-MS-TrafficTypeDiagnostic: CY1PR0201MB1931: X-LD-Processed: 657af505-d5df-48d0-8300-c31994686c5c,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;CY1PR0201MB1931;31:CaAUkUoYN+qyWxck7iYGCLpmXCpYjMDUtmFi4cBNJR4LrxB8BP73AYWMxXqDg/Xyzxd95q/1iwd8/vm7v1THw1CZltiYgWJ4CMDv59AuDmzl9+moCIoVdo2P1GPCm2v9KYvRx00176pyOizc3InR203gPitb/SDJRDJcYXJx8cbKS+A0TEVwctZf9sWzAu8VXiPtfDff1sBtb5NdHRYfWY+I+rDwSDvaa6xCEsMgulo=;20:LPxGtPGk95UUFeRUyPXBsIurbLWyjbBMsT8E96b8MFQH5KIH8XSotYDRL3P+GT2h7hktPOuQG/Rr/iJQmLmgjbxtAPJdhjVoEIrAg5LUekgBIkmZuGmmZWdz9ZOBMRD8om88P28GDVX75knAhb3gWEc9q8pVgVOVOIeQzhdF8BbzfczcMCkwlJ0THk7N/ZNUFkgzabUz+BdffVnvkBF4Jzp7L34OXj7GdKUtvERwELzqXX1MnP3sy2qMwgwU3z8TRDyRWXsn47obnEyhDLIl0ieX3PCnJMYsZGy21SHblsM48LrNJcX57pJeDYb68Gq9v9RjouijXksrpCq4lDbfVHkydwZ0KMWYfPciyk2Fnu6werMN7TAx3kIJB6LKErATiOzPijJ8vQs/CY+J7GfZOhPx3Za4H6Kb8ppuUCc3+DijR2mulOgUOElq6FOiy3Glt3RXVka/qUKXjVDqX5m7aVGjBJ7EiIpa/v0h3cmDqtJOh4pa72cTpekBj54mHOWP 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)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93004095)(6055026)(6041248)(20161123562025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0201MB1931;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0201MB1931; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0201MB1931;4:91q3veXBaSQtmX34DgIZ22by5tz9/M3F700Pml3VEHCk6JumnrpcYqHgFjqOuy/R5soBzDPrbsgnByuVUB+KQch4oiozunW/Gtl0jgNAE29299lM5kdXVbCrgz1dQ6PZfI3Yi+kmsogfM1bAGxKCHRGAcuujlY4o9s1s2wz0gAqZ5pOsppphPRCz8sPDgxO13VV+yw0sqyj58lOCb1LZG5sbsJL2gGgNyIb8mdmDCVT5VvrvaeMqxorlZdpZMOshkvvXWN3agfyPWAXWyjm/C0c2FNF3tHaJYY8lxOrt/0Q= X-Forefront-PRVS: 04244E0DC5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0201MB1931;23:wwbg9ASv+jTbLZODoSEP2p3NF3j2h2oxDJgizxJ?= =?us-ascii?Q?eYxo8BSZtJOq6cZ2v3O8HNp+ygmMSwXVaVuUl1JqVSziBRaedEZCMrByXNB7?= =?us-ascii?Q?zuYfyH17eCUZfifvlT2riCZSKGJskIU2y3QZ1HQi3Z2ca+xrMw0ZSb1WVWzC?= =?us-ascii?Q?2WzVpRMBtXnpKNTJI1QtMtImnqTKJYq/xywUWiTb3suDkwuVIfXth+Vvf63h?= =?us-ascii?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TUJJt6HGFuVx5mg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR0201MB1931;6:8pt5YrQ0UEE5y0VLstYiZkRFJh4jDxFDi0UkZYVUWvjSZI3mpc7fUNdqHLdob91kTOeIBh/0M6cblzZEIk8o0MmNMtcEq6X7wvrx+HCXohnT3UgAm0F551+WGdiag2wifh/PKGamVcyUFqYpCTCfdZiEjiO6QLvyu1eDhRL+C6t5HdrlYoeH/WgJXs+FDFC1+wwvHy4sM3gFEmf6LNWK7WrdDL+ftsMfgOnUCjl9OvZMUlw5oz138GqNW5nWcesaaS3hdR2pTnXyQCVvpEjzu5aQY8N+ouVDRcOy9jKq5xZ3H1UDL+Hu4N29HAyh0+SW37PUvahyylDgVHUA3cflYQ==;5:kV8TTc2Q9YrxOfk3nixQp03LxY82yKu3Tq9vFxoMXLmWXP+/pL8ZwNgd7loD2Jampnl2xLVd1ZUjtVxSjhmly15Dqy7lEW8BiVgNI/kk/xB8kAqq7WR9toVMkds8hlVZL9N4mM/zVBFUAZfyIZQNRg==;24:iykwUBGqNIEWeN19VQl+kJ4G1ye+5ZKucR/P3h6w20aqvBkWnl23oKYzxi3fbdZ3Jjk6u6biZNtwqaab+E9w5AXsZ21tvfMS0Sa8OIk3+g8=;7:b6xlmXx7SIBlnLjFAFFykP50AJUTS0uxelkUWdfp2QGECrthPMHZPHEIWo0ixtGdSb3Q/MTxaS4hLZwxEe3+nM2PcdAUTOpNuSOWhJb3QQahvyppWIhOf0EuB674JasSgau0VKz0gksJPs/ILz4ifatJTVzdXW3+ewP0B25MoBXqgqdenmIPqcCKIOFvE2tSHsowPb0zkUE2wvqupI0Hztw6pT1jM751PYGr6izYi50= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2017 12:23:22.9870 (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.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0201MB1931 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1708 Lines: 52 Enabling Root DMA interrupts Adding Root DMA translations to bridge for Register Access Signed-off-by: Ravi Shankar Jonnalagadda Signed-off-by: RaviKiran Gummaluri --- 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.7.4