diff mbox

[U-Boot,v9,01/30] mtd: nand: Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT

Message ID 1362596377-5827-1-git-send-email-benoit.thebaudeau@advansee.com
State Changes Requested
Delegated to: Albert ARIBAUD
Headers show

Commit Message

Benoît Thébaudeau March 6, 2013, 6:59 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that other NAND controller
drivers could use it when a 16-bit NAND is deployed.

drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it, so that
other NAND drivers could reuse the same symbol.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
---
Changes in v9: None
Changes in v8:
 - New patch.

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 README                  |    9 ++++++---
 drivers/mtd/nand/ndfc.c |    4 ++--
 2 files changed, 8 insertions(+), 5 deletions(-)

Comments

Scott Wood March 6, 2013, 7:25 p.m. UTC | #1
On 03/06/2013 12:59:07 PM, Benoît Thébaudeau wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that other NAND  
> controller
> drivers could use it when a 16-bit NAND is deployed.
> 
> drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it,  
> so that
> other NAND drivers could reuse the same symbol.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>

NAND bits in the entire patchset are:
Acked-by: Scott Wood <scottwood@freescale.com>

-Scott
marcio@netopen.com.br March 14, 2013, 11:51 a.m. UTC | #2
Is this Patch included in the lastest release?
Thnaks



--
View this message in context: http://u-boot.10912.n7.nabble.com/PATCH-v9-01-30-mtd-nand-Introduce-CONFIG-SYS-NAND-BUSWIDTH-16BIT-tp149128p149695.html
Sent from the U-Boot mailing list archive at Nabble.com.
Fabio Estevam March 14, 2013, 12:39 p.m. UTC | #3
On Thu, Mar 14, 2013 at 8:51 AM, marcio@netopen.com.br
<marcio@netopen.com.br> wrote:
> Is this Patch included in the lastest release?

Not yet. Hopefully it will go into 2013.04 release.
Albert ARIBAUD March 28, 2013, 9:55 a.m. UTC | #4
Hi Benoît,

On Wed,  6 Mar 2013 19:59:07 +0100, Benoît Thébaudeau
<benoit.thebaudeau@advansee.com> wrote:

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that other NAND controller
> drivers could use it when a 16-bit NAND is deployed.
> 
> drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it, so that
> other NAND drivers could reuse the same symbol.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>

Sorry, I may have got the info before but I seem not to find it back:
is this series available somewhere as a branch that I could pull in
easily for testing?

Amicalement,
Benoît Thébaudeau March 28, 2013, 2:37 p.m. UTC | #5
Hi Albert,

On Thursday, March 28, 2013 10:55:29 AM, Albert ARIBAUD wrote:
> Hi Benoît,
> 
> On Wed,  6 Mar 2013 19:59:07 +0100, Benoît Thébaudeau
> <benoit.thebaudeau@advansee.com> wrote:
> 
> > From: Fabio Estevam <fabio.estevam@freescale.com>
> > 
> > Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that other NAND
> > controller
> > drivers could use it when a 16-bit NAND is deployed.
> > 
> > drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it, so that
> > other NAND drivers could reuse the same symbol.
> > 
> > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> > Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
> 
> Sorry, I may have got the info before but I seem not to find it back:
> is this series available somewhere as a branch that I could pull in
> easily for testing?

Yes, in your inbox on March 6, 2013 8:22 PM. ;)

Best regards,
Benoît
Albert ARIBAUD March 28, 2013, 3:16 p.m. UTC | #6
Hi Benoît,

On Thu, 28 Mar 2013 15:37:57 +0100 (CET), Benoît Thébaudeau
<benoit.thebaudeau@advansee.com> wrote:

> Hi Albert,
> 
> On Thursday, March 28, 2013 10:55:29 AM, Albert ARIBAUD wrote:
> > Hi Benoît,
> > 
> > On Wed,  6 Mar 2013 19:59:07 +0100, Benoît Thébaudeau
> > <benoit.thebaudeau@advansee.com> wrote:
> > 
> > > From: Fabio Estevam <fabio.estevam@freescale.com>
> > > 
> > > Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that other NAND
> > > controller
> > > drivers could use it when a 16-bit NAND is deployed.
> > > 
> > > drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it, so that
> > > other NAND drivers could reuse the same symbol.
> > > 
> > > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> > > Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
> > 
> > Sorry, I may have got the info before but I seem not to find it back:
> > is this series available somewhere as a branch that I could pull in
> > easily for testing?
> 
> Yes, in your inbox on March 6, 2013 8:22 PM. ;)

Oh, ok. I'd thought that was v8. I'll pull this in as soon as the
current mainline/ARM merge issue is solved.

> Best regards,
> Benoît

Amicalement,
Benoît Thébaudeau March 28, 2013, 4:33 p.m. UTC | #7
Hi Albert,

On Thursday, March 28, 2013 4:16:06 PM, Albert ARIBAUD wrote:
> Hi Benoît,
> 
> On Thu, 28 Mar 2013 15:37:57 +0100 (CET), Benoît Thébaudeau
> <benoit.thebaudeau@advansee.com> wrote:
> 
> > Hi Albert,
> > 
> > On Thursday, March 28, 2013 10:55:29 AM, Albert ARIBAUD wrote:
> > > Hi Benoît,
> > > 
> > > On Wed,  6 Mar 2013 19:59:07 +0100, Benoît Thébaudeau
> > > <benoit.thebaudeau@advansee.com> wrote:
> > > 
> > > > From: Fabio Estevam <fabio.estevam@freescale.com>
> > > > 
> > > > Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that other NAND
> > > > controller
> > > > drivers could use it when a 16-bit NAND is deployed.
> > > > 
> > > > drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it, so
> > > > that
> > > > other NAND drivers could reuse the same symbol.
> > > > 
> > > > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> > > > Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
> > > 
> > > Sorry, I may have got the info before but I seem not to find it back:
> > > is this series available somewhere as a branch that I could pull in
> > > easily for testing?
> > 
> > Yes, in your inbox on March 6, 2013 8:22 PM. ;)
> 
> Oh, ok. I'd thought that was v8.

That was actually v9. I should have mentioned it in that e-mail.

> I'll pull this in as soon as the
> current mainline/ARM merge issue is solved.

OK. That's fine for testing, but not for applying (because of patman stuff, and
Fabio should be set as the Git author/committer for 01 and 02/30, and I also had
to make some manual fixes to patch descriptions after running patman, which had
removed and added some tags that it should not have).

