[nvo] Remove the non-volatile options fragment list

Since its implementation several years ago, no driver has used a
fragment list containing more than a single fragment.  Simplify the
NVO core and the drivers that use it by removing the whole concept of
the fragment list, and using a simple (address,length) pair instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2010-11-30 01:10:38 +00:00
parent 8f8b55f187
commit 1651d4f6d7
6 changed files with 50 additions and 111 deletions

View File

@@ -130,15 +130,6 @@ static struct bit_basher_operations natsemi_basher_ops = {
.write = natsemi_spi_write_bit,
};
/* It looks that this portion of EEPROM can be used for
* non-volatile stored options. Data sheet does not talk about this region.
* Currently it is not working. But with some efforts it can.
*/
static struct nvo_fragment natsemi_nvo_fragments[] = {
{ 0x0c, 0x68 },
{ 0, 0 }
};
/*
* Set up for EEPROM access
*
@@ -157,8 +148,13 @@ static void natsemi_init_eeprom ( struct natsemi_private *np ) {
*/
init_at93c46 ( &np->eeprom, 16 );
np->eeprom.bus = &np->spibit.bus;
np->nvo.nvs = &np->eeprom.nvs;
np->nvo.fragments = natsemi_nvo_fragments;
/* It looks that this portion of EEPROM can be used for
* non-volatile stored options. Data sheet does not talk about
* this region. Currently it is not working. But with some
* efforts it can.
*/
nvo_init ( &np->nvo, &np->eeprom.nvs, 0x0c, 0x68, NULL );
}
/**