Re: [U-Boot] efi_loader: execute image's unload function

2018-10-01 Thread AKASHI Takahiro
Heinrich, On Fri, Sep 28, 2018 at 01:24:42PM +0900, AKASHI Takahiro wrote: > Heinrich, > > On Fri, Sep 28, 2018 at 04:35:57AM +0200, Heinrich Schuchardt wrote: > > On 08/09/2018 08:50 AM, AKASHI Takahiro wrote: > > > Currently, unload function in EFI_LOADED_IMAGE_PROTOCOL is never called > > >

[U-Boot] [PATCH 1/1] fs: fat: memory leak in fat_unlink()

2018-10-01 Thread Heinrich Schuchardt
Do not leak filename_copy in case of error. Catch out of memory when calling strdup. This addresses Coverity Scan CID 184086. Reported-by: Tom Rini Signed-off-by: Heinrich Schuchardt --- fs/fat/fat_write.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[U-Boot] [PATCH 1/1] efi_loader: error handling in read_console()

2018-10-01 Thread Heinrich Schuchardt
getc() might return an error code. Avoid an incorrect converison to Unicode. This addresses CoverityScan CID 184087. Reported-by: Tom Rini Signed-off-by: Heinrich Schuchardt --- lib/charset.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/charset.c

[U-Boot] [PATCH 1/1] efi_loader: return type efi_console_register()

2018-10-01 Thread Heinrich Schuchardt
Use a return type that can encompass the return value. This fixes CoverityScan CID 184090. Reported-by: Tom Rini Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 2 +- lib/efi_loader/efi_console.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git

[U-Boot] [PATCH 1/1] efi_loader: superfluous statement in is_dir()

2018-10-01 Thread Heinrich Schuchardt
When is_dir() is called we have already execute set_blk_dev(fh). So don't call it again. This fixes CoverityScan CID 184093. Reported-by: Tom Rini Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_file.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[U-Boot] [PATCH 1/1] efi_loader: memory leak in efi_set_variable()

2018-10-01 Thread Heinrich Schuchardt
Do not leak native_name if out of memory. This addresses CoverityScan CID 184095. Reported-by: Tom Rini Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_variable.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_variable.c

[U-Boot] [PATCH v2 16/17] test: Reduce the number of tests run with sandbox_flattree

2018-10-01 Thread Simon Glass
We only need to run driver-model tests with this config, since this is the only thing that is different when CONFIG_OF_LIVE is not defined. Filter out the other tests to same time. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to reduce the number of tests run with

[U-Boot] [PATCH v2 17/17] binman: Run tests concurrently

2018-10-01 Thread Simon Glass
At present the tests run one after the other using a single CPU. This is not very efficient. Bring in the concurrencytest module and run the tests concurrently, using one process for each CPU by default. A -P option allows this to be overridden, which is necessary for code-coverage to function

[U-Boot] [PATCH v2 15/17] patman: Don't clear progress in tout unless it was used

2018-10-01 Thread Simon Glass
At present calling Uninit() always called ClearProgress() which outputs a \r character as well as spaces to remove any progress information on the line. This can mess up the normal output of binman and other tools. Fix this by outputing this only when progress information has actually been

[U-Boot] [PATCH v2 12/17] binman: Separate out testSplBssPad()

2018-10-01 Thread Simon Glass
At present this test runs binman twice, which means that the temporary files from the first run do not get cleaned up. Split this into two tests to fix this problem. Signed-off-by: Simon Glass --- Changes in v2: None tools/binman/ftest.py | 4 +++- 1 file changed, 3 insertions(+), 1

[U-Boot] [PATCH v2 07/17] test: Simplify the PATH setup

2018-10-01 Thread Simon Glass
Use 'export' to avoid repeating the path setup for each command. Signed-off-by: Simon Glass --- Changes in v2: None test/run | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/run b/test/run index d77a1c371b4..6b73813f9bc 100755 --- a/test/run +++

[U-Boot] [PATCH v2 09/17] test: Tidy up comments and variable name

2018-10-01 Thread Simon Glass
The 'result' variable counts the number of failures in running the tests. Rename it to 'failures' to make this more obvious. Also tidy up a few comments. Signed-off-by: Simon Glass --- Changes in v2: None test/run | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

[U-Boot] [PATCH v2 10/17] binman: Add a default path to libfdt.py

2018-10-01 Thread Simon Glass
This module is often available in the sandbox_spl build created by 'make check'. Use this as a default path so that just typing 'binman -t' (without setting PYTHONPATH) will generally run the tests. Signed-off-by: Simon Glass --- Changes in v2: None tools/binman/binman.py | 2 ++

[U-Boot] [PATCH v2 06/17] Makefile: Add a 'check' target for make

2018-10-01 Thread Simon Glass
At present we use 'make tests' to run the tests. For many projects 'make check' is more common, so support that as well. Also add some help to 'make help'. Signed-off-by: Simon Glass --- Changes in v2: None Makefile | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[U-Boot] [PATCH v2 08/17] test: Print the name of each test before running it

2018-10-01 Thread Simon Glass
At present the tests are run without any indication of what is running. For the tests which start with a build this is pretty obvious, but for tools it is not. Add a name for each test we run, and print it before starting the test. Signed-off-by: Simon Glass --- Changes in v2: - Quote @$

[U-Boot] [PATCH v2 03/17] patman: Handle unicode in _ProjectConfigParser tests

2018-10-01 Thread Simon Glass
With Python 2.7.15rc1, ConfigParser.SafeConfigParser has unfortunately started returning unicode, for unknown reasons. Adjust the code to handle this by converting everything to unicode. We cannot convert things to ASCII since email addresses may be encoded with UTF-8. Signed-off-by: Simon Glass

[U-Boot] [PATCH v2 13/17] buildman: dtoc: Suppress unwanted output from test

2018-10-01 Thread Simon Glass
There are a few test cases which print output. Suppress this so that tests can run silently in the normal case. Signed-off-by: Simon Glass --- Changes in v2: None tools/buildman/test.py | 4 +++- tools/dtoc/test_dtoc.py | 6 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git

[U-Boot] [PATCH v2 04/17] test/py: Fix unicode handling for log filtering

2018-10-01 Thread Simon Glass
At present the unicode filtering seems to get confused at times with this error: UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 32: ordinal not in range(128) It seems to be due to self._nonprint being interpreted as UTF-8. Fix it by using ordinals instead of

[U-Boot] [PATCH v2 02/17] sandbox: Unprotect DATA regions in bus tests

2018-10-01 Thread Simon Glass
On my Ubuntu 18.04.1 machine two driver-model bus tests have started failing recently. The problem appears to be that the DATA region of the executable is protected. This does not seem correct, but perhaps there is a reason. To work around it, unprotect the regions in these tests before accessing

[U-Boot] [PATCH v2 14/17] tools: Set an initial value for indir

2018-10-01 Thread Simon Glass
This variable is not documented or set up in the module. Fix this. Signed-off-by: Simon Glass --- Changes in v2: None tools/patman/tools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/patman/tools.py b/tools/patman/tools.py index 1c9bf4e8100..bf099798e65 100644 ---

[U-Boot] [PATCH v2 11/17] binman: Fix up removal of temporary directories

2018-10-01 Thread Simon Glass
At present 'make check' leaves some temporary directories around. Part of this is because we call tools.PrepareOutputDir() twice in some cases, without calling tools.FinaliseOutputDir() in between. Fix this. Signed-off-by: Simon Glass --- Changes in v2: None tools/binman/elf_test.py | 5

[U-Boot] [PATCH v2 05/17] buildman: Make the toolchain test more forgiving

2018-10-01 Thread Simon Glass
The filenames of the toolchains on kernel.org changes every now and then. Fix it for the current change, and make the test use a regex so that it has a better chance of passing with future changes too. Signed-off-by: Simon Glass --- Changes in v2: None tools/buildman/test.py | 6 -- 1

[U-Boot] [PATCH v2 01/17] test/py: ignore console read exceptions after test failure

2018-10-01 Thread Simon Glass
From: Stephen Warren After a test has failed, test/py drains the U-Boot console log to ensure that any relevant output is captured. At this point, we don't care about detecting any additional errors, since the test is already known to have failed, and U-Boot will be restarted. To ensure that the

