mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-22 06:32:23 +00:00
board: starfive: Add the default cpu max voltage
The system will read cpu info from OTP, but if the OTP read fails or OTP driver is not enabled, then the cpu voltage script will fail to delete cpu frequencies node in dts file. Add the default cpu max voltage to avoid these corner cases. Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
This commit is contained in:
parent
7277a07103
commit
f0e66d4fd3
3 changed files with 8 additions and 3 deletions
|
@ -219,7 +219,6 @@ static void get_cpu_voltage_type(struct udevice *dev)
|
|||
env_set("cpu_max_vol", "1020000");
|
||||
break;
|
||||
default:
|
||||
env_set("cpu_max_vol", "1040000");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -361,6 +360,8 @@ err:
|
|||
eth_env_set_enetaddr("eth0addr", mac0);
|
||||
eth_env_set_enetaddr("eth1addr", mac1);
|
||||
|
||||
/* Set the default cpu max voltage. */
|
||||
env_set("cpu_max_vol", "1040000");
|
||||
#if CONFIG_IS_ENABLED(STARFIVE_OTP)
|
||||
get_cpu_voltage_type(dev);
|
||||
#endif
|
||||
|
|
|
@ -229,7 +229,6 @@ static void get_cpu_voltage_type(struct udevice *dev)
|
|||
env_set("cpu_max_vol", "1020000");
|
||||
break;
|
||||
default:
|
||||
env_set("cpu_max_vol", "1040000");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -281,6 +280,9 @@ err:
|
|||
eth_env_set_enetaddr("eth1addr", mac1);
|
||||
|
||||
chip = get_chip_type();
|
||||
|
||||
/* Set the default cpu max voltage. */
|
||||
env_set("cpu_max_vol", "1040000");
|
||||
#if CONFIG_IS_ENABLED(STARFIVE_OTP)
|
||||
get_cpu_voltage_type(dev);
|
||||
#endif
|
||||
|
|
|
@ -322,7 +322,6 @@ static void get_cpu_voltage_type(struct udevice *dev)
|
|||
env_set("cpu_max_vol", "1020000");
|
||||
break;
|
||||
default:
|
||||
env_set("cpu_max_vol", "1040000");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -484,6 +483,9 @@ err:
|
|||
|
||||
get_chip_type();
|
||||
set_uboot_fdt_addr_env();
|
||||
|
||||
/* Set the default cpu max voltage. */
|
||||
env_set("cpu_max_vol", "1040000");
|
||||
#if CONFIG_IS_ENABLED(STARFIVE_OTP)
|
||||
get_cpu_voltage_type(dev);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue