fix:bobk: update CPU/DDR/PLL freq getting according to DeviceID not BoardID
- update CPU/DDR/PLL freq getting according to DeviceID not BoardID
Change-Id: I0d74c3b1f628898749b3504585bbc1b47803d4a7
Signed-off-by: Zachary Zhang <zhangzg@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/23968
Tested-by: Star_Automation <star@marvell.com>
Reviewed-by: Omri Itach <omrii@marvell.com>
diff --git a/board/mv_ebu/msys/msys_family/cpu/mvCpu.c b/board/mv_ebu/msys/msys_family/cpu/mvCpu.c
index b1f69de..0f7a318 100644
--- a/board/mv_ebu/msys/msys_family/cpu/mvCpu.c
+++ b/board/mv_ebu/msys/msys_family/cpu/mvCpu.c
@@ -118,17 +118,15 @@
else if (family == MV_ALLEYCAT3_DEV_ID)
freqMhz = ac3ClockRatioTbl[idx].cpuFreq * 1000000;
else if (family == MV_BOBK_DEV_ID) {
- switch (mvBoardIdGet()) {
- case BOBK_CETUS_DB_ID:
- case BOBK_CETUS_CUSTOMER_BOARD_ID0:
+ switch (mvCtrlModelGet()) {
+ case MV_BOBK_CETUS_98DX4235_DEV_ID:
freqMhz = bobkCetusClockRatioTbl[idx].cpuFreq * 1000000;
break;
- case BOBK_CAELUM_DB_ID:
- case BOBK_CAELUM_CUSTOMER_BOARD_ID1:
+ case MV_BOBK_CAELUM_98DX4203_DEV_ID:
freqMhz = bobkCaelumClockRatioTbl[idx].cpuFreq * 1000000;
break;
default:
- mvOsPrintf("ERROR: Unknown BoardID %d, CPU freq get failed\n", mvBoardIdGet());
+ mvOsPrintf("ERROR: Unknown DeviceID %d, CPU freq get failed\n", mvCtrlModelGet());
return 0xFFFFFFFF;
}
} else
@@ -170,17 +168,15 @@
else if (family == MV_ALLEYCAT3_DEV_ID)
freqMhz = ac3ClockRatioTbl[idx].ddrFreq * 1000000;
else if (family == MV_BOBK_DEV_ID) {
- switch (mvBoardIdGet()) {
- case BOBK_CETUS_DB_ID:
- case BOBK_CETUS_CUSTOMER_BOARD_ID0:
+ switch (mvCtrlModelGet()) {
+ case MV_BOBK_CETUS_98DX4235_DEV_ID:
freqMhz = bobkCetusClockRatioTbl[idx].ddrFreq * 1000000;
break;
- case BOBK_CAELUM_DB_ID:
- case BOBK_CAELUM_CUSTOMER_BOARD_ID1:
+ case MV_BOBK_CAELUM_98DX4203_DEV_ID:
freqMhz = bobkCaelumClockRatioTbl[idx].ddrFreq * 1000000;
break;
default:
- mvOsPrintf("ERROR: Unknown BoardID %d, DDR freq get failed\n", mvBoardIdGet());
+ mvOsPrintf("ERROR: Unknown DeviceID %d, DDR freq get failed\n", mvCtrlModelGet());
return 0xFFFFFFFF;
}
} else
@@ -227,17 +223,15 @@
else if (family == MV_ALLEYCAT3_DEV_ID)
freqMhz = ac3ClockRatioTbl[idx].pllClk * 1000000;
else if (family == MV_BOBK_DEV_ID) {
- switch (mvBoardIdGet()) {
- case BOBK_CETUS_DB_ID:
- case BOBK_CETUS_CUSTOMER_BOARD_ID0:
+ switch (mvCtrlModelGet()) {
+ case MV_BOBK_CETUS_98DX4235_DEV_ID:
freqMhz = bobkCetusClockRatioTbl[idx].pllClk * 1000000;
break;
- case BOBK_CAELUM_DB_ID:
- case BOBK_CAELUM_CUSTOMER_BOARD_ID1:
+ case MV_BOBK_CAELUM_98DX4203_DEV_ID:
freqMhz = bobkCaelumClockRatioTbl[idx].pllClk * 1000000;
break;
default:
- mvOsPrintf("ERROR: Unknown BoardID %d, PLL freq get failed\n", mvBoardIdGet());
+ mvOsPrintf("ERROR: Unknown DeviceID %d, PLL freq get failed\n", mvCtrlModelGet());
return 0xFFFFFFFF;
}
} else