From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8AFE4C433F5 for ; Wed, 27 Apr 2022 05:50:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 05CD583E2B; Wed, 27 Apr 2022 07:50:38 +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="B0XntprK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F3AE083A95; Wed, 27 Apr 2022 07:50:35 +0200 (CEST) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 8AAFB83AE1 for ; Wed, 27 Apr 2022 07:50:30 +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-wm1-x32f.google.com with SMTP id l62-20020a1c2541000000b0038e4570af2fso518150wml.5 for ; Tue, 26 Apr 2022 22:50:30 -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=5Uf9LYVACHnJtKIpxMdaTi2DliGLco8jqIuE4OD4moM=; b=B0XntprKiOn7VFgo8Z0YObEn+oaVIuNeB6fdN84yVZ154ItZPjx8HqIi+S/cJTGg8a rvDm0ohH2+chmcPM5hjUu0SgRebjv6sl98E+R47Dyx8TMB8BHt/js2Kr78gJ0GLrztH7 E1IBumRZcWzBDw6F8e6Po/jrGZ8yh2SpgZOR8= 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=5Uf9LYVACHnJtKIpxMdaTi2DliGLco8jqIuE4OD4moM=; b=rFxXQ9SPGCrV43SbSmyL8rhK6MHBBTvpiPBdt3ipZU72qvV/a6NrPq2JMtf+1d67Jn 3sq7bwJCZMrPDJqeudGwZF1JMeplzxwv3ciUyS8JAyqFlPrTy3Ksqj2JHmRoePdJZyND bP+1H5VJZkxYBGRiZ4qK67smAJKyABnl0JM/SBOSlSD3+ZHW6hM+xv2ncDdgqLNZ75lD vEvfJCQZr8Ke8vCN5m5CD43nR+Gffwi3KVCGLaToZ2yJCPxfPwZlCD0mBtjuUxiM4khp OfUapRbgEwJpewREjJJP/juhMEr8gAUPUGfK4EF81Bp0pKoMGC2PEB555GPTqJY9foai 2rjg== X-Gm-Message-State: AOAM533DRBhNWRoKD/51O46W9kuHvWjP01Ml/VXnrAFR0ErkLEXeoHrQ mdCqB02mKVXLGgW4j6Hfi7yxKA== X-Google-Smtp-Source: ABdhPJxknoWkqiHDPW4My+8iepy9NbXNVu576AecbdMUv7QVHhLsPZ6tvo3jE6wla5HDOfArQcLmZQ== X-Received: by 2002:a1c:f604:0:b0:38c:8ffd:dbb6 with SMTP id w4-20020a1cf604000000b0038c8ffddbb6mr33696578wmc.43.1651038629765; Tue, 26 Apr 2022 22:50:29 -0700 (PDT) Received: from panicking.amarulasolutions.com ([5.171.215.247]) by smtp.gmail.com with ESMTPSA id f11-20020a7bcc0b000000b0037e0c362b6dsm769827wmh.31.2022.04.26.22.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 22:50:29 -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-kernel@amarulasolutions.com, Jagan Teki , Ariel D'Alessandro Subject: [PATCH V2 0/4] MXS nand fixes in SPL Date: Wed, 27 Apr 2022 07:50:21 +0200 Message-Id: <20220427055025.231586-1-michael@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Those patches come after some testing of failing in factory on some unit. We found out that the bootrom imx loader was not able to handling badblock. This can be a limit of the implementation right now in imx8mn. Anyway not all the imx platform has the support of this loader. I found some problems on the implementation so I have fixed it up according the experience of Sitara. I tested only using a Fit Image as a flash container. This version add in the series the fix of cmd_nandbcb and the fix of spl_nand load. I can imagine that a lot of boards and users are affected. I have started to backport this changes in some older uboot and adapt it Michael Trimarchi (4): nand: raw: mxs_nand: Fix specific hook registration mtd: nand: mxs_nand_spl: Fix bad block skipping arm: mach-imx: cmd_nandbcb fix bad block handling spl: spl_nand: Fix bad block handling in fitImage arch/arm/mach-imx/cmd_nandbcb.c | 21 +++---- common/spl/spl_nand.c | 5 +- drivers/mtd/nand/raw/mxs_nand.c | 32 +++++----- drivers/mtd/nand/raw/mxs_nand_spl.c | 90 ++++++++++++++++------------- 4 files changed, 73 insertions(+), 75 deletions(-) -- 2.25.1