vpr200: support CPU board V4 and rework board ver handling.

V4 CPU boards are now recognized.
References to V1 boards are retired, no V1 boards exist now.
LED init moved to console init.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
nand: fix build error when BBT not enabled.

This fixes following error when bad blocks config option is not enabled:

drivers/built-in.o: In function `nand_erase_nand':
drivers/mtd/nand/nand_write.c:721: undefined reference to `nand_update_bbt'
drivers/built-in.o: In function `nand_default_block_markbad':
drivers/mtd/nand/nand_write.c:76: undefined reference to `nand_update_bbt'
make: *** [barebox] Error 1

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
nand: Prevent drivers setting NAND_USE_FLASH_BBT if BBT config not enabled.

This prevents drivers from setting the options flags to use the flash
bab block table when the BBT is not enabled in config.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
vpr200: register eth0 MAC address from eeprom

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
vpr200: Remove fb registration

We don't show anything on the screen, so no need to register device.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
vpr200: fixup diag LED colours.

Some of the diag leds changed to active high, so update the colour enum.
Some boards do not have green led connected, so set the initial colour
to red.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
vpr200: only register mmc when booting from mmc.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
vpr200: env: remove unused logo

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
vpr200: source file eye candy.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
drivers/eeprom: at24: correct and quicker writes to eeprom.

The device is now polled for write completion. All the datasheets I looked
at had a max of 10ms for eeprom write time.

Writes across page boundaries are now handled correctly; the device
automatically wraps the write to page boundary, so we don't write more
than is remaining in the page.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
drivers: at24: set page size according to device size.

There is a fixed relationship between the page size and the device size.
This adds support for larger page size (although the driver itself can not
yet handle addressing offsets > 256 in the device with the larger page
size).

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
drivers: at24: refactor polling device into its own fucntion.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
drivers: at24: support erase file op

This adds support for erasing in the at24 driver, which simply involves
writing 0xff to all relevant locations.
The erase function is very similar to the write function, but implementing
it this way (rather than calling the write function) avoids allocating a
potentially large buffer of 0xff.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
drivers: at24: change driver name to at24, make dev name as eepromX

"eeprom" is too generic a name for the driver, so change to "at24".
A device name based around eeprom is still desirable, so keep that and
add the dev id to allow multiple devices.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
drivers: at24: add platform data.

This allows device sizing and naming to be specified at a platform level.
The platform data fields are all optional, if they are zero they are
assigned default values.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
vpr200: support new eeprom device naming, fall back to old if necessary.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>