From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH v2 3/3] e1000: Don't poll for FLSWCTL.GLDONE before starting a flash transaction
Date: Mon, 9 Oct 2017 21:06:27 +0200 [thread overview]
Message-ID: <20171009190627.2486-4-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20171009190627.2486-1-u.kleine-koenig@pengutronix.de>
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>
---
drivers/net/e1000/eeprom.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c
index 739bc17a519e..2a71fb1b159c 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");
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2017-10-09 19:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 19:06 [PATCH v2 0/3] e1000: fix access to companion flash chip Uwe Kleine-König
2017-10-09 19:06 ` [PATCH v2 1/3] e1000: implement register mapping for E1000_FLSW{CTL, DATA, CNT} Uwe Kleine-König
2017-10-09 19:06 ` [PATCH v2 2/3] e1000: implement support for smaller flash chips Uwe Kleine-König
2017-10-09 19:06 ` Uwe Kleine-König [this message]
2017-10-16 8:26 ` [PATCH v2 0/3] e1000: fix access to companion flash chip Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171009190627.2486-4-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox