All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of CR3V
@ 2016-06-30  6:02 Gong Qianyu
  2016-06-30  6:50 ` Michael Trimarchi
  0 siblings, 1 reply; 7+ messages in thread
From: Gong Qianyu @ 2016-06-30  6:02 UTC (permalink / raw)
  To: u-boot

From: Mingkai Hu <mingkai.hu@nxp.com>

Set the flash to Uniform Sector Architecture in the non-volatile
register. After the power cycle, it's also Uniform Sector Architecture.

Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>

diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 64d4e0f..366c362 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -975,7 +975,7 @@ int spi_flash_decode_fdt(const void *blob, struct spi_flash *flash)
 static int spansion_s25fss_disable_4KB_erase(struct spi_slave *spi)
 {
 	u8 cmd[4];
-	u32 offset = 0x800004; /* CR3V register offset */
+	u32 offset = 0x4; /* CR3NV register offset */
 	u8 cr3v;
 	int ret;
 
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of CR3V
  2016-06-30  6:02 [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of CR3V Gong Qianyu
@ 2016-06-30  6:50 ` Michael Trimarchi
  2016-06-30  7:29   ` Mingkai Hu
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Trimarchi @ 2016-06-30  6:50 UTC (permalink / raw)
  To: u-boot

Hi

On Jun 30, 2016 08:47, "Gong Qianyu" <Qianyu.Gong@nxp.com> wrote:
>
> From: Mingkai Hu <mingkai.hu@nxp.com>
>
> Set the flash to Uniform Sector Architecture in the non-volatile
> register. After the power cycle, it's also Uniform Sector Architecture.
>
> Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
> Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
>
> diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
> index 64d4e0f..366c362 100644
> --- a/drivers/mtd/spi/spi_flash.c
> +++ b/drivers/mtd/spi/spi_flash.c
> @@ -975,7 +975,7 @@ int spi_flash_decode_fdt(const void *blob, struct
spi_flash *flash)
>  static int spansion_s25fss_disable_4KB_erase(struct spi_slave *spi)
>  {
>         u8 cmd[4];
> -       u32 offset = 0x800004; /* CR3V register offset */
> +       u32 offset = 0x4; /* CR3NV register offset */
>         u8 cr3v;
>         int ret;
>

I have already tested it and I have in my tree. I don't think that should
be mandatory in general

Michael

> --
> 2.1.0.27.g96db324
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of CR3V
  2016-06-30  6:50 ` Michael Trimarchi
@ 2016-06-30  7:29   ` Mingkai Hu
  2016-06-30  7:32     ` Michael Trimarchi
  0 siblings, 1 reply; 7+ messages in thread
From: Mingkai Hu @ 2016-06-30  7:29 UTC (permalink / raw)
  To: u-boot



