All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] mtd: rawnand: stm32_fmc2: do not support EDO mode
@ 2023-03-27  9:47 ` Christophe Kerello
  0 siblings, 0 replies; 26+ messages in thread
From: Christophe Kerello @ 2023-03-27  9:47 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32, Christophe Kerello

The first patch removes EDO mode support from FMC2 driver as the controller
does not support the feature and has to be applied on Kernel LTS. The second
patch uses timings.mode instead of checking tRC_min timing for Kernel next.

Changes in v2:
 - second patch added for Kernel next

Christophe Kerello (2):
  mtd: rawnand: stm32_fmc2: do not support EDO mode
  mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min

 drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.25.1


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

* [PATCH v2 0/2] mtd: rawnand: stm32_fmc2: do not support EDO mode
@ 2023-03-27  9:47 ` Christophe Kerello
  0 siblings, 0 replies; 26+ messages in thread
From: Christophe Kerello @ 2023-03-27  9:47 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32, Christophe Kerello

The first patch removes EDO mode support from FMC2 driver as the controller
does not support the feature and has to be applied on Kernel LTS. The second
patch uses timings.mode instead of checking tRC_min timing for Kernel next.

Changes in v2:
 - second patch added for Kernel next

Christophe Kerello (2):
  mtd: rawnand: stm32_fmc2: do not support EDO mode
  mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min

 drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.25.1


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

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

* [PATCH v2 1/2] mtd: rawnand: stm32_fmc2: do not support EDO mode
  2023-03-27  9:47 ` Christophe Kerello
@ 2023-03-27  9:47   ` Christophe Kerello
  -1 siblings, 0 replies; 26+ messages in thread
From: Christophe Kerello @ 2023-03-27  9:47 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32, Christophe Kerello

FMC2 controller does not support EDO mode (timings mode 4 and 5).

Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")
---
 drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 5d627048c420..3abb63d00a0b 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -1531,6 +1531,9 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
 	if (IS_ERR(sdrt))
 		return PTR_ERR(sdrt);
 
+	if (sdrt->tRC_min < 30000)
+		return -EOPNOTSUPP;
+
 	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
 		return 0;
 
-- 
2.25.1


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

* [PATCH v2 1/2] mtd: rawnand: stm32_fmc2: do not support EDO mode
@ 2023-03-27  9:47   ` Christophe Kerello
  0 siblings, 0 replies; 26+ messages in thread
From: Christophe Kerello @ 2023-03-27  9:47 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32, Christophe Kerello

FMC2 controller does not support EDO mode (timings mode 4 and 5).

Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")
---
 drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 5d627048c420..3abb63d00a0b 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -1531,6 +1531,9 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
 	if (IS_ERR(sdrt))
 		return PTR_ERR(sdrt);
 
+	if (sdrt->tRC_min < 30000)
+		return -EOPNOTSUPP;
+
 	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
 		return 0;
 
-- 
2.25.1


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

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

* [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
  2023-03-27  9:47 ` Christophe Kerello
@ 2023-03-27  9:47   ` Christophe Kerello
  -1 siblings, 0 replies; 26+ messages in thread
From: Christophe Kerello @ 2023-03-27  9:47 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32, Christophe Kerello

This patch is using timings.mode value instead of checking tRC_min timing
for EDO mode support.

Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
---
 drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 3abb63d00a0b..9e74bcd90aaa 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
 	if (IS_ERR(sdrt))
 		return PTR_ERR(sdrt);
 
-	if (sdrt->tRC_min < 30000)
+	if (conf->timings.mode > 3)
 		return -EOPNOTSUPP;
 
 	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
-- 
2.25.1


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

* [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
@ 2023-03-27  9:47   ` Christophe Kerello
  0 siblings, 0 replies; 26+ messages in thread
From: Christophe Kerello @ 2023-03-27  9:47 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32, Christophe Kerello

This patch is using timings.mode value instead of checking tRC_min timing
for EDO mode support.

Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
---
 drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 3abb63d00a0b..9e74bcd90aaa 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
 	if (IS_ERR(sdrt))
 		return PTR_ERR(sdrt);
 
-	if (sdrt->tRC_min < 30000)
+	if (conf->timings.mode > 3)
 		return -EOPNOTSUPP;
 
 	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
-- 
2.25.1


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

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

* Re: [PATCH v2 0/2] mtd: rawnand: stm32_fmc2: do not support EDO mode
  2023-03-27  9:47 ` Christophe Kerello
@ 2023-03-27 10:09   ` Tudor Ambarus
  -1 siblings, 0 replies; 26+ messages in thread
From: Tudor Ambarus @ 2023-03-27 10:09 UTC (permalink / raw)
  To: Christophe Kerello, miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32



On 3/27/23 10:47, Christophe Kerello wrote:

Hi!

> The first patch removes EDO mode support from FMC2 driver as the controller
> does not support the feature and has to be applied on Kernel LTS. The second
> patch uses timings.mode instead of checking tRC_min timing for Kernel next.
> 

Would have been good if you specified that the fix is needed for v5.4+
and that the timings.mode was introduced in v5.8, it would have spared
readers of checking if two patches are really needed. No need to resubmit.

> Changes in v2:
>  - second patch added for Kernel next
> 
> Christophe Kerello (2):
>   mtd: rawnand: stm32_fmc2: do not support EDO mode
>   mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
> 
>  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

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