[U-Boot] [PATCH v2 00/17] test: Various test refinements and improvements

2018-10-01 Thread Simon Glass
This series includes a number of small changes designed to make tests run more smoothly. The overall goal is that 'make check' runs cleanly without unnecessary output and all temporary files aare cleaned up. Changes in v2: - Quote @$ correctly so that quoted arguments can be passed to run_test -

[U-Boot] [PATCH 1/1] efi_loader: fix simple network protocol

2018-10-01 Thread Heinrich Schuchardt
We should not call eth_rx() before the network interface is initialized. The services of the simple network protocol should check the state of the network adapter. Provide a correctly aligned transmit buffer not depending on CONFIG_EFI_LOADER_BOUNCE_BUFFER. Correct the unit test. Add and

[U-Boot] [ANN] U-Boot v2018.11-rc1 released

2018-10-01 Thread Tom Rini
Hey all, So it's release day and I've put up v2018.11-rc1. The merge window is now closed and I've updated git and the tarballs are also up now. Looking back to v2018.09, I had hoped to include the entire SPI-NAND series in that release. We're not there quite yet, but I expect a final PR

Re: [U-Boot] [PATCH v2] MAINTAINERS: at91: update entry for at91 boards

2018-10-01 Thread Tom Rini
On Mon, Oct 01, 2018 at 05:31:53PM +0300, Eugen Hristev wrote: > Updated the maintainership for the at91 boards. > > Signed-off-by: Eugen Hristev Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing

Re: [U-Boot] Errors when starting sandbox

2018-10-01 Thread Joe Hershberger
On Mon, Oct 1, 2018 at 4:27 PM, Simon Glass wrote: > Hi Joe, > > On 1 October 2018 at 15:14, Joe Hershberger wrote: >> >> Hi Simon, >> >> On Mon, Oct 1, 2018 at 12:32 PM, Simon Glass wrote: >> > Hi Joe, >> > >> > When I start sandbox now I see these errors every time. It is possible >> > to fix

Re: [U-Boot] [PATCH 2/3] board: da8xxevm: Add SPL DM for serial, spi

2018-10-01 Thread Adam Ford
On Mon, Sep 3, 2018 at 12:30 PM Jagan Teki wrote: > > This patch add SPL DM support for da8xxevm boards > with SPL serial, SPI drivers supported via platdata. > > Cc: Adam Ford I needed to massage one file a bit to get it to apply to master, but with that, Tested-by: Adam Ford #da850evm >

Re: [U-Boot] [PATCH 1/3] spi: davinci: Add platdata support

2018-10-01 Thread Adam Ford
On Mon, Oct 1, 2018 at 7:54 AM Adam Ford wrote: > > On Mon, Sep 3, 2018 at 5:22 PM Adam Ford wrote: > > > > On Mon, Sep 3, 2018 at 5:21 PM Adam Ford wrote: > > > > > > On Mon, Sep 3, 2018 at 12:30 PM Jagan Teki > > > wrote: > > > > > > > > Davanci spi driver has DM support already, this patch

Re: [U-Boot] clk: Add support for Arm's Versatile Express OSC clock generators

2018-10-01 Thread Tom Rini
On Mon, Oct 01, 2018 at 11:30:25PM +0200, Linus Walleij wrote: > On Mon, Oct 1, 2018 at 5:26 PM Tom Rini wrote: > > > Ah, OK, I see now. Let me also bring in Linus Walleij on this too. > > U-Boot has split the MAINTAINERS file up for a while now and stuff like > > these platform specific

Re: [U-Boot] clk: Add support for Arm's Versatile Express OSC clock generators

2018-10-01 Thread Linus Walleij
On Mon, Oct 1, 2018 at 5:26 PM Tom Rini wrote: > Ah, OK, I see now. Let me also bring in Linus Walleij on this too. > U-Boot has split the MAINTAINERS file up for a while now and stuff like > these platform specific drivers should get popped into > board/armltd/vexpress/MAINTAINERS or

Re: [U-Boot] Errors when starting sandbox

