diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-09-01 18:28:07 -0400 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-09-09 01:15:25 -0400 |
commit | e88dae5da46d3989fd6a83dd9f6806777b20d1ae (patch) | |
tree | 4df188dcfc3494e3a4312bf16ae30ac3198d00bf | |
parent | 3bf950ff23337fc812736520ff9d098284187844 (diff) |
rpmsg: Move virtio specifics from public header
Move virtio rpmsg implementation details from the public header file to
the virtio rpmsg implementation.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
-rw-r--r-- | drivers/rpmsg/virtio_rpmsg_bus.c | 52 | ||||
-rw-r--r-- | 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 { | |||
75 | struct rpmsg_endpoint *ns_ept; | 75 | struct rpmsg_endpoint *ns_ept; |
76 | }; | 76 | }; |
77 | 77 | ||
78 | /* The feature bitmap for virtio rpmsg */ | ||
79 | #define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */ | ||
80 | |||
81 | /** | ||
82 | * struct rpmsg_hdr - common header for all rpmsg messages | ||
83 | * @src: source address | ||
84 | * @dst: destination address | ||
85 | * @reserved: reserved for future use | ||
86 | * @len: length of payload (in bytes) | ||
87 | * @flags: message flags | ||
88 | * @data: @len bytes of message payload data | ||
89 | * | ||
90 | * Every message sent(/received) on the rpmsg bus begins with this header. | ||
91 | */ | ||
92 | struct rpmsg_hdr { | ||
93 | u32 src; | ||
94 | u32 dst; | ||
95 | u32 reserved; | ||
96 | u16 len; | ||
97 | u16 flags; | ||
98 | u8 data[0]; | ||
99 | } __packed; | ||
100 | |||
101 | /** | ||
102 | * struct rpmsg_ns_msg - dynamic name service announcement message | ||
103 | * @name: name of remote service that is published | ||
104 | * @addr: address of remote service that is published | ||
105 | * @flags: indicates whether service is created or destroyed | ||
106 | * | ||
107 | * This message is sent across to publish a new service, or announce | ||
108 | * about its removal. When we receive these messages, an appropriate | ||
109 | * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe() | ||
110 | * or ->remove() handler of the appropriate rpmsg driver will be invoked | ||
111 | * (if/as-soon-as one is registered). | ||
112 | */ | ||
113 | struct rpmsg_ns_msg { | ||
114 | char name[RPMSG_NAME_SIZE]; | ||
115 | u32 addr; | ||
116 | u32 flags; | ||
117 | } __packed; | ||
118 | |||
119 | /** | ||
120 | * enum rpmsg_ns_flags - dynamic name service announcement flags | ||
121 | * | ||
122 | * @RPMSG_NS_CREATE: a new remote service was just created | ||
123 | * @RPMSG_NS_DESTROY: a known remote service was just destroyed | ||
124 | */ | ||
125 | enum rpmsg_ns_flags { | ||
126 | RPMSG_NS_CREATE = 0, | ||
127 | RPMSG_NS_DESTROY = 1, | ||
128 | }; | ||
129 | |||
78 | /** | 130 | /** |
79 | * @vrp: the remote processor this channel belongs to | 131 | * @vrp: the remote processor this channel belongs to |
80 | */ | 132 | */ |
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 @@ | |||
41 | #include <linux/kref.h> | 41 | #include <linux/kref.h> |
42 | #include <linux/mutex.h> | 42 | #include <linux/mutex.h> |
43 | 43 | ||
44 | /* The feature bitmap for virtio rpmsg */ | ||
45 | #define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */ | ||
46 | |||
47 | /** | ||
48 | * struct rpmsg_hdr - common header for all rpmsg messages | ||
49 | * @src: source address | ||
50 | * @dst: destination address | ||
51 | * @reserved: reserved for future use | ||
52 | * @len: length of payload (in bytes) | ||
53 | * @flags: message flags | ||
54 | * @data: @len bytes of message payload data | ||
55 | * | ||
56 | * Every message sent(/received) on the rpmsg bus begins with this header. | ||
57 | */ | ||
58 | struct rpmsg_hdr { | ||
59 | u32 src; | ||
60 | u32 dst; | ||
61 | u32 reserved; | ||
62 | u16 len; | ||
63 | u16 flags; | ||
64 | u8 data[0]; | ||
65 | } __packed; | ||
66 | |||
67 | /** | ||
68 | * struct rpmsg_ns_msg - dynamic name service announcement message | ||
69 | * @name: name of remote service that is published | ||
70 | * @addr: address of remote service that is published | ||
71 | * @flags: indicates whether service is created or destroyed | ||
72 | * | ||
73 | * This message is sent across to publish a new service, or announce | ||
74 | * about its removal. When we receive these messages, an appropriate | ||
75 | * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe() | ||
76 | * or ->remove() handler of the appropriate rpmsg driver will be invoked | ||
77 | * (if/as-soon-as one is registered). | ||
78 | */ | ||
79 | struct rpmsg_ns_msg { | ||
80 | char name[RPMSG_NAME_SIZE]; | ||
81 | u32 addr; | ||
82 | u32 flags; | ||
83 | } __packed; | ||
84 | |||
85 | /** | ||
86 | * enum rpmsg_ns_flags - dynamic name service announcement flags | ||
87 | * | ||
88 | * @RPMSG_NS_CREATE: a new remote service was just created | ||
89 | * @RPMSG_NS_DESTROY: a known remote service was just destroyed | ||
90 | */ | ||
91 | enum rpmsg_ns_flags { | ||
92 | RPMSG_NS_CREATE = 0, | ||
93 | RPMSG_NS_DESTROY = 1, | ||
94 | }; | ||
95 | |||
96 | #define RPMSG_ADDR_ANY 0xFFFFFFFF | 44 | #define RPMSG_ADDR_ANY 0xFFFFFFFF |
97 | 45 | ||
98 | struct rpmsg_device; | 46 | struct rpmsg_device; |