X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fbus%2Ffslmc%2Fportal%2Fdpaa2_hw_dpio.c;h=668d987c211dda6c69bb49913f3619430c1d0bf4;hb=e24b05bfd20d637a920c6dc1d7c4ee0aa107287e;hp=62c03a200652e4ab69ec351d5a202f2338198cad;hpb=e16408499412e67a6afab8eca3d7496b770ac0e9;p=dpdk.git diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 62c03a2006..668d987c21 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -61,6 +61,7 @@ #include #include "dpaa2_hw_pvt.h" #include "dpaa2_hw_dpio.h" +#include #define NUM_HOST_CPUS RTE_MAX_LCORE @@ -179,6 +180,22 @@ dpaa2_configure_stashing(struct dpaa2_dpio_dev *dpio_dev) { int sdest; int cpu_id, ret; + static int first_time; + + /* find the SoC type for the first time */ + if (!first_time) { + struct mc_soc_version mc_plat_info = {0}; + + if (mc_get_soc_version(dpio_dev->dpio, + CMD_PRI_LOW, &mc_plat_info)) { + PMD_INIT_LOG(ERR, "\tmc_get_soc_version failed\n"); + } else if ((mc_plat_info.svr & 0xffff0000) == SVR_LS1080A) { + dpaa2_core_cluster_base = 0x02; + dpaa2_cluster_sz = 4; + PMD_INIT_LOG(DEBUG, "\tLS108x (A53) Platform Detected"); + } + first_time = 1; + } /* Set the Stashing Destination */ cpu_id = rte_lcore_id(); @@ -191,8 +208,6 @@ dpaa2_configure_stashing(struct dpaa2_dpio_dev *dpio_dev) } /* Set the STASH Destination depending on Current CPU ID. * Valid values of SDEST are 4,5,6,7. Where, - * CPU 0-1 will have SDEST 4 - * CPU 2-3 will have SDEST 5.....and so on. */ sdest = dpaa2_core_cluster_sdest(cpu_id);