* Re: [PATCH v2 0/2] mtd: rawnand: stm32_fmc2: do not support EDO mode
@ 2023-03-27 10:09   ` Tudor Ambarus
  0 siblings, 0 replies; 26+ messages in thread
From: Tudor Ambarus @ 2023-03-27 10:09 UTC (permalink / raw)
  To: Christophe Kerello, miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32



On 3/27/23 10:47, Christophe Kerello wrote:

Hi!

> The first patch removes EDO mode support from FMC2 driver as the controller
> does not support the feature and has to be applied on Kernel LTS. The second
> patch uses timings.mode instead of checking tRC_min timing for Kernel next.
> 

Would have been good if you specified that the fix is needed for v5.4+
and that the timings.mode was introduced in v5.8, it would have spared
readers of checking if two patches are really needed. No need to resubmit.

> Changes in v2:
>  - second patch added for Kernel next
> 
> Christophe Kerello (2):
>   mtd: rawnand: stm32_fmc2: do not support EDO mode
>   mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
> 
>  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

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

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

* Re: [PATCH v2 1/2] mtd: rawnand: stm32_fmc2: do not support EDO mode
  2023-03-27  9:47   ` Christophe Kerello
@ 2023-03-27 10:29     ` Tudor Ambarus
  -1 siblings, 0 replies; 26+ messages in thread
From: Tudor Ambarus @ 2023-03-27 10:29 UTC (permalink / raw)
  To: Christophe Kerello, miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32

Hi,

On 3/27/23 10:47, Christophe Kerello wrote:
> FMC2 controller does not support EDO mode (timings mode 4 and 5).
> 

commit subject and message should be in imperative mood, so I would
change the commit subject to "mtd: rawnand: stm32_fmc2: Remove
unsupported EDO mode" and the message to something like "Remove the EDO
mode support from as the FMC2 controller does not support the feature."
Extra points if you describe what happened when you used timings mode 4
and 5 with the current version of the driver.

Miquel, could you add Cc to stable when applying?
Cc: stable@vger.kernel.org

> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
> Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>

> ---
>  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> index 5d627048c420..3abb63d00a0b 100644
> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> @@ -1531,6 +1531,9 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
>  	if (IS_ERR(sdrt))
>  		return PTR_ERR(sdrt);
>  
> +	if (sdrt->tRC_min < 30000)
> +		return -EOPNOTSUPP;
> +
>  	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
>  		return 0;
>  

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

* Re: [PATCH v2 1/2] mtd: rawnand: stm32_fmc2: do not support EDO mode
@ 2023-03-27 10:29     ` Tudor Ambarus
  0 siblings, 0 replies; 26+ messages in thread
From: Tudor Ambarus @ 2023-03-27 10:29 UTC (permalink / raw)
  To: Christophe Kerello, miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32

Hi,

On 3/27/23 10:47, Christophe Kerello wrote:
> FMC2 controller does not support EDO mode (timings mode 4 and 5).
> 

commit subject and message should be in imperative mood, so I would
change the commit subject to "mtd: rawnand: stm32_fmc2: Remove
unsupported EDO mode" and the message to something like "Remove the EDO
mode support from as the FMC2 controller does not support the feature."
Extra points if you describe what happened when you used timings mode 4
and 5 with the current version of the driver.

Miquel, could you add Cc to stable when applying?
Cc: stable@vger.kernel.org

> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
> Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>

> ---
>  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> index 5d627048c420..3abb63d00a0b 100644
> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> @@ -1531,6 +1531,9 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
>  	if (IS_ERR(sdrt))
>  		return PTR_ERR(sdrt);
>  
> +	if (sdrt->tRC_min < 30000)
> +		return -EOPNOTSUPP;
> +
>  	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
>  		return 0;
>  

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

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
  2023-03-27  9:47   ` Christophe Kerello
@ 2023-03-27 10:30     ` Tudor Ambarus
  -1 siblings, 0 replies; 26+ messages in thread
From: Tudor Ambarus @ 2023-03-27 10:30 UTC (permalink / raw)
  To: Christophe Kerello, miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32



On 3/27/23 10:47, Christophe Kerello wrote:
> This patch is using timings.mode value instead of checking tRC_min timing
> for EDO mode support.
> 

Fixes and Cc to stable here too, as you'd like to have this backported
as well, don't you?

> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>

> ---
>  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> index 3abb63d00a0b..9e74bcd90aaa 100644
> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
>  	if (IS_ERR(sdrt))
>  		return PTR_ERR(sdrt);
>  
> -	if (sdrt->tRC_min < 30000)
> +	if (conf->timings.mode > 3)
>  		return -EOPNOTSUPP;
>  
>  	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
@ 2023-03-27 10:30     ` Tudor Ambarus
  0 siblings, 0 replies; 26+ messages in thread
From: Tudor Ambarus @ 2023-03-27 10:30 UTC (permalink / raw)
  To: Christophe Kerello, miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, linux-stm32



On 3/27/23 10:47, Christophe Kerello wrote:
> This patch is using timings.mode value instead of checking tRC_min timing
> for EDO mode support.
> 

Fixes and Cc to stable here too, as you'd like to have this backported
as well, don't you?

> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>

> ---
>  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> index 3abb63d00a0b..9e74bcd90aaa 100644
> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
>  	if (IS_ERR(sdrt))
>  		return PTR_ERR(sdrt);
>  
> -	if (sdrt->tRC_min < 30000)
> +	if (conf->timings.mode > 3)
>  		return -EOPNOTSUPP;
>  
>  	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)

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

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

* Re: [PATCH v2 1/2] mtd: rawnand: stm32_fmc2: do not support EDO mode
  2023-03-27 10:29     ` Tudor Ambarus
@ 2023-03-27 10:40       ` Miquel Raynal
  -1 siblings, 0 replies; 26+ messages in thread
From: Miquel Raynal @ 2023-03-27 10:40 UTC (permalink / raw)
  To: Tudor Ambarus
  Cc: Christophe Kerello, richard, vigneshr, linux-mtd, linux-kernel,
	linux-stm32

Hi Tudor,

tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:29:56 +0100:

> Hi,
> 
> On 3/27/23 10:47, Christophe Kerello wrote:
> > FMC2 controller does not support EDO mode (timings mode 4 and 5).
> >   
> 
> commit subject and message should be in imperative mood, so I would
> change the commit subject to "mtd: rawnand: stm32_fmc2: Remove
> unsupported EDO mode" and the message to something like "Remove the EDO
> mode support from as the FMC2 controller does not support the feature."
> Extra points if you describe what happened when you used timings mode 4
> and 5 with the current version of the driver.
> 
> Miquel, could you add Cc to stable when applying?
> Cc: stable@vger.kernel.org

Yes, absolutely.

> 
> > Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
> > Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")  
> 
> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> 
> > ---
> >  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > index 5d627048c420..3abb63d00a0b 100644
> > --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > @@ -1531,6 +1531,9 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
> >  	if (IS_ERR(sdrt))
> >  		return PTR_ERR(sdrt);
> >  
> > +	if (sdrt->tRC_min < 30000)
> > +		return -EOPNOTSUPP;
> > +
> >  	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
> >  		return 0;
> >    


Thanks,
Miquèl

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

* Re: [PATCH v2 1/2] mtd: rawnand: stm32_fmc2: do not support EDO mode
@ 2023-03-27 10:40       ` Miquel Raynal
  0 siblings, 0 replies; 26+ messages in thread
From: Miquel Raynal @ 2023-03-27 10:40 UTC (permalink / raw)
  To: Tudor Ambarus
  Cc: Christophe Kerello, richard, vigneshr, linux-mtd, linux-kernel,
	linux-stm32

Hi Tudor,

tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:29:56 +0100:

> Hi,
> 
> On 3/27/23 10:47, Christophe Kerello wrote:
> > FMC2 controller does not support EDO mode (timings mode 4 and 5).
> >   
> 
> commit subject and message should be in imperative mood, so I would
> change the commit subject to "mtd: rawnand: stm32_fmc2: Remove
> unsupported EDO mode" and the message to something like "Remove the EDO
> mode support from as the FMC2 controller does not support the feature."
> Extra points if you describe what happened when you used timings mode 4
> and 5 with the current version of the driver.
> 
> Miquel, could you add Cc to stable when applying?
> Cc: stable@vger.kernel.org

Yes, absolutely.

> 
> > Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
> > Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")  
> 
> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> 
> > ---
> >  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > index 5d627048c420..3abb63d00a0b 100644
> > --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > @@ -1531,6 +1531,9 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
> >  	if (IS_ERR(sdrt))
> >  		return PTR_ERR(sdrt);
> >  
> > +	if (sdrt->tRC_min < 30000)
> > +		return -EOPNOTSUPP;
> > +
> >  	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
> >  		return 0;
> >    


Thanks,
Miquèl

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

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
  2023-03-27 10:30     ` Tudor Ambarus
@ 2023-03-27 10:43       ` Miquel Raynal
  -1 siblings, 0 replies; 26+ messages in thread
From: Miquel Raynal @ 2023-03-27 10:43 UTC (permalink / raw)
  To: Tudor Ambarus
  Cc: Christophe Kerello, richard, vigneshr, linux-mtd, linux-kernel,
	linux-stm32

Hi Tudor,

tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:

> On 3/27/23 10:47, Christophe Kerello wrote:
> > This patch is using timings.mode value instead of checking tRC_min timing
> > for EDO mode support.
> >   
> 
> Fixes and Cc to stable here too, as you'd like to have this backported
> as well, don't you?

Actually the reason why Christophe split this into two patches is
because timings.mode was introduced rather lately, he wanted the same
patch to apply on all stable kernels, he actually asked for that split
and I agreed (another solution would have been to send this current
patch to Linus and have the other version sent to stable, but it
requires a bit of scheduling on both ends).

Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t

> 
> > Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>  
> 
> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> 
> > ---
> >  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > index 3abb63d00a0b..9e74bcd90aaa 100644
> > --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
> >  	if (IS_ERR(sdrt))
> >  		return PTR_ERR(sdrt);
> >  
> > -	if (sdrt->tRC_min < 30000)
> > +	if (conf->timings.mode > 3)
> >  		return -EOPNOTSUPP;
> >  
> >  	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)  


Thanks,
Miquèl

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
@ 2023-03-27 10:43       ` Miquel Raynal
  0 siblings, 0 replies; 26+ messages in thread
From: Miquel Raynal @ 2023-03-27 10:43 UTC (permalink / raw)
  To: Tudor Ambarus
  Cc: Christophe Kerello, richard, vigneshr, linux-mtd, linux-kernel,
	linux-stm32

Hi Tudor,

tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:

> On 3/27/23 10:47, Christophe Kerello wrote:
> > This patch is using timings.mode value instead of checking tRC_min timing
> > for EDO mode support.
> >   
> 
> Fixes and Cc to stable here too, as you'd like to have this backported
> as well, don't you?

Actually the reason why Christophe split this into two patches is
because timings.mode was introduced rather lately, he wanted the same
patch to apply on all stable kernels, he actually asked for that split
and I agreed (another solution would have been to send this current
patch to Linus and have the other version sent to stable, but it
requires a bit of scheduling on both ends).

Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t

> 
> > Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>  
> 
> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> 
> > ---
> >  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > index 3abb63d00a0b..9e74bcd90aaa 100644
> > --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> > @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
> >  	if (IS_ERR(sdrt))
> >  		return PTR_ERR(sdrt);
> >  
> > -	if (sdrt->tRC_min < 30000)
> > +	if (conf->timings.mode > 3)
> >  		return -EOPNOTSUPP;
> >  
> >  	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)  


Thanks,
Miquèl

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

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
  2023-03-27 10:43       ` Miquel Raynal
