[PATCH] Revised the detection for broken boot-region detection. MACRONIX parts have a custom implementation of the fixup. AMD implemtation restore to original version that has worked fine since 2001.

Marc Oscar Singer elf at synapse.com
Thu Dec 18 11:44:24 EST 2008


IMHO, it would be better to leave the AMD fixup code as it was.  It 
works fine for the AMD parts.  My comment about
changing what was already working has to do with the fact that editing 
the AMD fixup code is modifying working code.
The number of bytes saved because we don't have to check bit 7 twice in 
the default is nominal.  The fixup table
was changed to call the same function for two different manufacturers, 
so we had to add an explicit check for the manufacturer
in the fixup routine.  Why bother?  The AMD fixup is stable and 
working.  As far as I know, AMD isn't making more NOR flash,
so we are in a good position for *not* breaking support for AMD parts.

So, instead, lets write a new fixup for the Macronix part.  Yes, we have 
to duplicate the bit 7 test, but the routine, overall, can
be a straightforward switch on the exceptional IDs with the default 
still checking bit 7.

So, the principles are

 1) leave working code alone.
 2) use existing mechanisms as they were intended (i.e. the fixup table 
that selects by manufacturer)

If you agree, then you should be able to make your changes on top of the 
patch that I already submitted.

Cheers.

-- 
Marc Singer
Bureau of Gizmology
elf at synapse.com
t. 206.832.3712
   800.682.0581
f. 206.381.0899

Synapse Product Development, LLC.
1511 6th Avenue, 4th floor
Seattle, WA 98101




More information about the linux-mtd mailing list