|
@@ -132,8 +132,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
|
|
|
inl(dw_PCIBoardEepromAddress +
|
|
|
AMCC_OP_REG_MCSR);
|
|
|
dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
|
|
|
- }
|
|
|
- while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
+ } while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
|
|
|
for (i_Counter = 0; i_Counter < 2; i_Counter++) {
|
|
|
b_SelectedAddressLow = (w_EepromStartAddress + i_Counter) % 256; /* Read the low 8 bit part */
|
|
@@ -150,8 +149,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
|
|
|
inl(dw_PCIBoardEepromAddress +
|
|
|
AMCC_OP_REG_MCSR);
|
|
|
dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
|
|
|
- }
|
|
|
- while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
+ } while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
|
|
|
/* Load the low address */
|
|
|
outb(b_SelectedAddressLow,
|
|
@@ -164,8 +162,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
|
|
|
inl(dw_PCIBoardEepromAddress +
|
|
|
AMCC_OP_REG_MCSR);
|
|
|
dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
|
|
|
- }
|
|
|
- while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
+ } while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
|
|
|
/* Select the load high address mode */
|
|
|
outb(NVCMD_LOAD_HIGH,
|
|
@@ -178,8 +175,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
|
|
|
inl(dw_PCIBoardEepromAddress +
|
|
|
AMCC_OP_REG_MCSR);
|
|
|
dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
|
|
|
- }
|
|
|
- while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
+ } while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
|
|
|
/* Load the high address */
|
|
|
outb(b_SelectedAddressHigh,
|
|
@@ -192,8 +188,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
|
|
|
inl(dw_PCIBoardEepromAddress +
|
|
|
AMCC_OP_REG_MCSR);
|
|
|
dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
|
|
|
- }
|
|
|
- while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
+ } while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
|
|
|
/* Select the READ mode */
|
|
|
outb(NVCMD_BEGIN_READ,
|
|
@@ -206,8 +201,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
|
|
|
inl(dw_PCIBoardEepromAddress +
|
|
|
AMCC_OP_REG_MCSR);
|
|
|
dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
|
|
|
- }
|
|
|
- while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
+ } while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
|
|
|
/* Read data into the EEPROM */
|
|
|
*pb_ReadByte =
|
|
@@ -220,15 +214,14 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
|
|
|
inl(dw_PCIBoardEepromAddress +
|
|
|
AMCC_OP_REG_MCSR);
|
|
|
dw_eeprom_busy = dw_eeprom_busy & EEPROM_BUSY;
|
|
|
- }
|
|
|
- while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
+ } while (dw_eeprom_busy == EEPROM_BUSY);
|
|
|
|
|
|
/* Select the upper address part */
|
|
|
- if (i_Counter == 0) {
|
|
|
+ if (i_Counter == 0)
|
|
|
b_ReadLowByte = pb_ReadByte[0];
|
|
|
- } else {
|
|
|
+ else
|
|
|
b_ReadHighByte = pb_ReadByte[0];
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
/* Sleep */
|
|
|
for (i = 0; i < 10000; i++) ;
|