From patchwork Sat Feb 11 15:29:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 652700 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp1537645wrr; Sat, 11 Feb 2023 07:31:17 -0800 (PST) X-Google-Smtp-Source: AK7set+7vjrKcin0KHQX3YZpK2+b0vNxOrn9WK31Rm1oYAt9G9eEqHH6V4gPVe3Iafsh8BInU0kw X-Received: by 2002:a4a:94a5:0:b0:51f:8b5c:d789 with SMTP id k34-20020a4a94a5000000b0051f8b5cd789mr343509ooi.8.1676129477520; Sat, 11 Feb 2023 07:31:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676129477; cv=none; d=google.com; s=arc-20160816; b=FUeZCDvU9Xh5KSPYU9iFYKp/7qIB9E74x+GnY8cRBX92fRj9xAx2TNzV56s+uh8auR MAN/DjcTIDQ8bbYdZ31YSnboz9lQBpWEXL7XiWP5shU1rP/Wb9kek+1+QotKQQ6su1yM w+t3LgTHEKvTV7Dwv4koeiHEz7BLzb8DxFuVjYNj/2qdxEq4iaZRyb3QDa1mf7UsrWaE XvHTixYoJTEZkuDc2oqk8izeaiWye1TL1ALdoTISo5CUkCnP44t+ElXHTl8pTFfIp1kg QFHBoucGr4MQdlpYVh7zbV1CQ/7CZtbhUKhh+C8IqELsfvMdabAFSCdP6BfmxXM7UQli AXKw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UMgHKME/rQkbvwpkI7ZLxBXFoWc9l3r65uT2r45GxZM=; b=g9bbLNgFX1pxpf+cRzT2DcN5rqQGxesAlv1BYBkqNGWUxvgBwFItBDMJcEcY5xtaOO fS1jZ1miu7Ti6Nob5g+jCmuPt6EFUfqJNdErzgRPmX9gktgHMkI1ZKgDHnI39z6Am7bi 7PAu1YAeNBvoZMkmJV6mx8KVYGJ0Vk8VU4R6HGOCP/QbLrbyKgUtR2R2FjxwUHifQUWP YvZ270sRY/lW4QK4q+pgGiEpSZcStc78osVr0IItniSe6IHjmXWokpQeqn9AIZdCPLKD pnI7DzmvSpP06yf81oWq8ju7rw7q0RQIoDOovGe7BfGBhL3VoWh7ds45SQyK2TpyNyUg U1ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y0bETrVK; 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 n22-20020a056820055600b004faed8c9ee6si8457924ooj.68.2023.02.11.07.31.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 07:31:17 -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=Y0bETrVK; 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 16A6D85785; Sat, 11 Feb 2023 16:29:49 +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="Y0bETrVK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8886B85770; Sat, 11 Feb 2023 16:29:35 +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-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 D23FD857A3 for ; Sat, 11 Feb 2023 16:29:29 +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-ed1-x529.google.com with SMTP id u21so7773213edv.3 for ; Sat, 11 Feb 2023 07:29:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UMgHKME/rQkbvwpkI7ZLxBXFoWc9l3r65uT2r45GxZM=; b=Y0bETrVKOJmIlLqmV03bG+zCW8MdgzGOLiMJQmpw5m+NEFg0yfQnFOwCWbnG8QtKGg PFYvDVmgRu566EbTkjHvxir41ikblATkPVVfa6XfTk/m/BDsSvG/2QU7izvqHVXh5MhX hHBwqoy5AqIUpMCIv8ekWwnZsQywfdiqUKeUtLHS2hR1poNAkWzJFNEYCEyj9hiES1qL DbEIEYM8ufuSG9NhaHwgFidpO1eZxBQU7KJmYGTqahqveQeKPMSy8tzOAqXY95KZP5+A +B9gPDuC/icQldHDV8+nHlhzF44L4bqAVHFoadBOqLsdGo9Zw8raXoMnh8wGvB0w3Ixg BzHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UMgHKME/rQkbvwpkI7ZLxBXFoWc9l3r65uT2r45GxZM=; b=2utukoAh96D+vAMsf2gXb7M0bc86CRPQvXGfk6mshgq2aFuEN1GyaPY3F3YiegE6Fy +R2DsVOz2mT6gd45SKZXbFVOpb6opS50uzwC6RnNghCRMnfEabqapqbQiTCEQsRxS9ds cJdpb6m56VKdpU1EK1m4Zj6381/WRmYnwAs1h4AEhB9HsbrQ/JXoL06y8zw7XrCQ93xF msffB90QxI7wIvNhhGPpHdw/0jhJFspfr8Cv7mAa+D0QCKtRswouGVHLuHX/1WJzCoex SQbWIf09oiH5nUuaiJ/720HHGOzDPsn9XFlURS/joZKfWrgbIMRmgVMFqJgmLghoX+8i rNhQ== X-Gm-Message-State: AO0yUKUWwGrdz3moKmDm7QiBh8Dyq2sB3VbIwwKcQ32xW5Cu6emenLJY kecQMNSjlWY9MRnTyTaLKruUYa+F358QvARm X-Received: by 2002:a50:c053:0:b0:4ab:c411:8ac5 with SMTP id u19-20020a50c053000000b004abc4118ac5mr5179126edd.17.1676129369229; Sat, 11 Feb 2023 07:29:29 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 07:29:28 -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?= , =?utf-8?q?=C3=81lvaro_Fern=C3=A1nd?= =?utf-8?q?ez_Rojas?= , Florian Fainelli , Miquel Raynal , Linus Walleij Subject: [PATCH v2 07/10] mtd: rawnand: brcmnand: fix CS0 layout Date: Sat, 11 Feb 2023 16:29:06 +0100 Message-Id: <20230211152909.1436133-8-linus.walleij@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230211152909.1436133-1-linus.walleij@linaro.org> References: <20230211152909.1436133-1-linus.walleij@linaro.org> 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 From: Álvaro Fernández Rojas Only v3.3-v5.0 have a different CS0 layout. Controllers before v3.3 use the same layout for every CS. Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200522121524.4161539-3-noltari@gmail.com [Ported to U-Boot from the Linux kernel] Signed-off-by: Linus Walleij Reviewed-by: Michael Trimarchi Acked-by: William Zhang --- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index ee7c3a21602e..1ea9091e6497 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -561,8 +561,9 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl) } else { ctrl->cs_offsets = brcmnand_cs_offsets; - /* v5.0 and earlier has a different CS0 offset layout */ - if (ctrl->nand_version <= 0x0500) + /* v3.3-5.0 have a different CS0 offset layout */ + if (ctrl->nand_version >= 0x0303 && + ctrl->nand_version <= 0x0500) ctrl->cs0_offsets = brcmnand_cs_offsets_cs0; }