From patchwork Sat Feb 11 15:29:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 652698 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp1537455wrr; Sat, 11 Feb 2023 07:30:55 -0800 (PST) X-Google-Smtp-Source: AK7set8N/xwE72eOMO0mssceWkKi7U0rrlzPNHFLS4vG8iYXTGpd8ZF7AxX17SgahzkzlK6KWm9O X-Received: by 2002:a4a:de1a:0:b0:517:523d:b6a2 with SMTP id y26-20020a4ade1a000000b00517523db6a2mr9796721oot.4.1676129455093; Sat, 11 Feb 2023 07:30:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676129455; cv=none; d=google.com; s=arc-20160816; b=KacqdGSJJqHzK9PllSy2QsJ4WOq9w+LPkuHX7WM3gEpfLPQN6ISjjJFaGk5F4S8e3/ VU+o4+W2hqCA/qdcgRzkYFyHW4GQDF7+1HLy5YTz5Q14omvgzL0p/L3vpli9e8Kvo0CK ciBpGxMpd9L5r402LHtpOU4XHlkm6sNH7K6t1et3zetforhM/S/5Yd3taHXHXQ5b9bb8 7elDfPGSXy2NfsoQa+nRPF13EVDQfbxuffAjDfSBTVuU3Q5vDyYXLM+f1PM9okveElXv 9/nvg7dUc6fUV2uk5atFtfKikWd+IDzS+VNg0uadQ7m4S2Ei0Oiac7NExltCoBtx24Zg KLEg== 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=H5B/k4bOyDfaet4agU+tSuVU4NmNPt67u+Bj1P50y9Y=; b=N9+rbUuawjo8/XqgMhNH1n7IUZ/RK4U4xvC4hhOxUexYmA+wqkaYqQOBaIaSEvxWIE iHjnP/DMvVfWUgpCNmu2wgcmzRJZ7/ZZNN45bFyGNtP9srWgv7RBjqEvx7VQOctftXtF pK+f48NJ1/Alt8HSzCBEddK8iU+V0mg+JHDopLFOr0ndmzICNGuOKgRzXvlIIK8qA1BV sgb4PVtXwx1YqJ4WqPqtQM8JHY7R90qhucTXV0Xa06Ii/2xV+PQLB2zIaZEcfidlMpAc rscdgikAI6qBAu1YMhXr2+eds98nDp84no0pTSlHS0FkST7sL02ntsO5OxoyHgHtaiVq LWPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pw7ZaKSM; 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 bf10-20020a056820174a00b00517665db551si6543207oob.27.2023.02.11.07.30.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 07:30:55 -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=pw7ZaKSM; 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 20C40857BC; Sat, 11 Feb 2023 16:29:41 +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="pw7ZaKSM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 76989857C1; Sat, 11 Feb 2023 16:29:30 +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 A824A85764 for ; Sat, 11 Feb 2023 16:29:27 +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 sa10so22420502ejc.9 for ; Sat, 11 Feb 2023 07:29:27 -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=H5B/k4bOyDfaet4agU+tSuVU4NmNPt67u+Bj1P50y9Y=; b=pw7ZaKSMxCeSJfCjiYqXF0fy+9LCYi7ZsCKpEXb9jWmi0VbViZOsweGQoLoRfyVSSn WCLph3N5eotuDzrQ0f46hWyB/hpJrmwbyLTvleJaqgiUgU7nJQQfTqhlusT73vUHHOiK FO2hxTSMkkZgjF3XrEjDNHqEPqArFOKnNcyyHE+kp9rdG0nW7h5LQTRLGNcyz132jvgX k+Knh8iy4jBkBj9QbfEF1rhQOyUMsWjSjs86XHWbhV+u9GoOiQZ2RYu74S97Nqn3RuvP KuLIzg+8aiIystO2IcQF57AFF4zsMJbkIP7sXlIrLOwtyxb0ZY4Yd/GCFuQop8ZTflJO CPoA== 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=H5B/k4bOyDfaet4agU+tSuVU4NmNPt67u+Bj1P50y9Y=; b=NDbCAwcA9tMSxq7Vqv8E6rh3cXjA8l+HkN4pzv/tDjJDqzrJ45Et9J39uI2ZfRijIN XiCOO6KDX4YEDSoZcceAHXFnpPuRqNTnSx7c3XZdspd4EPW6sQWVKRqiEwDr17EI4jej aNKsD9VP25RONS3m7ilnLiOnJjWSr8TIgqX7BKcpTjbfwge3C8Mxklp28u3JSLn/gd7q 1qU7EadBfqpD6AYOTUT+HkZMAr6hZQz5z5y/UjbPyGAqYeDpL628ZdiuwR2dC7GrIDt1 DFg5ZfllclBBMSOcFauOfu/Um0R8/5cyLpWQKnVszrNfSzxPyURSmI8SBpE5FOIyYs3U L9hQ== X-Gm-Message-State: AO0yUKWQV0/OCuGN2aAa40Q0i5ufB8x2kw8jpi0zyD+i2Ep1MB88l3Zs nFULs1hksglZiH60w+F/AapbZtGdZyZMi5oW X-Received: by 2002:a17:907:a64b:b0:8af:3382:e578 with SMTP id vu11-20020a170907a64b00b008af3382e578mr11130123ejc.4.1676129367247; Sat, 11 Feb 2023 07:29:27 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 07:29:26 -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?= , Miquel Raynal , Florian Fainelli , Linus Walleij Subject: [PATCH v2 06/10] mtd: rawnand: brcmnand: rename v4 registers Date: Sat, 11 Feb 2023 16:29:05 +0100 Message-Id: <20230211152909.1436133-7-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 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 Reviewed-by: Michael Trimarchi Acked-by: William Zhang --- 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 5d3fb460d89a..ee7c3a21602e 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)