Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753328AbbLKS3c (ORCPT ); Fri, 11 Dec 2015 13:29:32 -0500 Received: from mail-bn1bon0145.outbound.protection.outlook.com ([157.56.111.145]:50560 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751089AbbLKS1M (ORCPT ); Fri, 11 Dec 2015 13:27:12 -0500 Authentication-Results: spf=permerror (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none;freescale.mail.onmicrosoft.com; dmarc=none action=none header.from=freescale.com; From: "J. German Rivera" To: , , , CC: , , , , , , , , , , , , , , "J. German Rivera" Subject: [PATCH v4 11/11] staging: fsl-mc: Added MSI support to the MC bus driver Date: Fri, 11 Dec 2015 12:09:49 -0600 Message-ID: <1449857389-2506-12-git-send-email-German.Rivera@freescale.com> X-Mailer: git-send-email 2.3.3 In-Reply-To: <1449857389-2506-1-git-send-email-German.Rivera@freescale.com> References: <1449857389-2506-1-git-send-email-German.Rivera@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD037;1:B/hF9LzM27Vz2i6PRuQ4Y4DbGX12j9v0yzgwshENuxizx8FSZvEzXaTFtbvZQWjhEnHLB6AM3dUIe1uJwKJ0RYnVbswaUjNi5Segc2HxW94N3GJp3MsJBHm7pK673kKWzRW7mf5qm1SLCXPtC+xjmQwauxF2zNiTxr0qVzcyGAxdMCOPYmPlAagvfz0epx9GoZ8nlAxI3TxCs5oLYs5BFR1I19I3mX7cU+h4XuIE6bdNm5VNhRwPMcvHzTFJUYWjlrzqstcdLnVutSiBYZDucWk61qnfBq81vryPaGBBw2cPPNjgpqIpcPI+bp0zhOIc7FI/9omarhVS73Im+JyI+umSUNbTKLVE9oG+qY8/m/GO7jhQ1PqHOcwWck4x3B5B5FeVGIx/5Je0NHpPgd2ntSmVD2q3Yk1xeWqzaYYtfzN7RREslcpfPZE4em+UlrLg X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(448002)(199003)(189002)(77096005)(11100500001)(76176999)(104016004)(85326001)(19580405001)(19580395003)(1220700001)(5003940100001)(6806005)(1096002)(586003)(5008740100001)(50466002)(48376002)(2201001)(4001430100002)(50986999)(86362001)(106466001)(50226001)(107886002)(92566002)(87936001)(5001960100002)(5001770100001)(81156007)(229853001)(189998001)(2950100001)(97736004)(36756003)(47776003);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB500;H:tx30smr01.am.freescale.net;FPR:;SPF:PermError;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB500;2:yrgbZYRtgAkzonnrX17YWkq6y/HyeSGHP0RzlaVMSd9ItRvdNFIk+tqt3qG/uJt0gHWs58C/SQuj8VaczxiYZ+VMzxSo0BTWdVWzKWmRLa/rs/2BGjpKy3BdreKtDJxaTuEhQAmELw+fBXFVZkxkjw==;3:rf0ZKXDJRXNn+q6Kh2H0KW/h/+A5ca/FcVKH6v+uxXu+hTYXO/pn5lHMG25lSoCVvTb1ZR8YLcKs/Ndbibvy4kzG3QGKC3Sj2x4bImvtNx5NWqcNRRVyNGKfoF82KZiXcUKA3arUkbwE4t50lw9pYgwg+vlDubGDNeaFdu6/83QlDSXNUI8kf8UUCVyAMNkot9P899l1J19K5q0GBK/9T9RdcVqcD76R4ivq31oR72k=;25:ChK2NmW++xmU1LPVPbjOpVXLUlKBVGygfDXlgesJ6Bx8S9UvvgLzFg/1SJiHtlp0S8MD+9MmRhILB7+BNUf8SmCCEuxcsM4d+xggqUUIy6T2Ce21DNQ5OUE0GCP5Esg4GKk9KaG8bloDGhWVVtXXeN/Gt9X/cYVBcJoDpBZCHdOgA5FI/L8NbGMxjTzcy40zgBaCcpa1Tv0R+CVxKczRRE6ITFHVWV36aIvpJlwinEsvUIvLPY2fsWj0G2+TIEEoNlmjEuUX0kG5J1B9ogGrCA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB500; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB500;20:nnmCQHQpDKpFApJHVFjNgaI1JXLc2Tw3q1ZZ52zEtw/m5U1rLGuCpMwgTOH6YVD61FGVIorbWgN3ZAVtsXFH7QinaHXjzALLdasWmA+7DYtF8dKsLLOdsji2mOyuXy81hgEtLlt82z31FSE0opCkMLmP9vPa5hekKDG/Yxr3570PrFmaXYWAi667P+T69Y6n94K0q5JziI9JRIaGo9sBQp3zmNYIur92ZwARO7B2Lyifmpwu3vcov7BtFOuka7mxUcEMvzJPrPdWXyMssWY+t97jg/tQjZJaMUWQGE/LrjMkNzHAq+WoWuJ5urWEWldP2C7j09OeImMXkIRkxii7z5LzXvt/8l/EC1Xvt/QbYvQ=;4:+Zu5xiYNfYux7+eInhgkAreg+QoNW9nHNxXA3TsO1Cx7/3u/uH/7ZK5JrY3NzYgS1iolEXzqdON83gNVi6ZYw6ZYH71ncXW8+KEDKU7NnFn8/U9Mhas/qYqqj/yQQdh4kKOQP1ILQ1uE1TfqKlgjxSeEj0ruyKs8CF6gdw0sWyo2XNQXL/U83oGhtUyuiaoNpMjyn0/V2+nWnFUqVuOn8Wz3L7LjO5vEYQGpBk4/KUI2l0LugVmWYGj8B8RQNQHMlp7FAF0p7jDlv2ZU0RtrXIW3OV69u8iI3NxrgaxOHpn7vXNESSXumMy0qgaOiR7S7K55y5eLOQC+HdGF+GQlCgw4F8T5lTwIcbZAepRZNahUHdjo1+TtD/p8gZxmoiPyg5EeSVqEC3I8IVIc6h06KNXWdwusTlVRKuG8IaF4c+ZNBhDueNdCglOyEJef4Q5n X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(101931422205132); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001);SRVR:BL2PR03MB500;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB500; X-Forefront-PRVS: 0787459938 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB500;23:bIE88CH+u0GfzkOhQWLd1Ev3ihhryYKcJrpct8n+Pm?= =?us-ascii?Q?sJ1ehZEgCmImcBIrZuvKvk0ybAk4GSfj2dV8HjCexxDc4s0DsO/lh7uIXfaT?= =?us-ascii?Q?0AgPUuzg9dsmbeHF86Yk6vefSb3eZjSdtKDXP7GEpKuQEB06omwFJU9BuTh1?= =?us-ascii?Q?HrrPx4PzJMB0MwOuyBMOlt4zdyPfhNChC/8Ckz1M+stj3AcApiVkRmqG0mjF?= =?us-ascii?Q?IMIzb4pnVLSiPvWmbN1s3vCsR0hkBxD1MIbxEt6J61bDs95Yskc89/xnyJe2?= =?us-ascii?Q?8zrv2Tr0WbRLO5AJGFm3NeFpcDh3GrruZynWFFUsg68u+hcIVwf0L8wgWygh?= =?us-ascii?Q?ZpCmbm0buO8yAzyBWHS2lUf/paNjQZViASryC7lKyZoJcrSiQKG7pM5vxzzV?= =?us-ascii?Q?Kni9Wi8pzi+1uZuIwhnXWyfoOg0oOsrB3RJ6Og44lmP6kWNQWVEV6eAjeudg?= =?us-ascii?Q?n/pqgBBaZQhuie04UOICuP6RrMg++MngSwCFOiJwoK6zuBtIXb8hTD1CwqH8?= =?us-ascii?Q?qPBNziysWXIEg3BKamr35TRSnVgPpo9N4zze6LmSD6R5zqlxxdAXVrczUm4b?= =?us-ascii?Q?ClkHrtjcu9pvsqSY+m7M5LffS00T3U6P8FfDaIiYI5WruJ726Ae1exTVseLF?= =?us-ascii?Q?SjDQXFRT4fFZlUTVdYB3oo0LOxkhHhk5BxRZRCw6ScJSjB5x5mgnsqg8BcxL?= =?us-ascii?Q?/hquVZodXP5Dy6udYJIUfqpkw1e8hfTKSu/7aPo51JoeaUdng+QgxNJ4SZfN?= =?us-ascii?Q?V4ahDqdmsozOwPcl0VECrGD5oKjoPX3XcjCX+Jwrw2Z9P0nsY37fYKNFj1ew?= =?us-ascii?Q?gakidvVB6Uh645OEYqXZ7OMf+LMjR5ahnxSQ/LKyAoVWHzV0p6ueBCeuoSHR?= =?us-ascii?Q?NnSHoCPbu1GMCYamIDx58BkOxwWF0+qj4ZaFB5iSsMY9lNzk+6OxrV6Nqz9p?= =?us-ascii?Q?t3Rmj3xBP9WOv9Pab0jWlcgDdK4fmGTIU6g+wm+sEw7M01H0m2c5+l/rTIxh?= =?us-ascii?Q?puVQU8wv3bgFPRkZR9W7riuSrEGqOmeMlzbUcFRVQjTw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB500;5:XrH3KbMBJImycDOOUkQTN1Pwt9s/4hzdxmdMF4BFxpKlFiwu4AetfPo+r6uelDsYGxUPlCOw/0fHqsbhSKcaYqtaccFPlJGXd0HfX2LyX4MdC7nxAYGUCx7m00fD2bkIQBfeFTHVjJOuMGmVeKRCfw==;24:KVZlyUvMKibVEaKYbg/y5Wz9kvPy1dq/QLD64TiDOrmN13tSl1DcciNNNQUrnYxOJu9uJEcGwJfnJcpod5mdWQkt5A8WLoScxbwv0WjSaFo= X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2015 18:27:09.5147 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB500 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1946 Lines: 70 Initialize/Cleanup ITS-MSI support for the MC bus driver at driver init/exit time. Associate an MSI domain with each DPAA2 child device. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/mc-bus.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c index d34f1af..9317561 100644 --- a/drivers/staging/fsl-mc/bus/mc-bus.c +++ b/drivers/staging/fsl-mc/bus/mc-bus.c @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include "../include/dpmng.h" #include "../include/mc-sys.h" #include "dprc-cmd.h" @@ -472,6 +474,8 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, mc_dev->icid = parent_mc_dev->icid; mc_dev->dma_mask = FSL_MC_DEFAULT_DMA_MASK; mc_dev->dev.dma_mask = &mc_dev->dma_mask; + dev_set_msi_domain(&mc_dev->dev, + dev_get_msi_domain(&parent_mc_dev->dev)); } /* @@ -833,8 +837,15 @@ static int __init fsl_mc_bus_driver_init(void) if (error < 0) goto error_cleanup_dprc_driver; + error = its_fsl_mc_msi_init(); + if (error < 0) + goto error_cleanup_mc_allocator; + return 0; +error_cleanup_mc_allocator: + fsl_mc_allocator_driver_exit(); + error_cleanup_dprc_driver: dprc_driver_exit(); @@ -856,6 +867,7 @@ static void __exit fsl_mc_bus_driver_exit(void) if (WARN_ON(!mc_dev_cache)) return; + its_fsl_mc_msi_cleanup(); fsl_mc_allocator_driver_exit(); dprc_driver_exit(); platform_driver_unregister(&fsl_mc_bus_driver); -- 2.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/