2018-10-01 Thread Simon Glass
Hi Joe, On 1 October 2018 at 15:14, Joe Hershberger wrote: > > Hi Simon, > > On Mon, Oct 1, 2018 at 12:32 PM, Simon Glass wrote: > > Hi Joe, > > > > When I start sandbox now I see these errors every time. It is possible > > to fix this? > > > > $ u-boot -D > > ... > > Warning: host_lo MAC

Re: [U-Boot] [PATCH] clk: Add support for Arm's Versatile Express OSC clock generators

2018-10-01 Thread Linus Walleij
On Mon, Sep 17, 2018 at 6:50 PM Liviu Dudau wrote: > The Arm Versatile Express and Juno development boards contain an > OSC clock generator that can be accessed through the Versatile > Express config bus. The generators are quite often being controlled > by some MCU and the config bus offers a

Re: [U-Boot] Errors when starting sandbox

2018-10-01 Thread Joe Hershberger
Hi Simon, On Mon, Oct 1, 2018 at 12:32 PM, Simon Glass wrote: > Hi Joe, > > When I start sandbox now I see these errors every time. It is possible > to fix this? > > $ u-boot -D > ... > Warning: host_lo MAC addresses don't match: > Address in ROM is ea:06:97:67:f4:b6 > Address in

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-01 Thread Miquel Raynal
Hi Jagan, Jagan Teki wrote on Mon, 1 Oct 2018 21:49:32 +0530: > On Monday 01 October 2018 07:13 PM, Miquel Raynal wrote: > > There should not be a 'nand' command, a 'sf' command and certainly not > > a new 'spi-nand' command. Write a 'mtd' command instead to manage all > > MTD

Re: [U-Boot] [PATCH 43/45] video: at91: Adjust vidconsole_position_cursor() to use char pos

2018-10-01 Thread Anatolij Gustschin
Hi Simon, On Mon, 1 Oct 2018 12:22:47 -0600 Simon Glass s...@chromium.org wrote: > 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

[U-Boot] [RFQ PATCH] nand: mxs_nand: Add the option to have BBT in the nand device

2018-10-01 Thread Michael Trimarchi
This patch add people that use ubi and BBT in the kernel. Up to now the mxs driver has no managment for BBT in nand itself. We can have this problem: ubi0: attaching mtd1 ubi0 error: scan_peb: bad image sequence number -999266176 in PEB 1844, expected 344810451 Erase counter header dump:

Re: [U-Boot] [PATCH 44/45] video: Tidy up a few comments in video.o

2018-10-01 Thread Anatolij Gustschin
On Mon, 1 Oct 2018 12:22:48 -0600 Simon Glass s...@chromium.org wrote: > Add a little more information to one comment and update the guard comment > to be more accurate. > > Signed-off-by: Simon Glass Reviewed-by: Anatolij Gustschin -- Anatolij

Re: [U-Boot] [PATCH 22/45] video: Adjust video_clear() to return an error

2018-10-01 Thread Anatolij Gustschin
On Mon, 1 Oct 2018 12:22:26 -0600 Simon Glass s...@chromium.org wrote: > All driver-model operation should return an error code. Adjust this > function to do so also. > > Signed-off-by: Simon Glass Reviewed-by: Anatolij Gustschin -- Anatolij ___

Re: [U-Boot] [PATCH 09/15] sandbox: video: Speed up video output

2018-10-01 Thread Anatolij Gustschin
On Mon, 1 Oct 2018 11:55:14 -0600 Simon Glass s...@chromium.org wrote: > 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 >

Re: [U-Boot] [PATCH 00/22] spl: Add features for passing info from SPL to U-Boot proper

2018-10-01 Thread Simon Glass
Hi Lukasz, On 1 October 2018 at 07:06, Lukasz Majewski wrote: > > Hi Simon, > > > At present we have no standard way of passing information from SPL to > > U-Boot. Such information may be the size of DRAM banks or some > > information about the reset state of the machine,for example. > > > >

[U-Boot] [PATCH 38/45] ctags: Minor changes to fix ctags output

2018-10-01 Thread Simon Glass
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.

[U-Boot] [PATCH 35/45] cros_ec: Add support for v3 messages on LPC

2018-10-01 Thread Simon Glass
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 --- drivers/misc/cros_ec_lpc.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/misc/cros_ec_lpc.c

[U-Boot] [PATCH 42/45] sysreset: Add a way to find the last reset

2018-10-01 Thread Simon Glass
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 --- drivers/sysreset/sysreset-uclass.c | 30 +

[U-Boot] [PATCH 33/45] x86: Update mtrr functions to allow leaving cache alone

2018-10-01 Thread Simon Glass
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

[U-Boot] [PATCH 45/45] dtoc: Fix the value of SetInt()

2018-10-01 Thread Simon Glass
This does not set the correct value at present. Fix it. Signed-off-by: Simon Glass --- tools/dtoc/fdt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py index 2df2d4b0cc7..9ad72f89ec7 100644 --- a/tools/dtoc/fdt.py +++

[U-Boot] [PATCH 30/45] Add a header file for strings

2018-10-01 Thread Simon Glass
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 --- include/string.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 include/string.h diff --git a/include/string.h

[U-Boot] [PATCH 41/45] sysreset: Tidy up a few comments and logging

2018-10-01 Thread Simon Glass
Some comments are incorrect or missing pieces. Fix these and use logging to print the error. Signed-off-by: Simon Glass --- drivers/sysreset/sysreset-uclass.c | 4 +++- include/sysreset.h | 4 +++- test/dm/sysreset.c | 1 - 3 files changed, 6 insertions(+), 3

[U-Boot] [PATCH 36/45] test: panel: Add a test for the panel uclass

2018-10-01 Thread Simon Glass
At present this uclass has no tests. Add a simple one which checks the PWM configuration, regulator and GPIO. Signed-off-by: Simon Glass --- arch/sandbox/dts/sandbox_pmic.dtsi | 2 +- arch/sandbox/dts/test.dts | 20 +++- arch/sandbox/include/asm/test.h| 15 +

[U-Boot] [PATCH 31/45] Rename GPT_HEADER_SIGNATURE to avoid conflict

2018-10-01 Thread Simon Glass
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 --- disk/part_efi.c| 6 +++--- include/part_efi.h | 2 +- 2 files

[U-Boot] [PATCH 39/45] fdt: Allow C++ comments in link scripts and DT files

2018-10-01 Thread Simon Glass
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 --- Makefile | 2 +- scripts/Makefile.spl | 2 +- 2 files changed, 2

[U-Boot] [PATCH 40/45] pci: Add a little more debugging to pci_rom

2018-10-01 Thread Simon Glass
Add some logging on failure. Signed-off-by: Simon Glass --- drivers/pci/pci_rom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index 29113f79586..eaacd4066e8 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c

[U-Boot] [PATCH 34/45] cros_ec: Update cros_ec_read_hash() to specify the image

2018-10-01 Thread Simon Glass
Allow selection of which EC image to hash. Signed-off-by: Simon Glass --- cmd/cros_ec.c | 2 +- drivers/misc/cros_ec.c | 7 --- include/cros_ec.h | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c index

[U-Boot] [PATCH 44/45] video: Tidy up a few comments in video.o

2018-10-01 Thread Simon Glass
Add a little more information to one comment and update the guard comment to be more accurate. Signed-off-by: Simon Glass --- include/video.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/video.h b/include/video.h index ab416c1cfac..75200f0e452 100644 ---

[U-Boot] [PATCH 23/45] tpm: Use livetree and allow children

2018-10-01 Thread Simon Glass
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 --- drivers/misc/cros_ec.c| 6 +++--- drivers/tpm/tpm-uclass.c | 1 +

[U-Boot] [PATCH 37/45] panel: Expand the backlight support

2018-10-01 Thread Simon Glass
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

[U-Boot] [PATCH 43/45] video: at91: Adjust vidconsole_position_cursor() to use char pos

2018-10-01 Thread Simon Glass
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.

[U-Boot] [PATCH 26/45] binman: Move to three-digit test-file numbers

2018-10-01 Thread Simon Glass
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 --- tools/binman/entry_test.py| 2 +- tools/binman/fdt_test.py

