[U-Boot] [PATCH v2 00/27] spl: Support loading a FIT image containing U-Boot

2016-02-22 Thread Simon Glass
We need a way to support more than one board per binary in U-Boot with device tree. Various methods have been discussed. The one that seems to make the most sense is to adjust SPL so that it can load a FIT which contains U-Boot and several device tree binaries. This is how things with with Linux: l

[U-Boot] [PATCH v2 01/27] mkimage: Move argument processing into its own function

2016-02-22 Thread Simon Glass
At present main() is very long. Split out the argument processing to make it easier to follow. Signed-off-by: Simon Glass --- Changes in v2: None tools/mkimage.c | 56 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/tools

[U-Boot] [PATCH v2 02/27] mkimage: Convert to use getopt()

2016-02-22 Thread Simon Glass
The current way of parsing arguments is a bit clumsy. It seems better to use getopt() which is commonly used for this purpose. Convert the code to use getopt() and make a few minor adjustments as needed. Signed-off-by: Simon Glass --- Changes in v2: None tools/mkimage.c | 233

[U-Boot] [PATCH v2 03/27] mkimage: Sort the option processing code by option

2016-02-22 Thread Simon Glass
Adjust the code so that option alphabetical order matches the order in the switch() statement. This makes it easier to find options. Signed-off-by: Simon Glass --- Changes in v2: None tools/mkimage.c | 50 +- 1 file changed, 25 insertions(+), 25

[U-Boot] [PATCH v2 07/27] libfdt: Add a function to write a property placeholder

2016-02-22 Thread Simon Glass
The existing function to add a new property to a tree being built requires that the entire contents of the new property be passed in. For some applications it is more convenient to be able to add the property contents later, perhaps by reading from a file. This avoids double-buffering of the conten

[U-Boot] [PATCH v2 05/27] mkimage: Show an error message when usage() is called

2016-02-22 Thread Simon Glass
Sometimes incorrect arguments are supplied but the reason is not obvious to the user. Add some helpful messages. Signed-off-by: Simon Glass --- Changes in v2: None tools/mkimage.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/mkimage.c b/tools/mkim

[U-Boot] [PATCH v2 09/27] freescale: Remove CONFIG_DM from header files

2016-02-22 Thread Simon Glass
Kconfig options must defined in the defconfig files. Since RSA_SOFTWARE_EXP relies on CONFIG_DM, unless it is set in kconfig we cannot enable RSA. Remove the hacks which enable CONFIG_DM in header files and update the defconfig. Signed-off-by: Simon Glass --- Changes in v2: None arch/arm/inclu

[U-Boot] [PATCH v2 06/27] mkimage: Make 'params' static

2016-02-22 Thread Simon Glass
This is not used outside mkimage.c, so make this variable static. Signed-off-by: Simon Glass --- Changes in v2: None tools/mkimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mkimage.c b/tools/mkimage.c index 5aae748..b8293f6 100644 --- a/tools/mkimage.c +++ b/t

[U-Boot] [PATCH v2 04/27] mkimage: Move usage() up to the top

2016-02-22 Thread Simon Glass
To avoid a forward declaration, move the usage() function higher in the file. Signed-off-by: Simon Glass --- Changes in v2: None tools/mkimage.c | 81 ++--- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/tools/mkimage.c b/too

[U-Boot] [PATCH v2 15/27] tools: Include fdt_sw.o in libfdt for mkimage

2016-02-22 Thread Simon Glass
At present this file is omitted. It is used to build up a binary device tree. We plan to do this in mkimage, so include this file in the build. Signed-off-by: Simon Glass --- Changes in v2: None tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Makefile b

[U-Boot] [PATCH v2 08/27] Correct defconfig ordering

2016-02-22 Thread Simon Glass
Various boards have the wrong Kconfig ordering now. To avoid a misleading diff in the next patch, reorder the configuration correctly. Signed-off-by: Simon Glass --- Changes in v2: None configs/am335x_gp_evm_defconfig | 2 +- configs/am437x_sk_evm_defconfig | 6 +++--- conf

[U-Boot] [PATCH v2 19/27] mkimage: Support automatic creating of a FIT without a .its

2016-02-22 Thread Simon Glass
At present, when generating a FIT, mkimage requires a .its file containing the structure of the FIT and referring to the images to be included. Creating the .its file is a separate step that makes it harder to use FIT. This is not required for creating legacy images. Often the FIT is pretty stand

[U-Boot] [PATCH v2 24/27] spl: Add an option to load a FIT containing U-Boot

2016-02-22 Thread Simon Glass
This provides a way to load a FIT containing U-Boot and a selection of device tree files. The board can select the correct device tree by probing the hardware. Then U-Boot is started with the selected device tree. Signed-off-by: Simon Glass --- Changes in v2: - Add a few missing header files K

[U-Boot] [PATCH v2 12/27] fdt: Adjust DEFAULT_DEVICE_TREE to device on OF_CONTROL

2016-02-22 Thread Simon Glass
This option has no meaning without OF_CONTROL, so add a dependency. Signed-off-by: Simon Glass --- Changes in v2: None dts/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/dts/Kconfig b/dts/Kconfig index fb2d79e..ba83d5f 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -53,6 +53,7 @@ e

[U-Boot] [PATCH v2 14/27] sunxi: Display the board model on start-up

2016-02-22 Thread Simon Glass
It is useful to know which sunxi board you are booting. Display this on start-up to avoid confusion. Signed-off-by: Simon Glass --- Changes in v2: None include/configs/sunxi-common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-comm

[U-Boot] [PATCH v2 17/27] tools: Add a function to obtain the size of a file

2016-02-22 Thread Simon Glass
This will be used in mkimage when working out the required size of the FIT based on the files to be placed into it. Signed-off-by: Simon Glass --- Changes in v2: None doc/mkimage.1 | 4 ++-- tools/imagetool.c | 22 ++ tools/imagetool.h | 12 3 files change

[U-Boot] [PATCH v2 21/27] mkimage: Support placing data outside the FIT

2016-02-22 Thread Simon Glass
One limitation of FIT is that all the data is 'inline' within it, using a 'data' property in each image node. This means that to find out what is in the FIT it is necessary to scan the entire file. Once loaded it can be scanned and then the images can be copied to the correct place in memory. In S

[U-Boot] [PATCH v2 16/27] mkimage: Allow a FIT to include an image of any type

2016-02-22 Thread Simon Glass
At present FIT images are set up by providing a device tree source file which is a file with a .its extension. We want to support automatically creating this file based on the image supplied to mkimage. This means that even though the final file type is always IH_TYPE_FLATDT, the image inside may b

[U-Boot] [PATCH v2 27/27] RFC: sunxi: Enable SPL FIT support

2016-02-22 Thread Simon Glass
Enable SPL FIT support for the Linksprite pcDuino3 as an example of how this feature is used. This is only for demonstration purposes and is not to be applied. Signed-off-by: Simon Glass --- Changes in v2: None arch/arm/cpu/armv7/sunxi/board.c | 5 + configs/Linksprite_pcDuino3_defcon

[U-Boot] [PATCH v2 13/27] fdt: Allow libfdt to be used in SPL

2016-02-22 Thread Simon Glass
Add an option to enable libfdt in SPL. This can be useful when decoding FIT files in SPL. We need to make sure this option is not enabled in SPL by this change. Also this option needs to be enabled in host builds. Si add a new IMAGE_USE_LIBFDT #define which can be used in files that are built on t

Re: [U-Boot] [PATCH] rpi: always scroll by 10 lines

2016-02-22 Thread Stephen Warren
On 02/22/2016 02:15 PM, Lubomir Rintel wrote: > Scrolling the simple framebuffer is really slow in Raspberry Pi to the > point it delays the boot by a second or two and makes longer output > inconvenient to follow (printenv, md). Acked-by: Stephen Warren __

[U-Boot] [PATCH v2 20/27] mkimage: Support adding device tree files to a FIT

2016-02-22 Thread Simon Glass
To make the auto-FIT feature useful we need to be able to provide a list of device tree files on the command line for mkimage to add into the FIT. Add support for this feature. So far there is no support for hashing or verified boot using this method. For those cases, a .its file must still be pro

[U-Boot] [PATCH v2 23/27] spl: Add a way for boards to select which device tree to load

2016-02-22 Thread Simon Glass
SPL calls this function with each device tree it can find in the FIT. The board should implement this function, using whatever hardware detection it can muster to determine the correct device tree. Signed-off-by: Simon Glass --- Changes in v2: None include/image.h | 13 + 1 file ch

[U-Boot] [PATCH v2 26/27] spl: Support loading a FIT from MMC

