public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] CFI: geometry reversal for STMicro M29W320DT
@ 2009-03-06 15:09 Richard Retanubun
  2009-03-06 15:27 ` Stefan Roese
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Retanubun @ 2009-03-06 15:09 UTC (permalink / raw)
  To: u-boot

Follow up to the flash_fixup_stm to fix geometry reversal
on STMicro M29W320ET flash chip. The M29W320DT has 4 erase region.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>

---
My baseline is 2009.03-rc1. If there are STMicro/Numonyx guys on
this mailing list, can you help provide a more 'generic' way of
detection? this way the exception list does not have to grow a lot.

  drivers/mtd/cfi_flash.c |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index a66feac..391d169 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -1806,8 +1806,9 @@ static void flash_fixup_stm(flash_info_t *info, struct cfi_qry *qry)
  	if (qry->num_erase_regions > 1) {
  		/* reverse geometry if top boot part */
  		if (info->cfi_version < 0x3131) {
-			/* CFI < 1.1, guess by device id (only M29W320ET now) */
-			if (info->device_id == 0x2256) {
+			/* CFI < 1.1, guess by device id (M29W320{DT,ET} only) */
+			if (info->device_id == 0x22CA ||
+			    info->device_id == 0x2256) {
  				cfi_reverse_geometry(qry);
  			}
  		}
-- 
1.5.6.5

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

* [U-Boot] [PATCH] CFI: geometry reversal for STMicro M29W320DT
  2009-03-06 15:09 [U-Boot] [PATCH] CFI: geometry reversal for STMicro M29W320DT Richard Retanubun
@ 2009-03-06 15:27 ` Stefan Roese
  2009-03-06 16:30   ` Richard Retanubun
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Roese @ 2009-03-06 15:27 UTC (permalink / raw)
  To: u-boot

On Friday 06 March 2009, Richard Retanubun wrote:
> Follow up to the flash_fixup_stm to fix geometry reversal
> on STMicro M29W320ET flash chip. The M29W320DT has 4 erase region.
>
> Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
>
> ---
> My baseline is 2009.03-rc1. If there are STMicro/Numonyx guys on
> this mailing list, can you help provide a more 'generic' way of
> detection? this way the exception list does not have to grow a lot.

Did you take a look at the Linux driver to see how this is handled there? 
Maybe they have a more "generic" solution...

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

* [U-Boot] [PATCH] CFI: geometry reversal for STMicro M29W320DT
  2009-03-06 15:27 ` Stefan Roese
@ 2009-03-06 16:30   ` Richard Retanubun
  2009-03-09  8:30     ` Stefan Roese
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Retanubun @ 2009-03-06 16:30 UTC (permalink / raw)
  To: u-boot

Stefan Roese wrote:
> On Friday 06 March 2009, Richard Retanubun wrote:
>> Follow up to the flash_fixup_stm to fix geometry reversal
>> on STMicro M29W320ET flash chip. The M29W320DT has 4 erase region.
>>
>> Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
>>
>> ---
>> My baseline is 2009.03-rc1. If there are STMicro/Numonyx guys on
>> this mailing list, can you help provide a more 'generic' way of
>> detection? this way the exception list does not have to grow a lot.
> 
> Did you take a look at the Linux driver to see how this is handled there? 
> Maybe they have a more "generic" solution...
Hi Stefan,

Thanks for the comments. I took a quick look around /drivers/mtd,
but can't find a similar geometry reversal.

Unfortunately, I found this in:

/driver/mtd/chips/cfi_cmdset_0001.c
[snip]
	{ CFI_MFR_ST, 0x00ba, /* M28W320CT */ fixup_st_m28w320ct, NULL },
	{ CFI_MFR_ST, 0x00bb, /* M28W320CB */ fixup_st_m28w320cb, NULL },
[/snip]

By no means am I a CFI expert, but my impression is,
if there has to be a part number specific fixup function for any reason,
then it is a good indication that there are just some part specific peculiarity.

What utilities exist in Linux-world to do the equivalent of "flinfo" in u-boot,
just so I can see if Linux has a more generic way.

