From patchwork Wed Oct 21 15:52:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suthikulpanit, Suravee" X-Patchwork-Id: 55387 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 5977223024 for ; Wed, 21 Oct 2015 15:53:22 +0000 (UTC) Received: by wicfg8 with SMTP id fg8sf8658833wic.0 for ; Wed, 21 Oct 2015 08:53:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type :spamdiagnosticoutput:spamdiagnosticmetadata:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=2HBg60ASQ6aTu0DxZgLI9Uu/gtf5+9VvZDIptG+4ebk=; b=jH1EZaGOVEy8pwlgwYOe0wT43r6DAqTIuXSv5lT/X/05PCu2pFiM1HGfuA5mLtkbJS 4VeL8M3ePqvMHzAjLBUqDbfpnCsI2zkb3nZGaLzIG2eXbQ2aGb+UaX4OlcIaUiEX9jHR 48xCJKZ8f47lU/ylqbBuRcMHN3Z+680YFmxLoJTbrtub2oAzIYHXa25WwhNEbe6IJxTS uu0k1Tddio4p8s/2Zu+8skES/qXnlPvPe8vpCPL0XkeBe4YznlZVzRf/+qUZ6Em7JnZ5 y6ZiwWxmk466+czWdwjLk2XgrYPho6VuOG/01QfvpsVwNRcSUJFkjYRxkNFBRPM2mKGg agdA== X-Gm-Message-State: ALoCoQkGha1WQ3k6b2AlNQcsyXw0e270qf2kD5R5e3r9eGmP7G27X2TYL/tZ46wjogF+T8usBblT X-Received: by 10.112.190.74 with SMTP id go10mr2407805lbc.9.1445442801631; Wed, 21 Oct 2015 08:53:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.17.70 with SMTP id g67ls234249lfi.13.gmail; Wed, 21 Oct 2015 08:53:21 -0700 (PDT) X-Received: by 10.112.180.198 with SMTP id dq6mr5809264lbc.90.1445442801464; Wed, 21 Oct 2015 08:53:21 -0700 (PDT) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id d191si6867712lfb.63.2015.10.21.08.53.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 08:53:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lfaz124 with SMTP id z124so23283940lfa.1 for ; Wed, 21 Oct 2015 08:53:21 -0700 (PDT) X-Received: by 10.25.150.199 with SMTP id y190mr3893918lfd.35.1445442801331; Wed, 21 Oct 2015 08:53:21 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp66258lbq; Wed, 21 Oct 2015 08:53:20 -0700 (PDT) X-Received: by 10.68.98.99 with SMTP id eh3mr11421457pbb.126.1445442800370; Wed, 21 Oct 2015 08:53:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cr7si14161100pad.107.2015.10.21.08.53.20; Wed, 21 Oct 2015 08:53:20 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755540AbbJUPxJ (ORCPT + 28 others); Wed, 21 Oct 2015 11:53:09 -0400 Received: from mail-bn1bon0056.outbound.protection.outlook.com ([157.56.111.56]:10624 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753535AbbJUPxE (ORCPT ); Wed, 21 Oct 2015 11:53:04 -0400 Received: from CY1PR12CA0012.namprd12.prod.outlook.com (10.160.137.22) by BLUPR12MB0707.namprd12.prod.outlook.com (10.163.218.145) with Microsoft SMTP Server (TLS) id 15.1.300.14; Wed, 21 Oct 2015 15:53:01 +0000 Received: from BY2NAM03FT015.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::207) by CY1PR12CA0012.outlook.office365.com (2a01:111:e400:4c1f::22) with Microsoft SMTP Server (TLS) id 15.1.306.13 via Frontend Transport; Wed, 21 Oct 2015 15:53:01 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp02.amd.com (165.204.84.222) by BY2NAM03FT015.mail.protection.outlook.com (10.152.84.212) with Microsoft SMTP Server id 15.1.306.8 via Frontend Transport; Wed, 21 Oct 2015 15:52:59 +0000 X-WSS-ID: 0NWKUS7-08-09Z-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 atltwp02.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2A576BD8903; Wed, 21 Oct 2015 11:52:54 -0400 (EDT) Received: from SATLEXDAG04.amd.com (10.181.40.9) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 21 Oct 2015 10:53:06 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by satlexdag04.amd.com (10.181.40.9) with Microsoft SMTP Server id 14.3.266.1; Wed, 21 Oct 2015 11:52:56 -0400 From: Suravee Suthikulpanit To: , , , , CC: , , , , , , , , Suravee Suthikulpanit Subject: [PATCH V4 2/8] device property: Introducing enum dev_dma_attr Date: Wed, 21 Oct 2015 08:52:05 -0700 Message-ID: <1445442731-28819-3-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1445442731-28819-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1445442731-28819-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.222; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(428002)(199003)(189002)(5003600100002)(5003940100001)(97736004)(105586002)(76176999)(2950100001)(11100500001)(101416001)(92566002)(36756003)(48376002)(50466002)(5001770100001)(189998001)(5007970100001)(87936001)(77096005)(2201001)(64706001)(229853001)(46102003)(50226001)(106466001)(19580395003)(86362001)(47776003)(50986999)(5008740100001)(53416004)(19580405001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR12MB0707; H:atltwp02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0707; 2:l3GXTPUxAiv9XZL3L3rwaLfopYkLdPqBA+dlnB5MxWC9ywpE7PvNfx4Fl4DOWp9UDdPy/jScZs831YUecYQeKW5OTfS0H760fyB463xOLsi5J7jkFm213YpLYGuySJiBE4RdC8U4gqsCS0ov0FCvSMAHVLEI+hVkW4rOmb/FZMQ=; 3:r2ScdO64FE0DcHkSQBDG/aHEhq/HIC1g4aB35a3d7HWyAtpR2zGrio1sM5Gtn8SMgBRqd0jDtj6MrwN0XaA8v8Zdawt/vYH8BxvS0H1bCWealN6nWZ+E3BRuCu/zBrIsqhgJad1K3FNHyUeEWn9EesgeIwQTbWUVzCT64VYr3f37+IeAh/dblPAZiMLuPYdz24SbgLTyuTI/MIDEb9+f+U/cScJ6Lz47m+5XuuadrrTPNqa6/LsTBMmpSaohlFxe; 25:jKVhWm8xJZpZFdLNf/7aRsy1rQqDXMfN5NuuzTdRGz432bXsrM7vRPJMexin0smW4e4RyuBF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xtmhtCsTxwD9A8pLhSl9zSISILKJXYwNQIDK8ZAKT8HLX9bGdlM5rIKNF2v6Ajmk5tsccSbsbctyn6LrGJWgATsVe0PEpvuW7u8/b/LRVI7r0vkFB5GsuO2QeGy 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)(102115026); SRVR:BLUPR12MB0707; BCL:0; PCL:0; RULEID:; SRVR:BLUPR12MB0707; X-Forefront-PRVS: 073631BD3D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR12MB0707; 23:fy57HfpaLsbGqzKqVTIeSVr3XmFiiMLeLyNQ4fzbK?= =?us-ascii?Q?L4RF1HQsRPW6RjTjUpplQkpG3K0wlBqko+ZyQV88xcFpqt7Lqs/r3Yx0gCz+?= =?us-ascii?Q?Ns54p+fwRa622dN8QsyuGuoq9Kpt+E1XrKUkl5/Bd+aNDd8KnNTNNE/CdQGA?= =?us-ascii?Q?7akAv8BZZqeCJYMA4Rxe5JdAFvdyaRdcG4EjQVpGtFXdraXWjPa48rREKaam?= =?us-ascii?Q?VdYfolyyPLMiKpYsd6mZw4qcfE2e4wlqA1l0itUlEWaAMj94uAh7wtHu2NRL?= =?us-ascii?Q?kdBB/nTl8cKp3VJH5blmIBNXb8WQmWeV5IwBfkERBNv9D/XNW1DSpR3pXb35?= =?us-ascii?Q?VhO5Z4Li/0myQseD6kX4zZy2NJQOaMGFLFI4HjAA4c9N/wC0hqit6kWehGPZ?= =?us-ascii?Q?9SipQj7jqd4ZGaCDqOpPwlIWW96Yx+Fujm+r62d310qTixWDBa2xhyfwENz4?= =?us-ascii?Q?9qN7l10bJBYkvQJxre8aKFqSkKrJUCbu8NP8kGDtp6AO+8sAQUtmIHsiExJi?= =?us-ascii?Q?jcBcSL2Pw5A5vjTvG2uhiSYv0Gztg3XLA6QxAdQ+7jhsaLjAC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TAT4Tyz4AzRO5Unvf60CZdix8ZW/2FIhussoFSKnkn1Pvn56M1wg SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2015 15:52:59.7624 (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.222]; Helo=[atltwp02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0707 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: suravee.suthikulpanit@amd.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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(+) diff --git a/include/linux/property.h b/include/linux/property.h index a59c6ee..522c1bf 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);