diff options
author | David Hendricks <dhendrix@chromium.org> | 2017-09-27 09:25:34 -0700 |
---|---|---|
committer | David Hendricks <david.hendricks@gmail.com> | 2017-10-03 00:23:34 +0000 |
commit | 79d838d31696542105a4185758f23db13d8ea045 (patch) | |
tree | 20162a2ada71c7ece57f96d9790ce8c7b791bb5c | |
parent | 75a2a79aebe9ffd0bcdb5f8d014d9e5583973014 (diff) | |
download | flashrom-79d838d31696542105a4185758f23db13d8ea045.tar.gz flashrom-79d838d31696542105a4185758f23db13d8ea045.tar.bz2 flashrom-79d838d31696542105a4185758f23db13d8ea045.zip |
fixup! nicintel_eeprom: Support for I210 emulated EEprom
A couple of C99-style variable declarations within loops are causing
compilation failures on some systems (gcc 4.9.2-10 on Raspbian). This
moves them to make gcc happy.
Change-Id: Ib7ad5a69244e462f84eae93df9e841716e089b31
Signed-off-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-on: https://review.coreboot.org/21702
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | nicintel_eeprom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nicintel_eeprom.c b/nicintel_eeprom.c index e2fb5848..e4a91efc 100644 --- a/nicintel_eeprom.c +++ b/nicintel_eeprom.c @@ -211,7 +211,8 @@ static int nicintel_ee_write_word_i210(unsigned int addr, uint16_t data) pci_mmio_writel(eewr, nicintel_eebar + EEWR); programmer_delay(5); - for (int i = 0; i < MAX_ATTEMPTS; i++) + int i; + for (i = 0; i < MAX_ATTEMPTS; i++) if (pci_mmio_readl(nicintel_eebar + EEWR) & BIT(EEWR_DONE)) return 0; return -1; @@ -419,7 +420,8 @@ static int nicintel_ee_shutdown_i210(void *arg) flup |= BIT(EE_FLUPD); pci_mmio_writel(flup, nicintel_eebar + EEC); - for (int i = 0; i < MAX_ATTEMPTS; i++) + int i; + for (i = 0; i < MAX_ATTEMPTS; i++) if (pci_mmio_readl(nicintel_eebar + EEC) & BIT(EE_FLUDONE)) return 0; |