And just in case it matters, our board with these flash is MMU-less,
so if there is a different tool for uCLinux that will help too :)

- Richard

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

* [U-Boot] [PATCH] CFI: geometry reversal for STMicro M29W320DT
  2009-03-06 16:30   ` Richard Retanubun
@ 2009-03-09  8:30     ` Stefan Roese
  2009-03-19 13:50       ` Richard Retanubun
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Roese @ 2009-03-09  8:30 UTC (permalink / raw)
  To: u-boot

On Friday 06 March 2009, Richard Retanubun wrote:
> >> My baseline is 2009.03-rc1. If there are STMicro/Numonyx guys on
> >> this mailing list, can you help provide a more 'generic' way of
> >> detection? this way the exception list does not have to grow a lot.
> >
> > Did you take a look at the Linux driver to see how this is handled there?
> > Maybe they have a more "generic" solution...
>
> Hi Stefan,
>
> Thanks for the comments. I took a quick look around /drivers/mtd,
> but can't find a similar geometry reversal.
>
> Unfortunately, I found this in:
>
> /driver/mtd/chips/cfi_cmdset_0001.c
> [snip]
> 	{ CFI_MFR_ST, 0x00ba, /* M28W320CT */ fixup_st_m28w320ct, NULL },
> 	{ CFI_MFR_ST, 0x00bb, /* M28W320CB */ fixup_st_m28w320cb, NULL },
> [/snip]
>
> By no means am I a CFI expert, but my impression is,
> if there has to be a part number specific fixup function for any reason,
> then it is a good indication that there are just some part specific
> peculiarity.

Right.

> What utilities exist in Linux-world to do the equivalent of "flinfo" in
> u-boot, just so I can see if Linux has a more generic way.

At this level you really need to "read" the code and/or use the embedded debug 
output (if available) or add some new code to see what's going on.

> And just in case it matters, our board with these flash is MMU-less,
> so if there is a different tool for uCLinux that will help too :)

I don't think that uCLinux has different "tools" here.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

* [U-Boot] [PATCH] CFI: geometry reversal for STMicro M29W320DT
  2009-03-09  8:30     ` Stefan Roese
@ 2009-03-19 13:50       ` Richard Retanubun
  2009-03-19 13:59         ` Stefan Roese
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Retanubun @ 2009-03-19 13:50 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

Just following up on this patch, the only other action I've seen on with regards to this is to fake the device
identification from top-boot to bottom boot, but I think this is more 'masking' the problem and
I don't have enough visibility to see if it is a safe thing to do.

In any case, even the reversal from top-boot to bottom-boot still
needs identification on a chip-per-chip basis.

In any case, I'd like to know if this patch is [ACK|NACK]?

Many thanks for your time.

- Richard

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

* [U-Boot] [PATCH] CFI: geometry reversal for STMicro M29W320DT
  2009-03-19 13:50       ` Richard Retanubun
@ 2009-03-19 13:59         ` Stefan Roese
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Roese @ 2009-03-19 13:59 UTC (permalink / raw)
  To: u-boot

Hi Richard,

On Thursday 19 March 2009, Richard Retanubun wrote:
> Just following up on this patch, the only other action I've seen on with
> regards to this is to fake the device identification from top-boot to
> bottom boot, but I think this is more 'masking' the problem and I don't
> have enough visibility to see if it is a safe thing to do.
>
> In any case, even the reversal from top-boot to bottom-boot still
> needs identification on a chip-per-chip basis.
>
> In any case, I'd like to know if this patch is [ACK|NACK]?

It's an ACK. Sorry, I forgot to take care of this patch. I'll apply it in 
quickly and ask Wolfgang to pull shortly so that this fix can be included in 
the upcoming 2009-03 release.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

end of thread, other threads:[~2009-03-19 13:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-06 15:09 [U-Boot] [PATCH] CFI: geometry reversal for STMicro M29W320DT Richard Retanubun
2009-03-06 15:27 ` Stefan Roese
2009-03-06 16:30   ` Richard Retanubun
2009-03-09  8:30     ` Stefan Roese
2009-03-19 13:50       ` Richard Retanubun
2009-03-19 13:59         ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox