Re: [U-Boot] [PATCH v5 02/20] dm: core: Fix up ofnode_get_addr_index() for 64-bit values

2017-07-28 Thread sjg
At present this function only supports 32-bit (single-cell) values. Update it to support two-cell values also. Signed-off-by: Simon Glass Tested-by: Marcel Ziswiler Tested-on: Beaver, Jetson-TK1 --- Changes in v5: None Changes in v4: - Add new patch to fix up ofnode_get_addr_index() for 64-bit

Re: [U-Boot] [PATCH] dm: Fix typo in include-guard for dm-structs.h

2017-07-28 Thread sjg
On 11 July 2017 at 15:30, Philipp Tomsich wrote: > > The include-guard for dm-structs.h was misspelled as __DT_STTUCTS. > Change it. > > Signed-off-by: Philipp Tomsich > --- > > include/dt-structs.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Simon Glass Applied t

Re: [U-Boot] [PATCH v5 04/20] tegra: tegra124: Add a PMC syscon driver

2017-07-28 Thread sjg
The PMC can be modelled as a syscon peripheral. Add a driver for this so that it can be accessed by drivers when needed. Enable it for tegra124 boards. Signed-off-by: Simon Glass Tested-by: Marcel Ziswiler Tested-on: Beaver, Jetson-TK1 --- Changes in v5: None Changes in v4: None Changes in v3:

Re: [U-Boot] [PATCH v5 07/20] dm: video: tegra124: Convert to livetree

2017-07-28 Thread sjg
Update these drives to support a live device tree. Signed-off-by: Simon Glass Acked-by: Anatolij Gustschin Tested-by: Marcel Ziswiler Tested-on: Beaver, Jetson-TK1 --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/video/tegra124/display.c | 8 +++---

Re: [U-Boot] [PATCH v5 03/20] tegra: spl: Enable debug UART

2017-07-28 Thread sjg
Enable the debug UART in SPL to allow early serial output even if the standard UART does not work (e.g. due to driver model problem). Signed-off-by: Simon Glass Tested-by: Marcel Ziswiler Tested-on: Beaver, Jetson-TK1 --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2

Re: [U-Boot] [PATCH 4/5] tpm: add more useful NV storage permission flags

2017-11-17 Thread sjg
On 3 October 2017 at 09:52, André Draszik wrote: > From: André Draszik > > TPM_NV_PER_PPREAD: physical presence needed for reading > TPM_NV_PER_WRITEDEFINE: persistent write lock by writing size 0 > TPM_NV_PER_WRITEALL: write in one go > > Signed-off-by: André Draszik > --- > include/tpm.h | 3

Re: [U-Boot] [PATCH] dm: core: fix member name in ofnode_union documentation

2017-11-17 Thread sjg
On 9 November 2017 at 04:44, Baruch Siach wrote: > Fixes: 4984de2baaa ("dm: core: Add ofnode to represent device tree nodes") > Cc: Simon Glass > Signed-off-by: Baruch Siach > --- > include/dm/ofnode.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Simon Glass Applied t

Re: [U-Boot] [PATCH v2 3/5] tpm: add tpm_get_random()

2017-11-17 Thread sjg
On 3 October 2017 at 09:55, André Draszik wrote: Please add a commit message. Also where is this used? Is it dead code? Acked-by: Simon Glass > From: André Draszik > > Signed-off-by: André Draszik > --- > include/tpm.h | 12 > lib/tpm.c | 43

Re: [U-Boot] [PATCH v2 5/5] tpm: add more missing va_end()

2017-11-17 Thread sjg
On 3 October 2017 at 09:55, André Draszik wrote: > From: André Draszik > > While commit 36d35345b1f6 ("tpm: add missing va_end") added > some missing calls to va_end(), it missed a few places. > > Signed-off-by: André Draszik > --- > lib/tpm.c | 5 - > 1 file changed, 4 insertions(+), 1 del

Re: [U-Boot] [PATCH] dm: core: Correct address cast in dev_read_addr_ptr()

2017-11-17 Thread sjg
On Sun, Oct 01, 2017 at 12:31:21AM +0200, Dr. Philipp Tomsich wrote: > > > On 30 Sep 2017, at 22:32, Tom Rini wrote: > > > > On Sat, Sep 30, 2017 at 06:08:02PM +0200, Dr. Philipp Tomsich wrote: > >> Simon, > >> > >>> On 28 Sep 2017, at 18:14, Dr. Philipp Tomsich > >>> wrote: > >>> > >>> > O

Re: [U-Boot] [PATCH] cmd/fdt.c align data buffer to avoid unaligned word access

2017-11-17 Thread sjg
On 28 September 2017 at 03:29, Bernhard Messerklinger wrote: > Since the compiler is free to place a char array to any address in > memory (in this case the stack), also to a non word aligned address the > function "fdt_prop_parse" runs into troubles upon it wants to write some > (fdt32_t *) to su

Re: [U-Boot] [PATCH v2 1/5] SPL: fix printing of image name

2017-11-17 Thread sjg
Hi Andre, On 1 November 2017 at 03:09, André Draszik wrote: > > Hi, > > > On Tue, 2017-10-03 at 16:55 +0100, André Draszik wrote: > > From: André Draszik > > > > The maximum length of the name of the image is > > obviously not sizeof(), which is just the > > length of a pointer, but IH_NMLEN. >

Re: [U-Boot] [PATCH v2 2/5] tpm: fix reading of permanent flags

2017-11-17 Thread sjg
On 3 October 2017 at 09:55, André Draszik wrote: > From: André Draszik > > The offset of the permanent flags structure is in a different > place in the response compared to what the code is doing, > which gives us a completely useless result. > > Fix by replacing hand-crafted code with generic pa

Re: [U-Boot] [PATCH] sandbox: Add clrbits/setbits macros

2017-11-17 Thread sjg
We borrow the macros for these functions from ARM and remove references to '__raw_'. Signed-off-by: Tom Rini --- arch/sandbox/include/asm/io.h | 57 +++ 1 file changed, 57 insertions(+) Applied to u-boot-dm thanks!

Re: [U-Boot] [PATCH 24/26] binman: Add add test for using an Intel MRC binary

2017-11-23 Thread sjg
MRC (Memory Reference Code) is a binary blob used to set up the SDRAM controller on some Intel boards. Add a test for this feature. With this test coverage on binman is back up to 100%. Signed-off-by: Simon Glass --- tools/binman/ftest.py | 7 +++ tools/binman/test/50_intel_m

Re: [U-Boot] [PATCH 25/26] binman: Return non-zero exit code on test failure

2017-11-23 Thread sjg
Return exit code 1 when test fail so that callers can detect this. Signed-off-by: Simon Glass --- tools/binman/binman.py | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) Applied to u-boot-dm thanks! ___ U-Boot mailing list U-Boot@lists.d

Re: [U-Boot] [PATCH 19/26] binman: Increase test coverage back to 100%

2017-11-23 Thread sjg
Make a minor tweak to fix test coverage. Signed-off-by: Simon Glass --- tools/binman/etype/u_boot_ucode.py | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) Applied to u-boot-dm thanks! ___ U-Boot mailing list U-Boot@lists.denx.de htt

Re: [U-Boot] [PATCH 17/26] binman: Add tests for importlib availability

2017-11-23 Thread sjg
Add a test that the 'entry' module works with or without importlib. The tests are numbered so that they are executed in the correct order. Signed-off-by: Simon Glass --- tools/binman/binman.py | 8 ++-- tools/binman/entry_test.py | 30 ++ 2 files changed, 36

Re: [U-Boot] [PATCH 03/26] binman: Add a Makefile for test-program compilation

2017-11-23 Thread sjg
These test programs are includedd as binary files in U-Boot to avoid having to build them (and associated toolchain differences). Instructions on building are in the files themselves, but it seems better to provide a Makefile which can be manually run when desired. Add a Makefile, separate from th

Re: [U-Boot] [PATCH 21/26] binman: Add test for u-boot-spl-bss-pad

2017-11-23 Thread sjg
Add a test that we can pad the BSS with zero bytes. Signed-off-by: Simon Glass --- tools/binman/ftest.py| 9 + tools/binman/test/47_spl_bss_pad.dts | 17 + tools/binman/test/Makefile | 5 - tools/binman/test/bss_data | Bin 0 -

Re: [U-Boot] [PATCH 02/26] binman: Add docs explaining how to enable binman for a board

2017-11-23 Thread sjg
The process is not obvious. Add a little section to explain how to move a board to use binman. Signed-off-by: Simon Glass --- tools/binman/README | 21 + 1 file changed, 21 insertions(+) Applied to u-boot-dm thanks! ___ U-Boot mai

Re: [U-Boot] [PATCH 22/26] binman: Add a test for x86-start16-spl

2017-11-23 Thread sjg
This allows us to put the 16-bit x86 start-up code in SPL. Add a test for it. Signed-off-by: Simon Glass --- tools/binman/ftest.py| 10 +- tools/binman/test/48_x86-start16-spl.dts | 13 + 2 files changed, 22 insertions(+), 1 deletion(-) create mode 10064

Re: [U-Boot] [PATCH 08/26] patman: Fix up tests to pass with newest checkpatch

2017-11-23 Thread sjg
The checkpatch tool was updated but the patman tests were not. Fix this. Signed-off-by: Simon Glass --- tools/patman/test.py | 41 ++--- 1 file changed, 26 insertions(+), 15 deletions(-) Applied to u-boot-dm thanks! __

Re: [U-Boot] [PATCH 20/26] binman: Check for files missing from test coverage

2017-11-23 Thread sjg
Files that are never imported are not shown in the test-coverage report. Detect these and show an error. Signed-off-by: Simon Glass --- tools/binman/binman.py | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) Applied to u-boot-dm thanks!

Re: [U-Boot] [PATCH 18/26] binman: Add a main program to the tests

2017-11-23 Thread sjg
Add a main program so that the tests can be executed directly, without going through the main binman program. Signed-off-by: Simon Glass --- tools/binman/entry_test.py | 4 tools/binman/ftest.py | 4 2 files changed, 8 insertions(+) Applied to u-boot-dm thanks! _

Re: [U-Boot] [PATCH 16/26] binman: Set up 'entry' to permit full test coverage

2017-11-23 Thread sjg
There is a little check at the top of entry.py which decides if importlib is available. At present this has no test coverage. To add this we will need to import the module twice, once with importlib and once without. In preparation for allowing a test to control the importing of this module, remove

Re: [U-Boot] [PATCH 13/26] dtoc: Fix up tests

2017-11-23 Thread sjg
The tool has changed slightly since it was originally written. Update the tests to suit. Signed-off-by: Simon Glass --- tools/dtoc/test_dtoc.py | 82 ++--- 1 file changed, 37 insertions(+), 45 deletions(-) Applied to u-boot-dm thanks! ___

Re: [U-Boot] [PATCH 23/26] binman: Add add test for SPL with a microcode pointer

2017-11-23 Thread sjg
Add a test for this feature. It allows SPL to hold a pointer to the microcode block. This is used for 64-bit U-Boot on x86. Signed-off-by: Simon Glass --- tools/binman/etype/u_boot_spl_with_ucode_ptr.py | 2 +- tools/binman/ftest.py | 84 - too

Re: [U-Boot] [PATCH 01/26] binman: Add better Makefile debugging

2017-11-23 Thread sjg
There is a debugging option in the Makefile to allow people to figure out which u-boot.dtsi files are used in the build. But is it not easy to use since it only shows files it finds, not those it is looking for. Update it and update the mention of it to the docs. Signed-off-by: Simon Glass ---

Re: [U-Boot] [PATCH 15/26] binman: Append to PYTHONPATH when running test coverage

2017-11-23 Thread sjg
Rather that overwrite this, append to it, in case the caller has already set up the path correctly. Signed-off-by: Simon Glass --- tools/binman/binman.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm thanks! ___ U-Boot ma

Re: [U-Boot] [PATCH 10/26] buildman: Allow skipping of tests which use the network

2017-11-23 Thread sjg
Accessing the network slows down the test and limits the environment in which it can be run. Add an option to disable network tests. Signed-off-by: Simon Glass --- tools/buildman/buildman.py | 6 -- tools/buildman/cmdline.py | 2 ++ tools/buildman/test.py | 7 +-- 3 files changed,

Re: [U-Boot] [PATCH 06/26] test/run: Report and return failure

2017-11-23 Thread sjg
This script runs the tests but does not report failure. Also it always returns an exit code of 0 even on failure. Fix these problems by checking the result of each test. Signed-off-by: Simon Glass --- test/run | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) Applied

Re: [U-Boot] [PATCH 11/26] buildman: Fix up tests

