GK SDK 源码库: XMIPCLinuxV100R005C00SPC030 (kernel/tools/open_source excluded)
This commit is contained in:
+44
@@ -0,0 +1,44 @@
|
||||
# Copyright 2021 NXP
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Select the Interconnect files
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
ifeq (${ADD_INTERCONNECT},)
|
||||
|
||||
ADD_INTERCONNECT := 1
|
||||
PLAT_INCLUDES += -I${PLAT_DRIVERS_INCLUDE_PATH}/interconnect
|
||||
|
||||
ifeq (, $(filter $(INTERCONNECT), CCI400 CCN502 CCN504 CCN508))
|
||||
$(error -> Interconnect type not set!)
|
||||
else
|
||||
$(eval $(call add_define_val,INTERCONNECT,${INTERCONNECT}))
|
||||
ifeq ($(INTERCONNECT), $(filter $(INTERCONNECT), CCN502 CCN504 CCN508))
|
||||
INTERCONNECT_SOURCES := drivers/arm/ccn/ccn.c \
|
||||
${PLAT_DRIVERS_PATH}/interconnect/ls_ccn.c
|
||||
else
|
||||
ifeq ($(INTERCONNECT), CCI400)
|
||||
INTERCONNECT_SOURCES := drivers/arm/cci/cci.c \
|
||||
${PLAT_DRIVERS_PATH}/interconnect/ls_cci.c
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (${BL_COMM_INTERCONNECT_NEEDED},yes)
|
||||
BL_COMMON_SOURCES += ${INTERCONNECT_SOURCES}
|
||||
else
|
||||
ifeq (${BL2_INTERCONNECT_NEEDED},yes)
|
||||
BL2_SOURCES += ${INTERCONNECT_SOURCES}
|
||||
endif
|
||||
ifeq (${BL31_INTERCONNECT_NEEDED},yes)
|
||||
BL31_SOURCES += ${INTERCONNECT_SOURCES}
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2020 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
*/
|
||||
|
||||
#include <arch.h>
|
||||
#include <cci.h>
|
||||
|
||||
#include <plat_arm.h>
|
||||
|
||||
/******************************************************************************
|
||||
* The following functions are defined as weak to allow a platform to override
|
||||
* the way ARM CCI driver is initialised and used.
|
||||
*****************************************************************************/
|
||||
#pragma weak plat_arm_interconnect_enter_coherency
|
||||
#pragma weak plat_arm_interconnect_exit_coherency
|
||||
|
||||
/******************************************************************************
|
||||
* Helper function to place current master into coherency
|
||||
*****************************************************************************/
|
||||
void plat_ls_interconnect_enter_coherency(unsigned int num_clusters)
|
||||
{
|
||||
cci_enable_snoop_dvm_reqs(MPIDR_AFFLVL1_VAL(read_mpidr_el1()));
|
||||
|
||||
for (uint32_t index = 1U; index < num_clusters; index++) {
|
||||
cci_enable_snoop_dvm_reqs(index);
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* Helper function to remove current master from coherency
|
||||
*****************************************************************************/
|
||||
void plat_ls_interconnect_exit_coherency(void)
|
||||
{
|
||||
cci_disable_snoop_dvm_reqs(MPIDR_AFFLVL1_VAL(read_mpidr_el1()));
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright 2020 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
*/
|
||||
|
||||
#include <arch.h>
|
||||
#include <ccn.h>
|
||||
|
||||
#include <plat_arm.h>
|
||||
|
||||
/******************************************************************************
|
||||
* Helper function to place current master into coherency
|
||||
*****************************************************************************/
|
||||
void plat_ls_interconnect_enter_coherency(unsigned int num_clusters)
|
||||
{
|
||||
ccn_enter_snoop_dvm_domain(1ULL << MPIDR_AFFLVL1_VAL(read_mpidr_el1()));
|
||||
|
||||
for (uint32_t index = 1U; index < num_clusters; index++) {
|
||||
ccn_enter_snoop_dvm_domain(1ULL << index);
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* Helper function to remove current master from coherency
|
||||
*****************************************************************************/
|
||||
void plat_ls_interconnect_exit_coherency(void)
|
||||
{
|
||||
ccn_exit_snoop_dvm_domain(1ULL << MPIDR_AFFLVL1_VAL(read_mpidr_el1()));
|
||||
}
|
||||
Reference in New Issue
Block a user