From 53d1bf0704120b0fe1706c97a42f6f97e57eff1e Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 25 Nov 2016 18:43:27 -0800 Subject: 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 --- .../multicore/open-amp/porting/imx7d_m4/platform_info.c | 13 +++++++++---- 1 file 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 @@ -46,6 +46,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 */ @@ -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<