David Hendricks merged this change.

View Change

Approvals: Nico Huber: Looks good to me, approved build bot (Jenkins): Verified
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>
---
M nicintel_eeprom.c
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/nicintel_eeprom.c b/nicintel_eeprom.c
index e2fb584..e4a91ef 100644
--- a/nicintel_eeprom.c
+++ b/nicintel_eeprom.c
@@ -211,7 +211,8 @@
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 @@
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;

To view, visit change 21702. To unsubscribe, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7ad5a69244e462f84eae93df9e841716e089b31
Gerrit-Change-Number: 21702
Gerrit-PatchSet: 3
Gerrit-Owner: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner@gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>