From patchwork Wed Oct 28 09:58:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1389215 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=HIoZlUKc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLkZS0QfFz9sVl for ; Wed, 28 Oct 2020 20:59:43 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3C77D824F7; Wed, 28 Oct 2020 10:58:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HIoZlUKc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 69B348244F; Wed, 28 Oct 2020 10:58:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BC35B824A8 for ; Wed, 28 Oct 2020 10:58:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x243.google.com with SMTP id 2so5302579ljj.13 for ; Wed, 28 Oct 2020 02:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g1CO/MfeI3bPV2f/cmgiYjwcMTKky5BoFcUs9OUFLgY=; b=HIoZlUKcnsCXLPRU9hm8Kl8ufYOha4l5ItplAjpjMhV/BI64CFLfwi7m0m0fEE2hyf eUDoYb9dbLF9uVzzOm24z8whKjzmv4grwV5etTVImzqU7N6iMhmLxLvBtLWmgLmhqAdJ QHu3+8HKkD+k+KyBBuP4aPxGsBLLzgRIjAYykVFrJ40tc/ypbdGAAO6EVidTx24hxpG2 /HOoxWeJuVkOh8vG+kPcSp8SMjgGNZkMPUxmzGyTTFBVC3LVi6UKEUwCoawxEFhL4McV Rvj/p6b/pAKA0ANwCDOxGCnLvYHYLkVR37K3q/x/Rmp3HaviwqZfnt5Ay46efMRVWHYz IomQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=g1CO/MfeI3bPV2f/cmgiYjwcMTKky5BoFcUs9OUFLgY=; b=ioHOMbGQJi/2pSHqIR/QkXzqtLZIokv0lijoxhX60uITujtyWsGZz/ssJW/fadH/XZ 1ZJ/gnqg6I1HuO25/RkiJpoxhDSfdtkJXcntl2LW+XRaAx63q2Xj9sJjQBgbaILEygFn 801mdKhTaIFWgMOENUMJGIVG8/C9ZF+2W1BBEt4QO5kqA07nd+/5+NGBg5YayYS0EwgM 29gfcgOGt5TjG2RH++xZUk/L1846dxlBo8biXFULig4ug4Kz+yEIwo3jS0nH1V9jcWZZ vlLJmVFW6Yh39UpyTNvr9m7xFeG5MJ+aDKaPfExOlScyKDt2RqS79tnxlqW8kZNaUgMb E1Zw== X-Gm-Message-State: AOAM530BX+XBua6Gyl+Lyn9AMBEMP37SkPKpx8FnW4WntGe+A48MCR89 vXVqWUDd6YcCKNZ3v2RbVArzdIHtBjg2oQ== X-Google-Smtp-Source: ABdhPJxGDIe/l1YONUD5DzzwjTgIzvsI+Lwhy7XLe7jzsIKdMiXBKmqBv8UoyexaBaRcq+EPNzPC+g== X-Received: by 2002:a2e:9114:: with SMTP id m20mr2791760ljg.203.1603879109794; Wed, 28 Oct 2020 02:58:29 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id 5sm339014lju.25.2020.10.28.02.58.28 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Oct 2020 02:58:29 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Marcel Ziswiler , Peng Fan , Oleksandr Suvorov , Philippe Schenker , Max Krummenacher , Stefano Babic , Igor Opaniuk , Simon Glass Subject: [PATCH v1 8/9] toradex: tdx-cfg-clock: fix i.mx 8m mini interactive Date: Wed, 28 Oct 2020 11:58:15 +0200 Message-Id: <20201028095816.23906-8-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201028095816.23906-1-igor.opaniuk@gmail.com> References: <20201028095816.23906-1-igor.opaniuk@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Marcel Ziswiler Now with them first Verdin iMX8M Mini DualLite modules in for bring-up we got clarity how is_cpu_type() actually behaves. Signed-off-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov --- board/toradex/common/tdx-cfg-block.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c index 475abf78a7..adab0a0802 100644 --- a/board/toradex/common/tdx-cfg-block.c +++ b/board/toradex/common/tdx-cfg-block.c @@ -423,12 +423,6 @@ static int get_cfgblock_interactive(void) tdx_hw_tag.prodid = COLIBRI_IMX7D; else if (!strcmp("imx7s", soc)) tdx_hw_tag.prodid = COLIBRI_IMX7S; - else if (is_cpu_type(MXC_CPU_IMX8MM)) - tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT; - else if (is_cpu_type(MXC_CPU_IMX8MMDL)) - tdx_hw_tag.prodid = VERDIN_IMX8MMDL; - else if (is_cpu_type(MXC_CPU_IMX8MN)) - tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT; else if (is_cpu_type(MXC_CPU_IMX8QM)) { if (it == 'y' || it == 'Y') { if (wb == 'y' || wb == 'Y') @@ -464,18 +458,16 @@ static int get_cfgblock_interactive(void) tdx_hw_tag.prodid = COLIBRI_IMX8DX; } #endif + } else if (is_cpu_type(MXC_CPU_IMX8MMDL)) { + if (wb == 'y' || wb == 'Y') + tdx_hw_tag.prodid = VERDIN_IMX8MMDL_WIFI_BT_IT; + else + tdx_hw_tag.prodid = VERDIN_IMX8MMDL; } else if (is_cpu_type(MXC_CPU_IMX8MM)) { - if (is_cpu_type(MXC_CPU_IMX8MMDL)) { - if (wb == 'y' || wb == 'Y') - tdx_hw_tag.prodid = VERDIN_IMX8MMDL_WIFI_BT_IT; - else - tdx_hw_tag.prodid = VERDIN_IMX8MMDL; - } else { - if (wb == 'y' || wb == 'Y') - tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT; - else - tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT; - } + if (wb == 'y' || wb == 'Y') + tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT; + else + tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT; } else if (is_cpu_type(MXC_CPU_IMX8MN)) { tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT; } else if (is_cpu_type(MXC_CPU_IMX8MP)) {