summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2017-10-10 17:38:07 +0200
committerNico Huber <nico.h@gmx.de>2017-11-04 16:07:14 +0000
commita4b1d5b446ebd26bbd7020b666e8df4944502253 (patch)
tree886ebd0f9d8fde9272f51c148839564396ed633f
parentf4d7772cee806d68a06db5394ab85a6e76904e88 (diff)
downloadflashrom-a4b1d5b446ebd26bbd7020b666e8df4944502253.tar.gz
flashrom-a4b1d5b446ebd26bbd7020b666e8df4944502253.tar.bz2
flashrom-a4b1d5b446ebd26bbd7020b666e8df4944502253.zip
fixup! nicintel_eeprom: Support for I210 emulated EEprom
Fix is_i210(), add a comment and break an overlong line. Change-Id: I5d3f71e4e0f77cc8793e7f395baf69e1fad930a3 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/21934 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com> (cherry picked from commit 4343e7d44006dcda2ea76b0e7625837832141539) Reviewed-on: https://review.coreboot.org/22331
-rw-r--r--nicintel_eeprom.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/nicintel_eeprom.c b/nicintel_eeprom.c
index e4a91efc3..c78758053 100644
--- a/nicintel_eeprom.c
+++ b/nicintel_eeprom.c
@@ -80,6 +80,10 @@ static bool done_i20_write = false;
#define UNPROG_DEVICE 0x1509
+/*
+ * Warning: is_i210() below makes assumptions on these PCI ids.
+ * It may have to be updated when this list is extended.
+ */
const struct dev_entry nics_intel_ee[] = {
{PCI_VENDOR_ID_INTEL, 0x150e, OK, "Intel", "82580 Quad Gigabit Ethernet Controller (Copper)"},
{PCI_VENDOR_ID_INTEL, 0x150f, NT , "Intel", "82580 Quad Gigabit Ethernet Controller (Fiber)"},
@@ -99,7 +103,7 @@ const struct dev_entry nics_intel_ee[] = {
static inline bool is_i210(uint16_t device_id)
{
- return (device_id & 0xff00) == 0x1500;
+ return (device_id & 0xfff0) == 0x1530;
}
static int nicintel_ee_probe_i210(struct flashctx *flash)
@@ -218,7 +222,8 @@ static int nicintel_ee_write_word_i210(unsigned int addr, uint16_t data)
return -1;
}
-static int nicintel_ee_write_i210(struct flashctx *flash, const uint8_t *buf, unsigned int addr, unsigned int len)
+static int nicintel_ee_write_i210(struct flashctx *flash, const uint8_t *buf,
+ unsigned int addr, unsigned int len)
{
done_i20_write = true;