@ 2023-03-27 11:06         ` Tudor Ambarus
  -1 siblings, 0 replies; 26+ messages in thread
From: Tudor Ambarus @ 2023-03-27 11:06 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Christophe Kerello, richard, vigneshr, linux-mtd, linux-kernel,
	linux-stm32



On 3/27/23 11:43, Miquel Raynal wrote:
> Hi Tudor,
> 
> tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:
> 
>> On 3/27/23 10:47, Christophe Kerello wrote:
>>> This patch is using timings.mode value instead of checking tRC_min timing
>>> for EDO mode support.
>>>   
>>
>> Fixes and Cc to stable here too, as you'd like to have this backported
>> as well, don't you?
> 
> Actually the reason why Christophe split this into two patches is
> because timings.mode was introduced rather lately, he wanted the same
> patch to apply on all stable kernels, he actually asked for that split
> and I agreed (another solution would have been to send this current
> patch to Linus and have the other version sent to stable, but it
> requires a bit of scheduling on both ends).
> 
> Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t

Right, I understood that from the beginning. If it were to me, I would
Cc: stable@vger.kernel.org #v5.4+ for the first patch and
Cc: stable@vger.kernel.org #v5.10+ for the second.

So first would be alone just in v5.4, and starting with v5.10 we'll have
both and we'll mimic what we currently have in upstream mainline.

> 
>>
>>> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>  
>>
>> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
>>
>>> ---
>>>  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>> index 3abb63d00a0b..9e74bcd90aaa 100644
>>> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>> @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
>>>  	if (IS_ERR(sdrt))
>>>  		return PTR_ERR(sdrt);
>>>  
>>> -	if (sdrt->tRC_min < 30000)
>>> +	if (conf->timings.mode > 3)
>>>  		return -EOPNOTSUPP;
>>>  
>>>  	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)  
> 
> 
> Thanks,
> Miquèl

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
@ 2023-03-27 11:06         ` Tudor Ambarus
  0 siblings, 0 replies; 26+ messages in thread
From: Tudor Ambarus @ 2023-03-27 11:06 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Christophe Kerello, richard, vigneshr, linux-mtd, linux-kernel,
	linux-stm32



On 3/27/23 11:43, Miquel Raynal wrote:
> Hi Tudor,
> 
> tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:
> 
>> On 3/27/23 10:47, Christophe Kerello wrote:
>>> This patch is using timings.mode value instead of checking tRC_min timing
>>> for EDO mode support.
>>>   
>>
>> Fixes and Cc to stable here too, as you'd like to have this backported
>> as well, don't you?
> 
> Actually the reason why Christophe split this into two patches is
> because timings.mode was introduced rather lately, he wanted the same
> patch to apply on all stable kernels, he actually asked for that split
> and I agreed (another solution would have been to send this current
> patch to Linus and have the other version sent to stable, but it
> requires a bit of scheduling on both ends).
> 
> Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t

Right, I understood that from the beginning. If it were to me, I would
Cc: stable@vger.kernel.org #v5.4+ for the first patch and
Cc: stable@vger.kernel.org #v5.10+ for the second.

So first would be alone just in v5.4, and starting with v5.10 we'll have
both and we'll mimic what we currently have in upstream mainline.

> 
>>
>>> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>  
>>
>> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
>>
>>> ---
>>>  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>> index 3abb63d00a0b..9e74bcd90aaa 100644
>>> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>> @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
>>>  	if (IS_ERR(sdrt))
>>>  		return PTR_ERR(sdrt);
>>>  
>>> -	if (sdrt->tRC_min < 30000)
>>> +	if (conf->timings.mode > 3)
>>>  		return -EOPNOTSUPP;
>>>  
>>>  	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)  
> 
> 
> Thanks,
> Miquèl

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

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
  2023-03-27 11:06         ` Tudor Ambarus
@ 2023-03-28  7:27           ` Christophe Kerello
  -1 siblings, 0 replies; 26+ messages in thread
From: Christophe Kerello @ 2023-03-28  7:27 UTC (permalink / raw)
  To: Tudor Ambarus, Miquel Raynal
  Cc: richard, vigneshr, linux-mtd, linux-kernel, linux-stm32

Hello Miquel,

On 3/27/23 13:06, Tudor Ambarus wrote:
> 
> 
> On 3/27/23 11:43, Miquel Raynal wrote:
>> Hi Tudor,
>>
>> tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:
>>
>>> On 3/27/23 10:47, Christophe Kerello wrote:
>>>> This patch is using timings.mode value instead of checking tRC_min timing
>>>> for EDO mode support.
>>>>    
>>>
>>> Fixes and Cc to stable here too, as you'd like to have this backported
>>> as well, don't you?
>>
>> Actually the reason why Christophe split this into two patches is
>> because timings.mode was introduced rather lately, he wanted the same
>> patch to apply on all stable kernels, he actually asked for that split
>> and I agreed (another solution would have been to send this current
>> patch to Linus and have the other version sent to stable, but it
>> requires a bit of scheduling on both ends).
>>
>> Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t
> 
> Right, I understood that from the beginning. If it were to me, I would
> Cc: stable@vger.kernel.org #v5.4+ for the first patch and
> Cc: stable@vger.kernel.org #v5.10+ for the second.
> 
> So first would be alone just in v5.4, and starting with v5.10 we'll have
> both and we'll mimic what we currently have in upstream mainline.
> 

