dri-devel Archive on lore.kernel.org
 help / color / Atom feed
From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: computersforpeace@gmail.com, kdasu.kdev@gmail.com,
	miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com,
	sumit.semwal@linaro.org, linux-mtd@lists.infradead.org,
	bcm-kernel-feedback-list@broadcom.com,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org
Cc: "Álvaro Fernández Rojas" <noltari@gmail.com>
Subject: [PATCH v2 2/5] mtd: rawnand: brcmnand: fix CS0 layout
Date: Tue, 12 May 2020 09:33:26 +0200
Message-ID: <20200512073329.742893-3-noltari@gmail.com> (raw)
In-Reply-To: <20200512073329.742893-1-noltari@gmail.com>

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 <noltari@gmail.com>
---
 v2: fix commit log.

 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 6a08dd07b058..72b268d8e3a4 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -606,8 +606,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;
 	}
 
-- 
2.26.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply index

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 15:14 [PATCH 1/3] nand: brcmnand: rename v4 registers Álvaro Fernández Rojas
2020-05-10 15:14 ` [PATCH 2/3] nand: brcmnand: fix CS0 layout Álvaro Fernández Rojas
2020-05-10 15:14 ` [PATCH 3/3] nand: brcmnand: support v2.1-v2.2 controllers Álvaro Fernández Rojas
2020-05-10 15:39   ` Florian Fainelli
2020-05-12  7:33 ` [PATCH v2 0/5] mtd: rawnand: " Álvaro Fernández Rojas
2020-05-12  7:33   ` [PATCH v2 1/5] mtd: rawnand: brcmnand: rename v4 registers Álvaro Fernández Rojas
2020-05-12  7:33   ` Álvaro Fernández Rojas [this message]
2020-05-12  7:33   ` [PATCH v2 3/5] mtd: rawnand: brcmnand: rename page sizes Álvaro Fernández Rojas
2020-05-12  7:33   ` [PATCH v2 4/5] dt: bindings: brcmnand: add v2.1 and v2.2 support Álvaro Fernández Rojas
2020-05-12  7:33   ` [PATCH v2 5/5] mtd: rawnand: brcmnand: support v2.1-v2.2 controllers Álvaro Fernández Rojas
2020-05-22  7:25   ` [PATCH v3 0/5] " Álvaro Fernández Rojas
2020-05-22  7:25     ` [PATCH v3 1/5] mtd: rawnand: brcmnand: rename v4 registers Álvaro Fernández Rojas
2020-05-22  7:25     ` [PATCH v3 2/5] mtd: rawnand: brcmnand: fix CS0 layout Álvaro Fernández Rojas
2020-05-22  7:25     ` [PATCH v3 3/5] mtd: rawnand: brcmnand: rename page sizes Álvaro Fernández Rojas
2020-05-22  7:25     ` [PATCH v3 4/5] dt: bindings: brcmnand: add v2.1 and v2.2 support Álvaro Fernández Rojas
2020-05-22  7:25     ` [PATCH v3 5/5] nand: brcmnand: support v2.1-v2.2 controllers Álvaro Fernández Rojas
2020-05-22 11:22       ` Miquel Raynal
2020-05-22 12:09         ` Álvaro Fernández Rojas
2020-05-22 12:15     ` [PATCH v4 0/5] mtd: rawnand: " Álvaro Fernández Rojas
2020-05-22 12:15       ` [PATCH v4 1/5] mtd: rawnand: brcmnand: rename v4 registers Álvaro Fernández Rojas
2020-05-22 15:33         ` Florian Fainelli
2020-05-24 19:26         ` Miquel Raynal
2020-05-22 12:15       ` [PATCH v4 2/5] mtd: rawnand: brcmnand: fix CS0 layout Álvaro Fernández Rojas
2020-05-22 15:35         ` Florian Fainelli
2020-05-24 19:26         ` Miquel Raynal
2020-05-22 12:15       ` [PATCH v4 3/5] mtd: rawnand: brcmnand: rename page sizes Álvaro Fernández Rojas
2020-05-22 15:35         ` Florian Fainelli
2020-05-24 19:26         ` Miquel Raynal
2020-05-22 12:15       ` [PATCH v4 4/5] dt: bindings: brcmnand: add v2.1 and v2.2 support Álvaro Fernández Rojas
2020-05-22 15:36         ` Florian Fainelli
2020-05-24 19:25         ` Miquel Raynal
2020-05-24 19:27           ` Miquel Raynal
2020-05-24 21:13             ` Álvaro Fernández Rojas
2020-05-24 22:06               ` Miquel Raynal
2020-05-22 12:15       ` [PATCH v4 5/5] mtd: rawnand: brcmnand: support v2.1-v2.2 controllers Álvaro Fernández Rojas
2020-05-22 15:37         ` Florian Fainelli
2020-05-24 22:06         ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200512073329.742893-3-noltari@gmail.com \
    --to=noltari@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=computersforpeace@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kdasu.kdev@gmail.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=sumit.semwal@linaro.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

dri-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dri-devel/0 dri-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dri-devel dri-devel/ https://lore.kernel.org/dri-devel \
		dri-devel@lists.freedesktop.org
	public-inbox-index dri-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.dri-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git