Hi Fabio,

about a one and a half year ago I stumbled across exactly the same Problem. SST 
reports it's flashes size twice, one time as "Blocks" and once again as 
"Sectors". I did a workaround for exactly this problem.
(See http://www.mail-archive.com/uclinux-dev@uclinux.org/msg05737.html ).

Please find attached the corresponding Patches. Unfortunately I haven't tested 
them on the most recent Kernels, but you might at least have hint where to 
search ;).

Best Regards,
  Peter


Attachment: cfi_cmdset_0002.patch
Description: Binary data

Attachment: cfi_probe.patch
Description: Binary data


On Mar 8, 2010, at 9:31 AM, Fabio Giovagnini wrote:

> Your patch seems not working. But the problem is teh follwing; maybe a fake 
> of mine;
> 
> cfi->cfiq->DevSize: 0x00000017
> 
> cfi->interleave: 1
> 
> number of CFI chips: 1
> 
> cfi->cfiq->NumEraseRegions: 2
> 
> cfi->numchips: 1
> 
> mtd->numeraseregions: 2
> 
> cfi->interleave: 1
> 
> Sum of regions (1000000) != total size of set of interleaved chips (800000)
> 
> 
> 
> Now I'm trying the jedec interface
> 
> 
> I'll let you know.
> 
> 
> 
> Alle 10:50, domenica 7 marzo 2010, Fabio Giovagnini ha scritto:
> 
> > Could you write the funciton where I have to act?
> 
> > I agree the issue about a bug into the cfi_cmdset_0002.c
> 
> >
> 
> > Ciao
> 
> >
> 
> > Alle 10:47, domenica 7 marzo 2010, Fabio Giovagnini ha scritto:
> 
> > > Ok I'll try.
> 
> > >
> 
> > > Alle 02:17, domenica 7 marzo 2010, Erwin Authried ha scritto:
> 
> > > > Am Samstag, den 06.03.2010, 16:59 -0500 schrieb Mike Frysinger:
> 
> > > > > On Saturday 06 March 2010 12:17:12 Fabio Giovagnini wrote:
> 
> > > > > > According to you, it is easier to add jedec entry or it is better
> 
> > > > > > to modify cfi_cmdset_0002.c?
> 
> > > > > > I'm newbe, so I aks: what could be the trade off between the two
> 
> > > > > > solutions?
> 
> > > > >
> 
> > > > > one can be sent upstream (jedec) and one cannot (hacking cmdset in
> 
> > > > > non- standard ways)
> 
> > > > > -mike
> 
> > > >
> 
> > > > I took a look at AMD's CFI specification. Both of the extended query
> 
> > > > tables are optional. Thus, it looks like relying that at least one of
> 
> > > > those tables exist is a bug in cfi_cmdset_0002. I believe this can be
> 
> > > > fixed this way:
> 
> > > >
> 
> > > > ...
> 
> > > > __u16 adr = primary?cfi->cfiq->P_ADR:cfi->cfiq->A_ADR;
> 
> > > > if (cfi->cfi_mode==CFI_MODE_CFI && adr){
> 
> > > > unsigned char bootloc;
> 
> > > > /*
> 
> > > > * It's a real CFI chip, not one for which the probe
> 
> > > > * routine faked a CFI structure. So we read the feature
> 
> > > > * table from it.
> 
> > > > */
> 
> > > > struct cfi_pri_amdstd *extp;
> 
> > > > ...
> 
> > > >
> 
> > > > Fabio, would you like to try if this works? I don't have a flash
> 
> > > > without extended query table, thus I can't test this.
> 
> > > >
> 
> > > > -Erwin
> 
> > > >
> 
> > > > _______________________________________________
> 
> > > > uClinux-dev mailing list
> 
> > > > uClinux-dev@uclinux.org
> 
> > > > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> 
> > > > This message was resent by uclinux-dev@uclinux.org
> 
> > > > To unsubscribe see:
> 
> > > > http://mailman.uclinux.org/mailman/options/uclinux-dev
> 
> 
> --
> 
> Fabio Giovagnini
> 
> 
> Aurion s.r.l.
> 
> CF e P.IVA 00885711200
> 
> Tel. +39.051.594.78.24
> 
> Cell. +39.335.8350919
> 
> 
> www.aurion-tech.com
> 
> 
> account telefono VoIP skype (www.skype.com):
> 
> aurion.giovagnini
> 
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev@uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev@uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to