From patchwork Thu Sep 21 00:37:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Goel, Sameer" X-Patchwork-Id: 9963109 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 286036056A for ; Thu, 21 Sep 2017 00:39:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1ABF02927E for ; Thu, 21 Sep 2017 00:39:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F69629282; Thu, 21 Sep 2017 00:39:44 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 693D42927F for ; Thu, 21 Sep 2017 00:39:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dupUe-0000Fr-F0; Thu, 21 Sep 2017 00:37:28 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dupUd-0000FN-Gr for xen-devel@lists.xenproject.org; Thu, 21 Sep 2017 00:37:27 +0000 Received: from [85.158.139.211] by server-12.bemta-5.messagelabs.com id 7E/70-30935-6C903C95; Thu, 21 Sep 2017 00:37:26 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrKIsWRWlGSWpSXmKPExsVybKJsgu4xzsO RBkunsFh83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBk3jp1jLDgqWNE7+TN7A+N7vi5GTg4hgSKJ rqdPmboYuThYBBqYJTYc+sAGkpAQiJZYt+EYO4TNJ3HxxQ+wIgmBCYwSv742M4I4QgL7mCRmT tjCBFIF1j51rgeE7SKx7v9/sG5GgQKJORs+MkLYKRKzut6A2WwCGhL9Jw4zg9giAqESN+eeZw MZyizwi1HiZNdZsCJhATuJ9mMboRaoShx494UVxOYFWrDyx2dWiPPkJE4emwxmcwq4SrTMO8I C8ZuLxIvZ1xknMAovYGRYxahRnFpUllqka2ikl1SUmZ5RkpuYmaNraGCql5taXJyYnpqTmFSs l5yfu4kRGKQMQLCDsW+W8yFGSQ4mJVHem0yHI4X4kvJTKjMSizPii0pzUosPMcpwcChJ8E7jA MoJFqWmp1akZeYA4wUmLcHBoyTCuxwkzVtckJhbnJkOkTrFqMvRcfPuHyYhlrz8vFQpcd4kkC IBkKKM0jy4EbDYvcQoKyXMywh0lBBPQWpRbmYJqvwrRnEORiVh3kKQKTyZeSVwm14BHcEEdET 2hgMgR5QkIqSkGhitXY+bd845XirwiN9CaYNctHnMbN3vy3mchNfM27B92wVdnWktP6ZsLr77 Yd1KeYcp9681Jb46lvHkwHGxFC9JEQHfE7E6V29wqd9lfTxFct5GSZmtApnea9SDE1hWBR65U NZxkTvmwXq/bz8UynwTa9IYlhg9Dt6zzcH987///fenX80r4tVVYinOSDTUYi4qTgQAPTqF19 gCAAA= X-Env-Sender: sgoel@codeaurora.org X-Msg-Ref: server-6.tower-206.messagelabs.com!1505954244!109685236!1 X-Originating-IP: [198.145.29.96] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 55959 invoked from network); 21 Sep 2017 00:37:25 -0000 Received: from smtp.codeaurora.org (HELO smtp.codeaurora.org) (198.145.29.96) by server-6.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 21 Sep 2017 00:37:25 -0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2463160865; Thu, 21 Sep 2017 00:37:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1505954244; bh=Wd9cI5b/iRaIY8eKgernNEv0hHHbwW2bN6QowjagIcA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JHYXR9HwX4p7P3bcx7ZxwqN+qT7Rkk/J/zSsk1onjoN+k/OzkzwNnwS0v3v2MQQXn Pi+gs4SO25h7nNA9m+uYf/aT3+5ppT8Wr+IJOrdWk2GmcT18XaqMvswt+7Vj5ybKsf b5dbokg50LtoAjqTEsdLklEPTYdUkqFd84/ALsNQ= Received: from sgoel1-lnx.qualcomm.com (unknown [129.46.14.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sgoel@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1B01960738; Thu, 21 Sep 2017 00:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1505954243; bh=Wd9cI5b/iRaIY8eKgernNEv0hHHbwW2bN6QowjagIcA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a89R4XWIAqigpop+uB0WuXomeYn2kX+j4t/QVLXtJizgBUd8yuvRsdvyBiupBnC6d 7Q0EIOedsmZCKW/kyv7uvbUWxBqcTTc3yM297hCw1l99jUURCYdq8/oHZCYMp3Nc8w o4ZfMwbsUbLRWhIkbmIaySSrkvp2YHuO5nglW644= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1B01960738 From: Sameer Goel To: xen-devel@lists.xenproject.org, julien.grall@arm.com, mjaggi@caviumnetworks.com Date: Wed, 20 Sep 2017 18:37:05 -0600 Message-Id: <1505954230-18892-3-git-send-email-sgoel@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505954230-18892-1-git-send-email-sgoel@codeaurora.org> References: <1505954230-18892-1-git-send-email-sgoel@codeaurora.org> Cc: sstabellini@kernel.org, wei.liu2@citrix.com, george.dunlap@eu.citrix.com, Andrew.Cooper3@citrix.com, jbeulich@suse.com, Sameer Goel , Ian.Jackson@citrix.com, nd@arm.com, robin.murphy@arm.com, shankerd@codeaurora.org Subject: [Xen-devel] [RFC v2 2/7] arm64: Add definitions for fwnode_handle X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP This will be used as a device property to match the DMA capable devices with the associated SMMU. The header file is a port from linux. The code was changed to remove the types that were not needed for Xen. Linux ChangeId:ce793486e23e: driver core / ACPI: Represent ACPI companions using fwnode_handle Signed-off-by: Sameer Goel --- xen/include/asm-arm/device.h | 2 ++ xen/include/xen/fwnode.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 xen/include/xen/fwnode.h diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h index 6734ae8..78c38fe 100644 --- a/xen/include/asm-arm/device.h +++ b/xen/include/asm-arm/device.h @@ -2,6 +2,7 @@ #define __ASM_ARM_DEVICE_H #include +#include enum device_type { @@ -19,6 +20,7 @@ struct device #ifdef CONFIG_HAS_DEVICE_TREE struct dt_device_node *of_node; /* Used by drivers imported from Linux */ #endif + struct fwnode_handle *fwnode; /*fw device node identifier */ struct dev_archdata archdata; }; diff --git a/xen/include/xen/fwnode.h b/xen/include/xen/fwnode.h new file mode 100644 index 0000000..0fed958 --- /dev/null +++ b/xen/include/xen/fwnode.h @@ -0,0 +1,33 @@ +/* + * fwnode.h - Firmware device node object handle type definition. + * + * Copyright (C) 2015, Intel Corporation + * Author: Rafael J. Wysocki + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Ported from Linux include/linux/fwnode.h + * => commit ce793486e23e0162a732c605189c8028e0910e86 + * + * No functional Xen modifications. + */ + +#ifndef __XEN_FWNODE_H_ +#define __XEN_FWNODE_H_ + +enum fwnode_type { + FWNODE_INVALID = 0, + FWNODE_OF, + FWNODE_ACPI, + FWNODE_ACPI_STATIC, + FWNODE_IRQCHIP +}; + +struct fwnode_handle { + enum fwnode_type type; + struct fwnode_handle *secondary; +}; + +#endif