Message ID | 1536587361-11047-6-git-send-email-nipun.gupta@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show
Return-Path: <linux-pci-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC09D109C for <patchwork-linux-pci@patchwork.kernel.org>; Mon, 10 Sep 2018 13:51:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCA9428F68 for <patchwork-linux-pci@patchwork.kernel.org>; Mon, 10 Sep 2018 13:51:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFF7D290E0; Mon, 10 Sep 2018 13:51:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41BA328F68 for <patchwork-linux-pci@patchwork.kernel.org>; Mon, 10 Sep 2018 13:51:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728957AbeIJSpE (ORCPT <rfc822;patchwork-linux-pci@patchwork.kernel.org>); Mon, 10 Sep 2018 14:45:04 -0400 Received: from mail-db5eur01on0061.outbound.protection.outlook.com ([104.47.2.61]:34336 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728174AbeIJSpD (ORCPT <rfc822;linux-pci@vger.kernel.org>); Mon, 10 Sep 2018 14:45:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=raZc3+yJvpdhlPARR9k2QZGxd73wTqQLphSnoHPT7Yc=; b=VX7nKoatjTQuQx/2lmA9wcvhiF8L/OsRn0Tg8YQwJuRfP7vxNw2YA8AIKozPm5wk1A5d2VO/j8/w3pNwN/cRvqDtAxtxX9Lz8N2bu8RmtM8O6XX/kCEnP0BURR40Me9X2IMJe4DWUk4jcJ5XHxHCGDhFEDuBKIAa3Ae/VA/itHo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nipun.gupta@nxp.com; Received: from b27504-OptiPlex-790.ap.freescale.net (14.143.30.134) by DB7PR04MB4476.eurprd04.prod.outlook.com (2603:10a6:5:35::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.17; Mon, 10 Sep 2018 13:50:29 +0000 From: Nipun Gupta <nipun.gupta@nxp.com> To: joro@8bytes.org, robin.murphy@arm.com, will.deacon@arm.com, robh+dt@kernel.org, robh@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, gregkh@linuxfoundation.org, laurentiu.tudor@nxp.com, bhelgaas@google.com, hch@lst.de Cc: m.szyprowski@samsung.com, shawnguo@kernel.org, frowand.list@gmail.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, bharat.bhushan@nxp.com, stuyoder@gmail.com, leoyang.li@nxp.com, Nipun Gupta <nipun.gupta@nxp.com> Subject: [PATCH 5/7 v7] bus/fsl-mc: support dma configure for devices on fsl-mc bus Date: Mon, 10 Sep 2018 19:19:19 +0530 Message-Id: <1536587361-11047-6-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1536587361-11047-1-git-send-email-nipun.gupta@nxp.com> References: <1536587361-11047-1-git-send-email-nipun.gupta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: PN1PR0101CA0049.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::11) To DB7PR04MB4476.eurprd04.prod.outlook.com (2603:10a6:5:35::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3602b0da-019d-40ff-1b1f-08d6172460fb X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:DB7PR04MB4476; X-Microsoft-Exchange-Diagnostics: 1;DB7PR04MB4476;3:G8dGOlh43ZBxSBpLNx35z4DNZhmihC0aDZXrYzDK11KKNvnUUelySlNu3y5HDeSyNnsGQe3oP9dnqMiJ2ybfM5RuZ+8feyhUDlwYZyhZ7Bua6yP1sG+0fKDLTRrNLNW7RCzACn4pTEYzmdK5I7jH9R42hLmDLms10UD36PSJAjzshKP8ND/kgVpj1zRM//PZBg5+SaCqZg0tAojb4OKGQG6qjgnEg0Be+U7OeBsFWPQHP3nWo/HoAP0lE5vqS4aO;25:wHXUA6f8DersDiBfcq4gDQmLtiPQ0j/Zkt1ozAcj42l6jbA9uk/Y+AWRQNydGguZ+NfPnynWDM8ax/aO7VdNi1vPDVrvSa6fR2MmPflDmKmU3ACRBAJ+ToQhzpSbPD/jbaAjHM89LYlMQcqHVKaNB40jJvEf7qD+d/tSSox+0S7xpWGaLUHcH8yIeGJFeMY3S8HLTUreAJEFKH3hmnCZCtT3xijJbowYV1DnkY7IaqH0LFuHOMW9SJsazR8SzCdEL6xRGgrqwaxG8L5saplNd7GlzosVVDd5jLpk3Vun6usTyfF/uhiYHo0TmS2xGB+0DS3qzTN3LiovA/sR1VAyCw==;31:tk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zkPnFslu4UFEIJ1stt07Mgvec71vGM7oDP3HSgKvDViEzB+v+UE5Wxhp/iNoomGo8xqk0IGOmY3sCVOISpNC2cWMrQ= X-Microsoft-Antispam-PRVS: <DB7PR04MB44764A585FF555C42DB36533E6050@DB7PR04MB4476.eurprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823301075)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(201708071742011)(7699050);SRVR:DB7PR04MB4476;BCL:0;PCL:0;RULEID:;SRVR:DB7PR04MB4476; X-Forefront-PRVS: 07915F544A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(366004)(396003)(136003)(39860400002)(346002)(376002)(199004)(189003)(48376002)(81166006)(8936002)(81156014)(105586002)(106356001)(44832011)(53936002)(47776003)(50466002)(7416002)(316002)(956004)(16586007)(6512007)(2616005)(476003)(26005)(186003)(66066001)(486006)(11346002)(25786009)(6506007)(386003)(50226002)(446003)(2906002)(16526019)(86362001)(55236004)(6116002)(3846002)(97736004)(4326008)(68736007)(7736002)(5009440100003)(305945005)(6486002)(8676002)(478600001)(52116002)(51416003)(5660300001)(76176011)(39060400002)(6666003)(36756003)(110426005)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB4476;H:b27504-OptiPlex-790.ap.freescale.net;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;DB7PR04MB4476;23:1l84GhW9X0esR+Fsykb/vVwhR78V1/Z6zAFIL6miu4lRN5FehJd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InaDc2mwOFOHPA==;5:wI85OA/oPDWbu5UZG95vTIcwgpWUehwvLvKOxLpmTrxe0bJ2R6WUucJQZii32H21ztbofUfU0hD94SjHn40d7TBipYh26JoPh1pWJB5TJrpy11R9gF+B8O2WpcmvyblIvCKrr0a3PpKvpbYmQyLlasA03HsSSghTYJL01O4ZeDs=;7:U6XLGxRv763uAZpRZVs50pdf7HwdJk+poaiTSUUXUgGWVy6fTeg6kUgunIy4BPIXFlNdTHIdXk6XGJ2RBjfmVX3TzBuhuM45kiWMJXGzu1/ytLjwOfoE9HPYw2jnEphH3i9QtrRs3HCZKE56T2erwyJNgfWIGUw2wMIRic3fYctPcdshRNN5O+2Vk+XXKZ1S1rtG2+yzjVO9s1wVapfo1K8xBCR1/WinkFY7NsOIZUBpyoyUw7V+TG3yoj1oXJLS SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2018 13:50:29.0944 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3602b0da-019d-40ff-1b1f-08d6172460fb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4476 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: <linux-pci.vger.kernel.org> X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Support for fsl-mc bus and its devices in SMMU
|
expand
|
diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 5d8266c..fa43c7d 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -127,6 +127,16 @@ static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) return 0; } +static int fsl_mc_dma_configure(struct device *dev) +{ + struct device *dma_dev = dev; + + while (dev_is_fsl_mc(dma_dev)) + dma_dev = dma_dev->parent; + + return of_dma_configure(dev, dma_dev->of_node, 0); +} + static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -148,6 +158,7 @@ struct bus_type fsl_mc_bus_type = { .name = "fsl-mc", .match = fsl_mc_bus_match, .uevent = fsl_mc_bus_uevent, + .dma_configure = fsl_mc_dma_configure, .dev_groups = fsl_mc_dev_groups, }; EXPORT_SYMBOL_GPL(fsl_mc_bus_type); @@ -633,10 +644,6 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc, goto error_cleanup_dev; } - /* Objects are coherent, unless 'no shareability' flag set. */ - if (!(obj_desc->flags & FSL_MC_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() */