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: 10254891 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 AE65260211 for ; Fri, 2 Mar 2018 14:59:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E56E289B5 for ; Fri, 2 Mar 2018 14:59:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 928CD289D5; Fri, 2 Mar 2018 14:59:23 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 08E92289B5 for ; Fri, 2 Mar 2018 14:59:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1428930AbeCBO7W (ORCPT ); Fri, 2 Mar 2018 09:59:22 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:39443 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1426571AbeCBO63 (ORCPT ); Fri, 2 Mar 2018 09:58:29 -0500 Received: by mail-wr0-f194.google.com with SMTP id w77so10396053wrc.6 for ; Fri, 02 Mar 2018 06:58:29 -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=YU9DozmMCbap3LQdK08tTy/i59FogUZGENM2HvvpkEF+cIkkkqLctmGRZD34eGEBRZ F8reITQQJ1caiB09sh2108na/cH6U6zd8xc6ejirvF87JS8ahoAdbd6awdCc8T+cvhbX 9DBuKxIPG3OB/A5PXG3HmRrinev6B79rrV8zFEwzAJHt2icVOrXbKAmRhNKDAO/HtI9w 2GcJ3CkvMvMYBhAryk1nR+JtOaQhHo2BRMbjk3KdFv7yf5I39Il+f2fHI81yBiFZOyOY 2cE32AOt/CgaNnQTtVudaot5FSo4WNPGOpGoSRe+6Wb5oSNDO8Jk2CasXBa/WX+hTDxV Z8+A== X-Gm-Message-State: APf1xPDK+MFPdv8P9nsHESbsjqP9YmY4MW8pM2JywIowJDKnXNBc3h/z DhyThNrCgYwLUTLu3CB+foIfow== 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 Cc: joro@8bytes.org, ohad@wizery.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Srinivas Kandagatla 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> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.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