All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "mtd: rawnand: arasan: Prevent an unsupported configuration"
@ 2023-06-07  5:39 ` Amit Kumar Mahapatra
  0 siblings, 0 replies; 4+ messages in thread
From: Amit Kumar Mahapatra @ 2023-06-07  5:39 UTC (permalink / raw)
  To: miquel.raynal, vigneshr
  Cc: richard, linux-mtd, linux-kernel, git, amitrkcian2002,
	Amit Kumar Mahapatra

This reverts commit fc9e18f9e987ad46722dad53adab1c12148c213c.

This patch was a work around to fix timeout issue while operating in NVDDR
mode with software ECC engine. This patch prevents the Arasan NAND driver
from operating in NVDDR mode with software ECC engine resulting in a
significant performance degradation with SW-ECC.
'commit 7499bfeedb47 ("mtd: rawnand: arasan: Update NAND bus clock instead
of system clock")' and 'commit e16eceea863b ("mtd: rawnand: arasan: Fix
clock rate in NV-DDR")'
fixes the timeout issue in NVDDR mode with SW-ECC so, reverting the changes
as this work around is no longer required.

Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
---
BRANCH: nand/next
---
 drivers/mtd/nand/raw/arasan-nand-controller.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/mtd/nand/raw/arasan-nand-controller.c b/drivers/mtd/nand/raw/arasan-nand-controller.c
index d513d2db3549..906eef70cb6d 100644
--- a/drivers/mtd/nand/raw/arasan-nand-controller.c
+++ b/drivers/mtd/nand/raw/arasan-nand-controller.c
@@ -973,21 +973,6 @@ static int anfc_setup_interface(struct nand_chip *chip, int target,
 		nvddr = nand_get_nvddr_timings(conf);
 		if (IS_ERR(nvddr))
 			return PTR_ERR(nvddr);
-
-		/*
-		 * The controller only supports data payload requests which are
-		 * a multiple of 4. In practice, most data accesses are 4-byte
-		 * aligned and this is not an issue. However, rounding up will
-		 * simply be refused by the controller if we reached the end of
-		 * the device *and* we are using the NV-DDR interface(!). In
-		 * this situation, unaligned data requests ending at the device
-		 * boundary will confuse the controller and cannot be performed.
-		 *
-		 * This is something that happens in nand_read_subpage() when
-		 * selecting software ECC support and must be avoided.
-		 */
-		if (chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_SOFT)
-			return -ENOTSUPP;
 	} else {
 		sdr = nand_get_sdr_timings(conf);
 		if (IS_ERR(sdr))
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] Revert "mtd: rawnand: arasan: Prevent an unsupported configuration"
@ 2023-06-07  5:39 ` Amit Kumar Mahapatra
  0 siblings, 0 replies; 4+ messages in thread
From: Amit Kumar Mahapatra @ 2023-06-07  5:39 UTC (permalink / raw)
  To: miquel.raynal, vigneshr
  Cc: richard, linux-mtd, linux-kernel, git, amitrkcian2002,
	Amit Kumar Mahapatra

This reverts commit fc9e18f9e987ad46722dad53adab1c12148c213c.

This patch was a work around to fix timeout issue while operating in NVDDR
mode with software ECC engine. This patch prevents the Arasan NAND driver
from operating in NVDDR mode with software ECC engine resulting in a
significant performance degradation with SW-ECC.
'commit 7499bfeedb47 ("mtd: rawnand: arasan: Update NAND bus clock instead
of system clock")' and 'commit e16eceea863b ("mtd: rawnand: arasan: Fix
clock rate in NV-DDR")'
fixes the timeout issue in NVDDR mode with SW-ECC so, reverting the changes
as this work around is no longer required.

Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
---
BRANCH: nand/next
---
 drivers/mtd/nand/raw/arasan-nand-controller.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/mtd/nand/raw/arasan-nand-controller.c b/drivers/mtd/nand/raw/arasan-nand-controller.c
