mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
colibri-imx6ull: set module variant depending on config block
Using CPU temperature grading as a discriminator if the Wi-Fi / Bluetooth chip is populated is no longer possible due to upcoming SKUs. Set variant to -wifi only if a valid config block is present and the product id mentions a SKU with Wi-Fi / Bluetooth. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
This commit is contained in:
parent
89315f319c
commit
1560e12eff
1 changed files with 9 additions and 3 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <usb.h>
|
||||
#include <usb/ehci-ci.h>
|
||||
#include "../common/tdx-common.h"
|
||||
#include "../common/tdx-cfg-block.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
|
@ -317,10 +318,15 @@ static const struct boot_mode board_boot_modes[] = {
|
|||
|
||||
int board_late_init(void)
|
||||
{
|
||||
int minc, maxc;
|
||||
|
||||
if (get_cpu_temp_grade(&minc, &maxc) != TEMP_COMMERCIAL)
|
||||
#ifdef CONFIG_TDX_CFG_BLOCK
|
||||
/*
|
||||
* If we have a valid config block and it says we are a module with
|
||||
* Wi-Fi/Bluetooth make sure we use the -wifi device tree.
|
||||
*/
|
||||
if (tdx_hw_tag.prodid == COLIBRI_IMX6ULL_WIFI_BT_IT ||
|
||||
tdx_hw_tag.prodid == COLIBRI_IMX6ULL_WIFI_BT)
|
||||
env_set("variant", "-wifi");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CMD_BMODE
|
||||
add_board_boot_modes(board_boot_modes);
|
||||
|
|
Loading…
Reference in a new issue