From 79d838d31696542105a4185758f23db13d8ea045 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Wed, 27 Sep 2017 09:25:34 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/21702 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- nicintel_eeprom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nicintel_eeprom.c') 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; -- cgit v1.2.1