Browse Source

Merge "refactor(xilinx): move versal files to common place" into integration

pull/1996/head
Mark Dykes 2 years ago
committed by TrustedFirmware Code Review
parent
commit
523389e7f7
  1. 2
      plat/xilinx/common/include/pm_api_sys.h
  2. 1
      plat/xilinx/common/include/pm_node.h
  3. 1
      plat/xilinx/common/include/pm_svc_main.h
  4. 2
      plat/xilinx/common/pm_service/pm_api_sys.c
  5. 2
      plat/xilinx/common/pm_service/pm_svc_main.c
  6. 5
      plat/xilinx/versal/platform.mk
  7. 6
      plat/xilinx/versal_net/platform.mk
  8. 4
      plat/xilinx/zynqmp/aarch64/zynqmp_common.c
  9. 4
      plat/xilinx/zynqmp/libpm.mk
  10. 3
      plat/xilinx/zynqmp/plat_psci.c
  11. 3
      plat/xilinx/zynqmp/pm_service/pm_api_clock.c
  12. 3
      plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c
  13. 3
      plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c
  14. 3
      plat/xilinx/zynqmp/pm_service/pm_client.c
  15. 2
      plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c
  16. 6
      plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.h
  17. 2
      plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.c
  18. 6
      plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.h
  19. 2
      plat/xilinx/zynqmp/sip_svc_setup.c

2
plat/xilinx/versal/pm_service/pm_api_sys.h → plat/xilinx/common/include/pm_api_sys.h

@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

1
plat/xilinx/versal/pm_service/pm_node.h → plat/xilinx/common/include/pm_node.h

