barebox: common: added new filetypes

- Added omap CH image header recognition
  * filetype_ch_image
  * filetype_ch_image_be

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
PCM051: Update RAM timings

Updated timings for new MT41J256M16HA15EIT RAM.
Timings are backward compatible to the MT41J256M8HX15E RAMs

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
i2c: import SMBus stuff from linux

This patch imports i2c_smbus_{read,write}* functions from linux-3.15.

Here is a quote from linux.git/Documentation/i2c/smbus-protocol:

    If you write a driver for some I2C device, please try to use the SMBus
    commands if at all possible (if the device uses only that subset of the
    I2C protocol). This makes it possible to use the device driver on both
    SMBus adapters and I2C adapters (the SMBus command set is automatically
    translated to I2C on I2C adapters, but plain I2C commands can not be
    handled at all on most pure SMBus adapters).

So having i2c_smbus_{read,write}* functions in barebox makes
porting of linux i2c client drivers much easier as many drivers rely on
these smbus functions.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
gpio: add driver for PCA95[357]x, PCA9698, TCA64xx, and MAX7310 SMBus I/O expanders

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Revert "ARM: OMAP: Do not show MLO/SPI image options with OMAP_MULTI_BOARDS"

The assumption that OMAP_BUILD_IFT is unused for multi board support
is wrong. It is indeed used, so revert the patch.

This reverts commit d1ec6fb0c9bb66939e85964c2f5214b117c78ecf.
commands: i2c: verbose option doesn't need argument

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
commands: i2c: simplify i2c wide access logic

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
commands: i2c: add message if write is not successful

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Merge branch 'for-next/gpio' into next
Merge branch 'for-next/i2c' into next
Make IPaddr_t a 32bit type

unsigned long is 64bit wide on some architectures. Make IPaddr_t a
typedef to uint32_t to make sure it's 32bit wide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
oftree command: Use size_t for size

read_file takes a size_t argument as size, so use this type for the
size variable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
fat: Use correct format specifier

Use %zd to print size_t arguments.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
readkey: keys are unsigned char

We have keys with values > 127, so it must be an unsigned char.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
of: platform: Use PRINTF_CONVERSION_RESOURCE for printing resources

Avoids compiler warnings about wrong format specifiers

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
console: Add puts callback to console devices

Some devices may have a much more efficient way to output strings
rather than single characters. Let console devices implement a
callback for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add hex_byte_pack and hex_byte_pack_upper from kernel

Utility functions needed by the UUID/GUID printf support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
vsprintf: Support pU for printing UUIDs

With EFI 16byte UUIDs/GUIDs are common. Add support for printing them.
This needs to be selected via Kconfig since most architectures have
no use for this functionality.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add beginning wchar support

EFI uses 16 bit character strings. Add beginning support for this.
Since barebox uses 8 bit strings internally we need conversion functions
to convert between 16 bit and 8 bit strings.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
block: Add flush callback

Some block devices need an explicit callback for flushing written
blocks. Add this callback.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>