summaryrefslogtreecommitdiff
path: root/middleware/multicore/open-amp/rpmsg/rpmsg.h
diff options
context:
space:
mode:
authorSanchayan Maity <maitysanchayan@gmail.com>2017-09-27 11:22:48 +0530
committerStefan Agner <stefan.agner@toradex.com>2017-09-28 12:33:21 +0200
commitddfb8ccfdff53ff7247d903837eed2c3099fd2a6 (patch)
tree17e764701293b328ab860fc077aa818f818c6db7 /middleware/multicore/open-amp/rpmsg/rpmsg.h
parent23958fc05fe76b0d91e156da0a3b5619c81fe3c0 (diff)
middleware: multicore: open-amp: Update open-amp for Vybrid
Update open-amp for Vybrid bringing it in sync with FreeRTOS BSP 1.0.1 release from NXP for iMX7. The file and directory structure for "porting" which contains the platform specific part of open-amp has been kept same. Only the implementation has either been updated or added. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'middleware/multicore/open-amp/rpmsg/rpmsg.h')
-rw-r--r--middleware/multicore/open-amp/rpmsg/rpmsg.h55
1 files changed, 37 insertions, 18 deletions
diff --git a/middleware/multicore/open-amp/rpmsg/rpmsg.h b/middleware/multicore/open-amp/rpmsg/rpmsg.h
index 746b792..b0bc9b7 100644
--- a/middleware/multicore/open-amp/rpmsg/rpmsg.h
+++ b/middleware/multicore/open-amp/rpmsg/rpmsg.h
@@ -4,6 +4,7 @@
* Copyright (C) 2011 Texas Instruments, Inc.
* Copyright (C) 2011 Google, Inc.
* All rights reserved.
+ * Copyright (c) 2015 Freescale Semiconductor, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -41,6 +42,9 @@
#define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */
#define RPMSG_NAME_SIZE 32
+#if defined(__IAR_SYSTEMS_ICC__)
+__packed
+#endif
/**
* struct rpmsg_hdr - common header for all rpmsg messages
* @src: source address
@@ -53,14 +57,33 @@
* Every message sent(/received) on the rpmsg bus begins with this header.
*/
struct rpmsg_hdr {
- unsigned long src;
- unsigned long dst;
- unsigned long reserved;
- unsigned short len;
- unsigned short flags;
- unsigned char data[0];
-} /*__attribute__((packed))*/;
+ unsigned long src;
+ unsigned long dst;
+ unsigned long reserved;
+ unsigned short len;
+ unsigned short flags;
+ unsigned char data[1];
+#if defined(__IAR_SYSTEMS_ICC__)
+};
+#else
+}__attribute__((packed));
+#endif
+
+#define RPMSG_DROP_HDR_FLAG 1
+
+
+struct rpmsg_hdr_reserved
+{
+ short int idx;
+ short int totlen;
+};
+
+#define RPMSG_BUF_HELD (1U << 31)
+
+#if defined(__IAR_SYSTEMS_ICC__)
+__packed
+#endif
/**
* struct rpmsg_ns_msg - dynamic name service announcement message
* @name: name of remote service that is published
@@ -77,7 +100,11 @@ struct rpmsg_ns_msg {
char name[RPMSG_NAME_SIZE];
unsigned long addr;
unsigned long flags;
-} /*__attribute__((packed))*/;
+#if defined(__IAR_SYSTEMS_ICC__)
+};
+#else
+}__attribute__((packed));
+#endif
/**
* enum rpmsg_ns_flags - dynamic name service announcement flags
@@ -262,8 +289,9 @@ static inline
int rpmsg_trysend(struct rpmsg_channel *rpdev, void *data, int len)
{
- if (!rpdev || !data)
+ if (!rpdev || !data) {
return RPMSG_ERR_PARAM;
+ }
return rpmsg_send_offchannel_raw(rpdev, rpdev->src, rpdev->dst, (char *)data, len, RPMSG_FALSE);
}
@@ -399,13 +427,4 @@ struct rpmsg_channel *rpmsg_create_channel(struct remote_device *rdev, char *nam
*/
void rpmsg_delete_channel(struct rpmsg_channel *rp_chnl);
-/**
- *
- * rpmsg_handler
- *
- * Provide platform specific interrupt handler to application layer
- *
- */
-void rpmsg_handler(void);
-
#endif /* _RPMSG_H_ */