From patchwork Sun Jan 15 19:53:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 642956 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp251167pvb; Sun, 15 Jan 2023 11:55:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXsNdFxUCBEX6ydLpdZsE6DBTbWGlOuJuSHLLmTdg27xGX9fvKPnicYSb8l9292nfkMyaBWz X-Received: by 2002:a05:6808:1a0b:b0:364:533d:8469 with SMTP id bk11-20020a0568081a0b00b00364533d8469mr11205025oib.24.1673812525386; Sun, 15 Jan 2023 11:55:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673812525; cv=none; d=google.com; s=arc-20160816; b=lTZOSHvav2L3kIICgtUByEvGB7FfztczdBl0+XzH3SJbm4eeLK9GJGrBAPd0iDJ7mo XBCUy8nVdLZc1Nn+5Pl82mtXwz3TWrfqkUW4K34Qe4OEiJhS5+s4MRVZLChSeQ/q4zHv QXhhYn4mgV0JJLtg31vfjmMkVTmYmKNk65/ELALOEC/bhoasPpszSDNYS0HfMTkFoSbE x6ni6++FGunVueziaLOzp1gi7Un922lG8Sg+qzAKZRJRXy5KN8LqiG0trvZVmgn5qF48 VDjr4c71KhvU/ZtQJTmDIx/ehU6EjRRxNS82Nn4vu7sa4fZYYGANQZcedSxFAOFLTEcE zVhw== 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=kWVZy1tLCv9QYmVr1MKSQYafeRr97iAb92ovxdVifM4=; b=lPwFLU2pmjOGfBBqLA7pXSagOZhq/AGUQM9weNnfZXvwS1XCWGal1L5GOtIkCuAilI 0kevPxqcFSKdbETwixh+cWC+a0WySeoZgahSAHBavZndE9n3titnSAXHmWcPIxnjGbTU zIsYa+fuZR2LVQ2XUPut8rI0cjUdb+NwrqT5eMdEcNUhlDPgxfu/6Ry/gdLm1q0N/5d8 y5FebgXKzSA9bQmWbDx8V/SRlM2QguVaK12Cvzr35Lb5Qp3DZiv2FO+bf1sGtfB8HSuE hh5Z6HcRs7fYQd3ngG4SxO/JcHf1f7kkFGzL/6R3OIWzE7kq8Srq/b13Hc3GPNayoQG9 qtmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o3bYpd6W; 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 25-20020aca2819000000b0035e1e0b9d62si23624888oix.38.2023.01.15.11.55.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 11:55:25 -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=o3bYpd6W; 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 3CA89855C7; Sun, 15 Jan 2023 20:54:09 +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="o3bYpd6W"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 28F36855B6; Sun, 15 Jan 2023 20:53:51 +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-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (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 DD6B685592 for ; Sun, 15 Jan 2023 20:53:47 +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-x12e.google.com with SMTP id b3so40102934lfv.2 for ; Sun, 15 Jan 2023 11:53:47 -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=kWVZy1tLCv9QYmVr1MKSQYafeRr97iAb92ovxdVifM4=; b=o3bYpd6WSLx4NWcTDW/Ogy58gUoGslJpkzDpBsra/+/iWfBCRsVJF+Cx7qMP5aeWca UGXZfpxUrxJiCsUDWvVGD+4n1jlKKx/XIkeVSFojRPv3/YF07mJzCNWYsOzJrNbkad0y p+36L7TcvvVx7JgPMFE8uY8TPrC0Hul0bNediGoICv2wsbpcmlPbWWyMp1z65jqU66CS 1E8652onLgcnDDUnSO8D65B45pJM1Ca2+b4NLOSLRxEW0sa7Cmr7xK/fzgwCdqzyUgzD osPXiAeEYNlU2uF30tDN4htQOlcnb3mvnVVdooCCkMroLxpqqNtkEWWVWgtfLmYjUN+J RRiw== 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=kWVZy1tLCv9QYmVr1MKSQYafeRr97iAb92ovxdVifM4=; b=pYG64HyPJ57jBP8VnibI10JI2FEIQ/TfokOxi+Dlel/5K7e2wUxtHETAGqQDQJHqQt OxYbR7H7iOlMUvn94TIWYHGj6o0TylQcscXHzuYHFgL4jCYfITcOCFwQSANM9C6ylRiK PRuWmS+ruUvXbFv2ulpQRYEMi/CftKj+4T4Ys1d+zJFLXXfKYJX6LzbBL4Ehe+9EPuEj UPgDW3Dq7czaY50ECAN5zpZKjDqHpEFH2mjZ22p8o+zF7vVUM8ad54GEhPfBsDaqwa43 SWf8fQAhUZeLAx6vH42xuzxS5pGc/E2JPeTXOo8NmZv0IbcpnJdljaAAbiCFjSlmPIGa JBhg== X-Gm-Message-State: AFqh2kqdU3gWkbxbEzWSZx/e+gK3fYU1ruCgRyspsZT8ZxsgypNxsIhL +r6Q6UfJluLBIXmoKjeQU8BDO2KoVShE6h00 X-Received: by 2002:ac2:5604:0:b0:4ba:83f3:fb36 with SMTP id v4-20020ac25604000000b004ba83f3fb36mr22482368lfd.9.1673812425985; Sun, 15 Jan 2023 11:53:45 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 11:53:45 -0800 (PST) From: Linus Walleij To: u-boot@lists.denx.de, Tom Rini Cc: Anand Gore , William Zhang , Kursad Oney , Joel Peshkin , Philippe Reynes , =?utf-8?q?=C3=81lvaro_Fer?= =?utf-8?q?n=C3=A1ndez_Rojas?= , Miquel Raynal , Florian Fainelli , Linus Walleij Subject: [PATCH 10/14] mtd: rawnand: brcmnand: rename v4 registers Date: Sun, 15 Jan 2023 20:53:08 +0100 Message-Id: <20230115195312.1477845-11-linus.walleij@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230115195312.1477845-1-linus.walleij@linaro.org> References: <20230115195312.1477845-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 These registers are also used on v3.3. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Miquel Raynal Acked-by: Florian Fainelli Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200522121524.4161539-2-noltari@gmail.com [Ported to U-Boot from the Linux kernel] Signed-off-by: Linus Walleij --- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index b87e3e0656df..effc7f1ea802 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -293,8 +293,8 @@ enum brcmnand_reg { BRCMNAND_FC_BASE, }; -/* BRCMNAND v4.0 */ -static const u16 brcmnand_regs_v40[] = { +/* BRCMNAND v3.3-v4.0 */ +static const u16 brcmnand_regs_v33[] = { [BRCMNAND_CMD_START] = 0x04, [BRCMNAND_CMD_EXT_ADDRESS] = 0x08, [BRCMNAND_CMD_ADDRESS] = 0x0c, @@ -546,8 +546,8 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl) ctrl->reg_offsets = brcmnand_regs_v60; else if (ctrl->nand_version >= 0x0500) ctrl->reg_offsets = brcmnand_regs_v50; - else if (ctrl->nand_version >= 0x0400) - ctrl->reg_offsets = brcmnand_regs_v40; + else if (ctrl->nand_version >= 0x0303) + ctrl->reg_offsets = brcmnand_regs_v33; /* Chip-select stride */ if (ctrl->nand_version >= 0x0701)