All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] mtd: m25p80: restore the addressing mode when stop using the flash
@ 2017-11-24 10:08 Zhiqiang Hou
  2017-11-24 10:08 ` [PATCH 1/2] mtd: spi-nor: add a API to restore the addressing mode Zhiqiang Hou
  2017-11-24 10:08 ` [PATCH 2/2] mtd: m25p80: restore the addressing mode when stop using the flash Zhiqiang Hou
  0 siblings, 2 replies; 9+ messages in thread
From: Zhiqiang Hou @ 2017-11-24 10:08 UTC (permalink / raw)
  To: linux-mtd, linux-kernel, computersforpeace, dwmw2,
	boris.brezillon, marek.vasut, richard, cyrille.pitchen
  Cc: Hou Zhiqiang

From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

To be compatible with legacy device, reset the addressing mode
to the default mode. Such as Freescale eSPI boot, it copies the
images from SPI flash without firing a reset signal previously,
so the reboot command will fail without reseting the addressing
mode of SPI flash.

Hou Zhiqiang (2):
  mtd: spi-nor: add a API to restore the addressing mode
  mtd: m25p80: restore the addressing mode when stop using the flash

 drivers/mtd/devices/m25p80.c  | 8 ++++++++
 drivers/mtd/spi-nor/spi-nor.c | 8 ++++++++
 include/linux/mtd/spi-nor.h   | 1 +
 3 files changed, 17 insertions(+)

-- 
2.14.1

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

* [PATCH 1/2] mtd: spi-nor: add a API to restore the addressing mode
  2017-11-24 10:08 [PATCH 0/2] mtd: m25p80: restore the addressing mode when stop using the flash Zhiqiang Hou
@ 2017-11-24 10:08 ` Zhiqiang Hou
  2017-12-01  8:52   ` Cyrille Pitchen
  2017-11-24 10:08 ` [PATCH 2/2] mtd: m25p80: restore the addressing mode when stop using the flash Zhiqiang Hou
  1 sibling, 1 reply; 9+ messages in thread
From: Zhiqiang Hou @ 2017-11-24 10:08 UTC (permalink / raw)
  To: linux-mtd, linux-kernel, computersforpeace, dwmw2,
	boris.brezillon, marek.vasut, richard, cyrille.pitchen
  Cc: Hou Zhiqiang

From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

It's better to restore the addressing mode of the SPI flash
whenever remove the driver or reboot the system.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
---
 drivers/mtd/spi-nor/spi-nor.c | 8 ++++++++
 include/linux/mtd/spi-nor.h   | 1 +
 2 files changed, 9 insertions(+)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index bc266f70a15b..801cbe99b059 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2713,6 +2713,14 @@ static void spi_nor_resume(struct mtd_info *mtd)
 		dev_err(dev, "resume() failed\n");
 }
 
+void spi_nor_restore_addr_mode(struct spi_nor *nor)
+{
+	if ((nor->addr_width == 4) &&
+	    (JEDEC_MFR(nor->info) != SNOR_MFR_SPANSION) &&
+	    !(nor->info->flags & SPI_NOR_4B_OPCODES))
+		set_4byte(nor, nor->info, 0);
+}
+
 int spi_nor_scan(struct spi_nor *nor, const char *name,
 		 const struct spi_nor_hwcaps *hwcaps)
 {
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index d0c66a0975cf..fe9357da2049 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -398,5 +398,6 @@ struct spi_nor_hwcaps {
  */
 int spi_nor_scan(struct spi_nor *nor, const char *name,
 		 const struct spi_nor_hwcaps *hwcaps);
+void spi_nor_restore_addr_mode(struct spi_nor *nor);
 
 #endif
-- 
2.14.1

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

* [PATCH 2/2] mtd: m25p80: restore the addressing mode when stop using the flash
  2017-11-24 10:08 [PATCH 0/2] mtd: m25p80: restore the addressing mode when stop using the flash Zhiqiang Hou
  2017-11-24 10:08 ` [PATCH 1/2] mtd: spi-nor: add a API to restore the addressing mode Zhiqiang Hou
@ 2017-11-24 10:08 ` Zhiqiang Hou
  2017-12-01  8:57   ` Cyrille Pitchen
  1 sibling, 1 reply; 9+ messages in thread
From: Zhiqiang Hou @ 2017-11-24 10:08 UTC (permalink / raw)
  To: linux-mtd, linux-kernel, computersforpeace, dwmw2,
	boris.brezillon, marek.vasut, richard, cyrille.pitchen
  Cc: Hou Zhiqiang

From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

Add .shutdown function to restore the addressing mode in reboot
process, and add the same operation to the .remove function.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
---
 drivers/mtd/devices/m25p80.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index dbe6a1de2bb8..867bd2d5a267 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -307,10 +307,17 @@ static int m25p_remove(struct spi_device *spi)
 {
 	struct m25p	*flash = spi_get_drvdata(spi);
 
+	spi_nor_restore_addr_mode(&flash->spi_nor);
 	/* Clean up MTD stuff. */
 	return mtd_device_unregister(&flash->spi_nor.mtd);
 }
 
+static void m25p_shutdown(struct spi_device *spi)
+{
+	struct m25p *flash = spi_get_drvdata(spi);
+
+	spi_nor_restore_addr_mode(&flash->spi_nor);
+}
 /*
  * Do NOT add to this array without reading the following:
  *
@@ -386,6 +393,7 @@ static struct spi_driver m25p80_driver = {
 	.id_table	= m25p_ids,
 	.probe	= m25p_probe,
 	.remove	= m25p_remove,
+	.shutdown	= m25p_shutdown,
 
 	/* REVISIT: many of these chips have deep power-down modes, which
 	 * should clearly be entered on suspend() to minimize power use.
-- 
2.14.1

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

* Re: [PATCH 1/2] mtd: spi-nor: add a API to restore the addressing mode
  2017-11-24 10:08 ` [PATCH 1/2] mtd: spi-nor: add a API to restore the addressing mode Zhiqiang Hou
@ 2017-12-01  8:52   ` Cyrille Pitchen
  2017-12-01 10:06       ` Z.q. Hou
  0 siblings, 1 reply; 9+ messages in thread
From: Cyrille Pitchen @ 2017-12-01  8:52 UTC (permalink / raw)
  To: Zhiqiang Hou, linux-mtd, linux-kernel, computersforpeace, dwmw2,
	boris.brezillon, marek.vasut, richard

Hi Hou,

Le 24/11/2017 à 11:08, Zhiqiang Hou a écrit :
> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> 
> It's better to restore the addressing mode of the SPI flash
> whenever remove the driver or reboot the system.
> 
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> ---
>  drivers/mtd/spi-nor/spi-nor.c | 8 ++++++++
>  include/linux/mtd/spi-nor.h   | 1 +
>  2 files changed, 9 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index bc266f70a15b..801cbe99b059 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -2713,6 +2713,14 @@ static void spi_nor_resume(struct mtd_info *mtd)
>  		dev_err(dev, "resume() failed\n");
>  }
>  
> +void spi_nor_restore_addr_mode(struct spi_nor *nor)
> +{
> +	if ((nor->addr_width == 4) &&
> +	    (JEDEC_MFR(nor->info) != SNOR_MFR_SPANSION) &&
> +	    !(nor->info->flags & SPI_NOR_4B_OPCODES))
> +		set_4byte(nor, nor->info, 0);
> +}
+ EXPORT_SYMBOL_GPL(spi_nor_restore_addr_mode);

Like for spi_nor_scan(), you would need to export the symbol for modules.

> +
>  int spi_nor_scan(struct spi_nor *nor, const char *name,
>  		 const struct spi_nor_hwcaps *hwcaps)
>  {
> diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
> index d0c66a0975cf..fe9357da2049 100644
> --- a/include/linux/mtd/spi-nor.h
> +++ b/include/linux/mtd/spi-nor.h
> @@ -398,5 +398,6 @@ struct spi_nor_hwcaps {
>   */
>  int spi_nor_scan(struct spi_nor *nor, const char *name,
>  		 const struct spi_nor_hwcaps *hwcaps);
> +void spi_nor_restore_addr_mode(struct spi_nor *nor);
>
Please add the relevant kernel doc.

Best regards,

Cyrille

>  #endif
> 

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

* Re: [PATCH 2/2] mtd: m25p80: restore the addressing mode when stop using the flash
  2017-11-24 10:08 ` [PATCH 2/2] mtd: m25p80: restore the addressing mode when stop using the flash Zhiqiang Hou
@ 2017-12-01  8:57   ` Cyrille Pitchen
  2017-12-01 10:06       ` Z.q. Hou
  0 siblings, 1 reply; 9+ messages in thread
From: Cyrille Pitchen @ 2017-12-01  8:57 UTC (permalink / raw)
  To: Zhiqiang Hou, linux-mtd, linux-kernel, computersforpeace, dwmw2,
	boris.brezillon, marek.vasut, richard

Hi Hou,

Le 24/11/2017 à 11:08, Zhiqiang Hou a écrit :
> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> 
> Add .shutdown function to restore the addressing mode in reboot
> process, and add the same operation to the .remove function.
> 
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> ---
>  drivers/mtd/devices/m25p80.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index dbe6a1de2bb8..867bd2d5a267 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -307,10 +307,17 @@ static int m25p_remove(struct spi_device *spi)
>  {
>  	struct m25p	*flash = spi_get_drvdata(spi);
>  
> +	spi_nor_restore_addr_mode(&flash->spi_nor);

maybe add a new line here.

Otherwise, this looks good :)

Best regards,

Cyrille

>  	/* Clean up MTD stuff. */
>  	return mtd_device_unregister(&flash->spi_nor.mtd);
>  }
>  
> +static void m25p_shutdown(struct spi_device *spi)
> +{
> +	struct m25p *flash = spi_get_drvdata(spi);
> +
> +	spi_nor_restore_addr_mode(&flash->spi_nor);
> +}
>  /*
>   * Do NOT add to this array without reading the following:
>   *
> @@ -386,6 +393,7 @@ static struct spi_driver m25p80_driver = {
>  	.id_table	= m25p_ids,
>  	.probe	= m25p_probe,
>  	.remove	= m25p_remove,
> +	.shutdown	= m25p_shutdown,
>  
>  	/* REVISIT: many of these chips have deep power-down modes, which
>  	 * should clearly be entered on suspend() to minimize power use.
> 

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

* RE: [PATCH 1/2] mtd: spi-nor: add a API to restore the addressing mode
  2017-12-01  8:52   ` Cyrille Pitchen
@ 2017-12-01 10:06       ` Z.q. Hou
  0 siblings, 0 replies; 9+ messages in thread
From: Z.q. Hou @ 2017-12-01 10:06 UTC (permalink / raw)
  To: Cyrille Pitchen, linux-mtd, linux-kernel, computersforpeace,
	dwmw2, boris.brezillon, marek.vasut, richard

Hi Cyrille,

Thanks a lot for your comments!

> -----Original Message-----
> From: Cyrille Pitchen [mailto:cyrille.pitchen@wedev4u.fr]
> Sent: 2017年12月1日 16:53
> To: Z.q. Hou <zhiqiang.hou@nxp.com>; linux-mtd@lists.infradead.org;
> linux-kernel@vger.kernel.org; computersforpeace@gmail.com;
> dwmw2@infradead.org; boris.brezillon@free-electrons.com;
> marek.vasut@gmail.com; richard@nod.at
> Subject: Re: [PATCH 1/2] mtd: spi-nor: add a API to restore the addressing
> mode
> 
> Hi Hou,
> 
> Le 24/11/2017 à 11:08, Zhiqiang Hou a écrit :
> > From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >
> > It's better to restore the addressing mode of the SPI flash whenever
> > remove the driver or reboot the system.
> >
> > Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> > ---
> >  drivers/mtd/spi-nor/spi-nor.c | 8 ++++++++
> >  include/linux/mtd/spi-nor.h   | 1 +
> >  2 files changed, 9 insertions(+)
> >
> > diff --git a/drivers/mtd/spi-nor/spi-nor.c
> > b/drivers/mtd/spi-nor/spi-nor.c index bc266f70a15b..801cbe99b059
> > 100644
> > --- a/drivers/mtd/spi-nor/spi-nor.c
> > +++ b/drivers/mtd/spi-nor/spi-nor.c
> > @@ -2713,6 +2713,14 @@ static void spi_nor_resume(struct mtd_info
> *mtd)
> >  		dev_err(dev, "resume() failed\n");
> >  }
> >
> > +void spi_nor_restore_addr_mode(struct spi_nor *nor) {
> > +	if ((nor->addr_width == 4) &&
> > +	    (JEDEC_MFR(nor->info) != SNOR_MFR_SPANSION) &&
> > +	    !(nor->info->flags & SPI_NOR_4B_OPCODES))
> > +		set_4byte(nor, nor->info, 0);
> > +}
> + EXPORT_SYMBOL_GPL(spi_nor_restore_addr_mode);
> 
> Like for spi_nor_scan(), you would need to export the symbol for modules.

Yes, I will add this in next version.

> 
> > +
> >  int spi_nor_scan(struct spi_nor *nor, const char *name,
> >  		 const struct spi_nor_hwcaps *hwcaps)  { diff --git
> > a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index
> > d0c66a0975cf..fe9357da2049 100644
> > --- a/include/linux/mtd/spi-nor.h
> > +++ b/include/linux/mtd/spi-nor.h
> > @@ -398,5 +398,6 @@ struct spi_nor_hwcaps {
> >   */
> >  int spi_nor_scan(struct spi_nor *nor, const char *name,
> >  		 const struct spi_nor_hwcaps *hwcaps);
> > +void spi_nor_restore_addr_mode(struct spi_nor *nor);
> >
> Please add the relevant kernel doc.

Yes, will add comments for this API in next version.

> 
> Best regards,
> 
> Cyrille
> 
> >  #endif
> >

Thanks,
Zhiqiang

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

* RE: [PATCH 1/2] mtd: spi-nor: add a API to restore the addressing mode
@ 2017-12-01 10:06       ` Z.q. Hou
  0 siblings, 0 replies; 9+ messages in thread
