[U-Boot] [PATCH v1 03/14] colibri-imx6ull: set module variant depending on config block

Igor Opaniuk igor.opaniuk at toradex.com
Wed Apr 3 08:06:01 UTC 2019


Reviewed-by: Igor Opaniuk <igor.opaniuk at toradex.com>

On Fri, Mar 29, 2019 at 1:36 PM Marcel Ziswiler <marcel at ziswiler.com> wrote:
>
> From: Stefan Agner <stefan.agner at toradex.com>
>
> 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 at toradex.com>
> Acked-by: Marcel Ziswiler <marcel.ziswiler at toradex.com>
>
> ---
>
>  board/toradex/colibri-imx6ull/colibri-imx6ull.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/board/toradex/colibri-imx6ull/colibri-imx6ull.c b/board/toradex/colibri-imx6ull/colibri-imx6ull.c
> index fcb49a0718..fe60b8e870 100644
> --- a/board/toradex/colibri-imx6ull/colibri-imx6ull.c
> +++ b/board/toradex/colibri-imx6ull/colibri-imx6ull.c
> @@ -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);
> --
> 2.20.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot



-- 
Best regards - Freundliche GrĂ¼sse - Meilleures salutations

Senior Development Engineer,
Igor Opaniuk

Toradex AG
Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41 500 48
00 (main line)


More information about the U-Boot mailing list