[U-Boot] [PATCH 19/45] cros: Adjust board_get_cros_ec_dev() to return a udevice

2018-10-01 Thread Simon Glass
Rather than returning what is effectively an internal data structure, return the cros EC device itself. Signed-off-by: Simon Glass --- common/cros_ec.c | 4 ++-- include/cros_ec.h | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/common/cros_ec.c b/common/cros_ec.c

[U-Boot] [PATCH 28/45] log: Add comments to the rest of the log categories

2018-10-01 Thread Simon Glass
At present some of the log categories are missing comments. Add them. Signed-off-by: Simon Glass --- include/log.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/log.h b/include/log.h index 623f0fc32f7..0243bc08a4f 100644 --- a/include/log.h +++

[U-Boot] [PATCH 21/45] fdt: Remove fdtdec_decode_region() function

2018-10-01 Thread Simon Glass
This function is not used in U-Boot now. Remove it along with its 'memory' version. Signed-off-by: Simon Glass --- include/fdtdec.h | 45 -- lib/fdtdec.c | 83 2 files changed, 128 deletions(-) diff --git

[U-Boot] [PATCH 29/45] malloc_simple: Add logging of allocations

2018-10-01 Thread Simon Glass
It is sometimes useful to see what memory is being allocated early during boot. Add logging to support this, using a new LOGC_ALLOC category. Signed-off-by: Simon Glass --- common/malloc_simple.c | 58 +++--- include/malloc.h | 1 + 2 files changed,

[U-Boot] [PATCH 24/45] tpm: Tidy up logging in tpm-common.c

2018-10-01 Thread Simon Glass
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 --- lib/tpm-common.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/tpm-common.c b/lib/tpm-common.c index

[U-Boot] [PATCH 27/45] binman: Add a test for Intel reference code

2018-10-01 Thread Simon Glass
Unfortunately the test was not included in the original implementation. Add one. Signed-off-by: Simon Glass --- tools/binman/ftest.py | 7 +++ tools/binman/test/100_intel_refcode.dts | 14 ++ 2 files changed, 21 insertions(+) create mode 100644

[U-Boot] [PATCH 22/45] video: Adjust video_clear() to return an error

2018-10-01 Thread Simon Glass
All driver-model operation should return an error code. Adjust this function to do so also. Signed-off-by: Simon Glass --- drivers/video/video-uclass.c | 4 +++- include/video.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/video/video-uclass.c

[U-Boot] [PATCH 25/45] tpm: Add a few new commands for v1

2018-10-01 Thread Simon Glass
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 --- cmd/tpm_test.c | 15 --- include/tpm-v1.h | 28 lib/tpm-v1.c | 68

[U-Boot] [PATCH 20/45] dm: spi: Add logging of some return values

2018-10-01 Thread Simon Glass
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 --- drivers/mtd/spi/sf-uclass.c | 6 +++--- drivers/mtd/spi/sf_probe.c | 2 +-

[U-Boot] [PATCH 14/45] fdt: Allow indicating a node is for U-Boot proper only

2018-10-01 Thread Simon Glass
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 --- doc/driver-model/README.txt | 4 +++-

[U-Boot] [PATCH 16/45] serial: Allow serial to be absent in TPL

2018-10-01 Thread Simon Glass
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 --- drivers/serial/Kconfig | 10 ++ drivers/serial/serial-uclass.c | 4

[U-Boot] [PATCH 13/45] doc: Update docs for device tree in SPL, TPL

2018-10-01 Thread Simon Glass
Make a few small updates to indicate that device tree can be used in SPL and TPL. Signed-off-by: Simon Glass --- doc/README.fdt-control | 10 ++ doc/driver-model/README.txt | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/README.fdt-control

[U-Boot] [PATCH 11/45] rtc: Allow use of RTC in SPL and TPL

2018-10-01 Thread Simon Glass
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 --- drivers/rtc/Kconfig | 18 ++ drivers/rtc/Makefile | 2 +- drivers/rtc/rtc-uclass.c | 1 + 3 files

[U-Boot] [PATCH 17/45] fdt: Allow libfdt in TPL

2018-10-01 Thread Simon Glass
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 --- lib/Kconfig | 10 ++ 1 file changed, 10 insertions(+) diff --git a/lib/Kconfig b/lib/Kconfig index b711d62d32f..ccab426e121 100644

[U-Boot] [PATCH 18/45] cros: Update cros_ec code to use struct udevice

2018-10-01 Thread Simon Glass
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 --- cmd/cros_ec.c | 24 +++--- drivers/misc/cros_ec.c | 147

[U-Boot] [PATCH 07/45] Makefile: Add a warning if SPL/TPL cannot be built

2018-10-01 Thread Simon Glass
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 --- scripts/Makefile.spl | 7 +++ 1 file changed, 7 insertions(+) diff --git

[U-Boot] [PATCH 10/45] Kconfig: Convert CONFIG_RTC_MC146818 to Kconfig

2018-10-01 Thread Simon Glass
Move this option to Kconfig and tidy up the two boards which use it. Signed-off-by: Simon Glass --- configs/edison_defconfig | 1 + configs/malta_defconfig | 1 + drivers/rtc/Kconfig | 8 include/configs/edison.h | 1 - include/configs/malta.h | 1 -

[U-Boot] [PATCH 09/45] blk: Support block drivers in TPL

2018-10-01 Thread Simon Glass
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 --- drivers/block/Kconfig | 12 drivers/block/Makefile | 2 +- 2 files changed, 13

[U-Boot] [PATCH 04/45] dm: core: Update ofnode to read binman-style flash entry

2018-10-01 Thread Simon Glass
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 --- arch/sandbox/dts/sandbox.dts | 20 ++--

[U-Boot] [PATCH 15/45] tpm: Add support for SPL and TPL

2018-10-01 Thread Simon Glass
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 --- drivers/tpm/Makefile | 2 +- lib/Kconfig | 22 ++ lib/Makefile | 10 +++--- 3 files changed, 30 insertions(+), 4 deletions(-)

[U-Boot] [PATCH 08/45] spl: misc: Allow misc drivers in SPL and TPL

2018-10-01 Thread Simon Glass
In some cases it is necessary to read the keyboard in early phases of U-Boot. The cros_ec keyboard is kept in the misc directory. Update the config to allow this. Signed-off-by: Simon Glass --- drivers/misc/Kconfig | 72 +++ drivers/misc/Makefile | 9

[U-Boot] [PATCH 06/45] spl: input: Allow input in SPL and TPL

2018-10-01 Thread Simon Glass
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 --- drivers/input/Kconfig | 48 ++ drivers/input/Makefile | 11 ++ drivers/input/input.c | 5 - 3

[U-Boot] [PATCH 12/45] fdt: Document the fact that dtc is now built

2018-10-01 Thread Simon Glass
This documentation is out of date now that U-Boot builds dtc automatically. Update it. Signed-off-by: Simon Glass --- doc/README.fdt-control | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/README.fdt-control b/doc/README.fdt-control index 634a10616fc..88c04692f74

[U-Boot] [PATCH 05/45] sf: Avoid allocating memory on every read operation

2018-10-01 Thread Simon Glass
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:

[U-Boot] [PATCH 02/45] dm: core: Update some functions to use const

2018-10-01 Thread Simon Glass
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 --- drivers/core/device.c | 24 include/dm/device.h | 24 2 files changed, 24 insertions(+),

[U-Boot] [PATCH 03/45] dm: core: Add a function to find the first inactive child

2018-10-01 Thread Simon Glass
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 --- drivers/core/device.c | 18 ++ include/dm/device.h | 15 +++ test/dm/core.c| 31

[U-Boot] [PATCH 01/45] dm: core: Alloc uclass-private data to be cache-aligned

2018-10-01 Thread Simon Glass
There is no reason why this feature should not be supported for uclass- private data. Update the code accordingly. Signed-off-by: Simon Glass --- drivers/core/device.c | 3 ++- include/dm/uclass.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/core/device.c

[U-Boot] [PATCH 00/45] Various fixes and improvements

2018-10-01 Thread Simon Glass
This series collects together a large number of small patches that I have been fiddling with for a while. At lot of them relate to SPL and TPL and updating Chromium OS verified boot to work on U-Boot. Simon Glass (45): dm: core: Alloc uclass-private data to be cache-aligned dm: core: Update

[U-Boot] [PATCH 13/15] sandbox: tpm: Enhance to support the latest Chromium OS

2018-10-01 Thread Simon Glass
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 ---

[U-Boot] [PATCH 09/15] sandbox: video: Speed up video output

2018-10-01 Thread Simon Glass
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

Re: [U-Boot] [PATCH 03/18] armv8: ls1043ardb: Enable GPIO driver

2018-10-01 Thread York Sun
On 08/22/2018 06:15 PM, ying.zhang22...@nxp.com wrote: > From: Zhang Ying-22455 > > Signed-off-by: Zhang Ying-22455 > --- > configs/ls1043ardb_SECURE_BOOT_defconfig| 2 ++ > configs/ls1043ardb_defconfig| 2 ++ > configs/ls1043ardb_nand_SECURE_BOOT_defconfig | 2 ++

[U-Boot] [PATCH 12/15] sandbox: tpm: Tidy up enums and return values

2018-10-01 Thread Simon Glass
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 --- drivers/tpm/tpm_tis_sandbox.c | 20 ++-- include/tpm-v1.h | 14

[U-Boot] [PATCH 04/15] sandbox: spi: Drop command-line SPI option

2018-10-01 Thread Simon Glass
At present we support specifying SPI flash devices to use in the device tree and on the command line. Drop the second option, since it is a pain to support nicely with driver model, and unnecessary. Signed-off-by: Simon Glass --- drivers/mtd/spi/sandbox.c | 122

[U-Boot] [PATCH 10/15] sandbox: Add a debug UART

2018-10-01 Thread Simon Glass
Add support for the debug UART so that sandbox provides build testing for this feature. Signed-off-by: Simon Glass --- configs/sandbox_defconfig | 2 ++ drivers/serial/Kconfig| 11 +++ drivers/serial/sandbox.c | 17 + 3 files changed, 30 insertions(+) diff --git

[U-Boot] [PATCH 03/15] sandbox: Add a way to write data to the host filesystem

2018-10-01 Thread Simon Glass
For debugging it is sometimes useful to write out data for inspection using an external tool. Add a function which can write this data to a given file. Signed-off-by: Simon Glass --- arch/sandbox/cpu/os.c | 20 include/os.h | 13 + 2 files changed, 33

[U-Boot] [PATCH 05/15] sandbox: Support booting from TPL to SPL

2018-10-01 Thread Simon Glass
At present we support booting from SPL to U-Boot proper. Add support for the previous stage too, so sandbox can be started with TPL. Signed-off-by: Simon Glass --- arch/sandbox/cpu/os.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git

[U-Boot] [PATCH 14/15] dm: spi: Clean up detection of sandbox SPI emulator

2018-10-01 Thread Simon Glass
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 --- arch/sandbox/include/asm/state.h | 1 -

[U-Boot] [PATCH 15/15] sandbox: Restore blocking I/O on exit

2018-10-01 Thread Simon Glass
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

[U-Boot] [PATCH 11/15] serial: sandbox: Allow serial output without device tree

2018-10-01 Thread Simon Glass
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 --- drivers/serial/sandbox.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/serial/sandbox.c

[U-Boot] [PATCH 07/15] sandbox: Remove the old memory file later

2018-10-01 Thread Simon Glass
When debugging sandbox it is sometimes annoying that the memory file is deleted early on. If sandbox later crashes or we quit (using the debugger), it is not possible to run it again with the same state since the memory file is gone. Remove the old memory file when sandbox exits, instead. Also

[U-Boot] [PATCH 06/15] sandbox: Add a flag to set the default log level

2018-10-01 Thread Simon Glass
It is useful to be able to set the default log level from the command line when running sandbox. Add a new -L command-line flag for this. The log level is set using the enum log_level_t in log.h. At present a number must be specified, e.g. -L7 for debug. Signed-off-by: Simon Glass ---

  1   2   >