From: Z.q. Hou @ 2017-12-01 10:06 UTC (permalink / raw)
  To: Cyrille Pitchen, linux-mtd, linux-kernel, computersforpeace,
	dwmw2, boris.brezillon, marek.vasut, richard

Hi Cyrille,

Thanks a lot for your comments!

> -----Original Message-----
> From: Cyrille Pitchen [mailto:cyrille.pitchen@wedev4u.fr]
> Sent: 2017年12月1日 16:53
> To: Z.q. Hou <zhiqiang.hou@nxp.com>; linux-mtd@lists.infradead.org;
> linux-kernel@vger.kernel.org; computersforpeace@gmail.com;
> dwmw2@infradead.org; boris.brezillon@free-electrons.com;
> marek.vasut@gmail.com; richard@nod.at
> Subject: Re: [PATCH 1/2] mtd: spi-nor: add a API to restore the addressing
> mode
> 
> Hi Hou,
> 
> Le 24/11/2017 à 11:08, Zhiqiang Hou a écrit :
> > From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >
> > It's better to restore the addressing mode of the SPI flash whenever
> > remove the driver or reboot the system.
> >
> > Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> > ---
> >  drivers/mtd/spi-nor/spi-nor.c | 8 ++++++++
> >  include/linux/mtd/spi-nor.h   | 1 +
> >  2 files changed, 9 insertions(+)
> >
> > diff --git a/drivers/mtd/spi-nor/spi-nor.c
> > b/drivers/mtd/spi-nor/spi-nor.c index bc266f70a15b..801cbe99b059
> > 100644
> > --- a/drivers/mtd/spi-nor/spi-nor.c
> > +++ b/drivers/mtd/spi-nor/spi-nor.c
> > @@ -2713,6 +2713,14 @@ static void spi_nor_resume(struct mtd_info
> *mtd)
> >  		dev_err(dev, "resume() failed\n");
> >  }
> >
> > +void spi_nor_restore_addr_mode(struct spi_nor *nor) {
> > +	if ((nor->addr_width == 4) &&
> > +	    (JEDEC_MFR(nor->info) != SNOR_MFR_SPANSION) &&
> > +	    !(nor->info->flags & SPI_NOR_4B_OPCODES))
> > +		set_4byte(nor, nor->info, 0);
> > +}
> + EXPORT_SYMBOL_GPL(spi_nor_restore_addr_mode);
> 
> Like for spi_nor_scan(), you would need to export the symbol for modules.

Yes, I will add this in next version.

