summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2017-10-09 21:06:27 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-10-16 10:25:55 +0200
commit2be8662f257e32370062fe5cdbbf7fb2eb1ff44e (patch)
tree68aebe17fd395f1d3b0b95d80667cc5d1fad9935 /drivers
parent222820987a866e61d20b0172a038b735de50dda4 (diff)
downloadbarebox-2be8662f257e32370062fe5cdbbf7fb2eb1ff44e.tar.gz
barebox-2be8662f257e32370062fe5cdbbf7fb2eb1ff44e.tar.xz
e1000: Don't poll for FLSWCTL.GLDONE before starting a flash transaction
While FLSWCTL.GLDONE is set when the last transaction was fully completed, there is no good reason to depend on this. According to the i210 datasheet having FLSWCTL.DONE is enough. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/e1000/eeprom.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c
index 739bc17a51..2a71fb1b15 100644
--- a/drivers/net/e1000/eeprom.c
+++ b/drivers/net/e1000/eeprom.c
@@ -701,17 +701,8 @@ static int32_t e1000_spi_eeprom_ready(struct e1000_hw *hw)
static int e1000_flash_mode_wait_for_idle(struct e1000_hw *hw)
{
- /* Strictly speaking we need to poll FLSWCTL.DONE only if we
- * are executing this code after a reset event, but it
- * shouldn't hurt to do this everytime, besided we need to
- * poll got FLSWCTL.GLDONE to make sure that back to back
- * calls to that function work correctly, since we finish
- * execution by polling only FLSWCTL.DONE */
-
- const int ret = e1000_poll_reg(hw, E1000_FLSWCTL,
- E1000_FLSWCTL_DONE | E1000_FLSWCTL_GLDONE,
- E1000_FLSWCTL_DONE | E1000_FLSWCTL_GLDONE,
- SECOND);
+ const int ret = e1000_poll_reg(hw, E1000_FLSWCTL, E1000_FLSWCTL_DONE,
+ E1000_FLSWCTL_DONE, SECOND);
if (ret < 0)
dev_err(hw->dev,
"Timeout waiting for FLSWCTL.DONE to be set\n");