summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* board_f: Use IS_ENABLED instead of #ifdef in initf_bootstage()Simon Glass2017-06-121-5/+2
| | | | | | | | | | | | | The current implementation makes it look like the 'if (from_spl)' part is dead code because these features are not enabled for sandbox. We could enable it for sandbox_spl, but this is not done yet (it requires sharing memory between SPL and U-Boot proper which is in fact supported). It is probably nicer to avoid #ifdef anyway. Change it. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163244) Fixes: 824bb1b (bootstage: Support SPL)
* dm: core: Supress dead-code warning in __of_get_next_child()Simon Glass2017-06-121-0/+6
| | | | | | | | Suppress a warning on next = next->sibling. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163245) Fixes 644ec0a (dm: core: Add livetree access functions)
* test: bus: Add a check that dev is not NULLSimon Glass2017-06-121-0/+3
| | | | | | | | | | We know that uclass_get_device() and device_find_child_by_of_offset() do not return NULL for dev when they succeeds but coverity does not. Add an extra check to hopefully keep it happy. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163246) Fixes: 0753bc2 (dm: Simple Watchdog uclass)
* test: wdt: Add a check that dev is not NULLSimon Glass2017-06-121-0/+1
| | | | | | | | | | We know that uclass_get_device() does not return NULL for dev when it succeeds but coverity does not. Add an extra check to hopefully keep it happy. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163247) Fixes: 0753bc2 (dm: Simple Watchdog uclass)
* fdt: Add a check to fdt_print() for coveritySimon Glass2017-06-121-1/+1
| | | | | | | | We know that fdt_getprop() does not return NULL when len is > 0 but coverity does not. Add an extra check to keep it happy. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163248)
* fdt: Add a check to do_fdt() for coveritySimon Glass2017-06-121-1/+1
| | | | | | | | | We know that fdt_getprop() does not return NULL when len is > 0 but coverity does not. Add an extra check to keep it happy. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163249) Fixes: bc80295b (fdt: Add get commands to fdt)
* fdtgrep: Deal with NULL data passed to check_type_include()Simon Glass2017-06-121-11/+14
| | | | | | | | | Since the parameter can be NULL we must be careful not to dereference it in this case. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163250) Fixes: 1043d0a0 (fdt: Add fdtgrep tool)
* edid: Use sizeof() in cea_is_hdmi_vsdb_present()Simon Glass2017-06-121-2/+2
| | | | | | | | We should not use an open-coded value here. Use sizeof() instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163252) Fixes: 43c6bdd0 (edid: Add HDMI flag to timing info)
* test: pwm: Add a check that dev is not NULLSimon Glass2017-06-121-0/+1
| | | | | | | | | | We know that uclass_get_device() does not return NULL for dev when it succeeds but coverity does not. Add an extra check to hopefully keep it happy. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 161690) Fixes: 43b4156 (dm: sandbox: pwm: Add a basic pwm test)
* powerpc, 5xx: remove support for 5xxHeiko Schocher2017-06-1239-4792/+7
| | | | | | | | | There was for long time no activity in the 5xx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 5xx, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
* powerpc, 8260: remove support for mpc8260Heiko Schocher2017-06-1261-11051/+17
| | | | | | | | | There was for long time no activity in the 8260 area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 8260, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
* powerpc, 8xx: remove support for 8xxHeiko Schocher2017-06-12143-21631/+45
| | | | | | | | | | There was for long time no activity in the 8xx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 8xx, so remove it (with a heavy heart, knowing that I remove here the root of U-Boot). Signed-off-by: Heiko Schocher <hs@denx.de>
* arm: dra7: Set fastboot variables in environmentSemen Protsenko2017-06-121-0/+1
| | | | | | | | | | | | | | One can obtain those variables using next commands: $ fastboot getvar cpu $ fastboot getvar secure $ fastboot getvar board_rev $ fastboot getvar userdata_size Those variables are needed for fastboot.sh script. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* arm: am57xx: Set fastboot variables in environmentSemen Protsenko2017-06-121-0/+1
| | | | | | | | | | | | | | One can obtain those variables using next commands: $ fastboot getvar cpu $ fastboot getvar secure $ fastboot getvar board_rev $ fastboot getvar userdata_size Those variables are needed for fastboot.sh script. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* omap: Add routine for setting fastboot variablesSemen Protsenko2017-06-122-0/+121
| | | | | | | | This patch reuses new option, which allows us to expose variables from environment to "fastboot getvar" command. Those variables must be of "fastboot.%s" format. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
* ARM: fixed relocation using proper alignmentManfred Schlaegl2017-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | Using u-boot-2017.05 on i.MX6UL we ran into following problem: Initially U-Boot could be started normally. If we added one random command in configuration, the newly generated image hung at startup (last output was DRAM: 256 MiB). We tracked this down to a data abort within relocation (relocated_code). relocated_code in arch/arm/lib/relocate.S copies 8 bytes per loop iteration until the source pointer is equal to __image_copy_end. In a good case __image_copy_end was aligned to 8 bytes, so the loop stopped as suggested, but in an errornous case __image_copy_end was not aligned to 8 bytes, so the loop ran out of bounds and caused a data abort exception. This patches solves the issue by aligning __image_copy_end to 8 byte using the linker script related to arm. I don't know if it's the correct way to solve this, so some review would be very appreciated.
* Merge git://git.denx.de/u-boot-dmTom Rini2017-06-1043-168/+1120
|\
| * cmd/fdt: support single value replacement within an arrayHannes Schmelzer2017-06-091-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this commit we can modify single values within an array of a dts property. This is useful if we have for example a pwm-backlight where we want to modifiy the pwm frequency per u-boot script. The pwm is described in dts like this: backlight { pwms = <0x0000002b 0x00000000 0x004c4b40>; }; For changing the frequency, here the 3rd parameter, we simply type: fdt set /backlight pwms <? ? 0x1E8480>; For doing all this we: - backup the property content into our 'SCRATCHPAD' - only modify the array-cell if the new content doesn't start with '?' Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * buildman: properly translate strings for log and err files to ASCIIDaniel Schwierzeck2017-06-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | The build output can still produce unicode encoded output. But in the buildman's log and err files we only want plain ASCII characters. To handle all situations with unicode and non-unicode output, encode the stdout and stderr strings to UTF-8 and afterwards to ASCII with replacing all special characters. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
| * buildman: disable localized and unicode output of all build toolsDaniel Schwierzeck2017-06-091-1/+5
| | | | | | | | | | | | | | | | | | | | Build tools like Make, gcc or binutils support localized output or unicode encoded output dependent on the default system locale. This is not useful for buildman, where we want reproducible warning or error messages or where the output of binutils is further processed. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
| * README: Add instructions for chain-loading U-Boot on jerrySimon Glass2017-06-091-0/+70
| | | | | | | | | | | | Add instructions for chromebook_jerry. Signed-off-by: Simon Glass <sjg@chromium.org>
| * rockchip: jerry: Disable CONFIG_CONSOLE_SCROLL_LINESSimon Glass2017-06-091-1/+0
| | | | | | | | | | | | | | The display on jerry is so fast that this option is not needed. Drop it so that the display scrolls more smoothly. Signed-off-by: Simon Glass <sjg@chromium.org>
| * rockchip: Enable the video display bannerSimon Glass2017-06-091-0/+2
| | | | | | | | | | | | | | Show the U-Boot banner and board information on the video display during boot. Signed-off-by: Simon Glass <sjg@chromium.org>
| * rockchip: rk3288: Allow setting up clocks in U-Boot properSimon Glass2017-06-092-0/+36
| | | | | | | | | | | | | | | | If U-Boot is chain-loaded from a previous boot loader we must set up the clocks the way U-Boot wants them. Add code for this. It will do nothing if SPL has already done the job. Signed-off-by: Simon Glass <sjg@chromium.org>
| * rockchip: Init clocks again when chain-loadingSimon Glass2017-06-091-6/+19
| | | | | | | | | | | | | | Detect with a previous boot loader has already set up the clocks and set them up again so that U-Boot gets what it expects. Signed-off-by: Simon Glass <sjg@chromium.org>
| * rockchip: rk3288: Convert clock driver to use shifted masksSimon Glass2017-06-092-105/+90
| | | | | | | | | | | | | | | | Shifted masks are the standard approach with rockchip since it allows use of the mask without shifting it each time. Update the definitions and the driver to match. Signed-off-by: Simon Glass <sjg@chromium.org>
| * rockchip: jerry: Add a .its file for chromiumSimon Glass2017-06-091-0/+42
| | | | | | | | | | | | Add a sample .its file for booting U-Boot on a jerry Chromebook. Signed-off-by: Simon Glass <sjg@chromium.org>
| * rockchip: video: Take the vop device out of standbySimon Glass2017-06-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | On reset the standby bit is clear, but if U-Boot is chain-loaded from another boot loader it may be set. Clear it before starting up video so that it works correctly. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Squashed in 'rockchip: video: fix taking the VOP device out of standby': Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * rockchip: video: Add remove() methodsSimon Glass2017-06-092-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add remove() methods for EDP and VOP so that U-Boot can shut down the video on exit. This avoids leaving DMA running while booting Linux which can cause problems if Linux uses the frame buffer for something else. It also makes it clear what is needed to shut down video. While we are here, make rkvop_enable() static. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Squashed in 'rockchip: video: fix taking the VOP device out of standby': Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * rockchip: rk3288: Add error debugging to veyron_init()Simon Glass2017-06-091-1/+3
| | | | | | | | | | | | | | Add a debug() statement so we can see when something goes wrong with the regulator. Signed-off-by: Simon Glass <sjg@chromium.org>
| * rockchip: Fix regualtor typo in veyronSimon Glass2017-06-091-1/+1
| | | | | | | | | | | | This typo doesn't actually cause any problems, but is wrong. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * rockchip: Setup default PWM flagsSimon Glass2017-06-091-0/+1
| | | | | | | | | | | | | | At present if the Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 874ee59 (rockchip: pwm: implement pwm_set_invert())
| * README: Add instructions for chain-loading U-BootSimon Glass2017-06-093-0/+182
| | | | | | | | | | | | | | | | | | | | | | Most Chromebooks support chain-loading U-Boot but instructions are somewhat scattered. Add a README to hold this information within the U-Boot tree. Also add the standard developer keys to simplify the instructions, since they are small. For now this only supports nyan-big. Signed-off-by: Simon Glass <sjg@chromium.org>
| * tegra: nyan-big: Add a .its file for chromiumSimon Glass2017-06-091-0/+42
| | | | | | | | | | | | Add a sample .its file for booting U-Boot on a nyan-big Chromebook. Signed-off-by: Simon Glass <sjg@chromium.org>
| * tegra: clock: Avoid a divide-by-zero errorSimon Glass2017-06-091-1/+4
| | | | | | | | | | | | | | | | | | The clock fix-up for tegra is still present in the code. It causes a divide-by-zero bug after relocation when chain-loading U-Boot from coreboot. Fix this by adding a check. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 7468676 (ARM: tegra: fix clock_get_periph_rate() for UART clocks)
| * tegra: Enable CP15 initSimon Glass2017-06-091-1/+1
| | | | | | | | | | | | | | | | At present CP15 init is disabled on tegra. Use the correct option so that this init is performed on boot. This enables the instruction cache, for example, which is critical to the machine running at full speed. Signed-off-by: Simon Glass <sjg@chromium.org>
| * tegra: video: Don't power up the SOR twiceSimon Glass2017-06-091-0/+9
| | | | | | | | | | | | | | | | | | If U-Boot is the secondary boot loader, or has been run from itself, the SOR may already be powered up. Powering it up again causes a hang, so detect this situation and skip it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * tegra: nyan-big: Enable the dhrystone benchmarkSimon Glass2017-06-091-0/+2
| | | | | | | | | | | | | | Enable this so we can roughly measure CPU performance. Also enable the cache command to allow for timing. Signed-off-by: Simon Glass <sjg@chromium.org>
| * tegra: spi: Wait a little after setting the clocksSimon Glass2017-06-091-0/+1
| | | | | | | | | | | | | | | | | | For devices that need a delay between SPI transactions we seem to need an additional delay before the first one if the CPU is running at full speed. Add this, under control of the existing setting. At present it will only be enabled with the Chrome OS EC. Signed-off-by: Simon Glass <sjg@chromium.org>
| * tegra: dts: Add cros-ec SPI settingsSimon Glass2017-06-091-0/+9
| | | | | | | | | | | | | | At present the interrupt does not work and the SPI bus runs much less quickly than it should. Add settings to fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * tegra: Init clocks even when SPL did not runSimon Glass2017-06-094-0/+29
| | | | | | | | | | | | | | | | | | | | | | At present early clock init happens in SPL. If SPL did not run (because for example U-Boot is chain-loaded from another boot loader) then the clocks are not set as U-Boot expects. Add a function to detect this and call the early clock init in U-Boot proper. Signed-off-by: Simon Glass <sjg@chromium.org>
| * power: regulator: Add more debugging and fix a missing newlineSimon Glass2017-06-091-3/+5
| | | | | | | | | | | | | | | | This file does not report a few possible errors and one message is missing a newline. Fix these. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * arm: Disable LPAE if not enabledSimon Glass2017-06-091-0/+9
| | | | | | | | | | | | | | | | If CONFIG_ARMV7_LPAE is not defined we should make sure that the feature is disabled. This can happen if U-Boot is chain-loaded from another boot loader which does enable LPAE. Signed-off-by: Simon Glass <sjg@chromium.org>
| * arm: Don't try to support CONFIG_ARMV7_LPAE on ARMv4TSimon Glass2017-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | At present if CONFIG_ARMV7_LPAE is defined then mmu_setup() will use instructions which are invalid on ARMv4T. This happens on Tegra since it has an ARMv4T boot CPU. Add a check for the architecture version to allow the code to be built. It will not actually be executed by the boot CPU, but needs to compile. Signed-off-by: Simon Glass <sjg@chromium.org>
| * arm: Rename HCTR to HTCRSimon Glass2017-06-091-1/+1
| | | | | | | | | | | | This appears to be a typo. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * arm: arm720t: Support CONFIG_SKIP_LOWLEVEL_INIT_ONLYSimon Glass2017-06-091-2/+4
| | | | | | | | | | | | | | This option allows skipping the call to lowlevel() while still performing CP15 init. Support this on ARM720T so it can be used with Tegra. Signed-off-by: Simon Glass <sjg@chromium.org>
| * patman: Add a functional testSimon Glass2017-06-087-2/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing test (patman --test) only covers basic checkpatch output. We have had some problems with unicode processing and could use test coverage for the various tags patman supports. Add a new functional test which runs most of the patman flow on a few test commits and checks that the results are correct. See the documentation in the test for a description of what it does. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * patman: Rename 'list' variable in MakeCcFile()Simon Glass2017-06-081-10/+10
| | | | | | | | | | | | | | | | This is not a good variable name in Python because 'list' is a type. It shows up highlighted in some editors. Rename it. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * patman: Add a maintainer test feature to MakeCcFile()Simon Glass2017-06-081-2/+6
| | | | | | | | | | | | | | | | | | Allow the add_maintainers parameter to be a list of maintainers, thus allowing us to simulate calling the script in tests without actually needing it to work. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * patman: Add unicode to test patchesSimon Glass2017-06-081-0/+9
| | | | | | | | | | | | | | | | Add some unicode to the test patches to make sure that patman does the right thing. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>