I can send a V3 with cc tag added as per Tudor's suggestion.
Or cc tag will be added when the patches will be applied?

Regards,
Christophe Kerello.

>>
>>>
>>>> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
>>>
>>> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
>>>
>>>> ---
>>>>   drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>> index 3abb63d00a0b..9e74bcd90aaa 100644
>>>> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>> @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
>>>>   	if (IS_ERR(sdrt))
>>>>   		return PTR_ERR(sdrt);
>>>>   
>>>> -	if (sdrt->tRC_min < 30000)
>>>> +	if (conf->timings.mode > 3)
>>>>   		return -EOPNOTSUPP;
>>>>   
>>>>   	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
>>
>>
>> Thanks,
>> Miquèl

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
@ 2023-03-28  7:27           ` Christophe Kerello
  0 siblings, 0 replies; 26+ messages in thread
From: Christophe Kerello @ 2023-03-28  7:27 UTC (permalink / raw)
  To: Tudor Ambarus, Miquel Raynal
  Cc: richard, vigneshr, linux-mtd, linux-kernel, linux-stm32

Hello Miquel,

On 3/27/23 13:06, Tudor Ambarus wrote:
> 
> 
> On 3/27/23 11:43, Miquel Raynal wrote:
>> Hi Tudor,
>>
>> tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:
>>
>>> On 3/27/23 10:47, Christophe Kerello wrote:
>>>> This patch is using timings.mode value instead of checking tRC_min timing
>>>> for EDO mode support.
>>>>    
>>>
>>> Fixes and Cc to stable here too, as you'd like to have this backported
>>> as well, don't you?
>>
>> Actually the reason why Christophe split this into two patches is
>> because timings.mode was introduced rather lately, he wanted the same
>> patch to apply on all stable kernels, he actually asked for that split
>> and I agreed (another solution would have been to send this current
>> patch to Linus and have the other version sent to stable, but it
>> requires a bit of scheduling on both ends).
>>
>> Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t
> 
> Right, I understood that from the beginning. If it were to me, I would
> Cc: stable@vger.kernel.org #v5.4+ for the first patch and
> Cc: stable@vger.kernel.org #v5.10+ for the second.
> 
> So first would be alone just in v5.4, and starting with v5.10 we'll have
> both and we'll mimic what we currently have in upstream mainline.
> 

I can send a V3 with cc tag added as per Tudor's suggestion.
Or cc tag will be added when the patches will be applied?

Regards,
Christophe Kerello.

>>
>>>
>>>> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
>>>
>>> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
>>>
>>>> ---
>>>>   drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>> index 3abb63d00a0b..9e74bcd90aaa 100644
>>>> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>> @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
>>>>   	if (IS_ERR(sdrt))
>>>>   		return PTR_ERR(sdrt);
>>>>   
>>>> -	if (sdrt->tRC_min < 30000)
>>>> +	if (conf->timings.mode > 3)
>>>>   		return -EOPNOTSUPP;
>>>>   
>>>>   	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
>>
>>
>> Thanks,
>> Miquèl

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

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
  2023-03-28  7:27           ` Christophe Kerello
@ 2023-03-28  7:56             ` Miquel Raynal
  -1 siblings, 0 replies; 26+ messages in thread
From: Miquel Raynal @ 2023-03-28  7:56 UTC (permalink / raw)
  To: Christophe Kerello
  Cc: Tudor Ambarus, richard, vigneshr, linux-mtd, linux-kernel, linux-stm32

Hi Christophe,

christophe.kerello@foss.st.com wrote on Tue, 28 Mar 2023 09:27:55 +0200:

> Hello Miquel,
> 
> On 3/27/23 13:06, Tudor Ambarus wrote:
> > 
> > 
> > On 3/27/23 11:43, Miquel Raynal wrote:  
> >> Hi Tudor,
> >>
> >> tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:
> >>  
> >>> On 3/27/23 10:47, Christophe Kerello wrote:  
> >>>> This patch is using timings.mode value instead of checking tRC_min timing
> >>>> for EDO mode support.  
> >>>>    >>>  
> >>> Fixes and Cc to stable here too, as you'd like to have this backported
> >>> as well, don't you?  
> >>
> >> Actually the reason why Christophe split this into two patches is
> >> because timings.mode was introduced rather lately, he wanted the same
> >> patch to apply on all stable kernels, he actually asked for that split
> >> and I agreed (another solution would have been to send this current
> >> patch to Linus and have the other version sent to stable, but it
> >> requires a bit of scheduling on both ends).
> >>
> >> Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t  
> > 
> > Right, I understood that from the beginning. If it were to me, I would
> > Cc: stable@vger.kernel.org #v5.4+ for the first patch and
> > Cc: stable@vger.kernel.org #v5.10+ for the second.
> > 
> > So first would be alone just in v5.4, and starting with v5.10 we'll have
> > both and we'll mimic what we currently have in upstream mainline.
> >   
> 
> I can send a V3 with cc tag added as per Tudor's suggestion.
> Or cc tag will be added when the patches will be applied?

I'll handle it, no problem. Is it fine if I send this as part of the
next merge window or do you expect this fix to be applied earlier? I
just sent my fixes PR on Monday morning.

> 
> Regards,
> Christophe Kerello.
> 
> >>  
> >>>  
> >>>> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>  
> >>>
> >>> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> >>>  
> >>>> ---
> >>>>   drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
> >>>>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> >>>> index 3abb63d00a0b..9e74bcd90aaa 100644
> >>>> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> >>>> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> >>>> @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
> >>>>   	if (IS_ERR(sdrt))
> >>>>   		return PTR_ERR(sdrt);  
> >>>>   >>>> -	if (sdrt->tRC_min < 30000)  
> >>>> +	if (conf->timings.mode > 3)
> >>>>   		return -EOPNOTSUPP;  
> >>>>   >>>>   	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)  
> >>
> >>
> >> Thanks,
> >> Miquèl  


Thanks,
Miquèl

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
@ 2023-03-28  7:56             ` Miquel Raynal
  0 siblings, 0 replies; 26+ messages in thread
