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 A55A9C433F5 for ; Sun, 15 May 2022 09:35:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9276884057; Sun, 15 May 2022 11:35:45 +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="IvDipSOc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2E2CD83EE2; Sun, 15 May 2022 11:35:42 +0200 (CEST) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (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 2AE9D83EE2 for ; Sun, 15 May 2022 11:35:39 +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-x532.google.com with SMTP id p18so14772127edr.7 for ; Sun, 15 May 2022 02:35:39 -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=PYmK0S+t3O0g8+3ntQsGqbsf9tS2JzNFcChqJrfJbxU=; b=IvDipSOc1G2PGrXSZndDIetSyctuJKhMPFLdt3qJ5mTqDDPeaV+TmiDo7fWi3A16SQ x4B+Pgf03JIRnNaHrPpaItWuJbBK/B1GzQzQdm3vBo8c6cztQ1DcqPk8/+D3OmK2ugGy 2pPuvL8XUz2q4rxtwojm1gUwjUw7k9Ku0pxz8= 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=PYmK0S+t3O0g8+3ntQsGqbsf9tS2JzNFcChqJrfJbxU=; b=KQQMnzVrsRJjjL+IVMU7O2EoJJQFjyuOvr8F6kPognM3+FT/F8wUf2airZM0J1Vto8 rzsi/Guc9MTQ0gX8NfUE6gT1npbJ9ZoHmjlMU8n5Y0OAFGkNhmcvHiHrMY2n6BLZUxad yjUYMk3x58QwPrloIXUaByj2eLIqFnSx5piPiG2FhupuYFYFlPy7J2ORIbkxmPXlw0Jr SImIgKdE2bCnzfddhE2f9oKX1WzFtQzgcEjEKMSB0+otgNK9ccjTXx0Q//+FCphdcYaJ 3IvKslgkcBxMc/7eEkJBk98RtN5bXdFI3r1sWiUCOua5spTN7LE7q0YR3Ke8nbcjdSfR x7+w== X-Gm-Message-State: AOAM532LBWbb021LIRtXaxKsfR87usPa/Z1rTiWq1KaE/1hZ/wWH9IC6 Fxd5qCrPtEL4sR3QnTjADGyv2w== X-Google-Smtp-Source: ABdhPJxGuNWbnk9bnbgxPjJbAqxa235VaNFIdtqvYU5x7S6WxFzmWTQUOf58VOQizgePoRPDEXr2+g== X-Received: by 2002:a05:6402:1941:b0:413:2822:9c8 with SMTP id f1-20020a056402194100b00413282209c8mr7574131edz.13.1652607338729; Sun, 15 May 2022 02:35:38 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 May 2022 02:35:38 -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 0/5] MXS nand fixes in SPL Date: Sun, 15 May 2022 11:35:29 +0200 Message-Id: <20220515093534.1737172-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 (coming from Dario). 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. Move BSH board using the spl loading instead the romapi Michael Trimarchi (5): 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 board: bsh: Switch to nand spl load instead of romapi arch/arm/mach-imx/cmd_nandbcb.c | 21 +++---- board/bsh/imx8mn_smm_s2/spl.c | 3 + common/spl/spl_nand.c | 5 +- drivers/mtd/nand/raw/mxs_nand.c | 32 +++++----- drivers/mtd/nand/raw/mxs_nand_spl.c | 90 ++++++++++++++++------------- 5 files changed, 76 insertions(+), 75 deletions(-) -- 2.25.1