Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-07-11 Thread Brian Norris
Hi guys, Sorry to revisit this way late, and sorry for not paying as much attention initially. I'm prepped to merge v4, but some of the conversation matches what I was just thinking. On Mon, Apr 28, 2014 at 07:06:17AM +0200, Marek Vasut wrote: > On Saturday, April 26, 2014 at 05:10:13 AM, Huang

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-07-11 Thread Brian Norris
Hi guys, Sorry to revisit this way late, and sorry for not paying as much attention initially. I'm prepped to merge v4, but some of the conversation matches what I was just thinking. On Mon, Apr 28, 2014 at 07:06:17AM +0200, Marek Vasut wrote: On Saturday, April 26, 2014 at 05:10:13 AM, Huang

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-28 Thread Huang Shijie
On Mon, Apr 28, 2014 at 09:22:58AM -0500, Graham Moore wrote: > On Mon, Apr 28, 2014 at 2:06 AM, Huang Shijie wrote: > > On Mon, Apr 28, 2014 at 07:06:17AM +0200, Marek Vasut wrote: > >> > >> Two things competing over the same pointer looks misdesigned to me. I will > >> need > >> to dig into

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-28 Thread Graham Moore
On Mon, Apr 28, 2014 at 2:06 AM, Huang Shijie wrote: > On Mon, Apr 28, 2014 at 07:06:17AM +0200, Marek Vasut wrote: >> >> Two things competing over the same pointer looks misdesigned to me. I will >> need >> to dig into this one more time ... > Please refer to the code for NAND chip, the

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-28 Thread Huang Shijie
On Mon, Apr 28, 2014 at 07:06:17AM +0200, Marek Vasut wrote: > On Saturday, April 26, 2014 at 05:10:13 AM, Huang Shijie wrote: > > On Sat, Apr 26, 2014 at 12:12:24AM +0200, Marek Vasut wrote: > > > > > > the drivers may fills this hook itself, so the code should like > > > > > > this: > > > > > >

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-28 Thread Huang Shijie
On Mon, Apr 28, 2014 at 07:06:17AM +0200, Marek Vasut wrote: On Saturday, April 26, 2014 at 05:10:13 AM, Huang Shijie wrote: On Sat, Apr 26, 2014 at 12:12:24AM +0200, Marek Vasut wrote: the drivers may fills this hook itself, so the code should like this:

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-28 Thread Graham Moore
On Mon, Apr 28, 2014 at 2:06 AM, Huang Shijie b32...@freescale.com wrote: On Mon, Apr 28, 2014 at 07:06:17AM +0200, Marek Vasut wrote: Two things competing over the same pointer looks misdesigned to me. I will need to dig into this one more time ... Please refer to the code for NAND chip,

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-28 Thread Huang Shijie
On Mon, Apr 28, 2014 at 09:22:58AM -0500, Graham Moore wrote: On Mon, Apr 28, 2014 at 2:06 AM, Huang Shijie b32...@freescale.com wrote: On Mon, Apr 28, 2014 at 07:06:17AM +0200, Marek Vasut wrote: Two things competing over the same pointer looks misdesigned to me. I will need to dig

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-27 Thread Marek Vasut
On Saturday, April 26, 2014 at 05:10:13 AM, Huang Shijie wrote: > On Sat, Apr 26, 2014 at 12:12:24AM +0200, Marek Vasut wrote: > > > > > the drivers may fills this hook itself, so the code should like this: > > > > >-- > > > > > > > > > >

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-27 Thread Marek Vasut
On Saturday, April 26, 2014 at 05:10:13 AM, Huang Shijie wrote: On Sat, Apr 26, 2014 at 12:12:24AM +0200, Marek Vasut wrote: the drivers may fills this hook itself, so the code should like this: -- if ((info-flags

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-25 Thread Huang Shijie
On Sat, Apr 26, 2014 at 12:12:24AM +0200, Marek Vasut wrote: > > > > the drivers may fills this hook itself, so the code should like this: > > > >-- > > > > > > > > if ((info->flags & USE_FSR) && > > > > > > > >

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-25 Thread Marek Vasut
On Friday, April 25, 2014 at 03:52:46 AM, Huang Shijie wrote: > On Fri, Apr 25, 2014 at 04:42:33AM +0200, Marek Vasut wrote: > > On Friday, April 25, 2014 at 03:34:36 AM, Huang Shijie wrote: > > > On Tue, Apr 22, 2014 at 09:03:16AM -0500, Graham Moore wrote: > > > > Some new Micron flash chips

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-25 Thread Marek Vasut
On Friday, April 25, 2014 at 06:47:04 AM, Huang Shijie wrote: > On Tue, Apr 22, 2014 at 01:48:21PM -0500, Graham Moore wrote: > > On Tue, Apr 22, 2014 at 11:55 AM, Marek Vasut wrote: > > > Are you sure the n25q512a doesn't use FSR ? Do n25q512a{1,8}3 share the > > > same IDs? > > > > I looked at

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-25 Thread Marek Vasut
On Friday, April 25, 2014 at 06:47:04 AM, Huang Shijie wrote: On Tue, Apr 22, 2014 at 01:48:21PM -0500, Graham Moore wrote: On Tue, Apr 22, 2014 at 11:55 AM, Marek Vasut ma...@denx.de wrote: Are you sure the n25q512a doesn't use FSR ? Do n25q512a{1,8}3 share the same IDs? I looked at

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-25 Thread Marek Vasut
On Friday, April 25, 2014 at 03:52:46 AM, Huang Shijie wrote: On Fri, Apr 25, 2014 at 04:42:33AM +0200, Marek Vasut wrote: On Friday, April 25, 2014 at 03:34:36 AM, Huang Shijie wrote: On Tue, Apr 22, 2014 at 09:03:16AM -0500, Graham Moore wrote: Some new Micron flash chips require

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-25 Thread Huang Shijie
On Sat, Apr 26, 2014 at 12:12:24AM +0200, Marek Vasut wrote: the drivers may fills this hook itself, so the code should like this: -- if ((info-flags USE_FSR) nor-wait_till_ready

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-24 Thread Huang Shijie
On Tue, Apr 22, 2014 at 01:48:21PM -0500, Graham Moore wrote: > On Tue, Apr 22, 2014 at 11:55 AM, Marek Vasut wrote: > > Are you sure the n25q512a doesn't use FSR ? Do n25q512a{1,8}3 share the same > > IDs? > > I looked at the datasheet and the n25q512a *does* have the same FSR > usage note, so

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-24 Thread Huang Shijie
On Fri, Apr 25, 2014 at 04:42:33AM +0200, Marek Vasut wrote: > On Friday, April 25, 2014 at 03:34:36 AM, Huang Shijie wrote: > > On Tue, Apr 22, 2014 at 09:03:16AM -0500, Graham Moore wrote: > > > Some new Micron flash chips require reading the flag > > > status register to determine when

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-24 Thread Huang Shijie
On Fri, Apr 25, 2014 at 04:42:33AM +0200, Marek Vasut wrote: > On Friday, April 25, 2014 at 03:34:36 AM, Huang Shijie wrote: > > On Tue, Apr 22, 2014 at 09:03:16AM -0500, Graham Moore wrote: > > > Some new Micron flash chips require reading the flag > > > status register to determine when

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-24 Thread Huang Shijie
On Tue, Apr 22, 2014 at 09:03:16AM -0500, Graham Moore wrote: > Some new Micron flash chips require reading the flag > status register to determine when operations have completed. > > Furthermore, chips with multi-die stacks of the 65nm 256Mb QSPI also > require reading the status register before

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-24 Thread Marek Vasut
On Friday, April 25, 2014 at 03:34:36 AM, Huang Shijie wrote: > On Tue, Apr 22, 2014 at 09:03:16AM -0500, Graham Moore wrote: > > Some new Micron flash chips require reading the flag > > status register to determine when operations have completed. > > > > Furthermore, chips with multi-die stacks

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-24 Thread Marek Vasut
On Friday, April 25, 2014 at 03:34:36 AM, Huang Shijie wrote: On Tue, Apr 22, 2014 at 09:03:16AM -0500, Graham Moore wrote: Some new Micron flash chips require reading the flag status register to determine when operations have completed. Furthermore, chips with multi-die stacks of the

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-24 Thread Huang Shijie
On Tue, Apr 22, 2014 at 09:03:16AM -0500, Graham Moore wrote: Some new Micron flash chips require reading the flag status register to determine when operations have completed. Furthermore, chips with multi-die stacks of the 65nm 256Mb QSPI also require reading the status register before

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-24 Thread Huang Shijie
On Fri, Apr 25, 2014 at 04:42:33AM +0200, Marek Vasut wrote: On Friday, April 25, 2014 at 03:34:36 AM, Huang Shijie wrote: On Tue, Apr 22, 2014 at 09:03:16AM -0500, Graham Moore wrote: Some new Micron flash chips require reading the flag status register to determine when operations have

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-24 Thread Huang Shijie
On Fri, Apr 25, 2014 at 04:42:33AM +0200, Marek Vasut wrote: On Friday, April 25, 2014 at 03:34:36 AM, Huang Shijie wrote: On Tue, Apr 22, 2014 at 09:03:16AM -0500, Graham Moore wrote: Some new Micron flash chips require reading the flag status register to determine when operations have

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-24 Thread Huang Shijie
On Tue, Apr 22, 2014 at 01:48:21PM -0500, Graham Moore wrote: On Tue, Apr 22, 2014 at 11:55 AM, Marek Vasut ma...@denx.de wrote: Are you sure the n25q512a doesn't use FSR ? Do n25q512a{1,8}3 share the same IDs? I looked at the datasheet and the n25q512a *does* have the same FSR usage

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Graham Moore
On Tue, Apr 22, 2014 at 1:45 PM, Gerhard Sittig wrote: > the patch appears to not have dev_err() references, were they > removed? see below [...] > this emits a message that an error has occured, but doesn't tell > where it occured -- can you dev_err() here to make the message > even more

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Marek Vasut
On Tuesday, April 22, 2014 at 08:48:21 PM, Graham Moore wrote: > On Tue, Apr 22, 2014 at 11:55 AM, Marek Vasut wrote: > > Are you sure the n25q512a doesn't use FSR ? Do n25q512a{1,8}3 share the > > same IDs? > > I looked at the datasheet and the n25q512a *does* have the same FSR > usage note, so

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Graham Moore
On Tue, Apr 22, 2014 at 11:55 AM, Marek Vasut wrote: > Are you sure the n25q512a doesn't use FSR ? Do n25q512a{1,8}3 share the same > IDs? I looked at the datasheet and the n25q512a *does* have the same FSR usage note, so I suppose I should add USE_FSR to it as well. But how is it working now?

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Gerhard Sittig
On Tue, 2014-04-22 at 09:03 -0500, Graham Moore wrote: > > --- > V3: > Rebase to l2-mtd spinor branch. > V2: > Remove leading underscore in function names. > Remove type cast in dev_err call and use the proper format > specifier instead. the patch appears to not have dev_err() references, were

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Marek Vasut
On Tuesday, April 22, 2014 at 04:03:16 PM, Graham Moore wrote: [...] > #define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \ > @@ -488,6 +534,8 @@ const struct spi_device_id spi_nor_ids[] = { > { "n25q128a13", INFO(0x20ba18, 0, 64 * 1024, 256, 0) }, > { "n25q256a",

[PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Graham Moore
Some new Micron flash chips require reading the flag status register to determine when operations have completed. Furthermore, chips with multi-die stacks of the 65nm 256Mb QSPI also require reading the status register before reading the flag status register. This patch adds support for the flag

[PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Graham Moore
I rebased this patch onto the l2-mtd spinor branch. Sorry it took so long, had to patch for our SoC, corporate network issues, etc. The change to read the flag status register is, afaik, specific to Micron chips. So, imo, the fsr ready check should be in the m25p80.c file. But I put it into

[PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Graham Moore
I rebased this patch onto the l2-mtd spinor branch. Sorry it took so long, had to patch for our SoC, corporate network issues, etc. The change to read the flag status register is, afaik, specific to Micron chips. So, imo, the fsr ready check should be in the m25p80.c file. But I put it into

[PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Graham Moore
Some new Micron flash chips require reading the flag status register to determine when operations have completed. Furthermore, chips with multi-die stacks of the 65nm 256Mb QSPI also require reading the status register before reading the flag status register. This patch adds support for the flag

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Marek Vasut
On Tuesday, April 22, 2014 at 04:03:16 PM, Graham Moore wrote: [...] #define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \ @@ -488,6 +534,8 @@ const struct spi_device_id spi_nor_ids[] = { { n25q128a13, INFO(0x20ba18, 0, 64 * 1024, 256, 0) }, { n25q256a,

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Gerhard Sittig
On Tue, 2014-04-22 at 09:03 -0500, Graham Moore wrote: --- V3: Rebase to l2-mtd spinor branch. V2: Remove leading underscore in function names. Remove type cast in dev_err call and use the proper format specifier instead. the patch appears to not have dev_err() references, were they

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Graham Moore
On Tue, Apr 22, 2014 at 11:55 AM, Marek Vasut ma...@denx.de wrote: Are you sure the n25q512a doesn't use FSR ? Do n25q512a{1,8}3 share the same IDs? I looked at the datasheet and the n25q512a *does* have the same FSR usage note, so I suppose I should add USE_FSR to it as well. But how is it

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Marek Vasut
On Tuesday, April 22, 2014 at 08:48:21 PM, Graham Moore wrote: On Tue, Apr 22, 2014 at 11:55 AM, Marek Vasut ma...@denx.de wrote: Are you sure the n25q512a doesn't use FSR ? Do n25q512a{1,8}3 share the same IDs? I looked at the datasheet and the n25q512a *does* have the same FSR usage

Re: [PATCH V3] Add support for flag status register on Micron chips.

2014-04-22 Thread Graham Moore
On Tue, Apr 22, 2014 at 1:45 PM, Gerhard Sittig g...@denx.de wrote: the patch appears to not have dev_err() references, were they removed? see below [...] this emits a message that an error has occured, but doesn't tell where it occured -- can you dev_err() here to make the message even more