@ -1,5 +1,6 @@
/*
* Copyright (c) 2019, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

1
plat/xilinx/versal/pm_service/pm_svc_main.h → plat/xilinx/common/include/pm_svc_main.h

@ -1,5 +1,6 @@
/*
* Copyright (c) 2019-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

2
plat/xilinx/versal/pm_service/pm_api_sys.c → plat/xilinx/common/pm_service/pm_api_sys.c

@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

2
plat/xilinx/versal/pm_service/pm_svc_main.c → plat/xilinx/common/pm_service/pm_svc_main.c

@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2022, Xilinx, Inc. All rights reserved.
* Copyright (c) 2022, Advanced Micro Devices, Inc. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

5
plat/xilinx/versal/platform.mk

@ -1,4 +1,5 @@
# Copyright (c) 2018-2021, ARM Limited and Contributors. All rights reserved.
# Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
@ -82,6 +83,8 @@ BL31_SOURCES += drivers/arm/cci/cci.c \
plat/xilinx/common/plat_startup.c \
plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \
plat/xilinx/common/pm_service/pm_ipi.c \
plat/xilinx/common/pm_service/pm_api_sys.c \
plat/xilinx/common/pm_service/pm_svc_main.c \
plat/xilinx/versal/bl31_versal_setup.c \
plat/xilinx/versal/plat_psci.c \
plat/xilinx/versal/plat_versal.c \
@ -89,8 +92,6 @@ BL31_SOURCES += drivers/arm/cci/cci.c \
plat/xilinx/versal/sip_svc_setup.c \
plat/xilinx/versal/versal_gicv3.c \
plat/xilinx/versal/versal_ipi.c \
plat/xilinx/versal/pm_service/pm_svc_main.c \
plat/xilinx/versal/pm_service/pm_api_sys.c \
plat/xilinx/versal/pm_service/pm_client.c
ifeq ($(HARDEN_SLS_ALL), 1)

6
plat/xilinx/versal_net/platform.mk

@ -1,6 +1,6 @@
# Copyright (c) 2018-2022, ARM Limited and Contributors. All rights reserved.
# Copyright (c) 2021-2022, Xilinx, Inc. All rights reserved.
# Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.
# Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
@ -87,10 +87,10 @@ BL31_SOURCES += drivers/arm/cci/cci.c \
lib/cpus/aarch64/cortex_a78.S \
plat/common/plat_psci_common.c
ifeq ($(TFA_NO_PM), 0)
BL31_SOURCES += plat/xilinx/versal/pm_service/pm_api_sys.c \
BL31_SOURCES += plat/xilinx/common/pm_service/pm_api_sys.c \
plat/xilinx/common/pm_service/pm_ipi.c \
${PLAT_PATH}/plat_psci_pm.c \
plat/xilinx/versal/pm_service/pm_svc_main.c \
plat/xilinx/common/pm_service/pm_svc_main.c \
${PLAT_PATH}/pm_service/pm_client.c \
${PLAT_PATH}/versal_net_ipi.c
else

4
plat/xilinx/zynqmp/aarch64/zynqmp_common.c

@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved.
* Copyright (C) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -19,7 +19,7 @@
#include <plat/common/platform.h>
#include <services/arm_arch_svc.h>
#include "pm_api_sys.h"
#include "zynqmp_pm_api_sys.h"
/*
* Table of regions to map using the MMU.

4
plat/xilinx/zynqmp/libpm.mk

@ -8,8 +8,8 @@ LIBPM_SRCS := $(addprefix plat/xilinx/common/pm_service/, \
pm_ipi.c)
LIBPM_SRCS += $(addprefix plat/xilinx/zynqmp/pm_service/, \
pm_svc_main.c \
pm_api_sys.c \
zynqmp_pm_svc_main.c \
zynqmp_pm_api_sys.c \
pm_api_pinctrl.c \
pm_api_ioctl.c \
pm_api_clock.c \

3
plat/xilinx/zynqmp/plat_psci.c

@ -1,5 +1,6 @@
/*
* Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -16,8 +17,8 @@
#include <plat/common/platform.h>
#include <plat_private.h>
#include "pm_api_sys.h"
#include "pm_client.h"
#include "zynqmp_pm_api_sys.h"
static uintptr_t zynqmp_sec_entry;

3
plat/xilinx/zynqmp/pm_service/pm_api_clock.c

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -16,10 +17,10 @@
#include <plat/common/platform.h>
#include "pm_api_clock.h"
#include "pm_api_sys.h"
#include "pm_client.h"
#include "pm_common.h"
#include "pm_ipi.h"
#include "zynqmp_pm_api_sys.h"
#define CLK_NODE_MAX (6U)

3
plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2022, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -16,10 +17,10 @@
#include "pm_api_clock.h"
#include "pm_api_ioctl.h"
#include "pm_api_sys.h"
#include "pm_client.h"
#include "pm_common.h"
#include "pm_ipi.h"
#include "zynqmp_pm_api_sys.h"
/**
* pm_ioctl_get_rpu_oper_mode () - Get current RPU operation mode

3
plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -14,10 +15,10 @@
#include <plat/common/platform.h>
#include "pm_api_pinctrl.h"
#include "pm_api_sys.h"
#include "pm_client.h"
#include "pm_common.h"
#include "pm_ipi.h"
#include "zynqmp_pm_api_sys.h"
struct pinctrl_function {
char name[FUNCTION_NAME_LEN];

3
plat/xilinx/zynqmp/pm_service/pm_client.c

@ -1,5 +1,6 @@
/*
* Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -21,9 +22,9 @@
#include <plat_ipi.h>
#include <zynqmp_def.h>
#include "pm_api_sys.h"
#include "pm_client.h"
#include "pm_ipi.h"
#include "zynqmp_pm_api_sys.h"
#define IRQ_MAX 84U
#define NUM_GICD_ISENABLER ((IRQ_MAX >> 5U) + 1U)

2
plat/xilinx/zynqmp/pm_service/pm_api_sys.c → plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c

@ -16,10 +16,10 @@
#include "pm_api_clock.h"
#include "pm_api_ioctl.h"
#include "pm_api_pinctrl.h"
#include "pm_api_sys.h"
#include "pm_client.h"
#include "pm_common.h"
#include "pm_ipi.h"
#include "zynqmp_pm_api_sys.h"
#define PM_QUERY_FEATURE_BITMASK ( \
(1ULL << (uint64_t)PM_QID_CLOCK_GET_NAME) | \

6
plat/xilinx/zynqmp/pm_service/pm_api_sys.h → plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.h

@ -5,8 +5,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef PM_API_SYS_H
#define PM_API_SYS_H
#ifndef ZYNQMP_PM_API_SYS_H
#define ZYNQMP_PM_API_SYS_H
#include <stdint.h>
@ -192,4 +192,4 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, uint32_t *version,
uint32_t *bit_mask, uint8_t len);
enum pm_ret_status check_api_dependency(uint8_t id);
#endif /* PM_API_SYS_H */
#endif /* ZYNQMP_PM_API_SYS_H */

2
plat/xilinx/zynqmp/pm_service/pm_svc_main.c → plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.c

@ -22,10 +22,10 @@
#endif
#include <plat_private.h>
#include "pm_api_sys.h"
#include "pm_client.h"
#include "pm_defs.h"
#include "pm_ipi.h"
#include "zynqmp_pm_api_sys.h"
/* pm_up = !0 - UP, pm_up = 0 - DOWN */
static int32_t pm_up, ipi_irq_flag;

6
plat/xilinx/zynqmp/pm_service/pm_svc_main.h → plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.h

@ -5,8 +5,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef PM_SVC_MAIN_H
#define PM_SVC_MAIN_H
#ifndef ZYNQMP_PM_SVC_MAIN_H
#define ZYNQMP_PM_SVC_MAIN_H
#include "pm_common.h"
@ -14,4 +14,4 @@ int32_t pm_setup(void);
uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,
uint64_t x4, const void *cookie, void *handle,
uint64_t flags);
#endif /* PM_SVC_MAIN_H */
#endif /* ZYNQMP_PM_SVC_MAIN_H */

2
plat/xilinx/zynqmp/sip_svc_setup.c

@ -14,7 +14,7 @@
#include <custom_svc.h>
#include "ipi_mailbox_svc.h"
#include "pm_svc_main.h"
#include "zynqmp_pm_svc_main.h"
/* SMC function IDs for SiP Service queries */
#define ZYNQMP_SIP_SVC_CALL_COUNT U(0x8200ff00)

Loading…
Cancel
Save