mail archive of the barebox mailing list
 help / color / mirror / Atom feed
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 1/3] e1000: implement register mapping for E1000_FLSW{CTL, DATA, CNT}
Date: Mon,  9 Oct 2017 21:06:25 +0200	[thread overview]
Message-ID: <20171009190627.2486-2-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20171009190627.2486-1-u.kleine-koenig@pengutronix.de>

Fixes: 4ff3269a70b5 ("e1000: Expose i210's external flash as MTD")
Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/net/e1000/e1000.h | 6 +++---
 drivers/net/e1000/regio.c | 9 +++++++++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index e6b493c84cc1..45514629dd72 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -447,11 +447,11 @@ struct e1000_tx_desc {
 #define E1000_FLASHT   0x01028  /* FLASH Timer Register */
 #define E1000_EEWR     (E1000_MIGHT_BE_REMAPPED | 0x0102C)  /* EEPROM Write Register - RW */
 #define E1000_I210_EEWR     0x12018  /* EEPROM Write Register - RW */
-#define E1000_FLSWCTL  0x01030  /* FLASH control register */
+#define E1000_FLSWCTL  (E1000_MIGHT_BE_REMAPPED | 0x01030)  /* FLASH control register */
 #define E1000_I210_FLSWCTL 0x12048  /* FLASH control register */
-#define E1000_FLSWDATA 0x01034  /* FLASH data register */
+#define E1000_FLSWDATA (E1000_MIGHT_BE_REMAPPED | 0x01034)  /* FLASH data register */
 #define E1000_I210_FLSWDATA 0x1204C  /* FLASH data register */
-#define E1000_FLSWCNT  0x01038  /* FLASH Access Counter */
+#define E1000_FLSWCNT  (E1000_MIGHT_BE_REMAPPED | 0x01038)  /* FLASH Access Counter */
 #define E1000_I210_FLSWCNT  0x12050  /* FLASH Access Counter */
 #define E1000_FLOP     0x0103C  /* FLASH Opcode Register */
 #define E1000_ERT      0x02008  /* Early Rx Threshold - RW */
diff --git a/drivers/net/e1000/regio.c b/drivers/net/e1000/regio.c
index 1610d5851f05..5b2740fbc289 100644
--- a/drivers/net/e1000/regio.c
+++ b/drivers/net/e1000/regio.c
@@ -16,6 +16,15 @@ static uint32_t e1000_true_offset(struct e1000_hw *hw, uint32_t reg)
 			case E1000_EEMNGCTL:
 				reg = E1000_I210_EEMNGCTL;
 				break;
+			case E1000_FLSWCTL:
+				reg = E1000_I210_FLSWCTL;
+				break;
+			case E1000_FLSWCNT:
+				reg = E1000_I210_FLSWCNT;
+				break;
+			case E1000_FLSWDATA:
+				reg = E1000_I210_FLSWDATA;
+				break;
 			}
 		}
 		reg &= ~E1000_MIGHT_BE_REMAPPED;
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2017-10-09 19:07 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 ` Uwe Kleine-König [this message]
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 ` [PATCH v2 3/3] e1000: Don't poll for FLSWCTL.GLDONE before starting a flash transaction Uwe Kleine-König
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-2-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