lzma: fix buffer bound check error

Variable uncompressedSize references the space available, while outSizeFull is
the actual expected uncompressed size. Using the wrong value causes LzmaDecode
to return SZ_ERROR_INPUT_EOF. Problem was introduced in commit afca294. While
at it add additional debug message.

Signed-off-by: Antonios Vamporakis <ant@area128.com>
CC: Kees Cook <keescook@chromium.org>
CC: Simon Glass <sjg@chromium.org>
CC: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
CC: Luka Perkov <luka@openwrt.org>
sf: fix out-of-order calls for spi_claim_bus and spi_release_bus

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
sf: consistently use debug() for warning/error messages

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
sf: move malloc of spi_flash to spi_flash_probe()

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
sf: add slim probe funtions for SPL

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
sf: make calculatiom of address bytes completely configurable

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
sf: add support for 4-byte addressing

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
sf: add support for EN25QH256

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
sf: probe: add support for MX25L2006E

Add support for Macronix MX25L2006E SPI flash.

Signed-off-by: Luka Perkov <luka@openwrt.org>
sf: fix sector layout of S25FL256S_256K and S25FL512S_256K

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
cosmetic: sf: hex values are in lower case

All other hex values in sf_probe.c are in lower case so we should
fix this one too.

Signed-off-by: Luka Perkov <luka@openwrt.org>
net: switchlib: add framework for ethernet switch drivers

Add a generic framework similar to phylib for ethernet switch
drivers and devices. This is useful to share the init and
setup code for switch devices across different boards.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
net: switchlib: add driver for Lantiq PSB697X switch family

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
net: switchlib: add driver for Lantiq ADM6996I switch family

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
net: switchlib: add driver for Atheros AR8216

Signed-off-by: Luka Perkov <openwrt@lukaperkov.net>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
net: switchlib: add driver for REALTEK RTL8306

Signed-off-by: Oliver Muth <dr.o.muth@gmx.de>
Signed-off-by: Antonios Vamporakis <ant@area128.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: add support for Lantiq XWAY SoCs

Signed-off-by: Luka Perkov <luka@openwrt.org>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
MIPS: lantiq: add support for Lantiq XWAY ARX100 SoC family

Signed-off-by: Luka Perkov <luka@openwrt.org>
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
net: add driver for Lantiq XWAY ARX100 switch

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
tools: add some helper tools for Lantiq SoCs

Signed-off-by: Luka Perkov Luka Perkov <luka@openwrt.org>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>