From patchwork Sun Jan 15 19:52:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 642947 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp250649pvb; Sun, 15 Jan 2023 11:53:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXsxhvV9CgkcbOKz6a28Kjr6lRXxvM7YHrXYuJAOuVnJch6ko5wmtE9l/VyMufNOMAjCNnDj X-Received: by 2002:a9d:729d:0:b0:684:ad70:5824 with SMTP id t29-20020a9d729d000000b00684ad705824mr9197934otj.2.1673812414225; Sun, 15 Jan 2023 11:53:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673812414; cv=none; d=google.com; s=arc-20160816; b=NJjlFe8sODVZrsmTmGg8+jBzZSMWHeiYCezERNfaNRhm5yFbBVPf0D+2Aka7DxWKd9 uNRDT3uSx7UZTYbvFuEJgk7wC/lHMJA5/4dlkjRGY3PPEUzmjwi45xET+nE2t+dhZP8z RM95Fg4H4Ww/rOI+cHr0sOyttpOJBqQUCCu3CDKSeefHqi2uQxx8NJQbylJ19hzzR3Sq 3HReKC9sN84pYU2X5r3Zu2Wvwl3nS6CkUKQ1oBcur75O0I75lXBo6e231KyignsmFoKq a9frPKJ2uKZ7RUSynrm9hEUrKRma8kIej/Rq+eyaXNJdAfSdwBjj39UWE4qvqvzHLEnT ODBA== 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=1dzIPtvt9HMEOOw3vz7YwAWG2LwP8b7RpPZtn2SQ3bo=; b=RdnyqMapZyymPdjIzs5ufYHsbDj0v6c6/xVxBbuPAkA6PeASbh+HIGvcEgwIUU7BjV 5mFot2qTIko8YroqEiK4Au6SbjYyjXzH4+NtR6WHWSO1tIa7dNOZq0G3Qr7rAxHUFBfS nbyhxtPpZOmnYJqwnI3m4FK2agZwvSfuRwCNoLQ9omzSHfPnt2J0cvTnEj3G/jSMp2oC zntuRBlnkmjfDWTV87DcfrcUFvaa2FkOgJc8sfSViKqLHqMoh7xwfXi2AubOI8ChhEu4 vUWUschvhFmUBcNuOYxl361AL0pJWYEcumNv8NykHYoFJl5IigcVDXlitCyHFy5KHsmq 6X/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FCGZMJnJ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id k70-20020a9d19cc000000b00684a7fb761dsi13914510otk.144.2023.01.15.11.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 11:53:34 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FCGZMJnJ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 AC7E58545F; Sun, 15 Jan 2023 20:53:30 +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="FCGZMJnJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4684585337; Sun, 15 Jan 2023 20:53:29 +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-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (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 C87108533E for ; Sun, 15 Jan 2023 20:53:26 +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-lf1-x131.google.com with SMTP id bp15so40082798lfb.13 for ; Sun, 15 Jan 2023 11:53:26 -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=1dzIPtvt9HMEOOw3vz7YwAWG2LwP8b7RpPZtn2SQ3bo=; b=FCGZMJnJ8mBGV6Lm2D6dILvW8DT/xinziIH/F2fwPipsOOwMjbwpgkmrv/0jd+4IdB INjBpKDmR1PZXNRCSlNFyvrA+mW848mBx1tc5Id3O69VsNZ2RVQwqA0uNpp10IiA3W05 CwO88DMM548i27jJj2r578pyoZmqWzsw25RII+UCQZL9cXe8rN8pzLQ2Kxo12keSTAwS gCCqTl1a1EEWLwXfshQtE/vZgDgZidRAp6w4X2bdpjDwgtdK66yw68/P9akmDVJZc06q L4WLu8ory6ULpgpoTYVftaQTSpasRkiRb7FJxcBoLaEQnbleTow3//i6IjSp5K30sJgw R09A== 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=1dzIPtvt9HMEOOw3vz7YwAWG2LwP8b7RpPZtn2SQ3bo=; b=M7Ekn3UDn7PWauOucGbW0yltU7gH9IZHwIaaB9cYnkOOM4TFSv8SzcgJJLQtu4EwOW kYRf0UkESOcJfy1e5YhE74n+GbHSjps5gtaApNZ9mG4nhZ/mnQrV7RlE+UgbSHaWJ3FO oO7S80b7l1Dst8LwdPDo6tFnNHdt4IPZKgpyjYEmPKAMLBnmLU/gl5c+PiZAU7yHjfx0 2Bv7AnMDzXtujJyDIcHmjgQlHIaTzq9Mo+JONDo1i1v1HbNociucQyE8JnfcRUnRowV+ Lsg/BnwunW1DZayVfKcffP9RwjDkpg7DTllYiRHfIndPkIizsFXuaTTE99uQtKwc6FpB w3gw== X-Gm-Message-State: AFqh2krdhcqiZ3rQLhj9cxo/7AFxcAyJJGZv7ceD/cHedIFaENgd8RZB y/06jXKvlHMwepjqGX3CFzfS/VXAwkc9bejN X-Received: by 2002:a05:6512:3588:b0:4cb:1189:285a with SMTP id m8-20020a056512358800b004cb1189285amr19062611lfr.5.1673812405869; Sun, 15 Jan 2023 11:53:25 -0800 (PST) Received: from localhost.localdomain (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id r12-20020ac252ac000000b004aab0ca795csm4780439lfm.211.2023.01.15.11.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 11:53:25 -0800 (PST) From: Linus Walleij To: u-boot@lists.denx.de, Tom Rini Cc: Anand Gore , William Zhang , Kursad Oney , Joel Peshkin , Philippe Reynes , Linus Walleij Subject: [PATCH 00/14] Backport BRCMNAND changes from Linux Date: Sun, 15 Jan 2023 20:52:58 +0100 Message-Id: <20230115195312.1477845-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.39.0 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]. It's nice if someone else tests this I think. Boris Brezillon (1): mtd: nand: brcm: switch to mtd_ooblayout_ops Claire Lin (1): mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page bitfips Kamal Dasu (4): mtd: rawnand: brcmnand: Fix BCH ECC layout for large page NAND parts 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 (8): mtd: rawnand: brcmnand: fix hamming oob layout mtd: rawnand: brcmnand: improve hamming oob layout 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 | 615 ++++++++++++++++------- 1 file changed, 425 insertions(+), 190 deletions(-)