From patchwork Sun May 15 09:31:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nazzareno Trimarchi X-Patchwork-Id: 1631172 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=ZM7LNN6j; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L1HGH0Cm3z9s1l for ; Sun, 15 May 2022 19:32:06 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 79AF483FAA; Sun, 15 May 2022 11:32:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="ZM7LNN6j"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 47CD683FAA; Sun, 15 May 2022 11:31:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 96FB783F60 for ; Sun, 15 May 2022 11:31:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@amarulasolutions.com Received: by mail-ed1-x52f.google.com with SMTP id ba17so14801476edb.5 for ; Sun, 15 May 2022 02:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZSuqSBUGc8fAMe4diPajlZe1A0u5eHe2EuFT/9yueuo=; b=ZM7LNN6jrtb+RaEsfPGlhmFFE0m2zIS0W6aOEjrXLILXzvDsyMVNhpmx6wguFkGUb8 7+bGZLG+Qep98Y1U0c7ZeIT5aC7UcByLCF59zXFNV/Q5RHZ0uCCozJhA6bScDa5Km40x sAKloqlZxiYMh+dm2MP841V5Hor1rTVqBxcSo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZSuqSBUGc8fAMe4diPajlZe1A0u5eHe2EuFT/9yueuo=; b=WpAt2vZOu3BpDB/JcJfe3BkblnFMNhD1BBJjpfHNOQEPXpG2pyU07c2nW1fUw6EIwP fct05ngf5TmukKdiaD4WpeyI7/QFjsNZjpBLL9+8TgItV2NyEkdi+QN25cnhJJjGBKC4 yaSi0/FMSDvm1MXRUlVtNsCi2UPUNYfPYVzOxXQtlDCPtTLhbap/2Hk8DqgEAHAu1uFU omhGuwlNpgm4kvNjW5t6K3wAbo8eZsuNd0P4bYDxt8ImwqOfU8wMwQJP9dPz6g2Hs3a9 pma+6hmPe5gUCX8lLIYXHLWe/L86CNkr81Uw40AtR4WnZHAIOYLyOvyAQR6j44uQrHoM V64g== X-Gm-Message-State: AOAM532ViVKG/OdUgFkSdN6nBUrXK64zTlYfB7lTxsYkFBL5N+rhcEfu kJqG11dk5eiprRBIK49fP4kdOw== X-Google-Smtp-Source: ABdhPJwDuLeiFSDGtFsWqt4hYtG0uvAW8isphY61pY9pfLnjHzJrrsebuPRlnZe0E38h8Q/aiY2o3A== X-Received: by 2002:a05:6402:1148:b0:416:a4fb:3c2e with SMTP id g8-20020a056402114800b00416a4fb3c2emr7425783edw.182.1652607115158; Sun, 15 May 2022 02:31:55 -0700 (PDT) Received: from localhost.localdomain (mob-109-118-140-232.net.vodafone.it. [109.118.140.232]) by smtp.gmail.com with ESMTPSA id d4-20020a170907272400b006f3ef214dfesm2507929ejl.100.2022.05.15.02.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 May 2022 02:31:54 -0700 (PDT) From: Michael Trimarchi To: Han Xu , U-Boot-Denx Cc: Ye Li , Stefano Babic , Miquel Raynal , Fabio Estevam , Dario Binacchi , Sean Anderson , linux-amarula@amarulasolutions.com, Jagan Teki , Ariel D'Alessandro , Tom Rini Subject: [PATCH V3 5/5] board: bsh: Switch to nand spl load instead of romapi Date: Sun, 15 May 2022 11:31:51 +0200 Message-Id: <20220515093151.1736757-1-michael@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.5 at phobos.denx.de X-Virus-Status: Clean romapi is not eble to skip bad block so we need to workaround using the spl Signed-off-by: Michael Trimarchi --- board/bsh/imx8mn_smm_s2/spl.c | 3 +++ 1 file changed, 3 insertions(+) --- V2->V3: - Add to series and fix if condition V1->V2: - none --- diff --git a/board/bsh/imx8mn_smm_s2/spl.c b/board/bsh/imx8mn_smm_s2/spl.c index 0f61acc630..097b60c055 100644 --- a/board/bsh/imx8mn_smm_s2/spl.c +++ b/board/bsh/imx8mn_smm_s2/spl.c @@ -18,6 +18,9 @@ int spl_board_boot_device(enum boot_device boot_dev_spl) { + if (IS_ENABLED(CONFIG_NAND_MXS) && get_boot_device() != USB_BOOT) + return BOOT_DEVICE_NAND; + return BOOT_DEVICE_BOOTROM; }