Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758200AbbKGBrc (ORCPT ); Fri, 6 Nov 2015 20:47:32 -0500 Received: from mail-bn1on0114.outbound.protection.outlook.com ([157.56.110.114]:36192 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755229AbbKGBqZ (ORCPT ); Fri, 6 Nov 2015 20:46:25 -0500 Authentication-Results: spf=fail (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 v3 11/11] staging: fsl-mc: Added MSI support to the MC bus driver Date: Fri, 6 Nov 2015 19:30:27 -0600 Message-ID: <1446859827-6927-12-git-send-email-German.Rivera@freescale.com> X-Mailer: git-send-email 2.3.3 In-Reply-To: <1446859827-6927-1-git-send-email-German.Rivera@freescale.com> References: <1446859827-6927-1-git-send-email-German.Rivera@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD042;1:tbcaAQyjwbVJ6UI3Go3BG0IrFNCIXi/Am9qbhEw6A/4ZsgTbNSQgd4n8u98NB+1ZVSuL7l/3od8RUrynEedcly1yLZVIzuCZMYIBxOrymjA7Vs3kVtz8wC/T1dzwqOTXEGcKSY8Wd692R+oLd+bL993EBggof9Zxz8ffoEuynPqe6uRYbUUlbGCFoQMJRSSG80m5sUzRtMJWCFNhvCVUxm/zUgebrEwXU6wWxrViX3kZBzNGf7xRihviYHLOQpq+1wOBSSjtXORIWD0PjRWFbNAxa6Rd7Ahik9kTFR/qz6sBiFljVEp0/7sREJZV8rkjsTvB4CnELP5VkcWPxTmA+uazsLOsWL3W+hGObEg/aV4+K82u8oLgPPy9ca5R2HdlJhQcldcLNWkd2iAS3EPQow== X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(2950100001)(92566002)(85426001)(2201001)(86362001)(4001430100002)(47776003)(19580405001)(97736004)(6806005)(50466002)(104016004)(50226001)(81156007)(19580395003)(5008740100001)(11100500001)(48376002)(5001770100001)(50986999)(76176999)(105606002)(229853001)(5007970100001)(189998001)(77096005)(107886002)(36756003)(106466001)(5001960100002)(87936001)(5003940100001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB0749;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0749;2:kpWDHdB6dqt8objsCOuK+Nu7jC7Xc3pkYgIUpNgJe7slC/pcYOWL6DMUvzWvSt1wy8a6upZaUCgjBy5tQj3QGRF/ZiLFb5k3xkQZa3apDatY4F+FaE+GK+VO358Hqx0dqnc52E9ZV3lOlOAeWCHWzRJboGVxIPkXZdN+s+IfUK4=;3:JAKQB1lU0rjjbHHGtQYrs6rg4/Mmqmkpz2WOI2v+K3jdSTzOjAZUy5mm42tUYOlk8hs9pA5590q2crMkZ7ZKWBUpVQBSiAtcTTTHwj5TV5xfCyUPkePIriL1+r1JBPb2wJRTafcKYaPsX7ROl0YWLWxoQjw/GSP1TvQcBdYd/iCrBXmKsAwkRFQ9YUwK7lnIjswrMsanBImdN3ryqzziDEKqTsGlWMJJoE0z+13WMRs=;25:lFQ1xnALyIsdGurUPtA0UMrllWwpHQBMsb62m+bUeJ60HH65wiGegicN68ha+0d2p6P0hMmAsbTKbNskLgEe1cZAp0nqnRKA3W6XeNQxY0wYffKrDf0ADfDWy4Pd5bKTuVw1uKm8VBwvpj2vOtQptT1ZMYDT4GzFTAHA+LRIJ+/IU6oN+kftRJv0+GccVVKhMYaNW6wxuMm+e/JZSpjR+0qQVLQU7+BYjymTzO3aY3rhjsUjwirQ8hde17DN4PT6lv02WROenQ3joi1r92+pxg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0749; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0749;20:YPNqTg6BR2oAqK6BtzNzYKlJc5ybi8eBtyMN6fROF7J35w9zRGt0gEGFXXJO6WRrJRp8AczTOvo0mQOgXcRcXFwnfYQpYv+fcDvxIuJ7WyeaJj/P2SnIiDnsgcLN9y5T9HByqf+K0VpqchHUJNNYq1Q4RkHJurfjJ88jTgC52qYg0AvMsKE5phR7v9zvauO0/AbDZURll/aTx2MlYvaBAN+pk35gNX8/rDCtT6LfYXeOqBPvXgbHp0zG/EbhelNY7M/4DVcyAhRbfibV1MtjaTKlhtYbLmYTVKJXpl/vmCRXOZexnMK9p2KTeGycVI/tb99JSDRjCbj/Nm0hpUV73GZ3rXrdOdDUldYM+UAfJds=;4:DQUJJwnVezuT5GOXz537SGSBZpKLCFHtWfSACtPGxXahAsT4si/XdEkhb5RCpK3SdYQOHIhg75lLvF9CD3F0HrD7BBIXsyaUzf1E0tBZgrd+uUh+d7m83YL3kvmsnX1OhL/EMV+b9cnhsiicIrjH1oUZlYuoeXoVBXqKvGY3qUsJoRhKFBANHbrRsZkB904G5UrpB1CVoeDmZDVyd5enyXQxStgOuSL37Oy7otS1IbkfdX/yVJc/mRAmMXe93AluDmIxkyYvFflKjPV55mUQ5QuMG1aFtn/wmHiSGI6jKDLEra1vyhObCqXVurlwEH2FkFubiH6Wp9NSz4DZFvPRzM2TIFzsZ9iG18iuThkLIR7wtttLccYeYQSvrB7dDeeh 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)(5005006)(8121501046)(10201501046)(3002001);SRVR:DM2PR0301MB0749;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0749; X-Forefront-PRVS: 0753EA505A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0749;23:QSvw3FB0OxXSrJXKG2jDMAPNANg6RV5KHtuDQN7?= =?us-ascii?Q?eNHN+aR8PAHFp2Ek0FfvQPaojfaRhpePxPQ1EbGFGzsbz4qPtJSRzSyjqgFR?= =?us-ascii?Q?lf3pF3cNIwmZzGutcLThn7BT30binp9gJb9zcZUwLFShVFcYOHT5Fi/kU041?= =?us-ascii?Q?nApbnXsAfBaa8X+ETxsMlGsJlszEl7UpdQjCE9OtKJ2eBNybf8i0Y3ZaaNHb?= =?us-ascii?Q?8CUmzhZmil3as2qlTCUJoPGPlZN5/cfr2w27d2gkF6WWK2jephJao/qLfGjY?= =?us-ascii?Q?LinlZOZVESckyocSYtP2eWbXYEH9fyyFYXf2+MguZZVTyIclUKziLnb+o0W/?= =?us-ascii?Q?/2S2FfFSQGlbtjiRFJ78QfG78faYbN+0i9bGm3mPKYR4Ty8tlf6oslhM8H/i?= =?us-ascii?Q?sdDSAGTvW+pW4LdNOn/t/c/5J4OLyph4GXYxM0yoN7PC/bKMK+dcZyaKKxVj?= =?us-ascii?Q?xgPwvicRrIvuJTtehAXKyg0bRuGEJ+wGA5tpFr1qtngdl9UagqZmRijraZpf?= =?us-ascii?Q?tPGIvYRCR1WFO2FcWpgV6kFCtmNTT41kfqZdW4lsE65LlN8uPrRVORVQS92j?= =?us-ascii?Q?9Zd3BiJvCbMq99tAVu48j0qbi82XZginZ51cU8vY9XZBlLC+maUP2JaXTuzZ?= =?us-ascii?Q?Uya3KcTRaYpTsFpTlhSV/ECysOzdLEsxrpFCr0xM3NgIaIKPVsOrMDmip8Bf?= =?us-ascii?Q?0g3B8+FI6hMpKBdE0ONOoiqo+wbIFjzqfMUbfBLIkexXdpEZ4bUBH0JoX5Ap?= =?us-ascii?Q?b/RHsJQmhRJipuu5XMWVFnPJVLKJAzyDOrGcrGn9GV64MNV25U4EZj1EoF/E?= =?us-ascii?Q?z96PmB3OQYMK4GF3Qu93uf2aJvMk7FvSQKXZFDxGGrZACE1fhewui1Serz8X?= =?us-ascii?Q?Urs7n1YXMuPGOI8d4uiStuhE6iUDAEy4SVxj132sY9Siwert5tIpLs58orBk?= =?us-ascii?Q?/EDAuDUEkNQyTZgm2Xgk1zWFa1TTPwas05O7ZBg/SPwvnYNalpqNIkE7l1Jx?= =?us-ascii?Q?n+yxglQ1DcZQ64VAIB4gNqcNGEZcgM3+HacTigY7cC42teEC9MvJYQeUZMbD?= =?us-ascii?Q?ko0BJ4XsyaFZjryfZuuiKlA0vG1r2?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0749;5:dzDkugDppDz0EITWGpDrsanh3JmUdcs2mZX/G6X7XyTJzB1riBJdbROD3pqoMVraQVhTjaeIpCgoLh8kSJYmrNrpAoXQwWUmxLyi5QQxaz5yRgBVMgOCsjiTRLWX5K1IGhD2KC2QVLoKlrqBjSp9aw==;24:EVdl01xnF0TKmHTn39xNeLv3PHRlCPtmtl/ldu67Vvg9RhxVqxkWzyEl5v2nWKdWLqVjEocP07GFbXY6GIj/ATU6h/7UU55EgVWmWwwnRgI=;20:8DFccI8WNwwb7AUu5M8DB7P3KsMBE4K1NGcCX7ayO3zTjqXt0g62qWAkKziJCiDfPm0KXxJ91kntQ2enGO4HBw== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2015 01:46:21.6025 (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: DM2PR0301MB0749 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1925 Lines: 68 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 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/