summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-12-22 22:26:13 (GMT)
committerTom Rini <trini@ti.com>2015-01-13 16:53:39 (GMT)
commit068ea0a8a8f8776142946ac684ec77bbf0704fa6 (patch)
tree19466f4736d093b6fed51e17f53e6a1cfa3848ef /board
parentc87b6a96aca6748d519fd047da10fb7ed47017ad (diff)
downloadu-boot-fsl-qoriq-068ea0a8a8f8776142946ac684ec77bbf0704fa6.tar.xz
board: ti: am43xx: replace if else if else with a switch
A switch statement fits better in this case, specially considering we have a few extra frequencies to use. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'board')
-rw-r--r--board/ti/am43xx/board.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index 9874773..c418e68 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -381,11 +381,14 @@ void scale_vcores(void)
if (i2c_probe(TPS65218_CHIP_PM))
return;
- if (mpu_params->m == 1000) {
+ switch (mpu_params->m) {
+ case 1000:
mpu_vdd = TPS65218_DCDC_VOLT_SEL_1330MV;
- } else if (mpu_params->m == 600) {
+ break;
+ case 600:
mpu_vdd = TPS65218_DCDC_VOLT_SEL_1100MV;
- } else {
+ break;
+ default:
puts("Unknown MPU clock, not scaling\n");
return;
}