From 703a5aacfa9ce9830ed5ae6b73964f895fcacea6 Mon Sep 17 00:00:00 2001 From: Jolly Shah <jollys@xilinx.com> Date: Tue, 8 Jan 2019 11:25:28 -0800 Subject: [PATCH] xilinx: Move ipi configuration structure definition to header file Move ipi configuration structure definition to common header file and rename it to common name, so it can be used for Xilinx specific other platforms in upcoming changes. Signed-off-by: Tejas Patel <tejas.patel@xilinx.com> Reviewed-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Jolly Shah <jollys@xilinx.com> --- plat/xilinx/common/include/ipi.h | 25 +++++++++++++++++++++++++ plat/xilinx/zynqmp/platform.mk | 1 + plat/xilinx/zynqmp/zynqmp_ipi.c | 15 +++------------ 3 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 plat/xilinx/common/include/ipi.h diff --git a/plat/xilinx/common/include/ipi.h b/plat/xilinx/common/include/ipi.h new file mode 100644 index 000000000..c9fd8d104 --- /dev/null +++ b/plat/xilinx/common/include/ipi.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2018, Xilinx, Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/* Xilinx IPI management configuration data and macros */ + +#ifndef IPI_H +#define IPI_H + +#include <stdint.h> + +/********************************************************************* + * Struct definitions + ********************************************************************/ + +/* structure to maintain IPI configuration information */ +struct ipi_config { + unsigned int ipi_bit_mask; + unsigned int ipi_reg_base; + unsigned char secure_only; +}; + +#endif /* IPI_H */ diff --git a/plat/xilinx/zynqmp/platform.mk b/plat/xilinx/zynqmp/platform.mk index 35c8983cd..a4ffd6ceb 100644 --- a/plat/xilinx/zynqmp/platform.mk +++ b/plat/xilinx/zynqmp/platform.mk @@ -47,6 +47,7 @@ endif PLAT_INCLUDES := -Iinclude/plat/arm/common/ \ -Iinclude/plat/arm/common/aarch64/ \ + -Iplat/xilinx/common/include/ \ -Iplat/xilinx/zynqmp/include/ \ -Iplat/xilinx/zynqmp/pm_service/ \ -Iplat/xilinx/zynqmp/ipi_mailbox_service/ diff --git a/plat/xilinx/zynqmp/zynqmp_ipi.c b/plat/xilinx/zynqmp/zynqmp_ipi.c index 96f2b9c3b..ac84e0b73 100644 --- a/plat/xilinx/zynqmp/zynqmp_ipi.c +++ b/plat/xilinx/zynqmp/zynqmp_ipi.c @@ -15,6 +15,8 @@ #include <common/runtime_svc.h> #include <lib/bakery_lock.h> #include <lib/mmio.h> + +#include <ipi.h> #include <plat_ipi.h> #include <plat_private.h> @@ -44,19 +46,8 @@ #define IPI_IS_SECURE(I) ((zynqmp_ipi_table[(I)].secure_only & \ IPI_SECURE_MASK) ? 1 : 0) -/********************************************************************* - * Struct definitions - ********************************************************************/ - -/* structure to maintain IPI configuration information */ -struct zynqmp_ipi_config { - unsigned int ipi_bit_mask; - unsigned int ipi_reg_base; - unsigned char secure_only; -}; - /* Zynqmp ipi configuration table */ -const static struct zynqmp_ipi_config zynqmp_ipi_table[] = { +const static struct ipi_config zynqmp_ipi_table[] = { /* APU IPI */ { .ipi_bit_mask = 0x1, -- GitLab