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: 75248 Delivered-To: patch@linaro.org Received: by 10.140.29.8 with SMTP id a8csp536550qga; Thu, 1 Sep 2016 15:29:37 -0700 (PDT) X-Received: by 10.66.220.194 with SMTP id py2mr30689913pac.77.1472768976926; Thu, 01 Sep 2016 15:29:36 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t22si7676881pfi.209.2016.09.01.15.29.36; Thu, 01 Sep 2016 15:29:36 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753586AbcIAW3Y (ORCPT + 27 others); Thu, 1 Sep 2016 18:29:24 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:34288 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752857AbcIAW2a (ORCPT ); Thu, 1 Sep 2016 18:28:30 -0400 Received: by mail-pa0-f48.google.com with SMTP id fi15so33783107pac.1 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=fSPL+87RFm+qpXC/pMXNbN00Ccy3bgKPMFx8JCHHfzoq1HbjeSPfv4HNv/m02KwJn7 4KiH8AtX9dzeuSpxuoZGEyVINYR92jG519UtARsqux3KdTSqCc5jNu4mfDUl8sYCIeQU n/clTMfTyuA+V4gHuI1ezxXqXa6Agv4EweMBYmiYMxvBDjhY4sruJm5xptAkAmPAF36F 25CjwQ6LRE2fmloGdg8H5trBtwzhdQwE+W3YBrmY/NDwNHuM/QGhnP9dYVf8isTYhjqA vMMV/2AjjwJJZUkkxZqxA4lj4p+C08WcDrJXweedgXgrq3pfzj+UeH8Wcp1fBMcAeBLf ZP0Q== X-Gm-Message-State: AE9vXwNMxp/wt9MngghYFsdANQ45241ZnDnw9D07VdW2HampxpJ44SvtdA7rcvMN9c2mEBFc 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.5.0 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;