From: Miquel Raynal @ 2023-03-28  7:56 UTC (permalink / raw)
  To: Christophe Kerello
  Cc: Tudor Ambarus, richard, vigneshr, linux-mtd, linux-kernel, linux-stm32

Hi Christophe,

christophe.kerello@foss.st.com wrote on Tue, 28 Mar 2023 09:27:55 +0200:

> Hello Miquel,
> 
> On 3/27/23 13:06, Tudor Ambarus wrote:
> > 
> > 
> > On 3/27/23 11:43, Miquel Raynal wrote:  
> >> Hi Tudor,
> >>
> >> tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:
> >>  
> >>> On 3/27/23 10:47, Christophe Kerello wrote:  
> >>>> This patch is using timings.mode value instead of checking tRC_min timing
> >>>> for EDO mode support.  
> >>>>    >>>  
> >>> Fixes and Cc to stable here too, as you'd like to have this backported
> >>> as well, don't you?  
> >>
> >> Actually the reason why Christophe split this into two patches is
> >> because timings.mode was introduced rather lately, he wanted the same
> >> patch to apply on all stable kernels, he actually asked for that split
> >> and I agreed (another solution would have been to send this current
> >> patch to Linus and have the other version sent to stable, but it
> >> requires a bit of scheduling on both ends).
> >>
> >> Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t  
> > 
> > Right, I understood that from the beginning. If it were to me, I would
> > Cc: stable@vger.kernel.org #v5.4+ for the first patch and
> > Cc: stable@vger.kernel.org #v5.10+ for the second.
> > 
> > So first would be alone just in v5.4, and starting with v5.10 we'll have
> > both and we'll mimic what we currently have in upstream mainline.
> >   
> 
> I can send a V3 with cc tag added as per Tudor's suggestion.
> Or cc tag will be added when the patches will be applied?

I'll handle it, no problem. Is it fine if I send this as part of the
next merge window or do you expect this fix to be applied earlier? I
just sent my fixes PR on Monday morning.

> 
> Regards,
> Christophe Kerello.
> 
> >>  
> >>>  
> >>>> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>  
> >>>
> >>> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> >>>  
> >>>> ---
> >>>>   drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
> >>>>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> >>>> index 3abb63d00a0b..9e74bcd90aaa 100644
> >>>> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> >>>> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> >>>> @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
> >>>>   	if (IS_ERR(sdrt))
> >>>>   		return PTR_ERR(sdrt);  
> >>>>   >>>> -	if (sdrt->tRC_min < 30000)  
> >>>> +	if (conf->timings.mode > 3)
> >>>>   		return -EOPNOTSUPP;  
> >>>>   >>>>   	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)  
> >>
> >>
> >> Thanks,
> >> Miquèl  


Thanks,
Miquèl

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

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
  2023-03-28  7:56             ` Miquel Raynal
@ 2023-03-28  9:38               ` Christophe Kerello
  -1 siblings, 0 replies; 26+ messages in thread
From: Christophe Kerello @ 2023-03-28  9:38 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Tudor Ambarus, richard, vigneshr, linux-mtd, linux-kernel, linux-stm32

Hi Miquel,

On 3/28/23 09:56, Miquel Raynal wrote:
> Hi Christophe,
> 
> christophe.kerello@foss.st.com wrote on Tue, 28 Mar 2023 09:27:55 +0200:
> 
>> Hello Miquel,
>>
>> On 3/27/23 13:06, Tudor Ambarus wrote:
>>>
>>>
>>> On 3/27/23 11:43, Miquel Raynal wrote:
>>>> Hi Tudor,
>>>>
>>>> tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:
>>>>   
>>>>> On 3/27/23 10:47, Christophe Kerello wrote:
>>>>>> This patch is using timings.mode value instead of checking tRC_min timing
>>>>>> for EDO mode support.
>>>>>>     >>>
>>>>> Fixes and Cc to stable here too, as you'd like to have this backported
>>>>> as well, don't you?
>>>>
>>>> Actually the reason why Christophe split this into two patches is
>>>> because timings.mode was introduced rather lately, he wanted the same
>>>> patch to apply on all stable kernels, he actually asked for that split
>>>> and I agreed (another solution would have been to send this current
>>>> patch to Linus and have the other version sent to stable, but it
>>>> requires a bit of scheduling on both ends).
>>>>
>>>> Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t
>>>
>>> Right, I understood that from the beginning. If it were to me, I would
>>> Cc: stable@vger.kernel.org #v5.4+ for the first patch and
>>> Cc: stable@vger.kernel.org #v5.10+ for the second.
>>>
>>> So first would be alone just in v5.4, and starting with v5.10 we'll have
>>> both and we'll mimic what we currently have in upstream mainline.
>>>    
>>
>> I can send a V3 with cc tag added as per Tudor's suggestion.
>> Or cc tag will be added when the patches will be applied?
> 
> I'll handle it, no problem. Is it fine if I send this as part of the
> next merge window or do you expect this fix to be applied earlier? I
> just sent my fixes PR on Monday morning.
> 

Yes, it is fine. This patch set can be applied on next merge window.

Regards,
Christophe Kerello.

>>
>> Regards,
>> Christophe Kerello.
>>
>>>>   
>>>>>   
>>>>>> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
>>>>>
>>>>> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
>>>>>   
>>>>>> ---
>>>>>>    drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
>>>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>>>> index 3abb63d00a0b..9e74bcd90aaa 100644
>>>>>> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>>>> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>>>> @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
>>>>>>    	if (IS_ERR(sdrt))
>>>>>>    		return PTR_ERR(sdrt);
>>>>>>    >>>> -	if (sdrt->tRC_min < 30000)
>>>>>> +	if (conf->timings.mode > 3)
>>>>>>    		return -EOPNOTSUPP;
>>>>>>    >>>>   	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
>>>>
>>>>
>>>> Thanks,
>>>> Miquèl
> 
> 
> Thanks,
> Miquèl

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
@ 2023-03-28  9:38               ` Christophe Kerello
  0 siblings, 0 replies; 26+ messages in thread
From: Christophe Kerello @ 2023-03-28  9:38 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Tudor Ambarus, richard, vigneshr, linux-mtd, linux-kernel, linux-stm32

Hi Miquel,

On 3/28/23 09:56, Miquel Raynal wrote:
> Hi Christophe,
> 
> christophe.kerello@foss.st.com wrote on Tue, 28 Mar 2023 09:27:55 +0200:
> 
>> Hello Miquel,
>>
>> On 3/27/23 13:06, Tudor Ambarus wrote:
>>>
>>>
>>> On 3/27/23 11:43, Miquel Raynal wrote:
>>>> Hi Tudor,
>>>>
>>>> tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:
>>>>   
>>>>> On 3/27/23 10:47, Christophe Kerello wrote:
>>>>>> This patch is using timings.mode value instead of checking tRC_min timing
>>>>>> for EDO mode support.
>>>>>>     >>>
>>>>> Fixes and Cc to stable here too, as you'd like to have this backported
>>>>> as well, don't you?
>>>>
>>>> Actually the reason why Christophe split this into two patches is
>>>> because timings.mode was introduced rather lately, he wanted the same
>>>> patch to apply on all stable kernels, he actually asked for that split
>>>> and I agreed (another solution would have been to send this current
>>>> patch to Linus and have the other version sent to stable, but it
>>>> requires a bit of scheduling on both ends).
>>>>
>>>> Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t
>>>
>>> Right, I understood that from the beginning. If it were to me, I would
>>> Cc: stable@vger.kernel.org #v5.4+ for the first patch and
>>> Cc: stable@vger.kernel.org #v5.10+ for the second.
>>>
>>> So first would be alone just in v5.4, and starting with v5.10 we'll have
>>> both and we'll mimic what we currently have in upstream mainline.
>>>    
>>
>> I can send a V3 with cc tag added as per Tudor's suggestion.
>> Or cc tag will be added when the patches will be applied?
> 
> I'll handle it, no problem. Is it fine if I send this as part of the
> next merge window or do you expect this fix to be applied earlier? I
> just sent my fixes PR on Monday morning.
> 

Yes, it is fine. This patch set can be applied on next merge window.

Regards,
Christophe Kerello.

>>
>> Regards,
>> Christophe Kerello.
>>
>>>>   
>>>>>   
>>>>>> Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
>>>>>
>>>>> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
>>>>>   
>>>>>> ---
>>>>>>    drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
>>>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>>>> index 3abb63d00a0b..9e74bcd90aaa 100644
>>>>>> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>>>> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
>>>>>> @@ -1531,7 +1531,7 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr,
>>>>>>    	if (IS_ERR(sdrt))
>>>>>>    		return PTR_ERR(sdrt);
>>>>>>    >>>> -	if (sdrt->tRC_min < 30000)
>>>>>> +	if (conf->timings.mode > 3)
>>>>>>    		return -EOPNOTSUPP;
>>>>>>    >>>>   	if (chipnr == NAND_DATA_IFACE_CHECK_ONLY)
>>>>
>>>>
>>>> Thanks,
>>>> Miquèl
> 
> 
> Thanks,
> Miquèl

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

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
  2023-03-28  7:27           ` Christophe Kerello
