drivers/mtd: fix NULL pointer dereference in partition lock/unlock

Some mtd device does not support lock and unlock functions. Adding this check
avoids crashing when mtd_part_lock/unlock are called for such devices.

Signed-off-by: Zahari Doychev <zahari.doychev@linux.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
pci: pci_alloc_bus(): use xzalloc() instead of kzalloc()

Also drop redundant xzalloc() result check
as xzalloc() does not return in case of memory allocation error.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Documentation: add uemd mb7707 barebox mini-howto

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
dts: update to v3.16-rc3

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
dts: update to v3.16-rc4

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
hush: Fix error code returned value

Just returns error code instead of 0 or 1.

With this fix, $? is set to child exit code in all cases.
Without this fix, /child $PATH;echo $? displays 1 even if
child script calls exit with a specific non zero error code.

Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
dlmalloc: remove unused functions

remove unused function declarations and definitions:

- vallocc is #if 0 in source code
- pvalloc is defined but not used
- cfree is defined but not used
- malloc_usable_size is unused
- mallopt is not defined
- mallinfo is not defined

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
malloc.h: fix codingstyle

- Remove trailing newline
- use void *fn instead of void* fn

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
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.
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>
images: ignore and clean *.mlo/*.mlospi

Add *./mlo and *.mlospi to the clean rule and to .gitignore.

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