summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorJiaojinxing <jiaojinxing1987@gmail.com>2015-05-13 09:41:27 (GMT)
committer Jiaojinxing <jiaojinxing1987@gmail.com>2015-05-13 09:41:27 (GMT)
commit6e7034e5e5734b47dabc6c97293e21fa6f15a6ae (patch)
treee57c6a6145fcee3c186b7c2ce0a5f612941b0f1f
parentef0b24c2a2ac9bf9b87f20b178aced00a1c46bed (diff)
downloadbspam335x-6e7034e5e5734b47dabc6c97293e21fa6f15a6ae.zip
bspam335x-6e7034e5e5734b47dabc6c97293e21fa6f15a6ae.tar.gz
bspam335x-6e7034e5e5734b47dabc6c97293e21fa6f15a6ae.tar.bz2
Fixed voltage judgment bug.
-rw-r--r--SylixOS/driver/dvfs/dvfs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/SylixOS/driver/dvfs/dvfs.c b/SylixOS/driver/dvfs/dvfs.c
index 2aabadc..4a3accb 100644
--- a/SylixOS/driver/dvfs/dvfs.c
+++ b/SylixOS/driver/dvfs/dvfs.c
@@ -41,6 +41,7 @@
#define __SYLIXOS_KERNEL
#include "SylixOS.h"
+#include "stdlib.h"
#include "dvfs.h"
#include "soc_AM335x.h"
@@ -357,6 +358,16 @@ unsigned int am335xOppGet(void)
}
}
+ if (index == EFUSE_OPP_MAX) {
+ for (index = 0; index < EFUSE_OPP_MAX; index++) {
+ if ((oppTable[index].pllMult == mpuFreqMult) &&
+ (abs((int)oppTable[index].pmicVolt - (int)vdd1) <= 50)) {
+ oppIdx = index;
+ break;
+ }
+ }
+ }
+
switch (oppIdx) {
case EFUSE_OPP100_275:
opp = OPP_50;