summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* ARM: UniPhier: decrease pre-reloc malloc area sizeMasahiro Yamada2014-11-12-1/+1
| | | | | | | | | | | | | | | In the current implementation of the boot sequence of UniPhier platform, 32KB temporary RAM is available before relocation. The malloc area and the stack shares the 32KB area. With CONFIG_SYS_MALLOC_F_LEN set to 0x7000 (28KB), only 0x1000 (4KB) is left for the stack. In some use cases, the system hangs up with stack over-flow. Even with driver-model UART enabled, the malloc area of 0x2000 (8KB) should be enough. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* ARM: UniPhier: add set_pinsel macro for use in assembly codeMasahiro Yamada2014-11-12-1/+12
| | | | | | | | The function sg_set_pinsel is useful for switching I/O pins but it can be only used in C code. This commit adds a simple macro that is available in asm code. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* ARM: UniPhier: enable USB featuresMasahiro Yamada2014-11-12-0/+16
| | | | | | FAT-formated USB storage device access is available. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* usb: UniPhier: add UniPhier on-chip EHCI host driver supportMasahiro Yamada2014-11-12-0/+119
| | | | | | | | | | | | Support EHCI host driver used on Panasonic UniPhier platform. Since Device Tree is not supported on UniPhier yet, the base address of USB cores are passed from board files (platdevice.c). TODO for me: Move the base address to device trees. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Marek Vasut <marex@denx.de>
* ARM: UniPhier: add MIO register fileMasahiro Yamada2014-11-12-0/+20
| | | | | | | | This commit adds register defines of MIO (Media I/O) block of UniPhier platform. This file is necessary to control the reset signals of the USB cores. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* usb: add basic USB configs in KconfigMasahiro Yamada2014-11-12-0/+94
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Marek Vasut <marex@denx.de>
* ARM: UniPhier: add EHCI host pin settings for PH1-Pro4Masahiro Yamada2014-11-12-0/+7
| | | | | | | These IO pins are necessary for port power control and over current detect. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* ARM: UniPhier: move DDR related configuration to KconfigMasahiro Yamada2014-11-12-25/+27
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* ARM: UniPhier: reset on-board devices on start-upMasahiro Yamada2014-11-12-3/+4
| | | | | | | | | | | | If a support card is attached to the main board, the on-board SMSC9118 LAN controller is available. It must be kept in reset state for a while on start-up. When the board is kicked via a debbuger rather than pushing the hardware reset button, on-board chips are not reset; in this case the reset signals should be asserted by software. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* serial: UniPhier: borrow macros from linux/serial_reg.hMasahiro Yamada2014-11-12-13/+2
| | | | | | | | | The same bit-field macros are defined in include/linux/serial_reg.h so let's include it and delete duplicated defines. Also, remove unnecessary inclusion of <common.h>. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Prepare v2015.01-rc1Tom Rini2014-11-10-3/+3
| | | | Signed-off-by: Tom Rini <trini@ti.com>
* Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini2014-11-10-7/+31
|\
| * i2c: rcar_i2c: Fix order of restart and clear statusNobuhiro Iwamatsu2014-11-10-2/+2
| | | | | | | | | | | | | | | | | | | | In case of repeated START condition, the restart has to be kicked before clear status (MSR register). If it is kicked after clear status, R-Car I2C may transfer data (TXD register) or receive data (RXD register) instead of transferring slave address (MAR register). Signed-off-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
| * drivers/i2c/fsl_i2c: Change CONFIG_I2C_TIMEOUT to 100msShaveta Leekha2014-11-10-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some slow I2C devices like Power Monitor(ZM7304) at times do not work well with low timeout value, so I2C bus get stuck during read cycle with this device, changing it to 100ms from 10ms works fine A lot of other i2c drivers like mxc and i2c drivers of BOOTROM also use relax timeouts to give sufficient ticks to work well with slower devices Signed-off-by: Shaveta Leekha <shaveta@freescale.com> Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
| * ppc4xx: Handle i2c stuck on combined xferDirk Eibach2014-11-10-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | ppc4xx i2c master gets stuck on errors while repeated start is active. Can be easily reproduced by "i2c md" on an unpopulated i2c address. There is not stop condition given, scl remains pulled low. The only way out seems to be doing a stop manually and then a soft reset. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
| * ppc4xx: Fix i2c repeated startDirk Eibach2014-11-10-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Debugging some i2c trouble I saw on my scope that repeated start is not working properply. The 4xx even held clock pulled down after transfers. Having a look in the driver I realized that IIC_CNTL_RPST is set on that part of the transfer that should begin with a repeated start. But repeated start is about not sending a stop condition, so IIC_CNTL_RPST has to be set on the last transfer before the repeated start happens. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-blackfinTom Rini2014-11-10-1/+4
|\ \
| * | bfin: the max bfin sdh block count is 127Sonic Zhang2014-11-10-0/+1
| | | | | | | | | | | | Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
| * | bfin: make the CPU macro of LDR target more genenricSonic Zhang2014-11-10-1/+3
| |/ | | | | | | | | | | Remove BFIN from the CPU macro in Makefile. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2014-11-10-1/+645
|\ \
| * | gic: fixed compilation error in GICv2 wait for interrupt macroYehuda Yitschak2014-10-28-1/+1
| | | | | | | | | | | | | | | | | | | | | a hexadicemal value was missing the "0x" prefix which caused assembler error Signed-off-by: Yehuda Yitschak <yehuday@marvell.com>
| * | arm: debug: adjust for U-BootMasahiro Yamada2014-10-26-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because CONFIG_MMU is never defined in U-Boot, the non-MMU code in debug.S is always used. Unfortunately, the number of arguments of the addruart macro in Linux is different between MMU and non-MMU. This causes a build error when importing some debug macros using the third argument. (For ex. arch/arm/include/debug/exynos.S) Pass the third argument to the non-MMU addruart to avoid such a problem. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Przemyslaw Marczak <p.marczak@samsung.com>
| * | arm: debug: add Kconfig entries for lowlevel debugMasahiro Yamada2014-10-26-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have not had a good method to debug the early boot stage such as lowlevel_init function. I guess developers generally use dedicated debuggers for that, but it is difficult in some cases. (For example, my debugger cannot connect to the ARM processor when it is in the secure state. It sometimes happens when I need to debug the early boot stage on ARM SoCs with secure extension.) The low level debug feature in Linux would be also helpful for U-boot when we are stucking in nasty problems where the console is not available yet. You have to enable CONFIG_DEBUG_LL to use this feature. For now, only 8250-compatible UART devices are supported. You can add a header file under arch/arm/include/debug/ directory to support your UART device if necessary. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
| * | arm: debug: replace license blocks with SPDXMasahiro Yamada2014-10-26-9/+4
| | | | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
| * | arm: debug: import debug files from Linux 3.16Masahiro Yamada2014-10-26-0/+581
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot does not have arch/arm/kernel, include/uapi directories, This commit copies files as follows: Location in Linux -> Location in U-Boot arch/arm/kernel/debug.S -> arch/arm/lib/debug.S arch/arm/include/debug/8250.S -> arch/arm/include/debug/8250.S include/uapi/linux/serial_reg.h -> include/linux/serial_reg.h Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | Added support for comments in input to mkenvimage.Dominik Muth2014-11-10-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for comments in the input to mkenvimage, i.e. in the environment source: All lines starting with a # in the firs column will be ignored. Additionally empty lines will also be ignored. Signed-off-by: Dominik Muth <dominik.muth@bkvibro.com>
* | | ZFS: Clean up cppcheck warnings where relevant, leaked memory etcJorgen Lundman2014-11-10-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a message from Wolfgang Denk highlighting warnings from cppcheck, the patch will address those that are correctly diagnosed. Some are false-positives: > [fs/zfs/zfs.c:937]: (error) Memory leak: l dmu_read() allocates "l" if successful, so error-case should not free it. > [fs/zfs/zfs.c:1141]: (error) Memory leak: dnbuf dmu_read() allocates "dnbuf" if successful, so error-case should not free it. > [fs/zfs/zfs.c:1372]: (error) Memory leak: osp zio_read() allocates "osp" if successful, so error-case should not free it. > [fs/zfs/zfs.c:1726]: (error) Memory leak: nvlist int_zfs_fetch_nvlist() allocates "nvlist" if successful, so error-case should not free it. Signed-off-by: Jorgen Lundman <lundman@lundman.net>
* | | board/esd/common/auto_update.c: fix Uninitialized variableWolfgang Denk2014-11-10-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cppcheck reports: [board/esd/common/auto_update.c:458]: (error) Uninitialized variable: cnt The variable is not really used anywhere, so remove it. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com> Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
* | | ARM: MXS: fix Uninitialized variable errorWolfgang Denk2014-11-10-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cppcheck reports: [arch/arm/cpu/arm926ejs/mxs/timer.c:96]: (error) Uninitialized variable: now Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
* | | board/matrix_vision/mvblx/sys_eeprom.c: fix buffer overflowWolfgang Denk2014-11-07-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error detected by cppcheck: [board/matrix_vision/mvblx/sys_eeprom.c:353]: (error) Buffer is accessed out of bounds. Signed-off-by: Wolfgang Denk <wd@denx.de> cc: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Michael Jones <michael.jones@matrix-vision.de>
* | | common/cmd_fitupd.c: restore corrupted fileWolfgang Denk2014-11-07-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file got corrupted by the automatic editin of commit 1a45966 "Add GPL-2.0+ SPDX-License-Identifier to source files"; restore the opiginal content and manually insert the SPDX ID. The bug was detected by running cppcheck, which reported: [common/cmd_fitupd.c:8]: (error) Invalid number of character ({) when these macros are defined: 'CONFIG_UPDATE_TFTP'. Signed-off-by: Wolfgang Denk <wd@denx.de>
* | | drivers/net/uli526x.c: fix syntax errorWolfgang Denk2014-11-07-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error detected by cppcheck: [drivers/net/uli526x.c:551]: (error) printf format string requires 3 parameters but only 2 are given. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Roy Zang <tie-fei.zang@freescale.com>
* | | board/cogent/lcd.c: fix syntax errorWolfgang Denk2014-11-07-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error detected by cppcheck: [board/cogent/lcd.c:237]: (error) Invalid number of character (() when these macros are defined: 'CONFIG_SHOW_ACTIVITY;CONFIG_STATUS_LED'. Signed-off-by: Wolfgang Denk <wd@denx.de>
* | | cppcheck cleanup: fix nullPointer errorsWolfgang Denk2014-11-07-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a number of places where U-Boot intentionally and legally accesses physical address 0x0000, for example when installing exception vectors on systems where these are located in low memory. Add "cppcheck-suppress nullPointer" comments to silence cppcheck where this is intentional and legal. Signed-off-by: Wolfgang Denk <wd@denx.de>
* | | doc: fix documentation of out-of-tree buildTimo Ketola2014-11-07-5/+5
| | | | | | | | | | | | | | | | | | Correct environment variable for output directory is KBUILD_OUTPUT. Signed-off-by: Timo Ketola <timo@exertus.fi>
* | | tools/env: Fix environment size and CRC on 64-bit hostsDominic Sacré2014-11-07-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On architectures where 'long' is 64 bit, the u-boot environment as seen by the fw_env tools was missing 4 bytes. This patch fixes getenvsize(), and thus also ensures that the environment's CRC32 checksum is calculated correctly. Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Tom Rini <trini@ti.com>
* | | MAINTAINERS: CFI flash maintainership only includes the CFI related filesStefan Roese2014-11-07-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the other files in drivers/mtd/* are not really CFI related. So lets only include the files that are CFI specific. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Scott Wood <scottwood@freescale.com> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Jagan Teki <jagannadh.teki@gmail.com> Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com> Acked-by: Heiko Schocher <hs@denx.de>
* | | kbuild: sync misc scripts with Linux 3.18-rc1Masahiro Yamada2014-11-07-18/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit imports some updates in misc scripts from Linux 3.18-rc1. [1] commit cbb4d3e6510b99522719c5ef0 by Horia Geanta scripts/kernel-doc: handle object-like macros [2] commit 164f0d2efaaef83 by Michal Marek kbuild: Fix handling of backslashes in *.cmd files [3] commit 270a00963cd367214e by Randy Dunlap scripts/kernel-doc: recognize __meminit [4] commit a4954fd7724c0f55361eb5 by Masahiro Yamada kbuild: remove obj-n and lib-n handling [5] commit 5b2389b45d1a9c12b9f by Masahiro Yamada kbuild: simplify build, clean, modbuiltin shorthands Signed-off-by: Horia Geanta <horia.geanta@freescale.com> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | kconfig: sync kconfig files with Linux 3.18-rc1Masahiro Yamada2014-11-07-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit imports Kconfig updates from Linux 3.18-rc1. 'kvmconfig' and 'tinyconfig' help message have been commented out since they are unavailable at least now; in the future perhaps we can implement 'tinyconfig' to disable most of CONFIG_CMD_* to create a very small U-Boot image. [1] commit 3aaefce10351 by Josh Triplett x86, platform, kconfig: move kvmconfig functionality to a helper [2] commit 0da1d4a0b951 by Josh Triplett x86: Add "make tinyconfig" to configure the tiniest possible kernel [3] commit c40724d3f381 by Brian Norris kconfig: lxdialog: fix spelling [4] commit 7285996aa000 by Brian Norris kconfig: nconfig: fix multi-byte UTF handling Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | kbuild: sync top Makefile with Linux 3.18-rc1Masahiro Yamada2014-11-07-93/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Linux 3.15, relative path feature and related fixes, cleanups have been merged to the top Makefile. The relative path feature looks stable enough, so let's import it to U-Boot along with various cleanups. Commits imported from Linux (some need adjustment) are: [1] commit 7e1c04779efd by Michal Marek kbuild: Use relative path for $(objtree) [2] commit 890676c65d69 by Michal Marek kbuild: Use relative path when building in the source tree [3] commit 9da0763bdd82 by Michal Marek kbuild: Use relative path when building in a subdir of the source tree [4] commit c2e28dc975ea by Michal Marek kbuild: Print the name of the build directory [5] commit 066b7ed95580 by Michal Marek kbuild: Do not print the build directory with make -s [6] commit 3f1d9a6cec01 by Michal Marek kbuild: make -s should be used with kernelrelease/kernelversion/image_name [7] commit 7ff525712acf by Masahiro Yamada kbuild: fake the "Entering directory ..." message more simply [8] commit 745a254322c8 by Masahiro Yamada kbuild: use $(Q) for sub-make target [9] commit aa55c8e2f7a3 by Masahiro Yamada kbuild: handle C=... and M=... after entering into build directory [10] commit ab7474ea5361 by Borislav Petkov Kbuild: Ignore GREP_OPTIONS env variable To use relative path feature, tools/Makefile and scripts/Makefile.autoconf must be tweaked. Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | kbuild: improve multi-objs dependency and cleanupsMasahiro Yamada2014-11-07-40/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Linux 3.18-rc1, Kbuild is able to handle multi-objs dependency correctly, which also allows us futher cleanups of some makefiles. This commit imports those commits: [1] commit c8589d1e9e01 by Masahiro Yamada kbuild: handle multi-objs dependency appropriately [2] commit 97e3226e6e98 by Masahiro Yamada kbuild: handle the dependency of multi-objs hostprogs appropriately [3] commit 022af62d0190 by Masahiro Yamada kbuild: refactor script/kconfig/Makefile [4] commit 221ecca6cafe by Masahiro Yamada kbuild: remove redundant clean-files from scripts/kconfig/Makefile Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | kbuild: bug fixes and cleanups of Makefile.hostMasahiro Yamada2014-11-07-52/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit imports updates of scripts/Makefile.host from Linux 3.18-rc1. Imported commits are: [1] commit d8d9efe22709 by Masahiro Yamada kbuild: fix a typo in scripts/Makefile.host [2] commit edb950c17de0 by Masahiro Yamada kbuild: fix a bug of C++ host program handling [3] commit 62e2210798ed by Masahiro Yamada kbuild: drop shared library support from Makefile.host [4] commit 663935593915 by Masahiro Yamada kbuild: clean up scripts/Makefile.host [5] commit 1791ff7179f6 by Masahiro Yamada kbuild: clean-up and bug fix of scripts/Makefile.host Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | kbuild: remove "clobber" targetMasahiro Yamada2014-11-07-21/+7
| | | | | | | | | | | | | | | | | | | | | Now we stick to Linux Kernel's build system, so squash "clobber" to "clean" target. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | hush: make run_command() return an error on parsing failureRabin Vincent2014-11-07-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | run_command() returns success even if the command had a syntax error; correct this behaviour. Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org)
* | | hush: fix segfault on syntax errorRabin Vincent2014-11-07-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hush segfaults if it sees a syntax error while attempting to parse a command: $ ./u-boot -c "'" ... syntax error Segmentation fault (core dumped) This is due to a NULL pointer dereference of in_str->p in static_peek(). The problem is that the exit condition for the loop in parse_stream_outer() checks for rcode not being -1, but rcode is only ever 0 or 1. Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org) Tested-by: Simon Glass <sjg@chromium.org)
* | | hush: return consistent codes from run_command()Rabin Vincent2014-11-07-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to run: - an empty string - a string with just spaces returns different error codes, 1 for the empty string and 0 for the string with just spaces. Make both of them return 0 for consistency. Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org)
* | | sandbox: init cli for -cRabin Vincent2014-11-07-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sandbox crashes if a variable is set in the -c command, because hush's top_vars is not allocated. Call cli_init() from sandbox to ensure this is done before we execute the -c command. $ ./u-boot -c 'a=1' ... Segmentation fault (core dumped) Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org) Tested-by: Simon Glass <sjg@chromium.org)
* | | dlmalloc: ensure gd is set for early allocRabin Vincent2014-11-07-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to run the sandbox leads to a segfault, because some dynamic libraries (outside of u-boot) attempt to use malloc() to allocate memory before u-boot's gd variable is initialized. Check for gd not being NULL in the SYS_MALLOC_F_LEN handling, so that malloc() doesn't crash when called at this point. $ gdb -q --args ./u-boot (gdb) r Program received signal SIGSEGV, Segmentation fault. 0x0000000000412b9b in malloc (bytes=bytes@entry=37) at common/dlmalloc.c:2184 2184 if (!(gd->flags & GD_FLG_RELOC)) { (gdb) p gd $1 = (gd_t *) 0x0 (gdb) bt #0 0x0000000000412b9b in malloc (bytes=bytes@entry=37) at common/dlmalloc.c:2184 #1 0x00007ffff75bf8e1 in set_binding_values (domainname=0x7ffff11f4f12 "libgpg-error", dirnamep=0x7fffffffe168, codesetp=0x0) at bindtextdom.c:228 #2 0x00007ffff75bfb4c in set_binding_values (codesetp=0x0, dirnamep=0x7fffffffe168, domainname=<optimized out>) at bindtextdom.c:350 #3 __bindtextdomain (domainname=<optimized out>, dirname=0x7ffff11f4f00 "/usr/share/locale") at bindtextdom.c:348 #4 0x00007ffff11eca17 in ?? () from /lib/x86_64-linux-gnu/libgpg-error.so.0 #5 0x00007ffff7dea9fa in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe208, env=env@entry=0x7fffffffe218) at dl-init.c:78 #6 0x00007ffff7deaae3 in call_init (env=0x7fffffffe218, argv=0x7fffffffe208, argc=1, l=<optimized out>) at dl-init.c:36 #7 _dl_init (main_map=0x7ffff7ffe1a8, argc=1, argv=0x7fffffffe208, env=0x7fffffffe218) at dl-init.c:126 #8 0x00007ffff7ddd1ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org>
* | | power_spi.c: Rewrite pmic_reg functionTom Rini2014-11-07-23/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pmic_spi_free function isn't ever used, and as the frameworks stand today, cannot be, so remove it. Integrate the probe function into pmic_reg as it's not really a "probe" today. Finally, add an err label for the common failure cases. Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Stefano Babic <sbabic@denx.de>
* | | image-fdt: boot_get_fdt() return value when no DTB existsNoam Camus2014-11-07-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | I believe that when no DTB is around we should return 1. This why I fixed such scenarious to not return zero anymore. Else kernel might get NULL pointer to DTB which doesn't exists. Signed-off-by: Noam Camus <noamc@ezchip.com>