Skip to content

Commit

Permalink
apps: zynqmp: wrap app config symbols in ifndef
Browse files Browse the repository at this point in the history
Allow symbols for IPI and shared memory to be set in CMake configuration

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
  • Loading branch information
Ben Levinsky authored and arnopo committed Apr 14, 2022
1 parent b28fb38 commit a6fe0b7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
24 changes: 22 additions & 2 deletions apps/machine/zynqmp/platform_info.c
Expand Up @@ -37,28 +37,48 @@
* index to 0.
*/
#ifdef versal
#ifndef IPI_CHN_BITMASK
#define IPI_CHN_BITMASK 0x08 /* IPI channel bit mask for IPI
* from/to RPU0 */
#endif /* !IPI_CHN_BITMASK */
#ifndef IPI_DEV_NAME
#define IPI_DEV_NAME "ff360000.ipi" /* IPI device name */
#endif /* !IPI_DEV_NAME */
#else
#ifndef IPI_CHN_BITMASK
#define IPI_CHN_BITMASK 0x00000100
#endif /* !IPI_CHN_BITMASK */
#ifndef IPI_DEV_NAME
#define IPI_DEV_NAME "ff340000.ipi"
#endif /* !IPI_DEV_NAME */
#endif /* versal */
#define DEV_BUS_NAME "platform" /* device bus name. "platform" bus
* is used in Linux kernel for generic
* devices */
/* libmetal devices names used in the examples.
* They are platform devices, you find them in Linux sysfs
* sys/bus/platform/devices */
#ifndef SHM_DEV_NAME
#define SHM_DEV_NAME "3ed20000.shm" /* shared device name */

#endif /* SHM_DEV_NAME */
#ifndef RSC_MEM_PA
#define RSC_MEM_PA 0x3ED20000UL
#endif /* !RSC_MEM_PA */
#ifndef RSC_MEM_SIZE
#define RSC_MEM_SIZE 0x2000UL
#endif /* !RSC_MEM_SIZE */
#ifndef VRING_MEM_PA
#define VRING_MEM_PA 0x3ED40000UL
#endif /* !VRING_MEM_PA */
#ifndef VRING_MEM_SIZE
#define VRING_MEM_SIZE 0x8000UL
#endif /* !VRING_MEM_SIZE */
#ifndef SHARED_BUF_PA
#define SHARED_BUF_PA 0x3ED48000UL
#endif /* !SHARED_BUF_PA */
#ifndef SHARED_BUF_SIZE
#define SHARED_BUF_SIZE 0x40000UL

#endif /* !SHARED_BUF_SIZE */

struct remoteproc_priv rproc_priv = {
.shm_name = SHM_DEV_NAME,
Expand Down
2 changes: 2 additions & 0 deletions apps/machine/zynqmp/platform_info.h
Expand Up @@ -43,7 +43,9 @@ struct remoteproc_priv {
};

#ifdef RPMSG_NO_IPI
#ifndef POLL_DEV_NAME
#define POLL_DEV_NAME "3ee40000.poll" /* shared device name */
#endif /* !POLL_DEV_NAME */
#define POLL_STOP 0x1U
#endif /* RPMSG_NO_IPI */

Expand Down

0 comments on commit a6fe0b7

Please sign in to comment.