Fixes: 4ff3269a70b5 ("e1000: Expose i210's external flash as MTD") Acked-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> --- 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@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox