All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Jonker <jbx6244@gmail.com>
To: miquel.raynal@bootlin.com
Cc: richard@nod.at, vigneshr@ti.com, heiko@sntech.de,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, yifeng.zhao@rock-chips.com
Subject: [PATCH v1 3/5] mtd: nand: raw: rockchip-nand-controller: fix nand timing default
Date: Thu, 8 Jun 2023 18:30:40 +0200	[thread overview]
Message-ID: <f8a10a00-c3e4-9749-789d-39fba7944646@gmail.com> (raw)
In-Reply-To: <19bf714a-43f9-c30a-8197-91aaaf4a6e5d@gmail.com>

Somehow not all NAND chips give a valid timing setting with the
nand_get_sdr_timings() function. Don't consider it as an error,
but fall back to the default value in order to continue to use
the driver.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 drivers/mtd/nand/raw/rockchip-nand-controller.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/rockchip-nand-controller.c b/drivers/mtd/nand/raw/rockchip-nand-controller.c
index f56430f6c..e39431cfa 100644
--- a/drivers/mtd/nand/raw/rockchip-nand-controller.c
+++ b/drivers/mtd/nand/raw/rockchip-nand-controller.c
@@ -429,8 +429,10 @@ static int rk_nfc_setup_interface(struct nand_chip *chip, int target,
 		return 0;

 	timings = nand_get_sdr_timings(conf);
-	if (IS_ERR(timings))
-		return -EOPNOTSUPP;
+	if (IS_ERR(timings)) {
+		rknand->timing = 0x1081;
+		return 0;
+	}

 	if (IS_ERR(nfc->nfc_clk))
 		rate = clk_get_rate(nfc->ahb_clk);
--
2.30.2


WARNING: multiple messages have this Message-ID (diff)
From: Johan Jonker <jbx6244@gmail.com>
To: miquel.raynal@bootlin.com
Cc: richard@nod.at, vigneshr@ti.com, heiko@sntech.de,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, yifeng.zhao@rock-chips.com
Subject: [PATCH v1 3/5] mtd: nand: raw: rockchip-nand-controller: fix nand timing default
Date: Thu, 8 Jun 2023 18:30:40 +0200	[thread overview]
Message-ID: <f8a10a00-c3e4-9749-789d-39fba7944646@gmail.com> (raw)
In-Reply-To: <19bf714a-43f9-c30a-8197-91aaaf4a6e5d@gmail.com>

Somehow not all NAND chips give a valid timing setting with the
nand_get_sdr_timings() function. Don't consider it as an error,
but fall back to the default value in order to continue to use
the driver.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 drivers/mtd/nand/raw/rockchip-nand-controller.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/rockchip-nand-controller.c b/drivers/mtd/nand/raw/rockchip-nand-controller.c
index f56430f6c..e39431cfa 100644
--- a/drivers/mtd/nand/raw/rockchip-nand-controller.c
+++ b/drivers/mtd/nand/raw/rockchip-nand-controller.c
@@ -429,8 +429,10 @@ static int rk_nfc_setup_interface(struct nand_chip *chip, int target,
 		return 0;

 	timings = nand_get_sdr_timings(conf);
-	if (IS_ERR(timings))
-		return -EOPNOTSUPP;
+	if (IS_ERR(timings)) {
+		rknand->timing = 0x1081;
+		return 0;
+	}

 	if (IS_ERR(nfc->nfc_clk))
 		rate = clk_get_rate(nfc->ahb_clk);
--
2.30.2


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Johan Jonker <jbx6244@gmail.com>
To: miquel.raynal@bootlin.com
Cc: richard@nod.at, vigneshr@ti.com, heiko@sntech.de,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, yifeng.zhao@rock-chips.com
Subject: [PATCH v1 3/5] mtd: nand: raw: rockchip-nand-controller: fix nand timing default
Date: Thu, 8 Jun 2023 18:30:40 +0200	[thread overview]
Message-ID: <f8a10a00-c3e4-9749-789d-39fba7944646@gmail.com> (raw)
In-Reply-To: <19bf714a-43f9-c30a-8197-91aaaf4a6e5d@gmail.com>

Somehow not all NAND chips give a valid timing setting with the
nand_get_sdr_timings() function. Don't consider it as an error,
but fall back to the default value in order to continue to use
the driver.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 drivers/mtd/nand/raw/rockchip-nand-controller.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/rockchip-nand-controller.c b/drivers/mtd/nand/raw/rockchip-nand-controller.c
index f56430f6c..e39431cfa 100644
--- a/drivers/mtd/nand/raw/rockchip-nand-controller.c
+++ b/drivers/mtd/nand/raw/rockchip-nand-controller.c
@@ -429,8 +429,10 @@ static int rk_nfc_setup_interface(struct nand_chip *chip, int target,
 		return 0;

 	timings = nand_get_sdr_timings(conf);
-	if (IS_ERR(timings))
-		return -EOPNOTSUPP;
+	if (IS_ERR(timings)) {
+		rknand->timing = 0x1081;
+		return 0;
+	}

 	if (IS_ERR(nfc->nfc_clk))
 		rate = clk_get_rate(nfc->ahb_clk);
--
2.30.2


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Johan Jonker <jbx6244@gmail.com>
To: miquel.raynal@bootlin.com
Cc: richard@nod.at, vigneshr@ti.com, heiko@sntech.de,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, yifeng.zhao@rock-chips.com
Subject: [PATCH v1 3/5] mtd: nand: raw: rockchip-nand-controller: fix nand timing default
Date: Thu, 8 Jun 2023 18:30:40 +0200	[thread overview]
Message-ID: <f8a10a00-c3e4-9749-789d-39fba7944646@gmail.com> (raw)
In-Reply-To: <19bf714a-43f9-c30a-8197-91aaaf4a6e5d@gmail.com>

Somehow not all NAND chips give a valid timing setting with the
nand_get_sdr_timings() function. Don't consider it as an error,
but fall back to the default value in order to continue to use
the driver.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 drivers/mtd/nand/raw/rockchip-nand-controller.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/rockchip-nand-controller.c b/drivers/mtd/nand/raw/rockchip-nand-controller.c
index f56430f6c..e39431cfa 100644
--- a/drivers/mtd/nand/raw/rockchip-nand-controller.c
+++ b/drivers/mtd/nand/raw/rockchip-nand-controller.c
@@ -429,8 +429,10 @@ static int rk_nfc_setup_interface(struct nand_chip *chip, int target,
 		return 0;

 	timings = nand_get_sdr_timings(conf);
-	if (IS_ERR(timings))
-		return -EOPNOTSUPP;
+	if (IS_ERR(timings)) {
+		rknand->timing = 0x1081;
+		return 0;
+	}

 	if (IS_ERR(nfc->nfc_clk))
 		rate = clk_get_rate(nfc->ahb_clk);
--
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-06-08 16:31 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08 16:28 [PATCH v1 0/5] Fixes for Rockchip NAND controller driver Johan Jonker
2023-06-08 16:28 ` Johan Jonker
2023-06-08 16:28 ` Johan Jonker
2023-06-08 16:28 ` Johan Jonker
2023-06-08 16:30 ` [PATCH v1 1/5] mtd: nand: raw: rockchip-nand-controller: copy hwecc PA data to oob_poi buffer Johan Jonker
2023-06-08 16:30   ` Johan Jonker
2023-06-08 16:30   ` Johan Jonker
2023-06-08 16:30   ` Johan Jonker
2023-06-08 16:30 ` [PATCH v1 2/5] mtd: nand: raw: rockchip-nand-controller: add skipbbt option Johan Jonker
2023-06-08 16:30   ` Johan Jonker
2023-06-08 16:30   ` Johan Jonker
2023-06-08 16:30   ` Johan Jonker
2023-06-09  8:44   ` Miquel Raynal
2023-06-09  8:44     ` Miquel Raynal
2023-06-09  8:44     ` Miquel Raynal
2023-06-09  8:44     ` Miquel Raynal
2023-06-10 22:13     ` Johan Jonker
2023-06-10 22:13       ` Johan Jonker
2023-06-10 22:13       ` Johan Jonker
2023-06-08 16:30 ` Johan Jonker [this message]
2023-06-08 16:30   ` [PATCH v1 3/5] mtd: nand: raw: rockchip-nand-controller: fix nand timing default Johan Jonker
2023-06-08 16:30   ` Johan Jonker
2023-06-08 16:30   ` Johan Jonker
2023-06-09  8:50   ` Miquel Raynal
2023-06-09  8:50     ` Miquel Raynal
2023-06-09  8:50     ` Miquel Raynal
2023-06-09  8:50     ` Miquel Raynal
2023-06-08 16:30 ` [PATCH v1 4/5] mtd: nand: raw: rockchip-nand-controller: fix oobfree offset and description Johan Jonker
2023-06-08 16:30   ` Johan Jonker
2023-06-08 16:30   ` Johan Jonker
2023-06-08 16:30   ` Johan Jonker
2023-06-08 16:31 ` [PATCH v1 5/5] mtd: nand: add support for the Sandisk SDTNQGAMA chip Johan Jonker
2023-06-08 16:31   ` Johan Jonker
2023-06-08 16:31   ` Johan Jonker
2023-06-08 16:31   ` Johan Jonker
2023-06-09  8:54   ` Miquel Raynal
2023-06-09  8:54     ` Miquel Raynal
2023-06-09  8:54     ` Miquel Raynal
2023-06-09  8:54     ` 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=f8a10a00-c3e4-9749-789d-39fba7944646@gmail.com \
    --to=jbx6244@gmail.com \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    --cc=yifeng.zhao@rock-chips.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.