From patchwork Sun May 15 09:35:34 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: 1955 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5E6903F18B for ; Sun, 15 May 2022 11:35:54 +0200 (CEST) Received: by mail-ed1-f70.google.com with SMTP id s24-20020a05640217d800b00425e19e7deasf7745963edy.3 for ; Sun, 15 May 2022 02:35:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1652607353; cv=pass; d=google.com; s=arc-20160816; b=fA0WumsIN375NuiIs+TLaRim0F5DwbgYP93Ode7y0JZGA71bmVEKeLyqPmze1Gx7o0 MZjykjI4HFlqfgqo8eEVcrXZk8h8c1tuf/9tyw2DpFilQC0Ok7JNPwEcEZ25+xbraxEw A8fMgzGu5c4uXMYyyecbSuTR+7k6QSZGl0b/j+WqVllAl7eulWe3HzfTe059lRoYDbYX 8ktrYI+sCPYTSD7xw6QEkqDUgacJJOWn+406/b9tyO/C/R1PjdyNSPgis9TK395DTe6a 7h5MPGP4ZqVrVENH6kazYnjRmrEjF2KJMQWfmBNxNV+hoIGPUAWfXz+IOCBnvyYrtrsF +zVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=5OE1i6Ud+PeNWHrXFSX9KXN9j7YErUXgaZPeioZhs1c=; b=N8NrzePtyZAIF7blukwNN8UIHFwPjQL47lcA23bzUp5PHdFysNfHwlNQ243kNVQSjk 6VnYDaUp7PFpAdxDGdXeFuaCl4k4VMAuSlSbTbYck1qpAryODnsOFOJVQuJxjcFkpBaY /IGGB7N5oQP8dn6nBj2okIAoN3bCXRfYsudTrMrUVI++amtMsoccbeK7zv9eFoSFey9t nS0V7aSAFyt4szdBdvzHr8DB9Ra5C+kS6vSWrdbVGfqAylmDsYU+kTH/BaN8kw8ruqF/ Rc8QiGpKVb7bl+yO0sc7La2w1R4T7BCzF1XHNuw09Yf0n/YTD+XrC7ueO26vHNCU02FH r6rA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VDKNMBIo; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=5OE1i6Ud+PeNWHrXFSX9KXN9j7YErUXgaZPeioZhs1c=; b=V+CjfLZr/k6bKZLYi6bmGxr+qojEaNcw4YlMQiGdJzytOoDZk2wbXLAnYYnKYjaGQK Vb/A73/hxcwJ9ZhDxnGyH5LPPsfrCTeB918G84BFTJQkQGTg1sr/wOvStsvpWbLphhAo oQZcQ5YnGkRqZOhMnoHSB7fCOOWs16ELETZdI= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=5OE1i6Ud+PeNWHrXFSX9KXN9j7YErUXgaZPeioZhs1c=; b=JAfJo6e/mmycxp1OGpZDbbuEnew+lbHSjBCdmoYDPlRcBl59Yobb3WmFcx1T7JbwZQ 3R6//v4hRwpDfGH2Jd2R/1F8SF63josQxA/pD4wKweZRlHip5TxOTfa6pc3M55DTYUi1 rA2dqJrt61svbmljoH6yqmoF0aOCgY47Klf0z2lgO4Y+Fx556rNdUxCuEEeLQcGBLmiW CVlwc3nNHtg8ZTJPaPKXYbPWiHcnUdKq/xYvYPJpzuTvz0KanTu0hFbV6r3RYKl4V9Ew 8zQbunhH2ptTTJ3TA+QGhdm21bIcQrwLpnl+WU14I1MifcXVpm2IvHWUAUibpVF7VEvo AfCA== X-Gm-Message-State: AOAM530jA6EJOWJSXli5UCCo62sihBuBgz85YTM9jF5evw43qfqNSpbf g1dP7cmDnvtedH5LZVCTXtwi1MvU X-Google-Smtp-Source: ABdhPJwjms0GMnKbwD0lHidNQV6PKuDTIMl0S637ip8oH6rPkSvxkEbFS92CPQJ0abq7/0eaOiJ9Jw== X-Received: by 2002:a17:907:3f19:b0:6f5:6b2:9615 with SMTP id hq25-20020a1709073f1900b006f506b29615mr11444920ejc.659.1652607353771; Sun, 15 May 2022 02:35:53 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:7f1a:b0:6f4:7118:d7c7 with SMTP id qf26-20020a1709077f1a00b006f47118d7c7ls6008970ejc.1.gmail; Sun, 15 May 2022 02:35:52 -0700 (PDT) X-Received: by 2002:a17:906:4fd5:b0:6f8:5aa9:6f13 with SMTP id i21-20020a1709064fd500b006f85aa96f13mr11090018ejw.267.1652607352599; Sun, 15 May 2022 02:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652607352; cv=none; d=google.com; s=arc-20160816; b=DjTm6twBeyYw/Do7ZpEuS6lMXnJM8Evkvce66FW4O2j7IPYgBUj2c0BMgEd9MbDIQS ogPULF+DIu87kfaFOTNPhdbNQaNrNTlqxhovnmJzVPs23aRUiMLgSsGXs4Fi8KyF/Ax8 BNXfaNyEptEYbjQ7MmVJvv6AjdM0FgCw2eifELGNwFcmNzcmNN3P85T6tthdwKP2Kl7S Gqwjm/9ODlE62uy9bntiv3Mq4hfxC1qRFQpSY8J0vz6Xq7Z7LlTTkhJPMO4kErVt2/5O i7RaeWXYwjRXQoRzztbDce0+VjrVtKplyz2l5EMg5cuePnCwJOvJ1n1v7JPFopD6oQjE hMjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=mbjhTBV4XTaJwZYpjbu7yvB0TE9D8NnLKT3iIb8KdSg=; b=Tx/XJFQgQwIplgxQbW+Mp2AiSSenQZB4px+f4LpqiRYY+2Li7ifYgCzhGavEKjYspb 14CqfCa7SpooMfXQa1vfOqD6FUhBdmL8gTmWR/K+uJu/dxBPoUYpWNlNjVi4No+01OKS x5npv2YKkqzsgen1im7AX0RT63+6Abt0N4ZrSbBSwsCmjzKGOyey3CJn87B+99y18AYz 28VBeSq2/o3x2uckiqIuQ6p1AYBuGkywUkKD20GKFnHoeVZE3oBH2bHu804F/cALjfPJ i2n8Goha0iYhYJaow8xe9y7x7Bkaf8ZeuyL0a7gXQ2HldWhTJD+MImgvrXJWDQ7mpw0R pc3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VDKNMBIo; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a15-20020aa7d90f000000b00425bf0d5977sor3544392edr.25.2022.05.15.02.35.52 for (Google Transport Security); Sun, 15 May 2022 02:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:6402:354a:b0:427:d0e1:8ef3 with SMTP id f10-20020a056402354a00b00427d0e18ef3mr7524166edd.66.1652607352325; Sun, 15 May 2022 02:35:52 -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 p6-20020a17090664c600b006f3ef214de8sm2516582ejn.78.2022.05.15.02.35.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 May 2022 02:35:51 -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 V4 5/5] board: bsh: Switch to nand spl load instead of romapi Date: Sun, 15 May 2022 11:35:34 +0200 Message-Id: <20220515093534.1737172-6-michael@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515093534.1737172-1-michael@amarulasolutions.com> References: <20220515093534.1737172-1-michael@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VDKNMBIo; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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(+) --- V3->V4: - none 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; }