summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge tag 'dm-9oct18' of git://git.denx.de/u-boot-dmTom Rini2018-10-10224-1326/+5462
|\ \ | | | | | | | | | | | | | | | Test improvements to tidy up output and drop duplicate tests Sandbox SPL/TPL support Various dm-related improvements
| * | dtoc: Fix the value of SetInt()Simon Glass2018-10-091-1/+1
| | | | | | | | | | | | | | | | | | This does not set the correct value at present. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | video: Tidy up a few comments in video.oSimon Glass2018-10-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Add a little more information to one comment and update the guard comment to be more accurate. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
| * | video: at91: Adjust vidconsole_position_cursor() to use char posSimon Glass2018-10-092-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present this function uses pixels but it seems more useful for it to position in terms of characters on the screen. This also matches the comment to the function. Update this. Unfortunately there is one user of this function (at91). Have a crack at fixing this, since I cannot test it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
| * | sysreset: Add a way to find the last resetSimon Glass2018-10-094-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | We have a method to return the last reset as a string for humans, but not a method that allows it to be used programmatically. Add a new method that returns the last reset as an enum. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sysreset: Tidy up a few comments and loggingSimon Glass2018-10-093-3/+6
| | | | | | | | | | | | | | | | | | | | | Some comments are incorrect or missing pieces. Fix these and use logging to print the error. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | pci: Add a little more debugging to pci_romSimon Glass2018-10-091-2/+2
| | | | | | | | | | | | | | | | | | | | | Add some logging on failure. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | fdt: Allow C++ comments in link scripts and DT filesSimon Glass2018-10-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | At present // in a device-tree file or link script causes a warning. But this is used in the standard license header. Update the compiler flags to use C99, which permits this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | ctags: Minor changes to fix ctags outputSimon Glass2018-10-092-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present ctags emits lines with unmatched quotes which means that the output file is invalid. This is with exuberant-ctags version 5.9~svn201103 but I also see it with plain ctags. I am not sure that it is a bug though. Make a few minor changes in the source code to fix this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | panel: Expand the backlight supportSimon Glass2018-10-097-37/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present the panel can be turned on but not off, and the brightness cannot be controlled at run-time. Add a new API function to both the panel and backlight uclasses to handle this. Enhance the PWM backlight driver to deal with custom levels properly and allow the backlight to be turned on and off. Update the test to cover thes new features. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | test: panel: Add a test for the panel uclassSimon Glass2018-10-096-2/+111
| | | | | | | | | | | | | | | | | | | | | At present this uclass has no tests. Add a simple one which checks the PWM configuration, regulator and GPIO. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Add support for v3 messages on LPCSimon Glass2018-10-091-0/+33
| | | | | | | | | | | | | | | | | | | | | At present version 3 messages are only supported on SPI. Add support for using LPC as well, as used on samus. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Update cros_ec_read_hash() to specify the imageSimon Glass2018-10-093-5/+8
| | | | | | | | | | | | | | | | | | Allow selection of which EC image to hash. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | x86: Update mtrr functions to allow leaving cache aloneSimon Glass2018-10-094-16/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present the mtrr functions disable the cache before making changes and enable it again afterwards. This is fine in U-Boot, but does not work if running in CAR (such as we are in SPL). Update the functions so that the caller can request that caches be left alone. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | cros: Update ec_commands to latest versionSimon Glass2018-10-094-432/+3318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file has changed quite a bit in the last 5 years as the capabilities of the ECs have grown. Sync it up with the copy in coreboot commit b9141f2215. The only change is the addition of EC_VBNV_BLOCK_SIZE_V2. This is needed because U-Boot uses the new v2 vboot API and this is not currently fully supported by Chromium OS firmware. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Rename GPT_HEADER_SIGNATURE to avoid conflictSimon Glass2018-10-092-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The current name conflicts with the Chrome OS verified boot library, which prevents it being built. That library uses a string whereas U-Boot uses a 64-bit hex value. Rename this in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Add a header file for stringsSimon Glass2018-10-091-0/+1
| | | | | | | | | | | | | | | | | | | | | Add a string.h header for libraries that expect this to be available, now that U-Boot's version has moved to include/linux. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | log: Add comments to the rest of the log categoriesSimon Glass2018-10-091-6/+6
| | | | | | | | | | | | | | | | | | At present some of the log categories are missing comments. Add them. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | binman: Move to three-digit test-file numbersSimon Glass2018-10-09101-115/+115
| | | | | | | | | | | | | | | | | | | | | | | | We now have 99 tests. Before adding any more, rename everything to three digits. This helps to preserve the ordering of tests and makes it easier to find things. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | tpm: Add a few new commands for v1Simon Glass2018-10-093-18/+93
| | | | | | | | | | | | | | | | | | | | | These are needed for the 2018 version of Chromium OS vboot. Add an implementation for TPM v1, with v2 to come later. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | tpm: Tidy up logging in tpm-common.cSimon Glass2018-10-091-3/+7
| | | | | | | | | | | | | | | | | | | | | At present this file uses logging but it should use the new macros. Update it and add a log message for an error. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | tpm: Use livetree and allow childrenSimon Glass2018-10-092-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Adjust the TPM drivers to use livetree (only one does not). Also, sometimes TPMs can have child devices if they provide a service to the system (such as storing secure data), so permit that. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | video: Adjust video_clear() to return an errorSimon Glass2018-10-092-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | All driver-model operation should return an error code. Adjust this function to do so also. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
| * | fdt: Remove fdtdec_decode_region() functionSimon Glass2018-10-092-128/+0
| | | | | | | | | | | | | | | | | | | | | This function is not used in U-Boot now. Remove it along with its 'memory' version. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: spi: Add logging of some return valuesSimon Glass2018-10-094-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | When SPI flash operations fail it is helpful to be able to see the error codes and where they are generated. Add logging to capture this information for read operations. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros: Adjust board_get_cros_ec_dev() to return a udeviceSimon Glass2018-10-092-5/+3
| | | | | | | | | | | | | | | | | | | | | Rather than returning what is effectively an internal data structure, return the cros EC device itself. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros: Update cros_ec code to use struct udeviceSimon Glass2018-10-095-125/+122
| | | | | | | | | | | | | | | | | | | | | | | | At present we pass around a private pointer to specify the cros_ec device. With driver model it makes more sense to pass the device. Update the code to do this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | fdt: Allow libfdt in TPLSimon Glass2018-10-091-0/+10
| | | | | | | | | | | | | | | | | | | | | In some cases (e.g. sandbox with verified boot) it is useful to support libfdt in TPL. Update the Kconfig to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | serial: Allow serial to be absent in TPLSimon Glass2018-10-093-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | At present this option applies to SPL, but it should be available in TPL also, and separately. Change to using CONFIG_IS_ENABLED(), add a new Kconfig option and fix up hang(). Signed-off-by: Simon Glass <sjg@chromium.org>
| * | tpm: Add support for SPL and TPLSimon Glass2018-10-093-4/+30
| | | | | | | | | | | | | | | | | | | | | At present the tpm can only be used in U-Boot proper. Updated it to work in SPL and TPL also. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | fdt: Allow indicating a node is for U-Boot proper onlySimon Glass2018-10-092-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | At present it is not possible to specify that a node should be used before relocation (in U-Boot proper) without it also ending up in SPL and TPL device trees. Add a new "u-boot,dm-pre-proper" boolean property for this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | doc: Update docs for device tree in SPL, TPLSimon Glass2018-10-092-1/+12
| | | | | | | | | | | | | | | | | | | | | Make a few small updates to indicate that device tree can be used in SPL and TPL. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | fdt: Document the fact that dtc is now builtSimon Glass2018-10-091-1/+5
| | | | | | | | | | | | | | | | | | | | | This documentation is out of date now that U-Boot builds dtc automatically. Update it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | rtc: Allow use of RTC in SPL and TPLSimon Glass2018-10-093-1/+20
| | | | | | | | | | | | | | | | | | | | | Add Kconfig options so that the RTC can be used in SPL and TPL. This is helpful for accessing the contents of CMOS RAM, for example. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Kconfig: Convert CONFIG_RTC_MC146818 to KconfigSimon Glass2018-10-099-3/+13
| | | | | | | | | | | | | | | | | | Move this option to Kconfig and tidy up the two boards which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | blk: Support block drivers in TPLSimon Glass2018-10-092-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | At present it is not possible to enable/disable block drivers in TPL. This is needed to provide sandbox support. Add a Kconfig option and adjust the Makefile. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Makefile: Add a warning if SPL/TPL cannot be builtSimon Glass2018-10-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | At present the build fails in strange ways if CONFIG_SPL is defined by CONFIG_SUPPORT_SPL is not. Add a warning for this case as it can be very confusing to debug. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | spl: input: Allow input in SPL and TPLSimon Glass2018-10-093-5/+59
| | | | | | | | | | | | | | | | | | | | | In some cases it is necessary to read the keyboard in early phases of U-Boot. Update the config to allow this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sf: Avoid allocating memory on every read operationSimon Glass2018-10-091-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present spi_flash_cmd_read_ops() allocates and frees a few bytes of memory every time it is called. It is faster to use the stack for this and this is now supported by the minimum GCC version required by U-Boot. Remove the allocation and use a variable-sized array instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Update ofnode to read binman-style flash entrySimon Glass2018-10-097-45/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present ofnode_read_fmap_entry() reads a flash map entry in a format which is not supported by binman. To allow use to use binman-format descriptions, update this function. Also add a simple test. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Add a function to find the first inactive childSimon Glass2018-10-093-0/+64
| | | | | | | | | | | | | | | | | | | | | Some devices have children and want to press an existing inactive child into service when needed. Add a function to help with this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Update some functions to use constSimon Glass2018-10-092-24/+24
| | | | | | | | | | | | | | | | | | | | | Quite a few functions do not actually modify the device that is passed in. Update the function signatures to reflect that. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Alloc uclass-private data to be cache-alignedSimon Glass2018-10-092-1/+5
| | | | | | | | | | | | | | | | | | | | | There is no reason why this feature should not be supported for uclass- private data. Update the code accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: Restore blocking I/O on exitSimon Glass2018-10-093-19/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present sandbox sets non-blocking I/O as soon as any input is read from the terminal. However it does not restore the previous state on exit. Fix this and drop the old os_read_no_block() function. This means that we always enable blocking I/O in sandbox (if input is a terminal) whereas previously it would only happen on the first call to tstc() or getc(). However, the difference is likely not important. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: spi: Clean up detection of sandbox SPI emulatorSimon Glass2018-10-092-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | Now that we don't have to deal with the command-line flag we can simplify the code for detecting the emulator. Remove the lookup based on the SPI specification, relying just on the device tree to locate the emulator. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Enhance to support the latest Chromium OSSimon Glass2018-10-092-15/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | This driver was originally written against Chromium OS circa 2012. A few new features have been added. Enhance the TPM driver to match. This mostly includes a few new messages and properly modelling whether a particular 'space' is present or not. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Tidy up enums and return valuesSimon Glass2018-10-093-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | Use an enum for command values instead of open-coding them. This removes the need for comments. Also make sure the driver returns proper error numbers instead of -1. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | serial: sandbox: Allow serial output without device treeSimon Glass2018-10-091-0/+5
| | | | | | | | | | | | | | | | | | | | | At present sandbox assumes that device-tree control is active, but this may not be the case in SPL or TPL. Add some conditions to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: Add a debug UARTSimon Glass2018-10-093-0/+30
| | | | | | | | | | | | | | | | | | | | | Add support for the debug UART so that sandbox provides build testing for this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: video: Speed up video outputSimon Glass2018-10-095-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present there are many situations where sandbox syncs the display to the SDL frame buffer. This is a very expensive operation but is only needed every now and then. Update video_sync() so that we can specify whether this operation is really needed. At present this flag is not used on other architectures. It could also be used for reducing writeback-cache flushes but the benefit of that would need to be investigated. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>