summaryrefslogtreecommitdiff
path: root/middleware
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-11-25 18:43:27 -0800
committerStefan Agner <stefan.agner@toradex.com>2016-11-25 18:44:21 -0800
commit53d1bf0704120b0fe1706c97a42f6f97e57eff1e (patch)
tree60647ce814c9c27e96e7a77c8fdf709f4eb07baa /middleware
parentafa0439a7538fe7b017b7a05512ee5d58a176af4 (diff)
open-amp: introduce RPMSG_NUM_BUFS to declare number of buffers
Add a define with the same name we have on the Linux side to define the number of VirtIO buffers we are going to allocate. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'middleware')
-rw-r--r--middleware/multicore/open-amp/porting/imx7d_m4/platform_info.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/middleware/multicore/open-amp/porting/imx7d_m4/platform_info.c b/middleware/multicore/open-amp/porting/imx7d_m4/platform_info.c
index c7f6f3c..11930c5 100644
--- a/middleware/multicore/open-amp/porting/imx7d_m4/platform_info.c
+++ b/middleware/multicore/open-amp/porting/imx7d_m4/platform_info.c
@@ -47,6 +47,11 @@
extern struct hil_platform_ops proc_ops;
/*
+ * Number of buffers per VirtIO queue
+ */
+#define RPMSG_NUM_BUFS 256
+
+/*
* Linux requires the ALIGN to 0x1000(4KB) instead of 0x80
*/
#define VRING_ALIGN 0x1000
@@ -125,7 +130,7 @@ struct hil_proc proc_table []=
{
/*[0]*/
{ /* TX */
- NULL, (void*)VRING0_BASE/*phy_addr*/, 256/*num_descs*/, VRING_ALIGN/*align*/,
+ NULL, (void*)VRING0_BASE/*phy_addr*/, RPMSG_NUM_BUFS/*num_descs*/, VRING_ALIGN/*align*/,
/*struct virtqueue, phys_addr, num_descs, align*/
{
/*struct proc_intr*/
@@ -134,7 +139,7 @@ struct hil_proc proc_table []=
},
/*[1]*/
{ /* RX */
- NULL, (void*)VRING1_BASE, 256, VRING_ALIGN,
+ NULL, (void*)VRING1_BASE, RPMSG_NUM_BUFS, VRING_ALIGN,
{
VRING1_IPI_VECT,0,0,NULL
}
@@ -174,13 +179,13 @@ struct hil_proc proc_table []=
2, (1<<VIRTIO_RPMSG_F_NS), 0,
{
{/* RX */
- NULL, (void*)VRING0_BASE, 256, VRING_ALIGN,
+ NULL, (void*)VRING0_BASE, RPMSG_NUM_BUFS, VRING_ALIGN,
{
VRING0_IPI_VECT,0,0,NULL
}
},
{/* TX */
- NULL, (void*)VRING1_BASE, 256, VRING_ALIGN,
+ NULL, (void*)VRING1_BASE, RPMSG_NUM_BUFS, VRING_ALIGN,
{
VRING1_IPI_VECT,0,0,NULL
}