Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754631AbcDKQtW (ORCPT ); Mon, 11 Apr 2016 12:49:22 -0400 Received: from mail-bn1bon0084.outbound.protection.outlook.com ([157.56.111.84]:7424 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754318AbcDKQtS (ORCPT ); Mon, 11 Apr 2016 12:49:18 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; From: Stuart Yoder To: , CC: , , , , , Stuart Yoder Subject: [PATCH 07/14] staging: fsl-mc: set up coherent dma ops for added devices Date: Mon, 11 Apr 2016 11:49:13 -0500 Message-ID: <1460393353-15968-1-git-send-email-stuart.yoder@nxp.com> X-Mailer: git-send-email 1.7.9.5 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131048669555564009;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(33646002)(87936001)(81166005)(189998001)(19580395003)(47776003)(36756003)(106466001)(11100500001)(77096005)(105606002)(586003)(92566002)(50226001)(5008740100001)(1096002)(86362001)(50986999)(1220700001)(104016004)(6806005)(2906002)(48376002)(50466002)(4326007)(5001770100001)(19580405001)(7059030)(4720700001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0301MB1228;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD003;1:mzB1MbYXevwxYrdHukF3EGi0W4qnhP8XTgGy5+3TNabXnU0ENQWBiSC6AkAfLst14et50WJgvmHnV2stwwFkykwATua5t/wnIKLzjUSweci93Gahrk0+8limuJPlUTPXatw+mTH22+w2mlCRaW+1ahx5n/V01hFjWycAnFF0HO/XIGr+OJSMIbx0sZTzLycflq8aaSCq+9kg6EirK1V3DmB654n+uCYby+TYV8LBETbIac95YMG2BbbPbd5jN846IAXVeeH3htnNy9Op+gqLm05yqYRErcLr1scT5P/56iyIkcP1S64VA0O4AzCMB9ZMX9kDMgl0Y/9z7eMhxl5bUPqzpZ0O0kWp0IR2se0EecXFS2Hs/R+9APkP3KP/q9Pq497oHkG68a5rgR4YIRoYOWWND6bdHc5DQQjB3Eg9OKiSNJsOFZvK5mD4odnoDClf9dMmLE3+tJ3C1pSQbORuGFQQY/gs7CyQgn4JBYKqtPlTyYeAq/IBK8u0Ml7aDVPyY+xF2phU1L5pUpeS14xkGo8O6jzU2I17mu6UeKbX+8u7Wr4sSMDOJf0R1Nj9cZpo+9iIGDK0zfLZmMJMf8LrJw7OFEyCXm73jY51hpoSyHkeaMXbYf5cEY8rdAODU3um/XCJej3F/nUSdhwcAcd0v5HdP9DSSclHS02LvFFRj3dFwiNposnWjUf+ZVCiDRKy MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 5a92c6cf-f60d-4671-3c88-08d36229379a X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1228;2:Ptw0JvHHfTuyP8qJVTM45030xRq2LwpcrkuNaXSwmemT0yXtnHQXoUe22fZRQd72puWaYNBpV9zLfSo0OMFbp5+R5698n3fYtMvPWRDkBO3h/PheoqVTI2+dMArxcyVAtNcsG5UsaXLBGxvdxGXMvzpB2t0f88aPODvVX+dJdT39L6qRW9lEF3RxNh5qf5tb;3:OhHjHVhJNlZTw3lQ3FP3f/q+VMXYK1pHZZwVAWnE9Dd1npR7QD48TSZVz9AaPERz6uVQ30s9pX6m5n+2R7k58BGuWHeEiRgcZoI+1ZWtUZZV6rb+I5WxiZ70B3XKRf2M5eEGba+kFkqlC4DMMOg4FVVfBS/pLWVXLgyMx3TiTI5zoZa200d/U4ZYSNQlOu60cLpSW3dL3vr8Dserr3fgDKw/JBARW4mzWwnmkOH3yIQ= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1228; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1228;25:M7qLbxvzYifMObrEHlIiiiuyXkRbX0/5aDuDT7XD5+Wr5eoOuJaYukr+NNxGcrhrHktpEJd1SpV+dY/tA2f9UvKcx1eODL/C2wrSly7tqFQ12IQGtgpk+xlVE73VOjgDRVkEQvfsefJKyyipHcBVjBMSSPT3tQhToK0ftVY6M5PZv4YeBOUv1i+mOqdvRzPsDCEsumFWWTjYRQvQ764pCYnx2drF5GTumBXjqMkT/Te0nCdB2kIrATiIGM3wmY+Mc6he1LqKvkPtzFxuaU0Vg9NSiZFsF3crfgKCyWbn7uJq04egVUuJvwUNHc7YzkqDMCrwahK+mJQxe/QmG4uEtSOsF4woxzwk2aQx9kvhNSjCGT6DcEtVlwSJYQRPI8psMZ8uPopit3vx3K9XyZNTkQy7Pdbe4ndNPuR98SfYVFxNN4DtoprXG/eaQwXreywEGxmJx3uXSi9gAQzb+f3T8i0zAgdizG4d84wOKd35L1XQAKVrdvZHr0DhJeRd6/8ic3dDcWZXXTjzLqz05+bLEXOtlWZOZVEBme8swSiuAQOM9Pv3lDPLKmD39qYJsT3lt5/Xu22WhpTzABf+lh0j72vYhB/1OINzmHdrawbN/VmYGTTr58oWB/krUJg8K9oIB/eHENpI80E+0oEnezfaSQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(13017025)(13015025)(13018025)(13024025)(13023025)(10201501046)(3002001)(6055026);SRVR:CY1PR0301MB1228;BCL:0;PCL:0;RULEID:(400006);SRVR:CY1PR0301MB1228; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1228;4:BrLWMnnK9EePHskcQBuzlvu0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/mfmztxhq5WZ?= =?us-ascii?Q?erO8LOBU+GQpROznR6UzCKQ3qKCFBA2oAw7seBn3Zs6PfhhalcuTcOmbuAwE?= =?us-ascii?Q?kDe4Dkk/4074sXbEnnc9fciWmbGb3EfFNATbjFUJFkKsYjJCrLORM2AfcovV?= =?us-ascii?Q?YAHQf8xROz7FRoHdntJvdxbTnHXeTIDBzqJg41WnxJ6K/A50QlAOql0fFU9q?= =?us-ascii?Q?slJB24q/qUsOuJqJZMPId6i8ky+U19JThv+itLLXZ5vbZ6CllnBMl6Cd4nDb?= =?us-ascii?Q?15C3WRcGYU4GXpK1LHNlPh2eByZKO6JB2EflBUu6zbjZ45zGPTyHwFRmIJA5?= =?us-ascii?Q?+Hw55nulcr4AT/CuNYuy72jwtbUqMAlw0p508x76uedagG93GPSt40k7Dp3I?= =?us-ascii?Q?6bdE9cXdz94XYKy6I+K74e2LpXywY7gSVjSD8/28WTi298kN5uPUoSSM32g0?= =?us-ascii?Q?1rfI3CChlE1K2wgv7+WKEeKQoOhqstiqh9JCNil3RBb1yoT/+79YXX9BxOLA?= =?us-ascii?Q?2PFg+KODzkLY8S2Khx4yJxuJOKUKQMgALpIv8nd1U0Q=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1228;5:GGYR4CuAzjFW6vXsJYt5z+yVEB0YMGiEPq3CxZ3oV1L3ddpBHBeAyQYQ573dwZDzcQ2m67MNvNuhlSWPT9ydoCX0+pwfmJkxP9EF0PMF5oVgUZhA09dzLg3/AuxL/k2ekVOPQYxmLJ3cCUJMvl/P2A3tcq+KJgcmKsRULYTaysw=;24:uuKcwNHbKxSs/DvZzNPLME1Ce/opcjLJp4I90uddJa7Nb4+34esDVHOVUInkKG4x/ECTsg8HHAjwx/jNM16jaPsVznL0rtWzVH/Ekf2L7XU= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2016 16:49:15.3535 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1228 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 867 Lines: 27 From: Stuart Yoder Unless discovered devices have the no shareability flag set, set up coherent dma ops for them. Signed-off-by: Stuart Yoder --- drivers/staging/fsl-mc/bus/mc-bus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c index 981e4c2..8bf76d7 100644 --- a/drivers/staging/fsl-mc/bus/mc-bus.c +++ b/drivers/staging/fsl-mc/bus/mc-bus.c @@ -469,6 +469,10 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, goto error_cleanup_dev; } + /* Objects are coherent, unless 'no shareability' flag set. */ + if (!(obj_desc->flags & DPRC_OBJ_FLAG_NO_MEM_SHAREABILITY)) + arch_setup_dma_ops(&mc_dev->dev, 0, 0, NULL, true); + /* * The device-specific probe callback will get invoked by device_add() */ -- 1.7.9.5