- init_at25040 ( &efab->falcon_eeprom );
- } else {
- init_mc25xx640 ( &efab->falcon_eeprom );
- /* Falcon's SPI interface cannot support a block size
- * larger than 16, so forcibly reduce it
- */
- efab->falcon_eeprom.nvs.block_size = 16;
+ }
+
+ /* Initialise EEPROM if present */
+ if ( efab->has_eeprom ) {
+ if ( efab->is_asic ) {
+ falcon_read ( efab, ®, FCN_VPD_CONFIG_REG_KER );
+ eeprom_9bit = EFAB_OWORD_FIELD ( reg, FCN_VPD_9BIT );
+ } else {
+ eeprom_9bit = 1;
+ }
+ if ( eeprom_9bit ) {
+ DBG ( "Small EEPROM is present\n" );
+ init_at25040 ( &efab->falcon_eeprom );
+ } else {
+ DBG ( "Large EEPROM is present\n" );
+ init_mc25xx640 ( &efab->falcon_eeprom );
+ /* Falcon's SPI interface cannot support a block
+ size larger than 16, so forcibly reduce it
+ */
+ efab->falcon_eeprom.nvs.block_size = 16;
+ }