@ 2023-03-28 14:01             ` Miquel Raynal
  -1 siblings, 0 replies; 26+ messages in thread
From: Miquel Raynal @ 2023-03-28 14:01 UTC (permalink / raw)
  To: Christophe Kerello
  Cc: Tudor Ambarus, richard, vigneshr, linux-mtd, linux-kernel, linux-stm32

Hi Christophe,

christophe.kerello@foss.st.com wrote on Tue, 28 Mar 2023 09:27:55 +0200:

> Hello Miquel,
> 
> On 3/27/23 13:06, Tudor Ambarus wrote:
> > 
> > 
> > On 3/27/23 11:43, Miquel Raynal wrote:  
> >> Hi Tudor,
> >>
> >> tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:
> >>  
> >>> On 3/27/23 10:47, Christophe Kerello wrote:  
> >>>> This patch is using timings.mode value instead of checking tRC_min timing
> >>>> for EDO mode support.  
> >>>>    >>>  
> >>> Fixes and Cc to stable here too, as you'd like to have this backported
> >>> as well, don't you?  
> >>
> >> Actually the reason why Christophe split this into two patches is
> >> because timings.mode was introduced rather lately, he wanted the same
> >> patch to apply on all stable kernels, he actually asked for that split
> >> and I agreed (another solution would have been to send this current
> >> patch to Linus and have the other version sent to stable, but it
> >> requires a bit of scheduling on both ends).
> >>
> >> Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t  
> > 
> > Right, I understood that from the beginning. If it were to me, I would
> > Cc: stable@vger.kernel.org #v5.4+ for the first patch and
> > Cc: stable@vger.kernel.org #v5.10+ for the second.
> > 
> > So first would be alone just in v5.4, and starting with v5.10 we'll have
> > both and we'll mimic what we currently have in upstream mainline.
> >   
> 
> I can send a V3 with cc tag added as per Tudor's suggestion.
> Or cc tag will be added when the patches will be applied?

Actually I have other fixes to queue early next week, so can you please
send a v3 with the tags discussed with Tudor?

Thanks,
Miquèl

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

* Re: [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min
@ 2023-03-28 14:01             ` Miquel Raynal
  0 siblings, 0 replies; 26+ messages in thread
From: Miquel Raynal @ 2023-03-28 14:01 UTC (permalink / raw)
  To: Christophe Kerello
  Cc: Tudor Ambarus, richard, vigneshr, linux-mtd, linux-kernel, linux-stm32

Hi Christophe,

christophe.kerello@foss.st.com wrote on Tue, 28 Mar 2023 09:27:55 +0200:

> Hello Miquel,
> 
> On 3/27/23 13:06, Tudor Ambarus wrote:
> > 
> > 
> > On 3/27/23 11:43, Miquel Raynal wrote:  
> >> Hi Tudor,
> >>
> >> tudor.ambarus@linaro.org wrote on Mon, 27 Mar 2023 11:30:51 +0100:
> >>  
> >>> On 3/27/23 10:47, Christophe Kerello wrote:  
> >>>> This patch is using timings.mode value instead of checking tRC_min timing
> >>>> for EDO mode support.  
> >>>>    >>>  
> >>> Fixes and Cc to stable here too, as you'd like to have this backported
> >>> as well, don't you?  
> >>
> >> Actually the reason why Christophe split this into two patches is
> >> because timings.mode was introduced rather lately, he wanted the same
> >> patch to apply on all stable kernels, he actually asked for that split
> >> and I agreed (another solution would have been to send this current
> >> patch to Linus and have the other version sent to stable, but it
> >> requires a bit of scheduling on both ends).
> >>
> >> Link: https://lore.kernel.org/linux-mtd/20230327101156.0ec2816a@xps-13/T/#t  
> > 
> > Right, I understood that from the beginning. If it were to me, I would
> > Cc: stable@vger.kernel.org #v5.4+ for the first patch and
> > Cc: stable@vger.kernel.org #v5.10+ for the second.
> > 
> > So first would be alone just in v5.4, and starting with v5.10 we'll have
> > both and we'll mimic what we currently have in upstream mainline.
> >   
> 
> I can send a V3 with cc tag added as per Tudor's suggestion.
> Or cc tag will be added when the patches will be applied?

Actually I have other fixes to queue early next week, so can you please
send a v3 with the tags discussed with Tudor?

Thanks,
Miquèl

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

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

end of thread, other threads:[~2023-03-28 14:03 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27  9:47 [PATCH v2 0/2] mtd: rawnand: stm32_fmc2: do not support EDO mode Christophe Kerello
2023-03-27  9:47 ` Christophe Kerello
2023-03-27  9:47 ` [PATCH v2 1/2] " Christophe Kerello
2023-03-27  9:47   ` Christophe Kerello
2023-03-27 10:29   ` Tudor Ambarus
2023-03-27 10:29     ` Tudor Ambarus
2023-03-27 10:40     ` Miquel Raynal
2023-03-27 10:40       ` Miquel Raynal
2023-03-27  9:47 ` [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min Christophe Kerello
2023-03-27  9:47   ` Christophe Kerello
2023-03-27 10:30   ` Tudor Ambarus
2023-03-27 10:30     ` Tudor Ambarus
2023-03-27 10:43     ` Miquel Raynal
2023-03-27 10:43       ` Miquel Raynal
2023-03-27 11:06       ` Tudor Ambarus
2023-03-27 11:06         ` Tudor Ambarus
2023-03-28  7:27         ` Christophe Kerello
2023-03-28  7:27           ` Christophe Kerello
2023-03-28  7:56           ` Miquel Raynal
2023-03-28  7:56             ` Miquel Raynal
2023-03-28  9:38             ` Christophe Kerello
2023-03-28  9:38               ` Christophe Kerello
2023-03-28 14:01           ` Miquel Raynal
2023-03-28 14:01             ` Miquel Raynal
2023-03-27 10:09 ` [PATCH v2 0/2] mtd: rawnand: stm32_fmc2: do not support EDO mode Tudor Ambarus
2023-03-27 10:09   ` Tudor Ambarus

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.