Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755476AbbKXWtt (ORCPT ); Tue, 24 Nov 2015 17:49:49 -0500 Received: from mail-by2on0128.outbound.protection.outlook.com ([207.46.100.128]:52822 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932294AbbKXWsG (ORCPT ); Tue, 24 Nov 2015 17:48:06 -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 RESEND v3 11/11] staging: fsl-mc: Added MSI support to the MC bus driver Date: Tue, 24 Nov 2015 16:31:24 -0600 Message-ID: <1448404284-22258-12-git-send-email-German.Rivera@freescale.com> X-Mailer: git-send-email 2.3.3 In-Reply-To: <1448404284-22258-1-git-send-email-German.Rivera@freescale.com> References: <1448404284-22258-1-git-send-email-German.Rivera@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD039;1:Kpga5pFwh0+nandheNWFJnqbQwP1U+j6Tv6OgLWRjvqPoCk7cPQz4tmycU2c8DTZre6au3FekkqzM27OtXvug0+yu7trlPHKGgzbkfNyHC+o1wSJFBn95khjYPDC5yAIG283F/2hFVgaCwClcfU9RwtUreYyF87cDLqrQqdhFOKMym3/MCywwxLnn6fVHDTn2dhU06tNe/HevE/Fv5x6bU6puNTokePWL6F4KhkqTArPrgDDnbIPBmDz/Oakc9KTMsd00KhV1DlZf4aMO6Z4vgf5FZF1Qg24pdwnlPsu8KW/if3pDvh6Ww+qOgf8JgmfYsYkmHN3/wvsKsFZSkIRv0SN0oEP+sEI4WU0+xTzNr5jRGl/xKmAES0DaP1MFqp+Fx/c9SySkNgYiWm2oCl9iwB9EtFFbWUBlLZolF4MOATgYdHttEbuCxV2OE7BUfg0D6alzayBEFV4kIlGZi1CxQ== X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(448002)(3190300001)(189002)(199003)(76176999)(50466002)(586003)(4001430100002)(106466001)(229853001)(50986999)(92566002)(6806005)(104016004)(5003940100001)(5008740100001)(36756003)(19580395003)(19580405001)(5007970100001)(2201001)(11100500001)(85326001)(50226001)(81156007)(107886002)(189998001)(5001960100002)(47776003)(77096005)(2950100001)(5001770100001)(87936001)(5001920100001)(97736004)(48376002)(86362001)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR0301MB1634;H:tx30smr01.am.freescale.net;FPR:;SPF:PermError;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BLUPR0301MB1634;2:2GC8Fl6BZsw11H1Nsfx7hw3bTvG7NXm9w1YGW078s1UcPii4/DxdHhfz4pElb+y7ksurj09s9sVWD3V9GL0zLL8bNp/gQs6caiK1k16vQLBUeBOwdDRjg44LM1QM13RvJ8ClJo71EfSwN7/BOpEi6w==;3:TKtB3WnsCMe0pAz2gBqMEdwC2lDE3WL0+dAeZPY9SchJlfhoorw7R/RooiiAagXQIweFQpR+FU4MjQyOqY43b8+7UEcEp4GeTGQgXLLnxCTbfQWQgrljHCNpX+NsvYC7lM598mAX+71noozToP917DGABTr2QRADUgje07x27d02CoXjw/CbcGtCmD7tYO+mzDpHx9Q4Lpe2BJ32EzTPBUFFOtLsiNWDkgDCD+xSU6Q=;25:UsOz66Wt0nJSVt+w1u45SC4ChnPgtnHLU9bG34nMuW2cmFjamdq+Qw9WAeCpCaQz/WLLp1drCdXbsmp5A1Rzy/q4gQktwgfUIl129eufDeHKXt3R9Pkcc/wjA5wIG6x+ITB8QOUHSHmLDPq0x8INJ+b3v1L9Wq9v6qkVNFZDt003pCH3TKDI0ANCbLuoLVKZ+7WhSxFuRviC2bNcjh530rRIGW55ZOSRhoDG2hbLgiIlV6xnpLcdCqne3mwn3dZLu1p2zNs04RkaIvcLerXX6Q== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB1634; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0301MB1634;20:bMTuwQZt/zk50i0m71ABQavYpNHAzqv4GWtDVZI7eYF5kSLpZyhq0ZW+djJmq66XgCKck6i0gkKMFw/9idTmspCQHATSttLO8bfUpvR1InkXvA3dJk4842cFQ5plxwaFZiH8GLNSbiTOyr/61WByMjOlaMDr4eGoHGdsXESlHokzLrBIEGmgy2qaplB+M7IfSh4NdeOW0pFEnEGLHRBqedTMAT/WheDL5gumyfaOSdAoVJnaFAtYZ26zh5rNDNCGV4qgmolMdLAWpk95ilu5OoLLpunBOfTC9tvvWcvKWPVZ9lqxQHdrXIcf6RMWklRr7oyT3WdcRgQjI6qbD4K3VU6SfJuqIvhdFMn89aCvhwo=;4:+wREzX90+EAy/KJMzPmrY/6qFtlcHj7Bx/0ma1WYKXiSo5xjl6oXmjvdMLZ4Bi2FjD85Lfv+eTqGqugsSIXm0fUls4KlBBVe6aM8VoMZGLRw9ScPagKHjmxnvQgadUN13VkbwwDjP943EI0jOAG4YaK5DEeHBVjsh3XL+4UFhaYrjY66y4HraRIrALQ4a4Dmp3M4zopVvCqoQd7S4AMY0F+FC+2idstX2k6UZ7b3In7lo9EB2bMTK6UJEb3tqLQioZIKzdcpjzlmnKXMmCv8tVr0BTlNxoPGtngedOWX386EMM7YnDvmBq4IAXKu7Ure6B7jXvLEh7LGTKC1U4EWZ0QgFkH/Ezpv4n5uuakjVhnZSXbU/t6xOt0UAsVJ2phwyd/+/AKnDC6gqhwb4DwvwpSuYQdcQ7lq4MXeLTLiR8WiDP3H8bxdl/B5P4W/pdnH 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)(3002001)(10201501046);SRVR:BLUPR0301MB1634;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB1634; X-Forefront-PRVS: 0770F75EA9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR0301MB1634;23:tLpgJrfpKv8vj/xU9dbBFhpIFE43FpAign2IQdy?= =?us-ascii?Q?6Cvoq8GHVNRj7bliNYt3IRZcIB8npGk8ktTb3JVvfhsgY/D4Kgnx5DdTdMLC?= =?us-ascii?Q?CPL3BjGEBHQ6hQ+MpbahQypXOoMQkj3peIcXS5Amu82Lny3Zb4xlmrHdpNgP?= =?us-ascii?Q?jyXNCS17Yf2YJiG7Qsz54nMBMIj1kgU0zbfHv8+4mIotKXCytd8RcPROGFOk?= =?us-ascii?Q?Q64iO+C2FLAx8br8ckLaV1GIt1j2hiTVp+IlBRXDs0aneD/34HWdDL3Epx7b?= =?us-ascii?Q?3cD1Iibjw22kB3bhfnlhcGk32tmNCbz+M5tAct5SXxITPFhr0wTwy23AweZk?= =?us-ascii?Q?5D74kAis9DquWXZWtR6rhiqaNy6kgfolZ8/+XnrjEoNrBK1RELmqw6te2sZ8?= =?us-ascii?Q?atGaSZvjUSdh2lcpdDfkenYmTQkRwz+shtQs/+/Rh6YoElUWe/13gy8hxCiz?= =?us-ascii?Q?NMTNomQS3VE0RuDXu3Kc3kYTQZmodpZni88yBFvm6aGxK1Nmu/+9JIV12jzt?= =?us-ascii?Q?laPKRFLzkIhPujfBRIW0C9nReTz76ly7wRTV14kVVnPmL5SHvAMQgwQmRECu?= =?us-ascii?Q?prRwSDKW8Mbr9cI8LO48O/kX9xXvNXday3blzJQaYs/ggonv3YKkkhxrgEcA?= =?us-ascii?Q?Yurgl+n3ZKmQaYcpmm6TtSSzev7cl1RH4hodV1Rg4KIVqOG5gCULtlHrBYMm?= =?us-ascii?Q?0dxEr1iBQr4gBGaIascIplmcYKi9nykm4p0BXkq6n9YiT7nA+yFaXHh7bd2n?= =?us-ascii?Q?9Hy5UFgkdqVQSkT1uz6XAc/nFIFnSu2hZsc3w6vKfKzzeGllc43sawbjLDTA?= =?us-ascii?Q?9qu7NoqtDgbOXFrAejABsWk3CHdUH5Vs/q8pAv3GVAbwek3avTePZ9+vNjS8?= =?us-ascii?Q?lS0btxGhCCAgWWKaVOVnQfeqsPtN+Mnv1qIgLrPH+IvX50U/HKlwxkLmRlwV?= =?us-ascii?Q?2LZtRQedyIisz76j2ExW76wLxKsGyz7H3dlgqvwF6ESoT7EijwzVEsicZ4Gz?= =?us-ascii?Q?rbcTG19fxxMTNTCwC/ikvob0wH27ntLCQAt8VbKyof7UtWrkusC5UHQCgzTE?= =?us-ascii?Q?b9lODiSRSFxKUspvxfTEzUGZJazEEasLPm90og/ajj3R5hovi+Q=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR0301MB1634;5:PTtgvg1jUBc+khN11zhcUlHTX2bTLrFr3wiND04XX5slQoaTWopZ0Mg3NPTNUbvS70Axem0u1LL1vwZ7GkpAGDiL6hFwGpZcAVL/IWHUAKI/l/HYLhgmFVpbmHH7iL7hqfx7DbMJLICEcS3utFpXWw==;24:SAn/BAAIAA19JBB+QNCXFu/emxam2l/OL+1ShLxSRlmhuQNjlhiXTVpepGphP+wCmx8N8b7NDeaq+ZUE+YBwd0gLSCHcFkb4M1hPcH21LEo= X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2015 22:48:03.9196 (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: BLUPR0301MB1634 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/