index d513d2db3549..906eef70cb6d 100644
--- a/drivers/mtd/nand/raw/arasan-nand-controller.c
+++ b/drivers/mtd/nand/raw/arasan-nand-controller.c
@@ -973,21 +973,6 @@ static int anfc_setup_interface(struct nand_chip *chip, int target,
 		nvddr = nand_get_nvddr_timings(conf);
 		if (IS_ERR(nvddr))
 			return PTR_ERR(nvddr);
-
-		/*
-		 * The controller only supports data payload requests which are
-		 * a multiple of 4. In practice, most data accesses are 4-byte
-		 * aligned and this is not an issue. However, rounding up will
-		 * simply be refused by the controller if we reached the end of
-		 * the device *and* we are using the NV-DDR interface(!). In
-		 * this situation, unaligned data requests ending at the device
-		 * boundary will confuse the controller and cannot be performed.
-		 *
-		 * This is something that happens in nand_read_subpage() when
-		 * selecting software ECC support and must be avoided.
-		 */
-		if (chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_SOFT)
-			return -ENOTSUPP;
 	} else {
 		sdr = nand_get_sdr_timings(conf);
 		if (IS_ERR(sdr))
-- 
2.17.1


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Revert "mtd: rawnand: arasan: Prevent an unsupported configuration"
  2023-06-07  5:39 ` Amit Kumar Mahapatra
@ 2023-06-09 15:25   ` Miquel Raynal
  -1 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2023-06-09 15:25 UTC (permalink / raw)
  To: Amit Kumar Mahapatra, miquel.raynal, vigneshr
  Cc: richard, linux-mtd, linux-kernel, git, amitrkcian2002

On Wed, 2023-06-07 at 05:39:36 UTC, Amit Kumar Mahapatra wrote:
> This reverts commit fc9e18f9e987ad46722dad53adab1c12148c213c.
> 
> This patch was a work around to fix timeout issue while operating in NVDDR
> mode with software ECC engine. This patch prevents the Arasan NAND driver
> from operating in NVDDR mode with software ECC engine resulting in a
> significant performance degradation with SW-ECC.
> 'commit 7499bfeedb47 ("mtd: rawnand: arasan: Update NAND bus clock instead
> of system clock")' and 'commit e16eceea863b ("mtd: rawnand: arasan: Fix
> clock rate in NV-DDR")'
> fixes the timeout issue in NVDDR mode with SW-ECC so, reverting the changes
> as this work around is no longer required.
> 
> Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Revert "mtd: rawnand: arasan: Prevent an unsupported configuration"
@ 2023-06-09 15:25   ` Miquel Raynal
  0 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2023-06-09 15:25 UTC (permalink / raw)
  To: Amit Kumar Mahapatra, miquel.raynal, vigneshr
  Cc: richard, linux-mtd, linux-kernel, git, amitrkcian2002

On Wed, 2023-06-07 at 05:39:36 UTC, Amit Kumar Mahapatra wrote:
> This reverts commit fc9e18f9e987ad46722dad53adab1c12148c213c.
> 
> This patch was a work around to fix timeout issue while operating in NVDDR
> mode with software ECC engine. This patch prevents the Arasan NAND driver
> from operating in NVDDR mode with software ECC engine resulting in a
> significant performance degradation with SW-ECC.
> 'commit 7499bfeedb47 ("mtd: rawnand: arasan: Update NAND bus clock instead
> of system clock")' and 'commit e16eceea863b ("mtd: rawnand: arasan: Fix
> clock rate in NV-DDR")'
> fixes the timeout issue in NVDDR mode with SW-ECC so, reverting the changes
> as this work around is no longer required.
> 
> Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-09 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-07  5:39 [PATCH] Revert "mtd: rawnand: arasan: Prevent an unsupported configuration" Amit Kumar Mahapatra
2023-06-07  5:39 ` Amit Kumar Mahapatra
2023-06-09 15:25 ` Miquel Raynal
2023-06-09 15:25   ` Miquel Raynal

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.