Intel 324632-003 Switch User Manual


 
Flash Interface Operation — Intel
®
82575EB Gigabit Ethernet Controller
324632-003 Intel
®
82575EB Gigabit Ethernet Controller
Revision: 2.1 Software Developer’s Manual and EEPROM Guide
January 2011 49
/* Poll the ready bit to see if the MDI read completed */
for (i = 0; i < E1000_GEN_POLL_TIMEOUT; i++) {
usec_delay(5);
regvalue = E1000_READ_REG(reg);
if (regvalue & E1000_GEN_CTL_READY)
break;
}
if (!(regvalue & E1000_GEN_CTL_READY)) {
DEBUGOUT1("Reg %08x did not indicate ready\n", reg);
ret_val = -E1000_ERR_PHY;
}
return ret_val;
}
4.2 Flash Interface Operation
The 82575 provides two different methods for software access to the Flash.
Using legacy Flash transactions, the Flash is read from, or written to, each time the host processor
performs a read or a write operation to a memory location that is within the FLASH address mapping or
at boot via accesses in the space indicated by the Expansion ROM Base Address register. All accesses to
the Flash require the appropriate command sequence for the 82575 used. Refer to the specific Flash
data sheet for more details on reading from or writing to Flash.
Accesses to the Flash are based on a direct decode of processor accesses to a memory window defined
in either:
1. The 82575’s Flash Base Address register (PCIe* Control register at offset 14h or 18h).
2. A certain address range of the IOADDR register defined by the IO Base Address register (PCIe*
Control register at offset 18h or 20h).
3. The Expansion ROM Base Address register (PCIe* Control register at offset 30h).
The 82575 controls accesses to the Flash when it decodes a valid access.
Note: Flash read accesses must always be assembled by the 82575 each time the access is
greater than a byte-wide access.
The 82575 byte reads or writes to the Flash take on the order of 2 s. The 82575 continues
to issue retry accesses during this time.
The 82575 supports only byte writes to the Flash.
Another way for software to access the Flash is directly using the Flash's 4-wire interface through the
Flash Access register (FLA). It can use this for reads, writes, or other Flash operations (accessing the
Flash status register, erase, etc.).