From patchwork Wed Oct 28 22:50:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suthikulpanit, Suravee" X-Patchwork-Id: 55725 Delivered-To: patch@linaro.org Received: by 10.112.61.134 with SMTP id p6csp212927lbr; Wed, 28 Oct 2015 15:51:39 -0700 (PDT) X-Received: by 10.50.72.51 with SMTP id a19mr6361060igv.21.1446072699093; Wed, 28 Oct 2015 15:51:39 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si23642299igx.17.2015.10.28.15.51.38; Wed, 28 Oct 2015 15:51:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932677AbbJ1Wv2 (ORCPT + 28 others); Wed, 28 Oct 2015 18:51:28 -0400 Received: from mail-by2on0097.outbound.protection.outlook.com ([207.46.100.97]:7040 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754513AbbJ1WvU (ORCPT ); Wed, 28 Oct 2015 18:51:20 -0400 Received: from CY1PR12CA0002.namprd12.prod.outlook.com (10.160.137.12) by SN1PR12MB0717.namprd12.prod.outlook.com (10.163.209.19) with Microsoft SMTP Server (TLS) id 15.1.306.13; Wed, 28 Oct 2015 22:51:17 +0000 Received: from DM3NAM03FT007.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::208) by CY1PR12CA0002.outlook.office365.com (2a01:111:e400:4c1f::12) with Microsoft SMTP Server (TLS) id 15.1.312.18 via Frontend Transport; Wed, 28 Oct 2015 22:51:17 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=amd.com; arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp01.amd.com (165.204.84.221) by DM3NAM03FT007.mail.protection.outlook.com (10.152.82.68) with Microsoft SMTP Server id 15.1.318.9 via Frontend Transport; Wed, 28 Oct 2015 22:51:16 +0000 X-WSS-ID: 0NWYCTF-07-6DG-02 X-M-MSG: Received: from satlvexedge02.amd.com (satlvexedge02.amd.com [10.177.96.29]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 275F4CAE7C0; Wed, 28 Oct 2015 18:51:14 -0400 (EDT) Received: from SATLEXDAG03.amd.com (10.181.40.7) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 28 Oct 2015 17:51:28 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by satlexdag03.amd.com (10.181.40.7) with Microsoft SMTP Server id 14.3.266.1; Wed, 28 Oct 2015 18:51:12 -0400 From: Suravee Suthikulpanit To: , , , , CC: , , , , , , , , Suravee Suthikulpanit Subject: [PATCH V5 2/9] device property: Introducing enum dev_dma_attr Date: Wed, 28 Oct 2015 15:50:47 -0700 Message-ID: <1446072654-5608-3-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1446072654-5608-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1446072654-5608-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.221; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(428002)(199003)(189002)(19580405001)(5008740100001)(189998001)(47776003)(19580395003)(50466002)(48376002)(97736004)(11100500001)(2950100001)(50226001)(92566002)(53416004)(5007970100001)(77096005)(5003600100002)(5001770100001)(50986999)(2201001)(86362001)(101416001)(106466001)(76176999)(105586002)(36756003)(87936001)(229853001)(5003940100001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0717; H:atltwp01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0717; 2:e8tCLQgSRUkAaU9exWdaDCuJAefAWk/VBphC6C3cOAGn2T/3SoZPkM/027E8Rx7fuC8qUz8CPXnBJdeqRegcP3HtuBGEtkh7MtuBgcr9b9X9c8KdFYaZUv17zR49nFR/Zr2pUYiibAbvBn+hoiCN7cP6gFACiI+RzrRVyRNhhzE=; 3:zCn/bdSBZB99gNoFFvoqYe20inaFYtyKZy1cHJGpErbvrgVhDgF5LwEpaXVNVrgc7vdcO87To7i7Cq8WPqvmHjp0J5XD3OOZ65eVgo22DCp2Gka8oNgi0nXUwhwpItRRrKGASfWrRteJP1yvd5eAbeba+ntpM5YF8WSF6Gsw562njxYYtUU3j05SMExs7C7t+BjnNEdlzmBMW5IxskJK0KH1LCsOtMAzOyU5pvvvMsBjDPbntdPsmKQirfXKeP7X; 25:4RWN/dx5s37idtXaPLS893bKeltOpc2JXwvAtJLA65VOeuUYx8vclUKwKRu4UMAXpRIdXgWqmZ5j/Z1OiEDhfpoM81PjrIHQzDIdgkIan86AzI9R5rgvHB3WfQ9jBzL1sYPkXiPsmtew2ZAnqnBc3IWZPQmT40GmopNjnmf3sGjTlni+mrJOm3F4P2vDMMuvf3S8uIaOOkYKqkjSDqMZfnRR6u3usFUW4iIF/UuKRkZIk9zsVa0uxN2BvQr2X4cMQ7nFav6qbMzK7SlcavdolQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0717; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0717; 20:aXIHtOlaX5reqWAa6CVnX2JyRuj2MlegmZyVu0UeU/w8VUHYWXu17+rMYWsNZLB+UTauptBkebXVM/GzaPmaPMJlQpnS5giwbRRvpZeAi4sZq+/vhSO5bd/fsIIC57ip6gQjazY6+mpRzgI3IgX8ZM7TPh3bj9UzpQuwV88pjk7+u9zJwYHkZ9liJIwZHQiqT9KrpoWxM3czxPLb3u1+bIz8vMNqTdnHG2g54L3QtRyUoaeoRzsN/4G3epGQ+YNIiELVsh0U0AR2rgdObg0qfLack9uii32dgStA5wcGVZ6xvfo7ECLcueZ5BXlvo7pNhhfFhUXK3f2w0oIgl9ebrhKC6XtF1ZqNrfl4De6WkybOy8IRF+iXruPy9uZ486NsU8aMH01CFW7JLCi4PSsfaNtEnd2NzPe6Yl34vyCqzNcGbNKtE7qKaF0qVKi6kjlFHDBxZv3e8NBTB3yyHS6UDDi5FN34DKqq8Diu5NGNOnz3ZPh0rieYo/wUpw6Dch0Z; 4:zyqdl2k6qMbe5VVnGKPzvHPM0vEgMJbwSWIR6XoR37ZTCtE/YdveSJ7CaUlwu9RxWQQ6TDVU7k1sGsI+truOcGErKAiPS1rPxFL/7Nq5wDRe7nTVxJNMh5ZeFwajBdDEkTJK81rnrZzOdVZCf1LqvKXUJyVu4k8CgnDV8nNbaCGCg13fZuatFKfYt93xWPpymkFBo3LP9UXylXcDNHbxGpWXr1Y/rEVDnsFX0R3+Ot+wT01axk8NEZj/2arPMfCsD3/U7fJ6jBWYqqYaWVqX9MSjYXHr3rtSuaChMMeDqQmZ/FjVdlMpTR/eCObGN+U9HLopVTMau9x/vOH77OVNSJP7uzZCBbnGTUIUh1LvVVzNAoA5NtKai22n9OaUtysaANjog1b+TkhIU1KWnguC6g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(10201501046)(102215026); SRVR:SN1PR12MB0717; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0717; X-Forefront-PRVS: 0743E8D0A6 X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0717; 23:GhusFkF/4ivA4tCXSBg8fasrYR84SlyukJXsC1ToSSCPlXZtm9YAGMrJPusyeWLCsjagxxinkOFifvXXppOtkhonAxGaMhD2HHTzgugwCyd1N6Ldx1hnCtre7y0xI8+Pln61V73aFXOIDwPzXyVh/4I2292vYew3tj/Jj9UPrNpdl1yYbu4/H4X449C021Vtjn54mlI5tQTh5qzvcNoRQksHSAR1lRt/clspgf7fmdjcjua7EaxbfHy5nfBj0ujufd9m0NiF02xYWzi8Uv4yWbZvKnJLdh+KCyYmdaEA7HIY5sbrTpkGZWAykm3uL5wsCWW7qgGbLl2CUxRDv/fZCnK0V2xxgqAVDKtFxaz6urxLj/1ouPYtpseVXvEF/qjQ4j4+E6YWtkxh0K8H2J971k8uaCjYzeDPVJotiwCW/h9nmfmgjiodRqxV1ocHIG/KzFdK5jcIsObVkGu4iu+sN0lxTysV5PrpfdESUC8wuYDSMwwBjS8WjbtHVPEBaHXF+3ULiHezPkEB6tYK+5BGrYH06MfoZN6OB6FUHWPs0yF/UTXWHGTfxQJ4k97BSbfcNK0wlGS7d7c88Cf4UL44XnHrBVRkMAnHxqabyQS2Y6i6c5PYKalTlqvp8nArMbNpiD4SnD+/nnzQXqVpKDciANTetA3ndsnuJQn96UlPPMgh6zVdV188QOskajwQVS/CekBAMvUgu3QoxERQOAP1iOEA5sxPS44W+uyi648EYxGpgK+j9ImhfJUoDFdeenAkh2ah8AymaZ97GJl5liqwQrtc2RQDnDJILoDvhqhgMaxdWwBAC74GPAWRc7SN8Dz8s/xyrfyd1bBjNINodbyfJhu9DOl/IYqXCWx+XrC93kLe2RsGI6Oiz3DwRpzr2d0zi/0xrRRNL9sV6HEhl+cdGGBoyTagkPaEqoCNyer/ktsJOX4CZdiGH1nwqHLhGWHN X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0717; 5:ljgE3KnRlkSunHWMauJvXhSBBLzmHJmntOrBsTS9mNAPiTGXoaX69zBHaJHHiL6sFxjrsJKNd44OxhLxSwlVIJ4TR0dYUFMycUfgzbwMgCbIomaJ1zcLYo+aQzDQYq7vKtlwuKuIkwaVpw+wcG/Ikw==; 24:5Bl05BjhkkLOY+7B8Q7TZmlvTsNghhS2mvPkFhmH2Bw1bhEkM+OS953TU0uv2XGTb5AkBSNpMXoG3l5CzzccTDAN5qnGpodso5FyvcW3yn4=; 20:6l/7AvurvmL2wPYasdI+DC4zaZRml80ArVmTPJYQkbiHnYGtEfkuozVa336NLU1idTqVGpet7mi3irXDyGMFYimc04gUtqSKTwbsSpdKMZRo4flf1X5EUPCC9RW7UqQna1UO47JgHdSxpJsBPffkX/ZB2GEC7E/+C+2On6WvE2yrMcoY//3O59cHKV4p4+Ti4g4UL6hwAXZV4oFQ7JVtMRFKa6JmJ96NeovMsJOLoma0U58n5oHdgvB425wpE98c SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2015 22:51:16.3874 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.221]; Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0717 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A device could have one of the following DMA attributes: * DMA not supported * DMA non-coherent * DMA coherent So, this patch introduces enum dev_dma_attribute. This will be used by new APIs introduced in later patches. Signed-off-by: Suravee Suthikulpanit CC: Rafael J. Wysocki CC: Bjorn Helgaas --- include/linux/property.h | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.1.0 -- 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/ diff --git a/include/linux/property.h b/include/linux/property.h index 463de52..8eecf20 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -27,6 +27,12 @@ enum dev_prop_type { DEV_PROP_MAX, }; +enum dev_dma_attr { + DEV_DMA_NOT_SUPPORTED, + DEV_DMA_NON_COHERENT, + DEV_DMA_COHERENT, +}; + bool device_property_present(struct device *dev, const char *propname); int device_property_read_u8_array(struct device *dev, const char *propname, u8 *val, size_t nval);