I don't know if you have a script or something (e.g. with git am) to make
applying less painful. It should be possible to run a command line to wget then
git-am the following range of patches (out of order with respect to patch #ing):
http://patchwork.ozlabs.org/patch/225577/
to http://patchwork.ozlabs.org/patch/225607/ (with either raw/ or mbox/ suffix)
skipping unrelated http://patchwork.ozlabs.org/patch/225602/

Best regards,
Benoît
Albert ARIBAUD March 30, 2013, 8:52 a.m. UTC | #8
Hi Benoît,

On Wed,  6 Mar 2013 19:59:07 +0100, Benoît Thébaudeau
<benoit.thebaudeau@advansee.com> wrote:

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that other NAND controller
> drivers could use it when a 16-bit NAND is deployed.
> 
> drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it, so that
> other NAND drivers could reuse the same symbol.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
> ---
> Changes in v9: None
> Changes in v8:
>  - New patch.
> 
> Changes in v7: None
> Changes in v6: None
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
> 
>  README                  |    9 ++++++---
>  drivers/mtd/nand/ndfc.c |    4 ++--
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/README b/README
> index d8cb394..830c45e 100644
> --- a/README
> +++ b/README
> @@ -3713,9 +3713,12 @@ Low Level (hardware related) configuration options:
>  - CONFIG_SYS_SRIOn_MEM_SIZE:
>  		Size of SRIO port 'n' memory region
>  
> -- CONFIG_SYS_NDFC_16
> -		Defined to tell the NDFC that the NAND chip is using a
> -		16 bit bus.
> +- CONFIG_SYS_NAND_BUSWIDTH_16BIT
> +		Defined to tell the NAND controller that the NAND chip is using
> +		a 16 bit bus.
> +		Not all NAND drivers use this symbol.
> +		Example of driver that uses it:
> +		- drivers/mtd/nand/ndfc.c
>  
>  - CONFIG_SYS_NDFC_EBC0_CFG
>  		Sets the EBC0_CFG register for the NDFC. If not defined
> diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
> index 6ebbb5e..213d2c9 100644
> --- a/drivers/mtd/nand/ndfc.c
> +++ b/drivers/mtd/nand/ndfc.c
> @@ -156,7 +156,7 @@ static uint8_t ndfc_read_byte(struct mtd_info *mtd)
>  
>  	struct nand_chip *chip = mtd->priv;
>  
> -#ifdef CONFIG_SYS_NDFC_16BIT
> +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT
>  	return (uint8_t) readw(chip->IO_ADDR_R);
>  #else
>  	return readb(chip->IO_ADDR_R);
> @@ -218,7 +218,7 @@ int board_nand_init(struct nand_chip *nand)
>  	nand->ecc.bytes = 3;
>  	nand->select_chip = ndfc_select_chip;
>  
> -#ifdef CONFIG_SYS_NDFC_16BIT
> +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT
>  	nand->options |= NAND_BUSWIDTH_16;
>  #endif
>  

Series does not apply cleanly on current mainline/ARM trees (actually,
it does not rebase cleanly). I am trying fixing this manually for
testings, but a rebased V10 will be necessary anyway.

Amicalement,
Benoît Thébaudeau March 30, 2013, 3:42 p.m. UTC | #9
Hi Albert,

On Saturday, March 30, 2013 9:52:31 AM, Albert ARIBAUD wrote:
> Hi Benoît,
> 
> On Wed,  6 Mar 2013 19:59:07 +0100, Benoît Thébaudeau
> <benoit.thebaudeau@advansee.com> wrote:
> 
> > From: Fabio Estevam <fabio.estevam@freescale.com>
> > 
> > Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that other NAND
> > controller
> > drivers could use it when a 16-bit NAND is deployed.
> > 
> > drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it, so that
> > other NAND drivers could reuse the same symbol.
> > 
> > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> > Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
> > ---
> > Changes in v9: None
> > Changes in v8:
> >  - New patch.
> > 
> > Changes in v7: None
> > Changes in v6: None
> > Changes in v5: None
> > Changes in v4: None
> > Changes in v3: None
> > Changes in v2: None
> > 
> >  README                  |    9 ++++++---
> >  drivers/mtd/nand/ndfc.c |    4 ++--
> >  2 files changed, 8 insertions(+), 5 deletions(-)
> > 
> > diff --git a/README b/README
> > index d8cb394..830c45e 100644
> > --- a/README
> > +++ b/README
> > @@ -3713,9 +3713,12 @@ Low Level (hardware related) configuration options:
> >  - CONFIG_SYS_SRIOn_MEM_SIZE:
> >  		Size of SRIO port 'n' memory region
> >  
> > -- CONFIG_SYS_NDFC_16
> > -		Defined to tell the NDFC that the NAND chip is using a
> > -		16 bit bus.
> > +- CONFIG_SYS_NAND_BUSWIDTH_16BIT
> > +		Defined to tell the NAND controller that the NAND chip is using
> > +		a 16 bit bus.
> > +		Not all NAND drivers use this symbol.
> > +		Example of driver that uses it:
> > +		- drivers/mtd/nand/ndfc.c
> >  
> >  - CONFIG_SYS_NDFC_EBC0_CFG
> >  		Sets the EBC0_CFG register for the NDFC. If not defined
> > diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
> > index 6ebbb5e..213d2c9 100644
> > --- a/drivers/mtd/nand/ndfc.c
> > +++ b/drivers/mtd/nand/ndfc.c
> > @@ -156,7 +156,7 @@ static uint8_t ndfc_read_byte(struct mtd_info *mtd)
> >  
> >  	struct nand_chip *chip = mtd->priv;
> >  
> > -#ifdef CONFIG_SYS_NDFC_16BIT
> > +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT
> >  	return (uint8_t) readw(chip->IO_ADDR_R);
> >  #else
> >  	return readb(chip->IO_ADDR_R);
> > @@ -218,7 +218,7 @@ int board_nand_init(struct nand_chip *nand)
> >  	nand->ecc.bytes = 3;
> >  	nand->select_chip = ndfc_select_chip;
> >  
> > -#ifdef CONFIG_SYS_NDFC_16BIT
> > +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT
> >  	nand->options |= NAND_BUSWIDTH_16;
> >  #endif
> >  
> 
> Series does not apply cleanly on current mainline/ARM trees (actually,
> it does not rebase cleanly). I am trying fixing this manually for
> testings, but a rebased V10 will be necessary anyway.

OK, I'll send that on Monday, April 8, in the evening.

Best regards,
Benoît
diff mbox

Patch

diff --git a/README b/README
index d8cb394..830c45e 100644
--- a/README
+++ b/README
@@ -3713,9 +3713,12 @@  Low Level (hardware related) configuration options:
 - CONFIG_SYS_SRIOn_MEM_SIZE:
 		Size of SRIO port 'n' memory region
 
-- CONFIG_SYS_NDFC_16
-		Defined to tell the NDFC that the NAND chip is using a
-		16 bit bus.
+- CONFIG_SYS_NAND_BUSWIDTH_16BIT
+		Defined to tell the NAND controller that the NAND chip is using
+		a 16 bit bus.
+		Not all NAND drivers use this symbol.
+		Example of driver that uses it:
+		- drivers/mtd/nand/ndfc.c
 
 - CONFIG_SYS_NDFC_EBC0_CFG
 		Sets the EBC0_CFG register for the NDFC. If not defined
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 6ebbb5e..213d2c9 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -156,7 +156,7 @@  static uint8_t ndfc_read_byte(struct mtd_info *mtd)
 
 	struct nand_chip *chip = mtd->priv;
 
-#ifdef CONFIG_SYS_NDFC_16BIT
+#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT
 	return (uint8_t) readw(chip->IO_ADDR_R);
 #else
 	return readb(chip->IO_ADDR_R);
@@ -218,7 +218,7 @@  int board_nand_init(struct nand_chip *nand)
 	nand->ecc.bytes = 3;
 	nand->select_chip = ndfc_select_chip;
 
-#ifdef CONFIG_SYS_NDFC_16BIT
+#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT
 	nand->options |= NAND_BUSWIDTH_16;
 #endif