2016-02-22 Thread Simon Glass
Detect a FIT when loading from MMC and handle it using the new FIT SPL support. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl_mmc.c | 75 +++- 1 file changed, 57 insertions(+), 18 deletions(-) diff --git a/common/spl/spl_mmc.

[U-Boot] [PATCH v2 25/27] spl: Add a way to specify a list of device trees to include

2016-02-22 Thread Simon Glass
When building a FIT, more than one device tree can be included. The board can select (at run-time) the one that it wants. Add a Kconfig option to allow the list of devices trees (supported by the board) to be specified. When using SPL_LOAD_FIT, build u-boot.img in FIT format instead of the legacy

[U-Boot] [PATCH v2 18/27] image: Add functions to obtain short names

2016-02-22 Thread Simon Glass
Sometimes it is useful to obtain the short name for an Operating System, architecture or compression mechanism. Provide functions for this. Signed-off-by: Simon Glass --- Changes in v2: None common/image.c | 26 ++ include/image.h | 27 +++ 2 fi

[U-Boot] [PATCH v2 22/27] mkimage: Bring data into the FIT before processing

2016-02-22 Thread Simon Glass
Since we now support data outside the FIT image, bring it into the FIT image first before we do any processing. This avoids adding new functionality to the core FIT code for now. Signed-off-by: Simon Glass --- Changes in v2: None tools/fit_image.c | 97 +

Re: [U-Boot] fdtgrep results in Segmentation fault for 64bit DT

2016-02-22 Thread Simon Glass
Hi Masahiro, On 17 February 2016 at 20:36, Masahiro Yamada wrote: > Hi Simon, > > I am working on U-Boot support on my new ARMv8 SoC. > I was hit by a problem with fdtgrep. > > (Note: CONFIG_SPL_OF_CONTROL is on UniPhier SoC family) > OK thanks for the report. I will take a look at the end of th

Re: [U-Boot] [PATCH] rpi: set board serial number in environment

2016-02-22 Thread Stephen Warren
On 02/22/2016 02:06 PM, Lubomir Rintel wrote: > Gets propagated into the device tree and then into /proc/cpuinfo where > users often expect it. Tested-by: Stephen Warren (on qemu-0xabu at least) Reviewed-by: Stephen Warren ___ U-Boot mailing list U-Bo

Re: [U-Boot] [PATCH 08/16] timer: Provide an early timer

2016-02-22 Thread Simon Glass
Hi Bin, On 16 February 2016 at 02:21, Bin Meng wrote: > Hi Simon, > > On Mon, Feb 15, 2016 at 9:36 AM, Simon Glass wrote: >> In some cases the timer must be accessible before driver model is active. >> Examples include when using CONFIG_TRACE to trace U-Boot's execution before >> driver model is

Re: [U-Boot] [PATCH 10/16] sandbox: timer: Support the early timer

2016-02-22 Thread Simon Glass
Hi Bin On 16 February 2016 at 02:22, Bin Meng wrote: > Hi Simon, > > On Mon, Feb 15, 2016 at 9:36 AM, Simon Glass wrote: >> Add support for the early timer so we can use tracing with sandbox again. >> >> Signed-off-by: Simon Glass >> --- >> >> drivers/timer/sandbox_timer.c | 14 --

Re: [U-Boot] [PATCH 07/16] timer: Support tracing fully

2016-02-22 Thread Simon Glass
Hi Bin, On 16 February 2016 at 02:21, Bin Meng wrote: > Hi Simon, > > On Mon, Feb 15, 2016 at 9:36 AM, Simon Glass wrote: >> A few of the functions in the timer uclass are not marked with 'notrace'. Fix >> this so that tracing can be used with CONFIG_TRACE. >> >> Signed-off-by: Simon Glass >> -

Re: [U-Boot] uboot fdt commands

2016-02-22 Thread Simon Glass
Hi, On 18 February 2016 at 00:40, Damien Wei Huang wrote: > Hi > > This question is regarding to uboot commands > > > > I use the uboot "fdt mknode" command to create two nodes as below > > uboot> fdt resize > > uboot> fdt mknode /my_light_pinctrl > > uboot> fdt set /my_light_pintr

Re: [U-Boot] [PATCH 1/2] dm: core: Add uclass_first_device_err() to return a valid device

2016-02-22 Thread Simon Glass
Hi Bin, On 16 February 2016 at 02:31, Bin Meng wrote: > Hi Simon, > > On Fri, Feb 12, 2016 at 4:23 AM, Simon Glass wrote: >> A common pattern is to call uclass_first_device() and then check if it >> actually returns a device. Add a new function which does this, returning >> an error if there are

Re: [U-Boot] [PATCH 1/2] serial: dcc: Move driver to DM

2016-02-22 Thread Simon Glass
Hi Michal, On 22 February 2016 at 08:54, Michal Simek wrote: > On 19.2.2016 21:55, Simon Glass wrote: >> Hi Michal, >> >> On 18 February 2016 at 09:01, Michal Simek wrote: >>> Enabling this driver requires some DT changes. >>> Adding DCC to root or main bus: >>> dcc: dcc { >>> compatible

Re: [U-Boot] [PATCH] dm: ns16550: Add support for reg-offset property

2016-02-22 Thread Simon Glass
Hi Michal, On 22 February 2016 at 00:40, Michal Simek wrote: > On 19.2.2016 21:55, Simon Glass wrote: >> Hi Michal, >> >> On 16 February 2016 at 08:17, Michal Simek wrote: >>> reg-offset is the part of standard 8250 binding in the kernel. >>> It is shifting start of address space by reg-offset.

Re: [U-Boot] Issue with USB mass storage (thumb drives)

2016-02-22 Thread Hannes Schmelzer
On 22.02.2016 18:59, Fabio Estevam wrote: On Mon, Feb 22, 2016 at 2:51 PM, Maxime Jayat wrote: Hello, I was hit by the same problem, where my USB SD card reader would timeout in U-boot when reading a large file (16 MB). Changing USB_MAX_XFER_BLK to 32767 fixed the problem but I investigated a

Re: [U-Boot] [PATCH v2 00/25] exynos: video: Convert exynos LCD driver to use driver model

2016-02-22 Thread Simon Glass
Hi Minkyu, On 21 February 2016 at 21:08, Simon Glass wrote: > > This series converts the exynos LCD driver to work with driver model. Only > the eDP display is converted - the MIPI display is left mostly alone as I > do not have a device to test with. > > The conversion involves some refactoring

Re: [U-Boot] [RFC] armv8: layerscape: Add support of u-boot device tree fix-up

2016-02-22 Thread Scott Wood
On Tue, 2016-02-23 at 04:09 +, Prabhakar Kushwaha wrote: > > -Original Message- > > From: Scott Wood [mailto:o...@buserror.net] > > Sent: Tuesday, February 23, 2016 6:52 AM > > To: Prabhakar Kushwaha ; u- > > b...@lists.denx.de > > Cc: york sun ; Priyanka Jain > > Subject: Re: [RFC] ar

Re: [U-Boot] [U-Boot, v3, 3/3] kbuild: fix build rule of u-boot-spl.dtb

2016-02-22 Thread Michal Simek
On 23.2.2016 03:57, Masahiro Yamada wrote: > Hi Michal, Tom, Simon > > > > > 2016-02-23 1:16 GMT+09:00 Tom Rini : >> On Mon, Feb 22, 2016 at 04:51:47PM +0100, Michal Simek wrote: >>> Hi, >>> >>> On 8.2.2016 21:49, Tom Rini wrote: On Fri, Feb 05, 2016 at 05:55:14PM +0900, Masahiro Yamada wr

Re: [U-Boot] [U-Boot, v3, 3/3] kbuild: fix build rule of u-boot-spl.dtb

2016-02-22 Thread Masahiro Yamada
Hi Michal, 2016-02-23 16:06 GMT+09:00 Michal Simek : > On 23.2.2016 03:57, Masahiro Yamada wrote: >> Hi Michal, Tom, Simon >> >> >> >> >> 2016-02-23 1:16 GMT+09:00 Tom Rini : >>> On Mon, Feb 22, 2016 at 04:51:47PM +0100, Michal Simek wrote: Hi, On 8.2.2016 21:49, Tom Rini wrote: >>

Re: [U-Boot] [U-Boot, v3, 3/3] kbuild: fix build rule of u-boot-spl.dtb

2016-02-22 Thread Michal Simek
On 23.2.2016 08:47, Masahiro Yamada wrote: > Hi Michal, > > > 2016-02-23 16:06 GMT+09:00 Michal Simek : >> On 23.2.2016 03:57, Masahiro Yamada wrote: >>> Hi Michal, Tom, Simon >>> >>> >>> >>> >>> 2016-02-23 1:16 GMT+09:00 Tom Rini : On Mon, Feb 22, 2016 at 04:51:47PM +0100, Michal Simek wrot

<    1   2