From patchwork Sat Feb 11 15:28:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 652692 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp1536792wrr; Sat, 11 Feb 2023 07:29:23 -0800 (PST) X-Google-Smtp-Source: AK7set8EYCEZ8fDpz/7/e3rK80pzrnJYd9lP4Ds2bZk4MUxBQMGFDArWxzWnYNId09xfKVR5PgrC X-Received: by 2002:a05:6870:c68c:b0:16d:bbce:29d6 with SMTP id cv12-20020a056870c68c00b0016dbbce29d6mr3072855oab.25.1676129362984; Sat, 11 Feb 2023 07:29:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676129362; cv=none; d=google.com; s=arc-20160816; b=sT3/se9PUCxLQReqZgSx27Ub4C5aH0yLtYDMPqggIDKOmFIoOF0BS6H1j3o9mOosKH 2PFG2kfdAcB69Q4ArnmeKYqOoTv4i7+eX9HOcXMwM3UsgbygHkhrphzqTDKD8T37IpPf lhmN/wyiOSUqY0CISnx5fv4UpIz2jVY8r7mvnn+ntCDetWXzyFQf16Mzu2cW+VYetEvF 2hjSmLdqxaQ/yqFCx+nvGd6AofJ5SouuAJ2JwZa4S6MhjI1EMeHOdXO5LBuN+SlaJT9x CBWs3LzUkLkk+jM0AQHAaZtXHIyYls9QuBpb2s+j3vCKaBHyvNbvB5hA7uqPlaf2pvrr 0pmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=Wu8H0C3WUlzY7gURSM5r9w5iQ2zABaxkq1ZxPLUKiRI=; b=OpLQKKg+s7GTyMAD5N3lQiCahAERdfW+CqrcbH72tpBQJsO8IdftfaSk1xBL1Uapox OrwVdFCHKhhR1o7zgAA1mfbdcJNx78fYwnmDEG5FfGNbBoxbyrzKz96rlglPs6bLwM6B 1us42Def+nWylFjlEPE4VYz5B+Cir5AFi8psd7bt1YCyvOt3T8UABLzggjLqjabjbv3q J1dkkqy04d+oYhSIZgVALvIeVtTCDIsBvPbWoM5IhXclPtRmo7ZMYctCzNMu6OI9kNfM oHDijcTMh3Xu/XIGoOGMPSvsY1XTF6d4k+fE+iCHqks7ktel4VIh98xexr1+WpbxuiY0 JGJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D07eZ8Dl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id t18-20020a05683022f200b0068d555c4b27si7085052otc.207.2023.02.11.07.29.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 07:29:22 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D07eZ8Dl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 946038574D; Sat, 11 Feb 2023 16:29:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="D07eZ8Dl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 39087856FA; Sat, 11 Feb 2023 16:29:16 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (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 9D6DF856DD for ; Sat, 11 Feb 2023 16:29:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linus.walleij@linaro.org Received: by mail-ej1-x633.google.com with SMTP id sa10so22419761ejc.9 for ; Sat, 11 Feb 2023 07:29:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Wu8H0C3WUlzY7gURSM5r9w5iQ2zABaxkq1ZxPLUKiRI=; b=D07eZ8DlQFRDWWq9sp3qDmoW/TL/9KPk5wm3OQWB0y0NLOYDm+kzxAEQothPrjOa02 72Iw664K+2j3MON2l3PrsvabVgbYo4esn+qLE5qOZVtO2r/qhN4aYFwy7zqwlOAC1xoa fe5QHfCtIELqrCuHQzitJt4hg04ptd4YxeOjAljWEzpyL3I2pdcgat5u1xvgxtxrttk6 2uqPT8zfEB7/VAmySwmvFjBzvd4LfMaSkKION/zwOE9f/XJxiCdlVbZ9YLpKljuygVHZ Dzo3pbOEg1q7JeVAl7hMzbww0ldgjGcbtIQaO7xXPkpcQ3s1oVw++0ZJ0CH2TltVXg3N oAhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Wu8H0C3WUlzY7gURSM5r9w5iQ2zABaxkq1ZxPLUKiRI=; b=rWeIslPE6J1ARP3iA4lUOvCWJ4NYLAchKjSecti2MimDXBtvSbRuJzyJOC7fbK0iYG aCT3fH+fTVGQZ7pdOUMOGMWkHEE5dYJj5CZ6Kmmch9/iFFWMtSdI4SIkUqfYjZQMcOrB R+pcUTNdYiSb3gUF8dr1Hcb4K2lV9ZmOQLWrRbCxAFv/eILi75qaiwUvmxaxloBThaud 1ewQz1ZuXuHYrfBMN/lRHUGVtlxDdnRQwwaLA+CToBdLUOW/12flITE5RszIeWl/VigI MefCwPge+8pq/4XlujtAkEA1XvdCHo074BRUvLTHzwg8bZFqjVKyc2FFGFWAMa9135H1 9XoA== X-Gm-Message-State: AO0yUKUbHQjzP7VbYRSOd6UoEIN6Ekfc+5qIQVlitDzyo5NfiwayuZnb QkOq+8lpE95u/dZd5T1HHqoUyiJ/EOB3EY4m X-Received: by 2002:a17:907:724e:b0:8af:2fa1:5ae5 with SMTP id ds14-20020a170907724e00b008af2fa15ae5mr13271392ejc.53.1676129352985; Sat, 11 Feb 2023 07:29:12 -0800 (PST) Received: from Fecusia.lan (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id f26-20020a170906825a00b0084c4b87aa18sm3977768ejx.37.2023.02.11.07.29.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 07:29:12 -0800 (PST) From: Linus Walleij To: u-boot@lists.denx.de, Tom Rini , Michael Nazzareno Trimarchi Cc: Anand Gore , William Zhang , Kursad Oney , Joel Peshkin , Philippe Reynes , =?utf-8?b?UmFmYcWCIE1p?= =?utf-8?b?xYJlY2tp?= , Linus Walleij Subject: [PATCH v2 00/10] Backport BRCMNAND changes from Linux Date: Sat, 11 Feb 2023 16:28:59 +0100 Message-Id: <20230211152909.1436133-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.39.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.6 at phobos.denx.de X-Virus-Status: Clean Hunting down a bug on my system I took to back-porting all reasonable changes from the Linux brcmnand driver that were not yet in the U-Boot derivative. I noticed that a simple diff -ur between brcmnand.c between the file in Linux and U-Boot was possible to see what differs. Combining this with some git log --oneline manual comparison, fuzzing and manual intervention I backported a set of relevant patches from Linux that compiles and WorksForMe(TM). The diff between Linux and U-Boot is much smaller after this, the main missing part are subsystem cosmetics changes and the EDU DMA mode support. This was as much as I could bite off in one go. All patches countersigned-off and marked as [backported]. ChangeLog v1->v2: - Drop the patch to use the new OOB data layout helpers "mtd: nand: brcm: switch to mtd_ooblayout_ops" - Drop all patches depending on the previous patch, in total 4 patches. Claire Lin (1): mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page bitfips Kamal Dasu (3): mtd: rawnand: brcmnand: Refactored code to introduce helper functions mtd: rawnand: brcmnand: Add support for v7.3 controller mtd: nand: brcmnand: Add support for flash-dma v0 Álvaro Fernández Rojas (6): mtd: rawnand: brcmnand: correctly verify erased pages mtd: rawnand: brcmnand: rename v4 registers mtd: rawnand: brcmnand: fix CS0 layout mtd: rawnand: brcmnand: rename page sizes mtd: rawnand: brcmnand: support v2.1-v2.2 controllers mtd: rawnand: brcmnand: fix OOB R/W with Hamming ECC drivers/mtd/nand/raw/brcmnand/brcmnand.c | 353 +++++++++++++++++------ 1 file changed, 268 insertions(+), 85 deletions(-)