From: Michael Trimarchi [mailto:michael at amarulasolutions.com]
Sent: Thursday, June 30, 2016 2:50 PM
To: Qianyu Gong
Cc: Mingkai Hu; u-boot at lists.denx.de; Yunhui Cui; jteki at openedev.com
Subject: Re: [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of CR3V


Hi

On Jun 30, 2016 08:47, "Gong Qianyu" <Qianyu.Gong at nxp.com<mailto:Qianyu.Gong@nxp.com>> wrote:
>
> From: Mingkai Hu <mingkai.hu at nxp.com<mailto:mingkai.hu@nxp.com>>
>
> Set the flash to Uniform Sector Architecture in the non-volatile
> register. After the power cycle, it's also Uniform Sector Architecture.
>
> Signed-off-by: Mingkai Hu <mingkai.hu at nxp.com<mailto:mingkai.hu@nxp.com>>
> Signed-off-by: Gong Qianyu <Qianyu.Gong at nxp.com<mailto:Qianyu.Gong@nxp.com>>
>
> diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
> index 64d4e0f..366c362 100644
> --- a/drivers/mtd/spi/spi_flash.c
> +++ b/drivers/mtd/spi/spi_flash.c
> @@ -975,7 +975,7 @@ int spi_flash_decode_fdt(const void *blob, struct spi_flash *flash)
>  static int spansion_s25fss_disable_4KB_erase(struct spi_slave *spi)
>  {
>         u8 cmd[4];
> -       u32 offset = 0x800004; /* CR3V register offset */
> +       u32 offset = 0x4; /* CR3NV register offset */
>         u8 cr3v;
>         int ret;
>

I have already tested it and I have in my tree.

What does this mean?

I don't think that should be mandatory in general

The general code doesn?t handle different sector operation, so need to set it as uniform sector architecture.

Michael

> --
> 2.1.0.27.g96db324
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de<mailto:U-Boot@lists.denx.de>
> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of CR3V
  2016-06-30  7:29   ` Mingkai Hu
@ 2016-06-30  7:32     ` Michael Trimarchi
  2016-06-30  7:40       ` Mingkai Hu
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Trimarchi @ 2016-06-30  7:32 UTC (permalink / raw)
  To: u-boot

Hi


On Thu, Jun 30, 2016 at 9:29 AM, Mingkai Hu <mingkai.hu@nxp.com> wrote:
>
>
>
>
> From: Michael Trimarchi [mailto:michael at amarulasolutions.com]
> Sent: Thursday, June 30, 2016 2:50 PM
> To: Qianyu Gong
> Cc: Mingkai Hu; u-boot at lists.denx.de; Yunhui Cui; jteki at openedev.com
> Subject: Re: [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of
> CR3V
>
>
>
> Hi
>
> On Jun 30, 2016 08:47, "Gong Qianyu" <Qianyu.Gong@nxp.com> wrote:
>>
>> From: Mingkai Hu <mingkai.hu@nxp.com>
>>
>> Set the flash to Uniform Sector Architecture in the non-volatile
>> register. After the power cycle, it's also Uniform Sector Architecture.
>>
>> Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
>> Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
>>
>> diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
>> index 64d4e0f..366c362 100644
>> --- a/drivers/mtd/spi/spi_flash.c
>> +++ b/drivers/mtd/spi/spi_flash.c
>> @@ -975,7 +975,7 @@ int spi_flash_decode_fdt(const void *blob, struct
>> spi_flash *flash)
>>  static int spansion_s25fss_disable_4KB_erase(struct spi_slave *spi)
>>  {
>>         u8 cmd[4];
>> -       u32 offset = 0x800004; /* CR3V register offset */
>> +       u32 offset = 0x4; /* CR3NV register offset */
>>         u8 cr3v;
>>         int ret;
>>
>
> I have already tested it and I have in my tree.
>
> What does this mean?
>
> I don't think that should be mandatory in general
>
> The general code doesn?t handle different sector operation, so need to set
> it as uniform sector architecture.
>

And what about board that does not use the flash in uboot but manage
in some other way. I'm not saying that
is wrong but I don't know if this setting must be no-volatile. Is it
something connected from booting on QSPI?

Michael

> Michael
>
>> --
>> 2.1.0.27.g96db324
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot



-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |

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

* [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of CR3V
  2016-06-30  7:32     ` Michael Trimarchi
@ 2016-06-30  7:40       ` Mingkai Hu
  2016-06-30  7:47         ` Michael Trimarchi
  0 siblings, 1 reply; 7+ messages in thread
From: Mingkai Hu @ 2016-06-30  7:40 UTC (permalink / raw)
  To: u-boot



> -----Original Message-----
> From: Michael Trimarchi [mailto:michael at amarulasolutions.com]
> Sent: Thursday, June 30, 2016 3:33 PM
> To: Mingkai Hu
> Cc: Qianyu Gong; u-boot at lists.denx.de; Yunhui Cui; jteki at openedev.com
> Subject: Re: [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of
> CR3V
> 
> Hi
> 
> 
> On Thu, Jun 30, 2016 at 9:29 AM, Mingkai Hu <mingkai.hu@nxp.com> wrote:
> >
> >
> >
> >
> > From: Michael Trimarchi [mailto:michael at amarulasolutions.com]
> > Sent: Thursday, June 30, 2016 2:50 PM
> > To: Qianyu Gong
> > Cc: Mingkai Hu; u-boot at lists.denx.de; Yunhui Cui; jteki at openedev.com
> > Subject: Re: [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV
> > instead of CR3V
> >
> >
> >
> > Hi
> >
> > On Jun 30, 2016 08:47, "Gong Qianyu" <Qianyu.Gong@nxp.com> wrote:
> >>
> >> From: Mingkai Hu <mingkai.hu@nxp.com>
> >>
> >> Set the flash to Uniform Sector Architecture in the non-volatile
> >> register. After the power cycle, it's also Uniform Sector Architecture.
> >>
> >> Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
> >> Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
> >>
> >> diff --git a/drivers/mtd/spi/spi_flash.c
> >> b/drivers/mtd/spi/spi_flash.c index 64d4e0f..366c362 100644
> >> --- a/drivers/mtd/spi/spi_flash.c
> >> +++ b/drivers/mtd/spi/spi_flash.c
> >> @@ -975,7 +975,7 @@ int spi_flash_decode_fdt(const void *blob, struct
> >> spi_flash *flash)  static int
> >> spansion_s25fss_disable_4KB_erase(struct spi_slave *spi)  {
> >>         u8 cmd[4];
> >> -       u32 offset = 0x800004; /* CR3V register offset */
> >> +       u32 offset = 0x4; /* CR3NV register offset */
> >>         u8 cr3v;
> >>         int ret;
> >>
> >
> > I have already tested it and I have in my tree.
> >
> > What does this mean?
> >
> > I don't think that should be mandatory in general
> >
> > The general code doesn?t handle different sector operation, so need to
> > set it as uniform sector architecture.
> >
> 
> And what about board that does not use the flash in uboot but manage in some
> other way. I'm not saying that is wrong but I don't know if this setting must be
> no-volatile. Is it something connected from booting on QSPI?
> 

If it was not used as uniform sector architecture, the spansion_s25fss_disable_4KB_erase
should not be called, correct?

Thanks,
Mingkai

> >
> >> --
> >> 2.1.0.27.g96db324
> >>
> >> _______________________________________________
> >> U-Boot mailing list
> >> U-Boot at lists.denx.de
> >> http://lists.denx.de/mailman/listinfo/u-boot
> 
> 
> 
> --
> | Michael Nazzareno Trimarchi                     Amarula Solutions BV |
> | COO  -  Founder                                      Cruquiuskade 47 |
> | +31(0)851119172                                 Amsterdam 1018 AM NL |
> |                  [`as] http://www.amarulasolutions.com               |

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

* [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of CR3V
  2016-06-30  7:40       ` Mingkai Hu
@ 2016-06-30  7:47         ` Michael Trimarchi
  2016-06-30  8:31           ` Mingkai Hu
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Trimarchi @ 2016-06-30  7:47 UTC (permalink / raw)
  To: u-boot

Hi

On Thu, Jun 30, 2016 at 9:40 AM, Mingkai Hu <mingkai.hu@nxp.com> wrote:
>
>
>> -----Original Message-----
>> From: Michael Trimarchi [mailto:michael at amarulasolutions.com]
>> Sent: Thursday, June 30, 2016 3:33 PM
>> To: Mingkai Hu
>> Cc: Qianyu Gong; u-boot at lists.denx.de; Yunhui Cui; jteki at openedev.com
>> Subject: Re: [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of
>> CR3V
>>
>> Hi
>>
>>
>> On Thu, Jun 30, 2016 at 9:29 AM, Mingkai Hu <mingkai.hu@nxp.com> wrote:
>> >
>> >
>> >
>> >
>> > From: Michael Trimarchi [mailto:michael at amarulasolutions.com]
>> > Sent: Thursday, June 30, 2016 2:50 PM
>> > To: Qianyu Gong
>> > Cc: Mingkai Hu; u-boot at lists.denx.de; Yunhui Cui; jteki at openedev.com
>> > Subject: Re: [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV
>> > instead of CR3V
>> >
>> >
>> >
>> > Hi
>> >
>> > On Jun 30, 2016 08:47, "Gong Qianyu" <Qianyu.Gong@nxp.com> wrote:
>> >>
>> >> From: Mingkai Hu <mingkai.hu@nxp.com>
>> >>
>> >> Set the flash to Uniform Sector Architecture in the non-volatile
>> >> register. After the power cycle, it's also Uniform Sector Architecture.
>> >>
>> >> Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
>> >> Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
>> >>
>> >> diff --git a/drivers/mtd/spi/spi_flash.c
>> >> b/drivers/mtd/spi/spi_flash.c index 64d4e0f..366c362 100644
>> >> --- a/drivers/mtd/spi/spi_flash.c
>> >> +++ b/drivers/mtd/spi/spi_flash.c
>> >> @@ -975,7 +975,7 @@ int spi_flash_decode_fdt(const void *blob, struct
>> >> spi_flash *flash)  static int
>> >> spansion_s25fss_disable_4KB_erase(struct spi_slave *spi)  {
>> >>         u8 cmd[4];
>> >> -       u32 offset = 0x800004; /* CR3V register offset */
>> >> +       u32 offset = 0x4; /* CR3NV register offset */
>> >>         u8 cr3v;
>> >>         int ret;
>> >>
>> >
>> > I have already tested it and I have in my tree.
>> >
>> > What does this mean?
>> >
>> > I don't think that should be mandatory in general
>> >
>> > The general code doesn?t handle different sector operation, so need to
>> > set it as uniform sector architecture.
>> >
>>
>> And what about board that does not use the flash in uboot but manage in some
>> other way. I'm not saying that is wrong but I don't know if this setting must be
>> no-volatile. Is it something connected from booting on QSPI?
>>
>
> If it was not used as uniform sector architecture, the spansion_s25fss_disable_4KB_erase
> should not be called, correct?
>

Ok, understand what you mean. You should just probe one time during
development and if you probe means that you want it configured.

Anyway as I said I have it in my tree. So I was just asking about
permanent setting


Michael

> Thanks,
> Mingkai
>
>> >
>> >> --
>> >> 2.1.0.27.g96db324
>> >>
>> >> _______________________________________________
>> >> U-Boot mailing list
>> >> U-Boot at lists.denx.de
>> >> http://lists.denx.de/mailman/listinfo/u-boot
>>
>>
>>
>> --
>> | Michael Nazzareno Trimarchi                     Amarula Solutions BV |
>> | COO  -  Founder                                      Cruquiuskade 47 |
>> | +31(0)851119172                                 Amsterdam 1018 AM NL |
>> |                  [`as] http://www.amarulasolutions.com               |



-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |

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

* [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of CR3V
  2016-06-30  7:47         ` Michael Trimarchi
@ 2016-06-30  8:31           ` Mingkai Hu
  0 siblings, 0 replies; 7+ messages in thread
From: Mingkai Hu @ 2016-06-30  8:31 UTC (permalink / raw)
  To: u-boot



> -----Original Message-----
> From: Michael Trimarchi [mailto:michael at amarulasolutions.com]
> Sent: Thursday, June 30, 2016 3:47 PM
> To: Mingkai Hu
> Cc: Qianyu Gong; u-boot at lists.denx.de; Yunhui Cui; jteki at openedev.com
> Subject: Re: [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of
> CR3V
> 
> Hi
> 
> On Thu, Jun 30, 2016 at 9:40 AM, Mingkai Hu <mingkai.hu@nxp.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: Michael Trimarchi [mailto:michael at amarulasolutions.com]
> >> Sent: Thursday, June 30, 2016 3:33 PM
> >> To: Mingkai Hu
> >> Cc: Qianyu Gong; u-boot at lists.denx.de; Yunhui Cui; jteki at openedev.com
> >> Subject: Re: [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV
> >> instead of CR3V
> >>
> >> Hi
> >>
> >>
> >> On Thu, Jun 30, 2016 at 9:29 AM, Mingkai Hu <mingkai.hu@nxp.com> wrote:
> >> >
> >> >
> >> >
> >> >
> >> > From: Michael Trimarchi [mailto:michael at amarulasolutions.com]
> >> > Sent: Thursday, June 30, 2016 2:50 PM
> >> > To: Qianyu Gong
> >> > Cc: Mingkai Hu; u-boot at lists.denx.de; Yunhui Cui;
> >> > jteki at openedev.com
> >> > Subject: Re: [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV
> >> > instead of CR3V
> >> >
> >> >
> >> >
> >> > Hi
> >> >
> >> > On Jun 30, 2016 08:47, "Gong Qianyu" <Qianyu.Gong@nxp.com> wrote:
> >> >>
> >> >> From: Mingkai Hu <mingkai.hu@nxp.com>
> >> >>
> >> >> Set the flash to Uniform Sector Architecture in the non-volatile
> >> >> register. After the power cycle, it's also Uniform Sector Architecture.
> >> >>
> >> >> Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
> >> >> Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
> >> >>
> >> >> diff --git a/drivers/mtd/spi/spi_flash.c
> >> >> b/drivers/mtd/spi/spi_flash.c index 64d4e0f..366c362 100644
> >> >> --- a/drivers/mtd/spi/spi_flash.c
> >> >> +++ b/drivers/mtd/spi/spi_flash.c
> >> >> @@ -975,7 +975,7 @@ int spi_flash_decode_fdt(const void *blob,
> >> >> struct spi_flash *flash)  static int
> >> >> spansion_s25fss_disable_4KB_erase(struct spi_slave *spi)  {
> >> >>         u8 cmd[4];
> >> >> -       u32 offset = 0x800004; /* CR3V register offset */
> >> >> +       u32 offset = 0x4; /* CR3NV register offset */
> >> >>         u8 cr3v;
> >> >>         int ret;
> >> >>
> >> >
> >> > I have already tested it and I have in my tree.
> >> >
> >> > What does this mean?
> >> >
> >> > I don't think that should be mandatory in general
> >> >
> >> > The general code doesn?t handle different sector operation, so need
> >> > to set it as uniform sector architecture.
> >> >
> >>
> >> And what about board that does not use the flash in uboot but manage
> >> in some other way. I'm not saying that is wrong but I don't know if
> >> this setting must be no-volatile. Is it something connected from booting on
> QSPI?
> >>
> >
> > If it was not used as uniform sector architecture, the
> > spansion_s25fss_disable_4KB_erase should not be called, correct?
> >
> 
> Ok, understand what you mean. You should just probe one time during development
> and if you probe means that you want it configured.
> 

Yes, and if probed but not using the uniform sector, need to add the code to handle
different sectors operation and do not call the function on_s25fss_disable_4KB_erase.

> Anyway as I said I have it in my tree. So I was just asking about permanent
> setting
> 
> 
> Michael
> 
> > Thanks,
> > Mingkai
> >
> >> >
> >> >> --
> >> >> 2.1.0.27.g96db324
> >> >>
> >> >> _______________________________________________
> >> >> U-Boot mailing list
> >> >> U-Boot at lists.denx.de
> >> >> http://lists.denx.de/mailman/listinfo/u-boot
> >>
> >>
> >>
> >> --
> >> | Michael Nazzareno Trimarchi                     Amarula Solutions BV |
> >> | COO  -  Founder                                      Cruquiuskade 47 |
> >> | +31(0)851119172                                 Amsterdam 1018 AM NL |
> >> |                  [`as] http://www.amarulasolutions.com               |
> 
> 
> 
> --
> | Michael Nazzareno Trimarchi                     Amarula Solutions BV |
> | COO  -  Founder                                      Cruquiuskade 47 |
> | +31(0)851119172                                 Amsterdam 1018 AM NL |
> |                  [`as] http://www.amarulasolutions.com               |

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

end of thread, other threads:[~2016-06-30  8:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-30  6:02 [U-Boot] [PATCH] sf: set the Uniform Sector to CR3NV instead of CR3V Gong Qianyu
2016-06-30  6:50 ` Michael Trimarchi
2016-06-30  7:29   ` Mingkai Hu
2016-06-30  7:32     ` Michael Trimarchi
2016-06-30  7:40       ` Mingkai Hu
2016-06-30  7:47         ` Michael Trimarchi
2016-06-30  8:31           ` Mingkai Hu

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.