Re: [U-Boot] [PATCH 0/2] Disable hybrid mode for SPANSION S25FS-S family

2017-11-02 Thread Rajat Srivastava


> -Original Message-
> From: Jagan Teki [mailto:jagannadh.t...@gmail.com]
> Sent: Tuesday, October 31, 2017 1:32 PM
> To: Rajat Srivastava 
> Cc: u-boot@lists.denx.de; York Sun ; Suresh Gupta
> 
> Subject: Re: [PATCH 0/2] Disable hybrid mode for SPANSION S25FS-S family
> 
> On Mon, Oct 30, 2017 at 5:23 PM, Rajat Srivastava 
> wrote:
> >> On Mon, Oct 30, 2017 at 11:52 AM, Jagan Teki
> >> 
> >> wrote:
> >> > On Mon, Oct 16, 2017 at 12:54 PM, Rajat Srivastava
> >> >  wrote:
> >> >> The S25FS-S family physical sectors may be configured as a hybrid
> >> >> combination of eight 4-kB parameter sectors at the top or bottom
> >> >> of the address space with all but one of the remaining sectors
> >> >> being uniform size. The default status of the flash is the hybrid
> >> >> architecture.
> >> >>
> >> >> Since the parameter sectors and the uniform sectors have different
> >> >> erase commands, it is a problem to implement erase functionality
> >> >> for hybrid mode in current U-boot code. Also, enabling hybrid mode
> >> >> doesn't provide any significant benefit.
> >> >
> >> > I think I've asked this question before, keeping the state of the
> >> > flash remains same. Can't erase parameter and uniform sectors
> >> > individually during operations like
> >> > - parameter sectors with erase commands (20h or 21h)
> >> > - uniform sectors with erase commands (D8h or DCh)
> >>
> >> I understand that even we can do parameter and uniform sectors
> >> individually with the help of offsets we still have 224. Any idea why
> >> we need hybrid mode with this off 244 sector size? if require we can even
> write cypress on this case.
> >>
> > Hi Jagan
> >
> > I am not aware of usage of the remaining 244 sector area. We will discuss 
> > this
> with Cypress.
> >
> > Moreover, do you have any idea where we apply offset based checks in code?
> And if we do apply checks, will that look good with current Uboot code?
> > I think no one is going to use hybrid mode and even if someone wants to, 
> > they
> can modify the code.
> 
> We can change the erase opcode based on the offsets in erase ops, since if we
> disable hybrid now, if someone want to re-enable for another reason (say some
> kind of protection PB, not sure) will end-up conflict. Better we can ask 
> Cypress
> about this and mean while we can post this change on spi-nor Linux for further
> discussion.
> 
Thanks Jagan. I am working on creating a similar patch in Linux.

Best regards
Rajat
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 0/2] Disable hybrid mode for SPANSION S25FS-S family

2017-10-31 Thread Jagan Teki
On Mon, Oct 30, 2017 at 5:23 PM, Rajat Srivastava
 wrote:
>> On Mon, Oct 30, 2017 at 11:52 AM, Jagan Teki 
>> wrote:
>> > On Mon, Oct 16, 2017 at 12:54 PM, Rajat Srivastava
>> >  wrote:
>> >> The S25FS-S family physical sectors may be configured as a hybrid
>> >> combination of eight 4-kB parameter sectors at the top or bottom of
>> >> the address space with all but one of the remaining sectors being
>> >> uniform size. The default status of the flash is the hybrid
>> >> architecture.
>> >>
>> >> Since the parameter sectors and the uniform sectors have different
>> >> erase commands, it is a problem to implement erase functionality for
>> >> hybrid mode in current U-boot code. Also, enabling hybrid mode
>> >> doesn't provide any significant benefit.
>> >
>> > I think I've asked this question before, keeping the state of the
>> > flash remains same. Can't erase parameter and uniform sectors
>> > individually during operations like
>> > - parameter sectors with erase commands (20h or 21h)
>> > - uniform sectors with erase commands (D8h or DCh)
>>
>> I understand that even we can do parameter and uniform sectors individually
>> with the help of offsets we still have 224. Any idea why we need hybrid mode
>> with this off 244 sector size? if require we can even write cypress on this 
>> case.
>>
> Hi Jagan
>
> I am not aware of usage of the remaining 244 sector area. We will discuss 
> this with Cypress.
>
> Moreover, do you have any idea where we apply offset based checks in code? 
> And if we do apply checks, will that look good with current Uboot code?
> I think no one is going to use hybrid mode and even if someone wants to, they 
> can modify the code.

We can change the erase opcode based on the offsets in erase ops,
since if we disable hybrid now, if someone want to re-enable for
another reason (say some kind of protection PB, not sure) will end-up
conflict. Better we can ask Cypress about this and mean while we can
post this change on spi-nor Linux for further discussion.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 0/2] Disable hybrid mode for SPANSION S25FS-S family

