From patchwork Thu Sep 1 22:28:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 9309903 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 435B660756 for ; Thu, 1 Sep 2016 22:29:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E79832843F for ; Thu, 1 Sep 2016 22:29:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC2C22955E; Thu, 1 Sep 2016 22:29:20 +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 68A0D2843F for ; Thu, 1 Sep 2016 22:29:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752092AbcIAW3U (ORCPT ); Thu, 1 Sep 2016 18:29:20 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:35928 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752840AbcIAW2a (ORCPT ); Thu, 1 Sep 2016 18:28:30 -0400 Received: by mail-pa0-f48.google.com with SMTP id fu3so26012562pad.3 for ; Thu, 01 Sep 2016 15:28:30 -0700 (PDT) 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=VkJLWUzC9BE27oCn3reRsbkSAMYMa8ibC6iwEvj/ad0=; b=jZPcdmworIiU5wlMTEYvTpJ30n7Xge21kXBPRaJUbhvQgFiKWbDN0N0xjY2vr9QFON hsMYJlxqlQCUJ1i7LHI+OEaQkG4LlVNhSf3kUs6y3oXpsk2Vsc8DJ9jLifkN2vQVdHQq uJdGpwcxx9S3FDS0T3CSpf9mh0WV35VjYBJUA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VkJLWUzC9BE27oCn3reRsbkSAMYMa8ibC6iwEvj/ad0=; b=F0P0sJB90IM62LcUeOE/Ms13cQ5DY7Z9ZoDXgTxk72OjVLaJ4qOzmP347D6bKI6+M2 p9AjZhEsmmqYO90rCkFVjgTaeGdDRuJB5CBqiW/taCnju6NNVVQx6U1Jj7mDP/WMz+i9 tGlaJECxnwRPNQ3j3TSIJlKwm1YIICKnL15sEpDObM9+D4Lc4/wzMCSi99gqtki8rTot TmsYf/k17R3C9lEJ9ZrXpRRRcbmpXAiX/NRQGO+p1N/bfzT5RhqXUror3Xe0MchiOqjZ efR63Ctr1YHQ/LIsNahCXSAxcdEOc2680g/Xtx04cEPaWcdtIgsDCJUYWAGr0WjCMGBK v1DA== X-Gm-Message-State: AE9vXwMhz8y/cMot7iMM4JVivOlgTIj7AwWSqBHvvzjb8oWL7os51DTITmnYRh+bxwHwdyeN X-Received: by 10.66.248.10 with SMTP id yi10mr30823298pac.31.1472768910048; Thu, 01 Sep 2016 15:28:30 -0700 (PDT) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id iw10sm8887131pac.14.2016.09.01.15.28.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Sep 2016 15:28:29 -0700 (PDT) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 15/17] rpmsg: Move virtio specifics from public header Date: Thu, 1 Sep 2016 15:28:07 -0700 Message-Id: <1472768889-3906-16-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1472768889-3906-1-git-send-email-bjorn.andersson@linaro.org> References: <1472768889-3906-1-git-send-email-bjorn.andersson@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 Move virtio rpmsg implementation details from the public header file to the virtio rpmsg implementation. Signed-off-by: Bjorn Andersson --- Changes since v1: - None drivers/rpmsg/virtio_rpmsg_bus.c | 52 ++++++++++++++++++++++++++++++++++++++++ include/linux/rpmsg.h | 52 ---------------------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index ac2241242188..671cb1803431 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c @@ -75,6 +75,58 @@ struct virtproc_info { struct rpmsg_endpoint *ns_ept; }; +/* The feature bitmap for virtio rpmsg */ +#define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */ + +/** + * struct rpmsg_hdr - common header for all rpmsg messages + * @src: source address + * @dst: destination address + * @reserved: reserved for future use + * @len: length of payload (in bytes) + * @flags: message flags + * @data: @len bytes of message payload data + * + * Every message sent(/received) on the rpmsg bus begins with this header. + */ +struct rpmsg_hdr { + u32 src; + u32 dst; + u32 reserved; + u16 len; + u16 flags; + u8 data[0]; +} __packed; + +/** + * struct rpmsg_ns_msg - dynamic name service announcement message + * @name: name of remote service that is published + * @addr: address of remote service that is published + * @flags: indicates whether service is created or destroyed + * + * This message is sent across to publish a new service, or announce + * about its removal. When we receive these messages, an appropriate + * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe() + * or ->remove() handler of the appropriate rpmsg driver will be invoked + * (if/as-soon-as one is registered). + */ +struct rpmsg_ns_msg { + char name[RPMSG_NAME_SIZE]; + u32 addr; + u32 flags; +} __packed; + +/** + * enum rpmsg_ns_flags - dynamic name service announcement flags + * + * @RPMSG_NS_CREATE: a new remote service was just created + * @RPMSG_NS_DESTROY: a known remote service was just destroyed + */ +enum rpmsg_ns_flags { + RPMSG_NS_CREATE = 0, + RPMSG_NS_DESTROY = 1, +}; + /** * @vrp: the remote processor this channel belongs to */ diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h index b4b56b010f71..71b16d37503a 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h @@ -41,58 +41,6 @@ #include #include -/* The feature bitmap for virtio rpmsg */ -#define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */ - -/** - * struct rpmsg_hdr - common header for all rpmsg messages - * @src: source address - * @dst: destination address - * @reserved: reserved for future use - * @len: length of payload (in bytes) - * @flags: message flags - * @data: @len bytes of message payload data - * - * Every message sent(/received) on the rpmsg bus begins with this header. - */ -struct rpmsg_hdr { - u32 src; - u32 dst; - u32 reserved; - u16 len; - u16 flags; - u8 data[0]; -} __packed; - -/** - * struct rpmsg_ns_msg - dynamic name service announcement message - * @name: name of remote service that is published - * @addr: address of remote service that is published - * @flags: indicates whether service is created or destroyed - * - * This message is sent across to publish a new service, or announce - * about its removal. When we receive these messages, an appropriate - * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe() - * or ->remove() handler of the appropriate rpmsg driver will be invoked - * (if/as-soon-as one is registered). - */ -struct rpmsg_ns_msg { - char name[RPMSG_NAME_SIZE]; - u32 addr; - u32 flags; -} __packed; - -/** - * enum rpmsg_ns_flags - dynamic name service announcement flags - * - * @RPMSG_NS_CREATE: a new remote service was just created - * @RPMSG_NS_DESTROY: a known remote service was just destroyed - */ -enum rpmsg_ns_flags { - RPMSG_NS_CREATE = 0, - RPMSG_NS_DESTROY = 1, -}; - #define RPMSG_ADDR_ANY 0xFFFFFFFF struct rpmsg_device;