> 
> > +
> >  int spi_nor_scan(struct spi_nor *nor, const char *name,
> >  		 const struct spi_nor_hwcaps *hwcaps)  { diff --git
> > a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index
> > d0c66a0975cf..fe9357da2049 100644
> > --- a/include/linux/mtd/spi-nor.h
> > +++ b/include/linux/mtd/spi-nor.h
> > @@ -398,5 +398,6 @@ struct spi_nor_hwcaps {
> >   */
> >  int spi_nor_scan(struct spi_nor *nor, const char *name,
> >  		 const struct spi_nor_hwcaps *hwcaps);
> > +void spi_nor_restore_addr_mode(struct spi_nor *nor);
> >
> Please add the relevant kernel doc.

Yes, will add comments for this API in next version.

> 
> Best regards,
> 
> Cyrille
> 
> >  #endif
> >

Thanks,
Zhiqiang

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

* RE: [PATCH 2/2] mtd: m25p80: restore the addressing mode when stop using the flash
  2017-12-01  8:57   ` Cyrille Pitchen
@ 2017-12-01 10:06       ` Z.q. Hou
  0 siblings, 0 replies; 9+ messages in thread
From: Z.q. Hou @ 2017-12-01 10:06 UTC (permalink / raw)
  To: Cyrille Pitchen, linux-mtd, linux-kernel, computersforpeace,
	dwmw2, boris.brezillon, marek.vasut, richard

Hi Cyrille,

Thanks for your comments!

> -----Original Message-----
> From: Cyrille Pitchen [mailto:cyrille.pitchen@wedev4u.fr]
> Sent: 2017年12月1日 16:58
> To: Z.q. Hou <zhiqiang.hou@nxp.com>; linux-mtd@lists.infradead.org;
> linux-kernel@vger.kernel.org; computersforpeace@gmail.com;
> dwmw2@infradead.org; boris.brezillon@free-electrons.com;
> marek.vasut@gmail.com; richard@nod.at
> Subject: Re: [PATCH 2/2] mtd: m25p80: restore the addressing mode when
> stop using the flash
> 
> Hi Hou,
> 
> Le 24/11/2017 à 11:08, Zhiqiang Hou a écrit :
> > From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >
> > Add .shutdown function to restore the addressing mode in reboot
> > process, and add the same operation to the .remove function.
> >
> > Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> > ---
> >  drivers/mtd/devices/m25p80.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/mtd/devices/m25p80.c
> > b/drivers/mtd/devices/m25p80.c index dbe6a1de2bb8..867bd2d5a267
> 100644
> > --- a/drivers/mtd/devices/m25p80.c
> > +++ b/drivers/mtd/devices/m25p80.c
> > @@ -307,10 +307,17 @@ static int m25p_remove(struct spi_device *spi)
> > {
> >  	struct m25p	*flash = spi_get_drvdata(spi);
> >
> > +	spi_nor_restore_addr_mode(&flash->spi_nor);
> 
> maybe add a new line here.
> 
> Otherwise, this looks good :)

Yes, will add in next version, thanks a lot for the suggestion!


Thanks,
Zhiqiang

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

* RE: [PATCH 2/2] mtd: m25p80: restore the addressing mode when stop using the flash
@ 2017-12-01 10:06       ` Z.q. Hou
  0 siblings, 0 replies; 9+ messages in thread
From: Z.q. Hou @ 2017-12-01 10:06 UTC (permalink / raw)
  To: Cyrille Pitchen, linux-mtd, linux-kernel, computersforpeace,
	dwmw2, boris.brezillon, marek.vasut, richard

Hi Cyrille,

Thanks for your comments!

> -----Original Message-----
> From: Cyrille Pitchen [mailto:cyrille.pitchen@wedev4u.fr]
> Sent: 2017年12月1日 16:58
> To: Z.q. Hou <zhiqiang.hou@nxp.com>; linux-mtd@lists.infradead.org;
> linux-kernel@vger.kernel.org; computersforpeace@gmail.com;
> dwmw2@infradead.org; boris.brezillon@free-electrons.com;
> marek.vasut@gmail.com; richard@nod.at
> Subject: Re: [PATCH 2/2] mtd: m25p80: restore the addressing mode when
> stop using the flash
> 
> Hi Hou,
> 
> Le 24/11/2017 à 11:08, Zhiqiang Hou a écrit :
> > From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >
> > Add .shutdown function to restore the addressing mode in reboot
> > process, and add the same operation to the .remove function.
> >
> > Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> > ---
> >  drivers/mtd/devices/m25p80.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/mtd/devices/m25p80.c
> > b/drivers/mtd/devices/m25p80.c index dbe6a1de2bb8..867bd2d5a267
> 100644
> > --- a/drivers/mtd/devices/m25p80.c
> > +++ b/drivers/mtd/devices/m25p80.c
> > @@ -307,10 +307,17 @@ static int m25p_remove(struct spi_device *spi)
> > {
> >  	struct m25p	*flash = spi_get_drvdata(spi);
> >
> > +	spi_nor_restore_addr_mode(&flash->spi_nor);
> 
> maybe add a new line here.
> 
> Otherwise, this looks good :)

Yes, will add in next version, thanks a lot for the suggestion!


Thanks,
Zhiqiang


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

end of thread, other threads:[~2017-12-01 10:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-24 10:08 [PATCH 0/2] mtd: m25p80: restore the addressing mode when stop using the flash Zhiqiang Hou
2017-11-24 10:08 ` [PATCH 1/2] mtd: spi-nor: add a API to restore the addressing mode Zhiqiang Hou
2017-12-01  8:52   ` Cyrille Pitchen
2017-12-01 10:06     ` Z.q. Hou
2017-12-01 10:06       ` Z.q. Hou
2017-11-24 10:08 ` [PATCH 2/2] mtd: m25p80: restore the addressing mode when stop using the flash Zhiqiang Hou
2017-12-01  8:57   ` Cyrille Pitchen
2017-12-01 10:06     ` Z.q. Hou
2017-12-01 10:06       ` Z.q. Hou

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.