2017-10-30 Thread Rajat Srivastava
> On Mon, Oct 30, 2017 at 11:52 AM, Jagan Teki 
> wrote:
> > On Mon, Oct 16, 2017 at 12:54 PM, Rajat Srivastava
> >  wrote:
> >> The S25FS-S family physical sectors may be configured as a hybrid
> >> combination of eight 4-kB parameter sectors at the top or bottom of
> >> the address space with all but one of the remaining sectors being
> >> uniform size. The default status of the flash is the hybrid
> >> architecture.
> >>
> >> Since the parameter sectors and the uniform sectors have different
> >> erase commands, it is a problem to implement erase functionality for
> >> hybrid mode in current U-boot code. Also, enabling hybrid mode
> >> doesn't provide any significant benefit.
> >
> > I think I've asked this question before, keeping the state of the
> > flash remains same. Can't erase parameter and uniform sectors
> > individually during operations like
> > - parameter sectors with erase commands (20h or 21h)
> > - uniform sectors with erase commands (D8h or DCh)
> 
> I understand that even we can do parameter and uniform sectors individually
> with the help of offsets we still have 224. Any idea why we need hybrid mode
> with this off 244 sector size? if require we can even write cypress on this 
> case.
> 
Hi Jagan

I am not aware of usage of the remaining 244 sector area. We will discuss this 
with Cypress.

Moreover, do you have any idea where we apply offset based checks in code? And 
if we do apply checks, will that look good with current Uboot code?
I think no one is going to use hybrid mode and even if someone wants to, they 
can modify the code.

Thanks
Rajat
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 0/2] Disable hybrid mode for SPANSION S25FS-S family

2017-10-30 Thread Jagan Teki
On Mon, Oct 30, 2017 at 11:52 AM, Jagan Teki  wrote:
> On Mon, Oct 16, 2017 at 12:54 PM, Rajat Srivastava
>  wrote:
>> The S25FS-S family physical sectors may be configured as a hybrid
>> combination of eight 4-kB parameter sectors at the top or bottom
>> of the address space with all but one of the remaining sectors
>> being uniform size. The default status of the flash is the hybrid
>> architecture.
>>
>> Since the parameter sectors and the uniform sectors have different
>> erase commands, it is a problem to implement erase functionality for
>> hybrid mode in current U-boot code. Also, enabling hybrid mode doesn't
>> provide any significant benefit.
>
> I think I've asked this question before, keeping the state of the
> flash remains same. Can't erase parameter and uniform sectors
> individually during operations like
> - parameter sectors with erase commands (20h or 21h)
> - uniform sectors with erase commands (D8h or DCh)

I understand that even we can do parameter and uniform sectors
individually with the help of offsets we still have 224. Any idea why
we need hybrid mode with this off 244 sector size? if require we can
even write cypress on this case.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 0/2] Disable hybrid mode for SPANSION S25FS-S family

2017-10-30 Thread Jagan Teki
On Mon, Oct 16, 2017 at 12:54 PM, Rajat Srivastava
 wrote:
> The S25FS-S family physical sectors may be configured as a hybrid
> combination of eight 4-kB parameter sectors at the top or bottom
> of the address space with all but one of the remaining sectors
> being uniform size. The default status of the flash is the hybrid
> architecture.
>
> Since the parameter sectors and the uniform sectors have different
> erase commands, it is a problem to implement erase functionality for
> hybrid mode in current U-boot code. Also, enabling hybrid mode doesn't
> provide any significant benefit.

I think I've asked this question before, keeping the state of the
flash remains same. Can't erase parameter and uniform sectors
individually during operations like
- parameter sectors with erase commands (20h or 21h)
- uniform sectors with erase commands (D8h or DCh)

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 0/2] Disable hybrid mode for SPANSION S25FS-S family

2017-10-16 Thread Rajat Srivastava
The S25FS-S family physical sectors may be configured as a hybrid
combination of eight 4-kB parameter sectors at the top or bottom
of the address space with all but one of the remaining sectors
being uniform size. The default status of the flash is the hybrid
architecture.

Since the parameter sectors and the uniform sectors have different
erase commands, it is a problem to implement erase functionality for
hybrid mode in current U-boot code. Also, enabling hybrid mode doesn't
provide any significant benefit.

There is a configuration option to disable the hybrid mode so that all
sectors are of uniform size (256 kbytes). This set of patches disables
the above mentioned hybrid mode in Spansion S25FS-S family of flashes.

Rajat Srivastava (2):
  sf: Disable hybrid mode for SPANSION S25FS-S family
  sf: Fix s25fs512s erase size and remove SECT_4K flag

 drivers/mtd/spi/sf_internal.h   |  7 +
 drivers/mtd/spi/spi_flash.c | 65 +
 drivers/mtd/spi/spi_flash_ids.c |  2 +-
 3 files changed, 73 insertions(+), 1 deletion(-)

-- 
2.7.4

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot