mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
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>
This commit is contained in:
parent
c87b6a96ac
commit
068ea0a8a8
1 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue