1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-06-30 21:52:36 +02:00

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>
This commit is contained in:
David Hendricks
2017-09-27 09:25:34 -07:00
committed by David Hendricks
parent 75a2a79aeb
commit 79d838d316

View File

@ -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;