From patchwork Tue Aug 16 00:17:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 73941 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1711929qga; Mon, 15 Aug 2016 17:18:11 -0700 (PDT) X-Received: by 10.98.86.154 with SMTP id h26mr58731409pfj.22.1471306691511; Mon, 15 Aug 2016 17:18:11 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si28974912paa.190.2016.08.15.17.18.08; Mon, 15 Aug 2016 17:18:11 -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 S1753226AbcHPARv (ORCPT + 27 others); Mon, 15 Aug 2016 20:17:51 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36347 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753006AbcHPARq (ORCPT ); Mon, 15 Aug 2016 20:17:46 -0400 Received: by mail-pa0-f49.google.com with SMTP id pp5so20346003pac.3 for ; Mon, 15 Aug 2016 17:17:46 -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=vygNXARA6MHAzeXIXKVWGR2fDFt+ytY7mGuqlZfFuas=; b=ff9fCQeXT0EIbizVxhFAquRThnPQ0XYbAnZs4yMgYbi90rIFOqtk+Ke1br9yaYJlSp csfeW6iW4qMYmJ8iQPLru2lbezrAJZC9KSfJF5TIdxp0Bl1+I6mYTBpB0PJC1bhdkhi/ 4r+ajpC1IJBcMocbM6uGpDGsHaGiK/LfQBOh0= 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=vygNXARA6MHAzeXIXKVWGR2fDFt+ytY7mGuqlZfFuas=; b=iK+nUA37pMyIrQKqWoSdpjTpqk7ZuPlwSExZY8JApuKMG97VeS9FIyNJW/oMyP5Led krSWO2sIs2pWwAavO3b2dA8AP2ltAZHxeBbd2uyMzm2Vwspkn9B4H38rPiW5Jd/Mpb8S 8XJdOGFjyAZJlmC6OK6/8Ucbu8sJMlsu87/yXP06NotdGuIhmkGxuXT8rkVrLsxhP7jj qS0wx6xAW5pkQjfEU3ICA4O6Xp9Q2wbFldSZ8uxb6BBOHQ2iZOno1xwc2I2L9qh2h57R JCnADUbsqIXEm2wujBnCLkuHr6yuF6TrWAeMj8hYUKQm3Mrip8uFVdXq/BU+LLMMb6Ch 9Emw== X-Gm-Message-State: AEkoousJxswZEPwlMm+wnMFyfjHEhrpcNsfbdgynPe/kW14Cm+05Q64jLZOJOTTDCeoYYXOj X-Received: by 10.66.170.44 with SMTP id aj12mr58965797pac.131.1471306655972; Mon, 15 Aug 2016 17:17:35 -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 p187sm34047931pfb.5.2016.08.15.17.17.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Aug 2016 17:17:35 -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 11/14] rpmsg: Move virtio specifics from public header Date: Mon, 15 Aug 2016 17:17:17 -0700 Message-Id: <1471306640-29917-12-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1471306640-29917-1-git-send-email-bjorn.andersson@linaro.org> References: <1471306640-29917-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 --- 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 6ad4c657aaf4..a284b48285a1 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 a5679b9b6102..db409a8e3178 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;