net/e1000: allow to overwrite flash size from device tree
When barebox probes the e1000 driver and the flash on the i210 device is
unprogrammed, the driver assumes the flash has a size of only 4 kiB.
This is annoying because to program the flash an image must be written
that is bigger than 4 kiB. So you first have to flash the first sector
to make barebox detect the right size on the next boot. Then reset the
board to be able to write the remaining data.

To work around that limitation, try to read the actual size from the
device tree. (Note however that barebox' pci code currently doesn't use
the device tree and so currently this try always fails without further
patching.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 87c08ac commit 8120d32a972990f6206063727dade9ae608c7781
@Uwe Kleine-König Uwe Kleine-König authored on 12 Jul 2018
Sascha Hauer committed on 13 Jul 2018
Showing 1 changed file
View
drivers/net/e1000/eeprom.c