2017-11-23 Thread sjg
The tests were broken by two separate commits which adjusted the output when boards are listed. Fix this by adding back a PowerPC board and putting the name of each board in the test. Fixes: b9f7d881 (powerpc, 5xx: remove some "5xx" remains) Fixes: 8d7523c5 (buildman: Allow showing the list of boa

Re: [U-Boot] [PATCH 04/26] binman: Rename tests to ftest

2017-11-23 Thread sjg
At present these tests use the same filename as patman. This adds confusion when running all tests, since error messages look very similar. In fact binman tries to run the wrong tests at present. Rename the tests. Signed-off-by: Simon Glass --- tools/binman/binman.py | 4 ++--

Re: [U-Boot] [PATCH 05/26] binman: Disable the no-unit_address_vs_reg warnings

2017-11-23 Thread sjg
These warnings are not useful for binman tests. Disable them. Signed-off-by: Simon Glass --- tools/dtoc/fdt_util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Applied to u-boot-dm thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http

Re: [U-Boot] [PATCH] gitignore: add intermediates from libfdt build

2017-09-04 Thread sjg
On 29 August 2017 at 17:47, Philipp Tomsich wrote: > Since ee95d10 (fdt: Build the new python libfdt module), a number of > additional files are auto-generated/installed into the tools directory. > List these in .gitignore to suppress having them listed as untracked. > > Signed-off-by: Philipp Tom

Re: [U-Boot] [PATCH 1/3] dm: Add migration plan for CONFIG_BLK

2017-09-04 Thread sjg
Hi Tom, On 7 August 2017 at 09:39, Tom Rini wrote: > On Sat, Aug 05, 2017 at 03:45:53PM -0600, Simon Glass wrote: > >> The CONFIG_BLK conversion involves quite invasive changes in the U-Boot >> code, with #ifdefs and different code paths. We should try to move over to >> this soon so we can drop

Re: [U-Boot] [PATCH v2] dm: core: Add livetree documentation

2017-09-04 Thread sjg
On 08/31/2017 02:00 PM, Simon Glass wrote: > On 31 August 2017 at 19:59, Simon Glass wrote: >> Add some documentation for the live device tree support in U-Boot. This >> was missing from the initial series. >> >> Signed-off-by: Simon Glass >> Suggested-by: Lukasz Majewski > > Reviewed-by: Łukasz

Re: [U-Boot] [PATCH] fdt: fix 'prop (...) not found!' error in 'fdt set' command

2017-09-04 Thread sjg
On 18 August 2017 at 06:41, Hannes Schmelzer wrote: > This commit brings things back to the well known working state of the > command. > - > With commit 9620d87259572ef21f0df60988d9a932ca673779 > (cmd/fdt: support single value replacement within an array) > > there was an error introduced modifyin

Re: [U-Boot] [PATCH v3 2/2] dm: test: replace dm_scan_dt() by of dm_extended_scan_fdt() in dm_do_test

2017-09-12 Thread sjg
On 4 September 2017 at 06:55, wrote: > From: Patrice Chotard > > This allows to scan the DT including all "clocks" node's sub-nodes > in which fixed-clock are defined. > All fixed-clock should be defined inside a clocks node which collect all > external oscillators. Until now, all clocks sub-nod

Re: [U-Boot] [PATCH v3] patman: add support for omitting bouncing addresses

2017-09-12 Thread sjg
> On 1 Sep 2017, at 10:57, Chris Packham wrote: > > Add support for reading a list of bouncing addresses from a in-tree file > (doc/bounces) and from the ~/.patman config file. These addresses are > stripped from the Cc list. > > Signed-off-by: Chris Packham > Reviewed-by: Simon Glass Reviewed-

Re: [U-Boot] [PATCH v3 1/2] dm: core: add clocks node scan

2017-09-12 Thread sjg
On 4 September 2017 at 06:55, wrote: > From: Patrice Chotard > > Currently, all fixed-clock declared in "clocks" node in device tree > can be binded by clk_fixed_rate.c driver only if each of them have > the "simple-bus" compatible string. > This constraint has been invoked here [1]. > > This pa

Re: [U-Boot] [PATCH 2/2] sandbox: Convert SANDBOX_BITS_PER_LONG to Kconfig

2017-09-12 Thread sjg
Hi Bin, On 13 August 2017 at 19:26, Bin Meng wrote: > Hi Simon, > > On Sun, Aug 13, 2017 at 11:35 PM, Simon Glass wrote: >> Hi Bin, >> >> On 6 August 2017 at 03:13, Bin Meng wrote: >>> Hi Simon, >>> >>> On Sun, Aug 6, 2017 at 1:16 PM, Simon Glass wrote: Hi Bin, On 3 August 2017

Re: [U-Boot] [PATCH] moveconfig: Use fd.write() instead of print >>

2017-09-12 Thread sjg
Adjust this code so that it can work with Python 2 and 3. Fixes: d73fcb1 (moveconfig: Support building a simple config database) Reported-by: Chris Packham Signed-off-by: Simon Glass --- lib/libfdt/pylibfdt/libfdt.i | 2 ++ tools/moveconfig.py | 6 +++--- 2 files changed, 5 insertions

Re: [U-Boot] [PATCH v2 2/2] dm: core: Show driver name with 'dm tree'

2017-09-12 Thread sjg
It is often useful to see which driver was actually selected for each device. Add a new 'Driver' column to provide this information. Sample output: Class Probed Driver Name root[ + ]root_drive root_driver keyboard[ + ]i804

Re: [U-Boot] [PATCH] genconfig.py: Print defconfig next to warnings

2017-09-12 Thread sjg
At present we sometimes see warnings of the form: /tmp/tmpMA89kB:36: warning: overriding the value of CMD_SPL. Old value: "y", new value: "y". This is not very useful as it does not show whch defconfig file it relates to. Update the tool to show this. Signed-off-by: Simon Glass --- to

Re: [U-Boot] [PATCH v2 1/2] dm: core: Drop use of strlcpy()

2017-09-12 Thread sjg
On Thu, Aug 3, 2017 at 2:12 AM, Simon Glass wrote: > We can use printf() to limit the string width. Adjust the code to do this > instead of using strlcpy() which is a bit clumbsy. > > Signed-off-by: Simon Glass > --- > > Changes in v2: > - Add new patch to drop use of strlcpy() > > drivers/core/

Re: [U-Boot] [PATCH 1/2] sandbox: Introduce Kconfig option for 32/64 bit host

2017-09-12 Thread sjg
On 1 August 2017 at 17:33, Bin Meng wrote: > It seems most of the time we are building and running sandbox on 64-bit host. > But we do support 32-bit host as well. Introduce Kconfig option for this. > > Signed-off-by: Bin Meng > --- > > arch/sandbox/Kconfig | 17 + > 1 file chang

Re: [U-Boot] [PATCH] Travis-CI: Switch back to using the top of tree dtc

2017-09-15 Thread sjg
On 14 September 2017 at 09:29, Tom Rini wrote: > > In a0f3e3df4adc we switched to using the Ubuntu-provided dtc as travis > was having a problem with the number of warnings that were generated by > the newer dtc. This is no longer a concern as we now have the same > logic as Linux to enable/disab

Re: [U-Boot] [PATCH v3 09/14] doc: Document how to apply fdt overlays

2017-09-15 Thread sjg
On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > We have the capability to apply overlays on the command line but > we didn't have a document explaining how. > > Signed-off-by: Pantelis Antoniou > --- > doc/README.fdt-overlays | 37 + > 1 file changed,

Re: [U-Boot] [PATCH v3 14/14] test: overlay: Add unit test for stacked overlay

2017-09-15 Thread sjg
On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > Verify that stacked overlays work. > > Signed-off-by: Pantelis Antoniou > --- > test/overlay/Makefile | 1 + > test/overlay/cmd_ut_overlay.c | 34 > ++- > test/overlay/test-fdt-

Re: [U-Boot] [PATCH v3 08/14] fit: fdt overlays doc

2017-09-15 Thread sjg
On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > Signed-off-by: Pantelis Antoniou > --- > doc/uImage.FIT/command_syntax_extensions.txt | 12 +- > doc/uImage.FIT/overlay-fdt-boot.txt | 221 > +++ > doc/uImage.FIT/source_file_format.txt| 6 +- >

Re: [U-Boot] [PATCH v3 05/14] fit: Allow multiple images per property

2017-09-15 Thread sjg
On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > As part of the fdt overlay support which need it, allow > a list of configurations per property. > > Signed-off-by: Pantelis Antoniou > --- > common/image-fit.c | 18 +++--- > 1 file changed, 15 insertions(+), 3 deletions(-) A

Re: [U-Boot] [PATCH v3 06/14] fit: Do not throw away extra configuration on fit_image_load()

2017-09-15 Thread sjg
Hi, On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > fit_image_load() threw away the extra configuration parts when > loading. We need them around for applying extra overlays for > building the boot fdt. > > Signed-off-by: Pantelis Antoniou > --- > common/image-fit.c | 11 +++ >

Re: [U-Boot] [PATCH v3 07/14] fit: Introduce methods for applying overlays on fit-load

2017-09-15 Thread sjg
On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > Introduce an overlay based method for constructing a base DT blob > to pass to the kernel. > > It is based on a specific method now to get the FDT from a FIT image > named boot_get_fdt_fit(). > > Signed-off-by: Pantelis Antoniou > --- > co

Re: [U-Boot] [PATCH v3 13/14] ut: fix fdt_getprop_u32() change

2017-09-15 Thread sjg
On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > fdt_getprop_u32 is not exported and it's different than what the > unit test uses. Rename u32 prop access methods to something that's > unit test specific. > > Signed-off-by: Pantelis Antoniou > --- > test/overlay/cmd_ut_overlay.c | 16 +++

Re: [U-Boot] [PATCH v3 04/14] fdt: Allow stacked overlays phandle references

2017-09-15 Thread sjg
On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > This patch enables an overlay to refer to a previous overlay's > labels by performing a merge of symbol information at application > time. > > In a nutshell it allows an overlay to refer to a symbol that a previous > overlay has defined. It

Re: [U-Boot] [PATCH v3 11/14] dtbo: make dtbos special

2017-09-15 Thread sjg
On Fri, Sep 15, 2017 at 10:21:28AM -0600, Stephen Warren wrote: > On 09/15/2017 10:13 AM, Tom Rini wrote: > >On Fri, Sep 15, 2017 at 09:52:41AM -0600, Stephen Warren wrote: > >>On 09/15/2017 09:50 AM, Stephen Warren wrote: > >>>On 09/04/2017 02:12 PM, Pantelis Antoniou wrote: > Special rule for

Re: [U-Boot] [PATCH v3 12/14] config: sandbox: Add unit tests

2017-09-15 Thread sjg
On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > Add unit tests for sandbox default config. > > Signed-off-by: Pantelis Antoniou > --- > configs/sandbox_defconfig | 2 ++ > 1 file changed, 2 insertions(+) > Acked-by: Simon Glass Applied to u-boot-fdt thanks! __

Re: [U-Boot] [PATCH v3 10/14] doc: overlays: Tweak documentation regarding overlays

2017-09-15 Thread sjg
On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > From: Franklin S Cooper Jr > > Pull some information regarding overlays from commit messages and > put them directly within the documentation. Also add some information > regarding required dtc version to properly use overlays. > > Signed-o

Re: [U-Boot] [PATCH] libfdt: Initialize the stack variable

2017-09-15 Thread sjg
On 9/4/2017 8:41 PM, Chee, Tien Fong wrote: > On Rab, 2017-08-30 at 06:31 -0700, J. William Campbell wrote: >> On 8/29/2017 10:15 PM, tien.fong.c...@intel.com wrote: >>> From: Tien Fong Chee >>> >>> Report Coverity log: >>> The code uses a variable that has not >>> been initialized, leading to unp

Re: [U-Boot] [PATCH v2 09/16] dtoc: Make is_phandle() a member function

2017-09-15 Thread sjg
This function will need to have access to class members once we enhance it to support multiple phandle values. In preparation for that, move it into the class. Signed-off-by: Simon Glass --- Changes in v2: None tools/dtoc/dtb_platdata.py | 36 ++-- 1 file change

Re: [U-Boot] [PATCH v2 14/16] dtoc: Support properties containing multiple phandle values

2017-09-15 Thread sjg
At present dtoc has a very simplistic view of phandles. It assumes that a property has only a single phandle with a single argument (i.e. two cells per property). This is not true in many cases. Enhance the implementation to scan all phandles in a property and to use the correct number of argument

Re: [U-Boot] [PATCH v2 02/16] dtoc: Adjust Node to record its parent

2017-09-15 Thread sjg
We need to be able to search back up the tree for #address-cells and #size-cells. Record the parent of each node to make this easier. Signed-off-by: Simon Glass Reviewed-by: Philipp Tomsich Tested-by: Philipp Tomsich --- Changes in v2: None tools/dtoc/fdt.py | 12 +++- 1 file change

Re: [U-Boot] [PATCH v2 15/16] dtoc: Rename the auto-generated dt-structs.h file

2017-09-15 Thread sjg
The filename of the auto-generated file is the same as the file that includes it. Even though the form is in the generated/ subdirectory, this could be confused. Rename the generated file to something that makes it clear it is auto-generated. Signed-off-by: Simon Glass --- Changes in v2: None

Re: [U-Boot] [PATCH v2 10/16] dtoc: Rename is_phandle() and adjust it to return more detail

2017-09-15 Thread sjg
Update this function to return more detail about a property that contains phandles. This will allow (in a future commit) more accurate handling of these properties. Signed-off-by: Simon Glass --- Changes in v2: None tools/dtoc/dtb_platdata.py | 79 +---

Re: [U-Boot] [PATCH v2 07/16] dtoc: Update the Fdt class to record phandles

2017-09-15 Thread sjg
Add a map from phandles to nodes. This can be used by clients of the the class instead of maintaining this themselves. Signed-off-by: Simon Glass --- Changes in v2: None tools/dtoc/fdt.py | 5 + 1 file changed, 5 insertions(+) Applied to u-boot-fdt thanks!

Re: [U-Boot] [PATCH v2 11/16] dtoc: Rename the phandle struct

2017-09-15 Thread sjg
Rather than naming the phandle struct according to the number of cells it uses (e.g. struct phandle_2_cell) name it according to the number of arguments it has (e.g. struct phandle_1_arg). This is a more intuitive naming. Signed-off-by: Simon Glass --- Changes in v2: None doc/driver-model/of-p

Re: [U-Boot] [PATCH v3 02/14] fdt: Introduce helper method fdt_overlay_apply_verbose()

2017-09-15 Thread sjg
On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > Introduce fdt_overlay_apply_verbose, a method that applies an > overlay but in the case of an error produces a helpful message. > > In addition if a base tree is found to be missing the __symbols__ > node the message will point out that the

Re: [U-Boot] [PATCH v2 16/16] dtoc: Add a header to the generated files

2017-09-15 Thread sjg
Add a header that indicates that the files generated by dtoc should not be modified. Signed-off-by: Simon Glass --- Changes in v2: None tools/dtoc/dtb_platdata.py | 12 1 file changed, 12 insertions(+) Applied to u-boot-fdt thanks! ___

Re: [U-Boot] [PATCH v3 01/14] Introduce fdt_setprop_placeholder() method

2017-09-15 Thread sjg
On 4 September 2017 at 14:12, Pantelis Antoniou wrote: > In some cases you need to add a property but the contents of it > are not known at creation time, merely the extend of it. > > This method allows you to create a property of a given size (filled > with garbage) while a pointer to the propert

Re: [U-Boot] [PATCH v2 08/16] dtoc: Use the Fdt's class's phandle map

2017-09-15 Thread sjg
Now that the Fdt class can map phandles to the associated nodes, use that instead of a separate implementation. Signed-off-by: Simon Glass --- Changes in v2: None tools/dtoc/dtb_platdata.py | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) Applied to u-boot-fdt thanks! _

Re: [U-Boot] [PATCH v2 12/16] dtoc: Put each phandle on a separate line

2017-09-15 Thread sjg
When writing values from properties which contain phandles, dtoc currently writes 8 phandles per line. Change this to write one phandle per line. This helps reduce line length, since phandles are generally longer and may have arguments. Signed-off-by: Simon Glass --- Changes in v2: None tools/

Re: [U-Boot] [PATCH v2 01/16] fdt: Sync libfdt up to upstream

2017-09-15 Thread sjg
Add upstream changes to U-Boot: - new pylibfdt functions - fdt_setprop_placeholder() Signed-off-by: Simon Glass --- Changes in v2: None lib/libfdt/fdt_rw.c | 20 --- lib/libfdt/libfdt.h | 31 +++ lib/libfdt/pylibfdt/libfdt.i | 58 +

Re: [U-Boot] [PATCH v2 06/16] dtoc: Handle 'reg' properties with unusual sizes

2017-09-15 Thread sjg
At present dtoc assumes that all 'reg' properties have both an address and a size. For I2C devices we do not have this. Adjust dtoc to cope. Reported-by: Philipp Tomsich Signed-off-by: Simon Glass --- Changes in v2: None tools/dtoc/dtoc_test_simple.dts | 14 ++ tools/dtoc/test_dto

Re: [U-Boot] [PATCH v2 05/16] dtoc: Add support for 32 or 64-bit addresses

2017-09-15 Thread sjg
On 29 August 2017 at 14:23, Dr. Philipp Tomsich wrote: > >> On 29 Aug 2017, at 22:15, Simon Glass wrote: >> >> When using 32-bit addresses dtoc works correctly. For 64-bit addresses it >> does not since it ignores the #address-cells and #size-cells properties. >> >> Update the tool to use fdt64_t

Re: [U-Boot] [PATCH v2 13/16] dtoc: Put phandle args in an array

2017-09-15 Thread sjg
We want to support more than one phandle argument. It makes sense to use an array for this rather than discrete struct members. Adjust the code to support this. Rename the member to 'arg' instead of 'id'. Signed-off-by: Simon Glass --- Changes in v2: None drivers/clk/clk-uclass.c | 2 +- inc

Re: [U-Boot] [PATCH v2 04/16] dtoc: Avoid very long lines in output

2017-09-15 Thread sjg
Large arrays can result in lines with hundreds or thousands of characters which is not very editor-friendly. To avoid this, addjust the tool to group values 8 per line. Signed-off-by: Simon Glass --- Changes in v2: None tools/dtoc/dtb_platdata.py | 7 ++- tools/dtoc/test_dtoc.py| 6 +++

Re: [U-Boot] [PATCH v2 03/16] dtoc: Add a 64-bit type and a way to convert cells into 64 bits

2017-09-15 Thread sjg
When dealing with multi-cell values we need a type that can hold this value. Add this and a function to process it from a list of cell values. Signed-off-by: Simon Glass Reviewed-by: Philipp Tomsich Tested-by: Philipp Tomsich --- Changes in v2: None tools/dtoc/dtb_platdata.py | 3 +++ tools

[U-Boot] Updated invitation: Unibuild discussion @ Thu 21 Sep 2017 12:00 - 13:30 (MDT) (u-boot@lists.denx.de)

2017-09-21 Thread sjg
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VEVENT DTSTART:20170921T18Z DTEND:20170921T193000Z DTSTAMP:20170921T183824Z ORGANIZER;CN=Simon Glass:mailto:s...@google.com UID:0h19tmpd9e4dve5d7va71nk...@google.com ATTENDEE;CU

Re: [U-Boot] [PATCH] dm: ofnode: query correct property in livetree ofnode_get_addr_size

2017-09-29 Thread sjg
On 20 September 2017 at 05:50, Klaus Goger wrote: > The livetree codepath of ofnode_get_addr_size always used the "reg" > property for of_get_property. Use the property parameter of the function > call instead and check the return value if the property exists. > Otherwise return FDT_ADDR_T_NONE. >

Re: [U-Boot] [PATCH 1/1] sandbox: avoid memory leak in os_dirent_ls

2017-09-29 Thread sjg
On 21 September 2017 at 04:56, Heinrich Schuchardt wrote: > Realloc does not free the old memory area if it fails. > > Identified by cppcheck. > > Signed-off-by: Heinrich Schuchardt > --- > arch/sandbox/cpu/os.c | 20 ++-- > 1 file changed, 14 insertions(+), 6 deletions(-) Revie

Re: [U-Boot] [PATCH 2/4] dm: gpio: Add a comment about not copying some drivers

2017-09-29 Thread sjg
These three drivers all use U_BOOT_DEVICE rather than device tree to create devices, so have to do manual allocation of platform data. This is not true for new platforms. Add a more explicit comment so that people do not copy this approach with new boards. Signed-off-by: Simon Glass Reported-by:

Re: [U-Boot] [PATCH 3/4] dm: gpio: Correct use of -ENODEV in drivers

2017-09-29 Thread sjg
In U-Boot -ENODEV means that there is no device. When there is a problem with the device, drivers should return an error like -ENXIO or -EREMOTEIO. When the device tree properties cannot be read correct , they should return -EINVAL. Update various GPIO drivers to follow this rule, to help with con

Re: [U-Boot] [PATCH] dm: core: Round up size when allocating so that it is cache line aligned

2017-09-29 Thread sjg
On 19 September 2017 at 05:23, Faiz Abbas wrote: > The size variable may not be always be a mulitple of > ARCH_DMA_MINALIGN and using it to flush cache leads to cache > misaligned warnings. > > Therefore, round up the size to a multiple of ARCH_DMA_MINLAIGN > when allocating private data. > > Sign

Re: [U-Boot] [PATCH 1/4] dm: gpio: vybrid_gpio: Correct driver's use of bind() method

2017-09-29 Thread sjg
It does not look like this driver needs to use a bind() method. It does not manually create devices with device_bind() nor does it create devices using U_BOOT_DEVICE(). It seems to only use device tree. Therefore the manual allocation of platform data is not needed and is confusing. Also platform

Re: [U-Boot] [PATCH] test: print_ut: Add test for %ls strings

2017-09-29 Thread sjg
On 13 September 2017 at 16:46, Rob Clark wrote: > Add a simple test for long strings. > > Signed-off-by: Rob Clark > --- > test/print_ut.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Simon Glass Applied to u-boot-dm thanks! ___ U-Boot ma

Re: [U-Boot] [PATCH 4/4] dm: gpio: pca953x: Drop pointless data structure checks

2017-09-29 Thread sjg
These checks cannot fail since driver model will not call a driver's method if it cannot fully create the driver data structures. It is confusing to have these checks and others might copy them. Drop this code. Signed-off-by: Simon Glass --- drivers/gpio/pca953x_gpio.c | 11 --- 1 file

Re: [U-Boot] [PATCH v4] power: pmic/regulator: Add basic support for TPS65910

2017-12-08 Thread sjg
On 30 November 2017 at 05:52, Felix Brack wrote: > Texas Instrument's TPS65910 PMIC contains 3 buck DC-DC converts, one > boost DC-DC converter and 8 LDOs. This patch implements driver model > support for the TPS65910 PMIC and its regulators making the get/set > API for regulator value/enable avai

Re: [U-Boot] [PATCH] dm: blk: Use uclass_find_first/next_device() in blk_first/next_device()

2017-12-08 Thread sjg
On 29 November 2017 at 08:46, Stefan Roese wrote: > This patch changes the calls to uclass_first/next_device() in blk_first/ > next_device() to use uclass_find_first/next_device() instead. These functions > don't prepare the devices, which is correct in this case. > > With this patch applied, the

Re: [U-Boot] [PATCH v3] power: extend prefix match to regulator-name property

2017-12-08 Thread sjg
On 27 November 2017 at 01:14, Felix Brack wrote: > This patch extends pmic_bind_children prefix matching. In addition to > the node name the property regulator-name is used while trying to match > prefixes. This allows assigning different drivers to regulator nodes > named regulator@1 and regulato

Re: [U-Boot] [PATCH 13/13] binman: tegra: Convert to use binman

2017-12-08 Thread sjg
Hi Stephen, On 14 November 2017 at 13:23, Stephen Warren wrote: > On 11/13/2017 06:55 PM, Simon Glass wrote: >> >> Update tegra to use binman for image creation. This still includes the >> current Makefile logic, but a later patch will remove this. Three output >> files are created, all of which

Re: [U-Boot] [PATCH 11/13] binman: Add binman support to spl_ram.c

2017-12-08 Thread sjg
SPL supports reading U-Boot from a RAM location. At present this is hard-coded to the U-Boot text base address. Use binman to allow this to come from the image file, if binman is used. Signed-off-by: Simon Glass --- common/spl/spl_ram.c | 19 +++ 1 file changed, 15 insertions(+)

Re: [U-Boot] [PATCH 06/13] binman: Adjust size of test SPL binary

2017-12-08 Thread sjg
This is only 3 bytes long which is not enough to hold two symbol values, needed to test the binman symbols feature. Increase it to 15 bytes. Using very small regions is useful since we can easily compare them in tests and errors are fairly easy to diagnose. Signed-off-by: Simon Glass --- tools

Re: [U-Boot] [PATCH v2] drivers: core: Add translation in live tree case

2017-12-08 Thread sjg
On 23 November 2017 at 23:51, Mario Six wrote: > The function dev_read_addr calls ofnode_get_addr_index in the live tree > case, which does not apply bus translations to the address read from the > device tree. This results in illegal addresses on boards that rely on > bus translations being appli

Re: [U-Boot] [PATCH 08/13] binman: Support accessing binman tables at run time

2017-12-08 Thread sjg
Binman construct images consisting of multiple binary files. These files sometimes need to know (at run timme) where their peers are located. For example, SPL may want to know where U-Boot is located in the image, so that it can jump to U-Boot correctly on boot. In general the positions where the

Re: [U-Boot] [PATCH 03/13] binman: Add support for including spl/u-boot-spl-nodtb.bin

2017-12-08 Thread sjg
This file contains SPL image without a device tree. Add support for including this in images. Signed-off-by: Simon Glass --- tools/binman/etype/u_boot_spl_nodtb.py| 17 + tools/binman/ftest.py | 5 + tools/binman/test/52_u_boot_spl_nodtb.dts | 11 +++

Re: [U-Boot] [PATCH 09/13] binman: arm: Include the binman symbol table

2017-12-08 Thread sjg
This area of the image contains symbols whose values are filled in by binman. If this feature is not used, the table is empty. Add this to the ARM SPL link script. Signed-off-by: Simon Glass --- arch/arm/config.mk | 6 -- arch/arm/cpu/u-boot-spl.lds | 7 +++ 2 files changed, 1

Re: [U-Boot] [PATCH 07/13] binman: Support enabling debug in tests

2017-12-08 Thread sjg
The elf module can provide some debugging information to assist with figuring out what is going wrong. This is also useful in tests. Update the -D option so that it is passed through to tests as well. Signed-off-by: Simon Glass --- tools/binman/binman.py | 6 -- tools/binman/control.py |

Re: [U-Boot] [PATCH 05/13] binman: Add tests binaries with binman symbols

2017-12-08 Thread sjg
For testing we need to build some ELF files containing binman symbols. Add these to the Makefile and check in the binaries: u_boot_binman_syms - normal, valid ELF file u_boot_binman_syms_bad - missing the __image_copy_start symbol u_boot_binman_syms_size - has a binman symbol with an inva

<    4   5   6   7   8   9   10   11   12   >