From patchwork Fri Mar 2 14:55:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10255019 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 9332160211 for ; Fri, 2 Mar 2018 15:41:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83919289F6 for ; Fri, 2 Mar 2018 15:41:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77CEA28A06; Fri, 2 Mar 2018 15:41:48 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0C362289F6 for ; Fri, 2 Mar 2018 15:41:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=OLl0fJXLvJYssjES/IJ0cjla/KrojQs3wn30JPIn38w=; b=mtDvyI874O0IdWgLVdTgmfNHhc pqe3JikjHTkOoU23+f36BE60kKGFJ1EQcvmzaihRWDAwAxCZ+GpF7O2BVLQS06BDhSMtE3VTmZ1dL tdWPyXme4U7s5YQTrBWyCfs3L7Yw4Yy97UTxAY8FyZt5iValS5aPU+NY/3UJQV2rHRB5ZTj7AgIsl H+A2jRdRz33dbdzbN+JnX3Sbp4d/VCeiqVDPTfRshtlaJkRUBSoJ4KeSEG8ZAo/LZ5GANxWM2gVcU /GzkUnQuWgRz4jiVvetyRE8QTwhWKaUC48PODmGeqQYlmhSNDBtUdoYIQu/wgDhhLZI8CJpS0rJbD 5MU5qCdw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ermoX-0004H8-2z; Fri, 02 Mar 2018 15:41:41 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ermoT-0004FH-Jw for linux-arm-kernel@bombadil.infradead.org; Fri, 02 Mar 2018 15:41:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ElYMzOYlFqWMtD7DzDSpINayMXJyu1ZXjzhI1C0ygl0=; b=IsYJmMQ9Qf3NI9SvrxGb3YZhC MtQHix7mj9Cyoee4SOHt+tTEyBHGsPJRqLKKpDWexi3NyPHPYMxHzCWbekQIsZs6iVhTyZxXqLmOy 2gYF6PeE5MLE4aGsM25vjiou900DXjgWZmAZmGNF7/I3DFdj82Fwq1a7/Qg1TO/9YtYDqYxLT91HT +LWO0k+nQC/NP8I+TpwqpiHcgjBJBJQHZMJSRKdOmGDDQq/Ib6EMrLnFDAwpNIfj7zms38WyN5omG I1p3HdzR8I92n/EMZbF7f4lGkYXIk0wRVmAqT1tqN6nIQA55xpG+VGaI4Y41B+HlMun/GyvP9EWm0 z6H7ulaBw==; Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by merlin.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1erm90-00064j-56 for linux-arm-kernel@lists.infradead.org; Fri, 02 Mar 2018 14:58:47 +0000 Received: by mail-wr0-x244.google.com with SMTP id n7so10391819wrn.5 for ; Fri, 02 Mar 2018 06:58:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ElYMzOYlFqWMtD7DzDSpINayMXJyu1ZXjzhI1C0ygl0=; b=FRt0L38Oe8pq+1NisRwB8ZbyAWr/OY4kko1b9KvjcvjzVM9k2mCnmVPaz8j5VWNTJT rS9pfM7T3/w+GfbApDXPt/DpEN4SGgAxAk8ptQfS/pyMbzMFkD0jTsaSE01ydukyoUv1 5UTab5vGJkOopiIxYDyddo2xF39TnOXkX41qo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ElYMzOYlFqWMtD7DzDSpINayMXJyu1ZXjzhI1C0ygl0=; b=BQmQO9qOFH2S2EXJQf+cEf/9mu/LEqYkwAOO3nb/8mdIl7GgrUpNffnZ+A3dMN/9jq 1FcMbLxzY53qRawQ3L3d8hnOVAAWbtW5/iK5e/PiSM4FZCxw+qTOiTwin2n2nBvLlS+7 xMv1CD1QyU3mGQi5SQoAxx/7Vy4icTDKfHtTFar6FFaNQcsEn92xIe+3+IxrYHT39D+v 2XAgfVk6uxhdOvSU7uZkHldQ1wisFYE50Qhi2rrm1O7FZ66OoviX3js2Ij6kD1SLOGee tyYy+OzbS8tNR+xLtY28QrGJ8fo8PVMV/Iqfiid/h8Oz9X+363LUcOufpxfGZKGKDl9l TeMg== X-Gm-Message-State: APf1xPBhOzsn3jPldcHWs1EAPJz0YlmKMVOgY8aJktHXiJbHlBaLBIZA V2xOuM14ISafQPggBkWPkMVKAg== X-Google-Smtp-Source: AG47ELtPKm+VwwguXx8je7gLZZ4Mh6T3I5TBwjJW+2UecHxPr1u0qARC3RWexYi4qQI2e01yxKtJ3Q== X-Received: by 10.223.187.199 with SMTP id z7mr5461800wrg.58.1520002708567; Fri, 02 Mar 2018 06:58:28 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id b68sm1483168wmi.30.2018.03.02.06.58.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Mar 2018 06:58:28 -0800 (PST) From: srinivas.kandagatla@linaro.org To: will.deacon@arm.com, robin.murphy@arm.com, bjorn.andersson@linaro.org Subject: [PATCH 1/3] rpmsg: core: export rpmsg bus type Date: Fri, 2 Mar 2018 14:55:29 +0000 Message-Id: <20180302145531.20463-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180302145531.20463-1-srinivas.kandagatla@linaro.org> References: <20180302145531.20463-1-srinivas.kandagatla@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180302_095846_229273_2773153D X-CRM114-Status: GOOD ( 14.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ohad@wizery.com, joro@8bytes.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla Export rpmsg bus type so that iommu drivers iommu ops to rpmsg bus type. On Qualcomm SoCs ADSP exposes functions like audio and other which need iommu access, as these drivers are part of rpmsg bus, able to allocate memory from iommus is basic requirement. So expose this bus so that iommu drivers can add ops to this. Signed-off-by: Srinivas Kandagatla --- drivers/rpmsg/rpmsg_core.c | 3 ++- include/linux/rpmsg.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index 5a081762afcc..e84c71f8d6ab 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -465,7 +465,7 @@ static int rpmsg_dev_remove(struct device *dev) return err; } -static struct bus_type rpmsg_bus = { +struct bus_type rpmsg_bus = { .name = "rpmsg", .match = rpmsg_dev_match, .dev_groups = rpmsg_dev_groups, @@ -473,6 +473,7 @@ static struct bus_type rpmsg_bus = { .probe = rpmsg_dev_probe, .remove = rpmsg_dev_remove, }; +EXPORT_SYMBOL(rpmsg_bus); int rpmsg_register_device(struct rpmsg_device *rpdev) { diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h index ca07366c4c33..869e5946b7df 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h @@ -49,7 +49,7 @@ struct rpmsg_device; struct rpmsg_endpoint; struct rpmsg_device_ops; struct rpmsg_endpoint_ops; - +extern struct bus_type rpmsg_bus; /** * struct rpmsg_channel_info - channel info representation * @name: name of service