Commit c4a99e89 authored by Jimmy Huang's avatar Jimmy Huang Committed by Yidi Lin
Browse files

mt8173: Fix cluster 0 core count



Use constant macro defined in platform_def.h to replace hardcoded value.
This patch fix following assert in new psci-1.0 framework.

ASSERT: populate_power_domain_tree <183> : j == PLATFORM_CORE_COUNT

Change-Id: I9b7eda525479464a8c3805b6fe14ffb10debaf72
Signed-off-by: default avatarJimmy Huang <jimmy.huang@mediatek.com>
parent 432b9905
...@@ -28,18 +28,20 @@ ...@@ -28,18 +28,20 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <arch.h> #include <arch.h>
#include <platform_def.h>
#include <psci.h> #include <psci.h>
unsigned int plat_get_aff_count(unsigned int aff_lvl, unsigned long mpidr) unsigned int plat_get_aff_count(unsigned int aff_lvl, unsigned long mpidr)
{ {
/* Report 1 (absent) instance at levels higher that the cluster level */ /* Report 1 (absent) instance at levels higher that the cluster level */
if (aff_lvl > MPIDR_AFFLVL1) if (aff_lvl > MPIDR_AFFLVL1)
return 1; return PLATFORM_SYSTEM_COUNT;
if (aff_lvl == MPIDR_AFFLVL1) if (aff_lvl == MPIDR_AFFLVL1)
return 2; /* We have two clusters */ return PLATFORM_CLUSTER_COUNT;
return mpidr & 0x100 ? 2 : 2; /* 2 cpus in cluster 1, 2 in cluster 0 */ return mpidr & 0x100 ? PLATFORM_CLUSTER1_CORE_COUNT :
PLATFORM_CLUSTER0_CORE_COUNT;
} }
unsigned int plat_get_aff_state(unsigned int aff_lvl, unsigned long mpidr) unsigned int plat_get_aff_state(unsigned int aff_lvl, unsigned long mpidr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment