]> git.ipfire.org Git - people/ms/u-boot.git/log
people/ms/u-boot.git
7 years agosandbox: Support building an SPL image
Simon Glass [Mon, 4 Jul 2016 17:57:46 +0000 (11:57 -0600)] 
sandbox: Support building an SPL image

When building an SPL image, override the link flags so that it uses the
system libraries. This is similar to the way the non-SPL image is built.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agosandbox: Allow chaining from SPL to U-Boot proper
Simon Glass [Mon, 4 Jul 2016 17:57:45 +0000 (11:57 -0600)] 
sandbox: Allow chaining from SPL to U-Boot proper

SPL is expected to load and run U-Boot. This needs to work with sandbox also.
Provide a function to locate the U-Boot image, and another to start it. This
allows SPL to function on sandbox as it does on other archs.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoMakefile: Allow the SPL final link rule to be overridden
Simon Glass [Mon, 4 Jul 2016 17:57:44 +0000 (11:57 -0600)] 
Makefile: Allow the SPL final link rule to be overridden

Overriding the final link rule is possible with U-Boot proper. It us used to
create a sandbox image links with host libraries. To build a sandbox SPL
image we need the same feature for SPL.

To support this, update the SPL link rule so sandbox can override it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agospl: Drop include of i2c.h
Simon Glass [Mon, 4 Jul 2016 17:57:43 +0000 (11:57 -0600)] 
spl: Drop include of i2c.h

This file does not appear to use I2C, so drop this include.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoREADME: Remove CONFIG_SYS_MALLOC_F_LEN comment
Simon Glass [Mon, 4 Jul 2016 17:57:42 +0000 (11:57 -0600)] 
README: Remove CONFIG_SYS_MALLOC_F_LEN comment

This option is now widely available, so remove the comment that it is only
available on ARM and sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agosandbox: Don't print a warning for CONFIG_I2C_COMPAT
Simon Glass [Mon, 4 Jul 2016 17:57:41 +0000 (11:57 -0600)] 
sandbox: Don't print a warning for CONFIG_I2C_COMPAT

Sandbox includes this code to provide build coverage. While we retain this
feature we should have sandbox build it. Sandbox does not in fact use the
I2C compatibility mode. Showing a warning for sandbox is just confusing,
since no conversion is expected.

Drop the warning for sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agortc: Tidy up the code style
Simon Glass [Mon, 20 Jun 2016 01:51:00 +0000 (19:51 -0600)] 
rtc: Tidy up the code style

This code generates lots of checkpatch errors. Fix them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoarm: Show cache warnings in U-Boot proper only
Simon Glass [Mon, 20 Jun 2016 01:43:05 +0000 (19:43 -0600)] 
arm: Show cache warnings in U-Boot proper only

Avoid bloating the SPL image size.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoAdd warn_non_spl() to show a message in U-Boot proper
Simon Glass [Mon, 20 Jun 2016 01:43:04 +0000 (19:43 -0600)] 
Add warn_non_spl() to show a message in U-Boot proper

SPL tends to be more space-constrained that U-Boot proper. Some error
messages are best suppressed in SPL. Add a macros to make this easy.

warn_non_spl() does nothing when built in SPL code.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoAdd comments for debug() and pr_fmt
Simon Glass [Mon, 20 Jun 2016 01:43:03 +0000 (19:43 -0600)] 
Add comments for debug() and pr_fmt

Add a note to each of these so it is more obvious how they work.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoarm: Don't invalidate unaligned cache regions
Simon Glass [Mon, 20 Jun 2016 01:43:02 +0000 (19:43 -0600)] 
arm: Don't invalidate unaligned cache regions

At present armv7 will unhappily invalidate a cache region and print an
error message. Make it skip the operation instead, as it does with other
cache operations.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agoarm: Move check_cache_range() into a common place
Simon Glass [Mon, 20 Jun 2016 01:43:01 +0000 (19:43 -0600)] 
arm: Move check_cache_range() into a common place

This code is common, so move it into a common file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agoboard_f: prevent misleading "Watchdog enabled" output
Anatolij Gustschin [Mon, 13 Jun 2016 12:24:24 +0000 (14:24 +0200)] 
board_f: prevent misleading "Watchdog enabled" output

Output the "Watchdog enabled" message only if hw_watchdog_init()
call really happened.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
7 years agoboard_f: init designware watchdog if CONFIG_DESIGNWARE_WATCHDOG=y
Anatolij Gustschin [Mon, 13 Jun 2016 12:24:23 +0000 (14:24 +0200)] 
board_f: init designware watchdog if CONFIG_DESIGNWARE_WATCHDOG=y

The designware watchdog init is skipped even if CONFIG_DESIGNWARE_WATCHDOG
is enabled. Fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
7 years agoconfigs: da850evm: enable bootz command
Sekhar Nori [Tue, 12 Jul 2016 10:54:48 +0000 (16:24 +0530)] 
configs: da850evm: enable bootz command

Enable bootz command on Texas Instruments DA850 EVM
board. This helps it boot zImage with device-tree
blob passed.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
7 years agoARM: OMAP5+: Enable errata i727
Lokesh Vutla [Tue, 12 Jul 2016 09:17:41 +0000 (14:47 +0530)] 
ARM: OMAP5+: Enable errata i727

Errata i727 is applicable on all OMAP5 and DRA7 variants but enabled only
on OMAP5 ES1.0. So, enable it on all platforms.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agomkimage: fix missing break for -p switch
Teddy Reed [Tue, 12 Jul 2016 05:54:26 +0000 (22:54 -0700)] 
mkimage: fix missing break for -p switch

Signed-off-by: Teddy Reed <teddy.reed@gmail.com>
Reported-by: Coverity (CID: 150277)
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agobootm: fixup silent Linux out of BOOTM_STATE_LOADOS state
Hector Palacios [Mon, 11 Jul 2016 10:34:37 +0000 (12:34 +0200)] 
bootm: fixup silent Linux out of BOOTM_STATE_LOADOS state

The function fixup_silent_linux() is called in status BOOTM_STATE_LOADOS
to silence Linux if variable 'silent' is set.
Currently only the 'bootm' command state machine contains
BOOTM_STATE_LOADOS, but others like 'booti' or 'bootz' commands do not.
This means silent Linux does not work with these commands.

This patch moves the fixup_silent_linux() call out of the
BOOTM_STATE_LOADOS state and into BOOTM_STATE_OS_PREP, to silence Linux
independently of the used command (booti, bootm or bootz).

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
7 years agostm32: Change USART port to USART6 for stm32f746 discovery board
Toshifumi NISHINAGA [Thu, 7 Jul 2016 16:02:26 +0000 (01:02 +0900)] 
stm32: Change USART port to USART6 for stm32f746 discovery board

This change is to remove a halt at about 200KiB
while sending a large(1MiB) binary to a micro controller using USART1.
USART1 is connected to a PC via an on-board ST-Link debugger
that also functions as a USB-Serial converter.
However, it seems to loss some data occasionally.
So I changed the serial port to USART6 and connected it to the PC using
an FTDI USB-Serial cable, therefore the transmission was successfully
completed.

Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
7 years agostm32: Add SDRAM support for stm32f746 discovery board
Toshifumi NISHINAGA [Thu, 7 Jul 2016 16:02:25 +0000 (01:02 +0900)] 
stm32: Add SDRAM support for stm32f746 discovery board

This patch adds SDRAM support for stm32f746 discovery board.
This patch depends on previous patch.
This patch is based on STM32F4 and emcraft's[1].

[1]:  https://github.com/EmcraftSystems/u-boot

Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
7 years agostm32: clk: Add 200MHz clock configuration for stm32f746 discovery board
Toshifumi NISHINAGA [Thu, 7 Jul 2016 16:02:24 +0000 (01:02 +0900)] 
stm32: clk: Add 200MHz clock configuration for stm32f746 discovery board

This patch adds 200MHz clock configuration for stm32f746 discovery board.
This patch is based on STM32F4 and emcraft's[1].

[1]:  https://github.com/EmcraftSystems/u-boot

Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
7 years agodragonboard410c: adding missing default addr for script and pxe boot
Ricardo Salveti de Araujo [Sun, 3 Jul 2016 17:16:03 +0000 (14:16 -0300)] 
dragonboard410c: adding missing default addr for script and pxe boot

Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Ricardo Salveti <rsalveti@rsalveti.net>
7 years agodragonboard410c: prefer sdcard boot over emmc
Ricardo Salveti de Araujo [Sun, 3 Jul 2016 16:59:01 +0000 (13:59 -0300)] 
dragonboard410c: prefer sdcard boot over emmc

Make the external devices the preferred ones when booting the system
(usb is already the first option). This allows users to easily boot
custom distributions without requiring them to reflash/customize u-boot.

Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Ricardo Salveti <rsalveti@rsalveti.net>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Tested-by: Andreas Färber <afaerber@suse.de>
Acked-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
7 years agotest: Convert the vboot test to test/py
Simon Glass [Sun, 3 Jul 2016 15:40:46 +0000 (09:40 -0600)] 
test: Convert the vboot test to test/py

Now that we have a suitable test framework we should move all tests into it.
The vboot test is a suitable candidate. Rewrite it in Python and move the
data files into an appropriate directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agotools: Correct error handling in fit_image_process_hash()
Simon Glass [Sun, 3 Jul 2016 15:40:44 +0000 (09:40 -0600)] 
tools: Correct error handling in fit_image_process_hash()

We should not be returning -1 as an error code. This can mask a situation
where we run out of space adding things to the FIT. By returning the correct
error in this case (-ENOSPC) it can be handled by the higher-level code.

This may fix the error reported by Tom Van Deun here:

https://www.mail-archive.com/u-boot@lists.denx.de/msg217417.html

although I am not sure as I cannot actually repeat it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Van Deun <tom.vandeun@wapice.com>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
7 years agotools: Add an error code when fit_handle_file() fails
Simon Glass [Sun, 3 Jul 2016 15:40:43 +0000 (09:40 -0600)] 
tools: Add an error code when fit_handle_file() fails

The error code may provide useful information for debugging. Add it to the
error string.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
7 years agotest/py: Add a helper to run a list of U-Boot commands
Simon Glass [Sun, 3 Jul 2016 15:40:42 +0000 (09:40 -0600)] 
test/py: Add a helper to run a list of U-Boot commands

Some tests want to execute a sequence of commands. Add a helper for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
7 years agotest/py: Provide a way to check that a command fails
Simon Glass [Sun, 3 Jul 2016 15:40:41 +0000 (09:40 -0600)] 
test/py: Provide a way to check that a command fails

Sometimes we want to run a command and check that it fails. Add a function
to handle this. It can check the return code and also make sure that the
output contains a given error message.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agotest/py: Add an option to execute a string containing a command
Simon Glass [Sun, 3 Jul 2016 15:40:40 +0000 (09:40 -0600)] 
test/py: Add an option to execute a string containing a command

It is sometimes inconvenient to convert a string into a list for execution
with run_and_log(). Provide a helper function to do this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
7 years agotest/py: Return output from run_and_log()
Simon Glass [Sun, 3 Jul 2016 15:40:39 +0000 (09:40 -0600)] 
test/py: Return output from run_and_log()

It is useful to be able to obtain the output from a command. Return it from
this function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
7 years agotest/py: Provide output from exceptions with RunAndLog()
Simon Glass [Sun, 3 Jul 2016 15:40:38 +0000 (09:40 -0600)] 
test/py: Provide output from exceptions with RunAndLog()

Tests may want to look at the output from running a command, even if it
fails (e.g. with a non-zero return code). Provide a means to obtain this.

Another approach would be to return a class object containing both the
output and the exception, but I'm not sure if that would result in a lot
of refactoring.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
7 years agotest/py: Allow RunAndLog() to return the output
Simon Glass [Sun, 3 Jul 2016 15:40:37 +0000 (09:40 -0600)] 
test/py: Allow RunAndLog() to return the output

Tests may want to look at the output from running a command. Return it so
that this is possible.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
7 years agotest/py: Allow tests to control the sandbox device-tree file
Simon Glass [Sun, 3 Jul 2016 15:40:36 +0000 (09:40 -0600)] 
test/py: Allow tests to control the sandbox device-tree file

Normally tests will run with the test.dtb file designed for this purpose.
However, the verified boot tests need to run with their own device-tree
file, containing a public key.

Make the device-tree file a config option so that it can be adjusted by
tests. The default is to keep the current behaviour.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
7 years agosandbox: Don't exit when bootm completes
Simon Glass [Sun, 3 Jul 2016 15:40:35 +0000 (09:40 -0600)] 
sandbox: Don't exit when bootm completes

At present sandbox exits when the 'bootm' command completes, since it is not
actually able to run the OS that is loaded. Normally 'bootm' failure is
considered a fatal error in U-Boot.

However this is annoying for tests, which may want to examine the state
after a test is complete. In any case there is a 'reset' command which can
be used to exit, if required.

Change the behaviour to return normally from the 'bootm' command on sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
7 years agotest: Add a simple script to run tests on sandbox
Simon Glass [Sun, 3 Jul 2016 15:40:34 +0000 (09:40 -0600)] 
test: Add a simple script to run tests on sandbox

A common check before sending patches is to run all available tests on
sandbox. But everytime I do this I have to look up the README. This presents
quite a barrier to actually doing this.

Add a shell script to help. To run the tests, type:

   test/run

in the U-Boot directory, which should be easy to remember.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
7 years agotest: Add a README
Simon Glass [Sun, 3 Jul 2016 15:40:33 +0000 (09:40 -0600)] 
test: Add a README

Add a few notes about how testing works in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
7 years agotools: Allow building with debug enabled
Simon Glass [Thu, 30 Jun 2016 16:52:20 +0000 (10:52 -0600)] 
tools: Allow building with debug enabled

Sometimes it is useful to build tools with debugging information included so
that line-number information is available when run under gdb. Add a Kconfig
option to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agomkimage: Show item lists for all categories
Simon Glass [Thu, 30 Jun 2016 16:52:19 +0000 (10:52 -0600)] 
mkimage: Show item lists for all categories

Update the error-handling code for -A, -C and -O to show a list of valid
options when an invalid one is provided.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Vinoth Eswaran <evinoth1206@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agomkimage: Use generic code for showing an 'image type' error
Simon Glass [Thu, 30 Jun 2016 16:52:18 +0000 (10:52 -0600)] 
mkimage: Use generic code for showing an 'image type' error

The existing error code only displays image types which are claimed by a
particular U_BOOT_IMAGE_TYPE() driver. But this does not seem correct. The
mkimage tool should support all image types, so it makes sense to allow
creation of images of any type with the tool.

When an incorrect image type is provided, use generic code to display the
error.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agomkimage: Allow display of a list of any image header category
Simon Glass [Thu, 30 Jun 2016 16:52:17 +0000 (10:52 -0600)] 
mkimage: Allow display of a list of any image header category

Add a generic function which can display a list of items in any category.
This will allow displaying of images for the -A, -C, -O and -T flags. At
present only -T is supported.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoimage: Add functions to obtain category information
Simon Glass [Thu, 30 Jun 2016 16:52:16 +0000 (10:52 -0600)] 
image: Add functions to obtain category information

Add generic functions which can look up information about a category:

- the number of items in the category
- the category description
- an item long time
- an item short time

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoimage: Add a name for invalid types
Simon Glass [Thu, 30 Jun 2016 16:52:15 +0000 (10:52 -0600)] 
image: Add a name for invalid types

At present the name is NULL, which prevents qsort() fromp being used. Use
the name "invalid" instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoimage: Create a table of information for each category
Simon Glass [Thu, 30 Jun 2016 16:52:14 +0000 (10:52 -0600)] 
image: Create a table of information for each category

Add a table that contains the category name, the number of items in each
category and a pointer to the table of items. This will allow us to use
generic code to deal with the categories.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoimage: Convert the IH_... values to enums
Simon Glass [Thu, 30 Jun 2016 16:52:13 +0000 (10:52 -0600)] 
image: Convert the IH_... values to enums

We need to know the number of values of each category (architecture,
compression, OS and image type). To make this value easier to maintain,
convert all values to enums. The count is then automatic.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoimage: Correct auto-fit architecture property name
Simon Glass [Thu, 30 Jun 2016 16:52:12 +0000 (10:52 -0600)] 
image: Correct auto-fit architecture property name

The fit_write_images() function incorrectly uses the long name for the
architecture. This cannot be parsed with the FIT is read. Fix this by using
the short name instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agomkimage: Drop blank line before main()
Simon Glass [Thu, 30 Jun 2016 16:52:11 +0000 (10:52 -0600)] 
mkimage: Drop blank line before main()

This is not needed. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agomkimage: Drop premature setting of params.fit_image_type
Simon Glass [Thu, 30 Jun 2016 16:52:10 +0000 (10:52 -0600)] 
mkimage: Drop premature setting of params.fit_image_type

There is no need to set params.fit_image_type while parsing the arguments.
It is set up later anyway.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agomkimage: Require a data file when auto-fit is used
Simon Glass [Thu, 30 Jun 2016 16:52:09 +0000 (10:52 -0600)] 
mkimage: Require a data file when auto-fit is used

When auto-fit is used, it is not valid to create a FIT without an image
file. Add a check for this to avoid a very confusing error message later
("Can't open (null): Bad address").

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agomkimage: Explain the auto-fit imagefile special case
Simon Glass [Thu, 30 Jun 2016 16:52:08 +0000 (10:52 -0600)] 
mkimage: Explain the auto-fit imagefile special case

There is a special case in the code when auto-fit is used. Add a comment to
make it easier to understand why this is needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agomkimage: Honour the default image type with auto-fit
Simon Glass [Thu, 30 Jun 2016 16:52:07 +0000 (10:52 -0600)] 
mkimage: Honour the default image type with auto-fit

The default image type is supposed to be IH_TYPE_KERNEL, as set in the
'params' variable. Honour this with auto-fit also.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agolinux/io.h: add generic ioremap()/iounmap() defines
Masahiro Yamada [Tue, 28 Jun 2016 01:48:42 +0000 (10:48 +0900)] 
linux/io.h: add generic ioremap()/iounmap() defines

For most of architectures in U-Boot, virtual address is straight
mapped to physical address.  So, it makes sense to have generic
defines of ioremap and friends in <linux/io.h>.

All of them are just empty and will disappear at compile time, but
they will be helpful to implement drivers which are counterparts of
Linux ones.

I notice MIPS already has its own implementation, so I added a
Kconfig symbol CONFIG_HAVE_ARCH_IOREMAP which MIPS (and maybe
Sandbox as well) can select.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
7 years agoarm, nds32, sh: remove useless ioremap()/iounmap() defines
Masahiro Yamada [Tue, 28 Jun 2016 01:48:41 +0000 (10:48 +0900)] 
arm, nds32, sh: remove useless ioremap()/iounmap() defines

These defines are valid only when iomem_valid_addr is defined,
but I do not see such defines anywhere.  Remove.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agotypes.h: move and redefine resource_size_t
Masahiro Yamada [Tue, 28 Jun 2016 01:48:40 +0000 (10:48 +0900)] 
types.h: move and redefine resource_size_t

Currently, this is only defined in arch/arm/include/asm/types.h,
so move it to include/linux/types.h to make it available for all
architectures.

I defined it with phys_addr_t as Linux does.  I needed to surround
the define with #ifdef __KERNEL__ ... #endif to avoid build errors
in tools building.  (Host tools should not include <linux/types.h>
in the first place, but this is already messy in U-Boot...)

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodoc: Update info on using secure devices from TI
Andreas Dannenberg [Mon, 27 Jun 2016 14:19:24 +0000 (09:19 -0500)] 
doc: Update info on using secure devices from TI

Adds information regarding SPL handling the loading and processing of
secured u-boot images as part of the second stage boot the SPL does.
Introduces the description of a new interface script in the TI SECDEV
Package which handles the creation and prep of secured binary images.

Signed-off-by: Daniel Allred <d-allred@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: am4x: add U-Boot FIT signing and SPL image post-processing
Madan Srinivas [Mon, 27 Jun 2016 14:19:23 +0000 (09:19 -0500)] 
arm: am4x: add U-Boot FIT signing and SPL image post-processing

Modify the SPL build procedure for AM437x high-security (HS) device
variants to create a secure u-boot_HS.img FIT blob that contains U-Boot
and DTB artifacts signed (and optionally encrypted) with a TI-specific
process based on the CONFIG_TI_SECURE_DEVICE config option and the
externally-provided image signing tool.

Also populate the corresponding FIT image post processing call to be
performed during SPL runtime.

Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarm: omap5: add U-Boot FIT signing and SPL image post-processing
Andreas Dannenberg [Mon, 27 Jun 2016 14:19:22 +0000 (09:19 -0500)] 
arm: omap5: add U-Boot FIT signing and SPL image post-processing

Modify the SPL build procedure for AM57xx and DRA7xx high-security (HS)
device variants to create a secure u-boot_HS.img FIT blob that contains
U-Boot and DTB artifacts signed with a TI-specific process based on the
CONFIG_TI_SECURE_DEVICE config option and the externally-provided image
signing tool.

Also populate the corresponding FIT image post processing call to be
performed during SPL runtime.

Signed-off-by: Daniel Allred <d-allred@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: fit: add support for post-processing of images
Daniel Allred [Mon, 27 Jun 2016 14:19:21 +0000 (09:19 -0500)] 
spl: fit: add support for post-processing of images

The next stage boot loader image and the selected FDT can be post-
processed by board/platform/device-specific code, which can include
modifying the size and altering the starting source address before
copying these binary blobs to their final destination. This might be
desired to do things like strip headers or footers attached to the
images before they were packaged into the FIT, or to perform operations
such as decryption or authentication. Introduce new configuration
option CONFIG_SPL_FIT_IMAGE_POST_PROCESS to allow controlling this
feature. If enabled, a platform-specific post-process function must
be provided.

Signed-off-by: Daniel Allred <d-allred@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: omap-common: Update to generate secure U-Boot FIT blob
Andreas Dannenberg [Mon, 27 Jun 2016 14:19:20 +0000 (09:19 -0500)] 
arm: omap-common: Update to generate secure U-Boot FIT blob

Adds commands so that when a secure device is in use and the SPL is
built to load a FIT image (with combined U-Boot binary and various
DTBs), these components that get fed into the FIT are all processed to
be signed/encrypted/etc. as per the operations performed by the
secure-binary-image.sh script of the TI SECDEV package. Furthermore,
perform minor comments cleanup to make better use of the available
space.

Signed-off-by: Daniel Allred <d-allred@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: omap-common: secure ROM signature verify API
Andreas Dannenberg [Mon, 27 Jun 2016 14:19:19 +0000 (09:19 -0500)] 
arm: omap-common: secure ROM signature verify API

Adds an API that verifies a signature attached to an image (binary
blob). This API is basically a entry to a secure ROM service provided by
the device and accessed via an SMC call, using a particular calling
convention.

Signed-off-by: Daniel Allred <d-allred@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarm: omap-common: add secure rom call API for secure devices
Andreas Dannenberg [Mon, 27 Jun 2016 14:19:18 +0000 (09:19 -0500)] 
arm: omap-common: add secure rom call API for secure devices

Adds a generic C-callable API for making secure ROM calls on OMAP and
OMAP-compatible devices. This API provides the important function of
flushing the ROM call arguments to memory from the cache, so that the
secure world will have a coherent view of those arguments. Then is
simply calls the omap_smc_sec routine.

Signed-off-by: Daniel Allred <d-allred@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarm: omap-common: add secure smc entry
Daniel Allred [Mon, 27 Jun 2016 14:19:17 +0000 (09:19 -0500)] 
arm: omap-common: add secure smc entry

Add an interface for calling secure ROM APIs across a range of OMAP and
OMAP compatible high-security (HS) device variants. While at it, also
perform minor cleanup/alignment without any change in functionality.

Signed-off-by: Daniel Allred <d-allred@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarm: cache: add missing dummy functions for when dcache disabled
Daniel Allred [Mon, 27 Jun 2016 14:19:16 +0000 (09:19 -0500)] 
arm: cache: add missing dummy functions for when dcache disabled

Adds missing flush_dcache_range and invalidate_dcache_range dummy
(empty) placeholder functions to the #else portion of the #ifndef
CONFIG_SYS_DCACHE_OFF, where full implementations of these functions
are defined.

Signed-off-by: Daniel Allred <d-allred@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarm64: add better and more generic spin-table support
Masahiro Yamada [Mon, 27 Jun 2016 10:31:05 +0000 (19:31 +0900)] 
arm64: add better and more generic spin-table support

There are two enable methods supported by ARM64 Linux; psci and
spin-table.  The latter is simpler and helpful for quick SoC bring
up.  My main motivation for this patch is to improve the spin-table
support, which allows us to boot an ARMv8 system without the ARM
Trusted Firmware.

Currently, we have multi-entry code in arch/arm/cpu/armv8/start.S
and the spin-table is supported in a really ad-hoc way, and I see
some problems:

  - We must hard-code CPU_RELEASE_ADDR so that it matches the
    "cpu-release-addr" property in the DT that comes from the
    kernel tree.

  - The Documentation/arm64/booting.txt in Linux requires that
    the release address must be zero-initialized, but it is not
    cared by the common code in U-Boot.  We must do it in a board
    function.

  - There is no systematic way to protect the spin-table code from
    the kernel.  We are supposed to do it in a board specific manner,
    but it is difficult to predict where the spin-table code will be
    located after the relocation.  So, it also makes difficult to
    hard-code /memreserve/ in the DT of the kernel.

So, here is a patch to solve those problems; the DT is run-time
modified to reserve the spin-table code (+ cpu-release-addr).
Also, the "cpu-release-addr" property is set to an appropriate
address after the relocation, which means we no longer need the
hard-coded CPU_RELEASE_ADDR.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoRevert "armv8: Enable CPUECTLR.SMPEN for coherency"
Tom Rini [Thu, 14 Jul 2016 21:36:18 +0000 (17:36 -0400)] 
Revert "armv8: Enable CPUECTLR.SMPEN for coherency"

Upon further review this breaks most other platforms as we need to check
what core we're running on before touching it at all.

This reverts commit d73718f3236c520a92efa401084c658e6cc067f3.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Tom Rini [Tue, 12 Jul 2016 12:15:17 +0000 (08:15 -0400)] 
Merge branch 'master' of git://git.denx.de/u-boot-x86

7 years agox86: link: Correct a failure in DRAM init
Simon Glass [Mon, 11 Jul 2016 15:30:55 +0000 (09:30 -0600)] 
x86: link: Correct a failure in DRAM init

With the change to set up pinctrl after relocation, link fails to boot. Add
a special case in the link code to handle this.

Fixes: d8906c1f (x86: Probe pinctrl driver in cpu_init_r())
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: Add Advantech SOM-DB5800/SOM-6867 support
George McCollister [Tue, 21 Jun 2016 17:07:33 +0000 (12:07 -0500)] 
x86: Add Advantech SOM-DB5800/SOM-6867 support

Add support for Advantech SOM-DB5800 with the SOM-6867 installed.
This is very similar to conga-qeval20-qa3-e3845 in that there is a
reference carrier board (SOM-DB5800) with a Baytrail based SoM (SOM-6867)
installed.

Currently supported:
 - 2x UART (From ITE EC on SOM-6867) routed to COM3/4 connectors on
   SOM-DB5800.
 - 4x USB 2.0 (EHCI)
 - Video
 - SATA
 - Ethernet
 - PCIe
 - Realtek ALC892 HD Audio
   Pad configuration for HDA_RSTB, HDA_SYNC, HDA_CLK, HDA_SDO
   HDA_SDI0 is set in DT to enable HD Audio codec.
   Pin defaults for codec pin complexs are not changed.

Not supported:
 - Winbond Super I/O (Must be disabled with jumpers on SOM-DB8500)
 - USB 3.0 (XHCI)
 - TPM

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: baytrail: acpi: Hide internal UART per GNVS setting
Bin Meng [Fri, 17 Jun 2016 09:13:17 +0000 (02:13 -0700)] 
x86: baytrail: acpi: Hide internal UART per GNVS setting

If global NVS says internal UART is not enabled, hide it in the ASL
code so that OS won't see it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: George McCollister <george.mccollister@gmail.com>
Tested-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: acpi: Pack global NVS into ACPI table
Bin Meng [Fri, 17 Jun 2016 09:13:16 +0000 (02:13 -0700)] 
x86: acpi: Pack global NVS into ACPI table

Now that platform-specific ACPI global NVS is added, pack it into
ACPI table and get its address fixed up.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: George McCollister <george.mccollister@gmail.com>
Tested-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: quark: Introduce ACPI global NVS
Bin Meng [Fri, 17 Jun 2016 09:13:15 +0000 (02:13 -0700)] 
x86: quark: Introduce ACPI global NVS

This introduces quark-specific ACPI global NVS structure, defined in
both C header file and ASL file.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: baytrail: Introduce ACPI global NVS
Bin Meng [Fri, 17 Jun 2016 09:13:14 +0000 (02:13 -0700)] 
x86: baytrail: Introduce ACPI global NVS

This introduces baytrail-specific ACPI global NVS structure, defined in
both C header file and ASL file.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: George McCollister <george.mccollister@gmail.com>
Tested-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: conga-qeval20-qa3: Add support for internal UART
Stefan Roese [Wed, 15 Jun 2016 12:15:25 +0000 (14:15 +0200)] 
x86: conga-qeval20-qa3: Add support for internal UART

This patch adds support to enable and use the internal BayTrail UART
instead of the one integrated in the Super IO Winbond chip. For this,
a 2nd defconfig file is added.

This is useful for tests done for the congatec SoM used on baseboards
without such a Super IO chip.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: fsp: Wrap setup_internal_uart() call with CONFIG_INTERNAL_UART
Bin Meng [Wed, 15 Jun 2016 04:33:24 +0000 (21:33 -0700)] 
x86: fsp: Wrap setup_internal_uart() call with CONFIG_INTERNAL_UART

For any FSP-enabled boards that want to enable debug UART support,
setup_internal_uart() will be called, but this API is only available
on BayTrail platform. Change to wrap it with CONFIG_INTERNAL_UART.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: baytrail: Introduce a Kconfig option for the internal UART
Bin Meng [Wed, 15 Jun 2016 04:33:23 +0000 (21:33 -0700)] 
x86: baytrail: Introduce a Kconfig option for the internal UART

There are quite a number of BayTrail boards that uses an external
SuperIO chipset to provide the legacy UART. For such cases, it's
better to have a Kconfig option to enable the internal UART.

So far BayleyBay and MinnowMax boards are using internal UART as
the U-Boot console, enable this on these two boards.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopci: Add board_ prefix to should_load_oprom() and make it weak
Bin Meng [Tue, 14 Jun 2016 09:02:40 +0000 (02:02 -0700)] 
pci: Add board_ prefix to should_load_oprom() and make it weak

For consistency with board_should_run_oprom(), do the same to
should_load_oprom(). Board support codes can provide this one
to override the default weak one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopci: Make load_oprom and run_oprom independent
Bin Meng [Tue, 14 Jun 2016 09:02:39 +0000 (02:02 -0700)] 
pci: Make load_oprom and run_oprom independent

At present should_load_oprom() calls board_should_run_oprom() to
determine whether oprom should be loaded. But sometimes we just
want to load oprom without running. Make them independent.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopci: Remove CONFIG_ALWAYS_LOAD_OPROM
Bin Meng [Tue, 14 Jun 2016 09:02:38 +0000 (02:02 -0700)] 
pci: Remove CONFIG_ALWAYS_LOAD_OPROM

This option is defined at nowhere. Remove it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agommc: exynos_dw_mmc: support the Driver mode for Exynos
Jaehoon Chung [Thu, 30 Jun 2016 11:57:37 +0000 (20:57 +0900)] 
mmc: exynos_dw_mmc: support the Driver mode for Exynos

This patch support the driver mode for exynos dwmmc controller.
To support the legacy model, maintained the existing code.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agommc: exynos_dw_mmc: use the 4bit bus-width by default
Jaehoon Chung [Wed, 29 Jun 2016 10:46:18 +0000 (19:46 +0900)] 
mmc: exynos_dw_mmc: use the 4bit bus-width by default

If there is not "samsung,bus-width" property, use the 4bit buswidth by
default.
Almost all Exnyos SoCs support at least 4bit buswidth.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agommc: exynos_dw_mmc: clean the unused and unnecessary codes
Jaehoon Chung [Wed, 29 Jun 2016 10:46:17 +0000 (19:46 +0900)] 
mmc: exynos_dw_mmc: clean the unused and unnecessary codes

Clean the unused and unnecessary codse.
This patch is one of them for preparing to use DM.
Because it's easy to maintain and combine DM after cleaning codes.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agommc: exynos_dw_mmc: add the error control for checking index
Jaehoon Chung [Wed, 29 Jun 2016 10:46:16 +0000 (19:46 +0900)] 
mmc: exynos_dw_mmc: add the error control for checking index

PERIPH_ID_SDMMC4(131) is not continous value with PERIPH_ID_SDMMC0(75).
If there is no 'index' property in fdt, then dev_index should be
assigned to dev_id(Peripheral ID).
At this time, dev_index should be "56". It means Exynos SoC has "56"
numbers of DWMMC IP. To prevent this behavior, it needs to check the
maximum device index.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agommc: exynos_dw_mmc: remove #ifdef for OF_CONTROL
Jaehoon Chung [Wed, 29 Jun 2016 10:46:15 +0000 (19:46 +0900)] 
mmc: exynos_dw_mmc: remove #ifdef for OF_CONTROL

Removed #ifdef for OF_CONTROL.
It might use 'OF_CONTROL' by default.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agommc: exynos_dw_mmc: remove the unused function
Jaehoon Chung [Wed, 29 Jun 2016 10:46:14 +0000 (19:46 +0900)] 
mmc: exynos_dw_mmc: remove the unused function

This function have maintained for supporting Non-FDT.
Now, Almost all SoC are changed to fdt style.
So there are no that this function is called anywhere.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agoARM: exynos4: dts: add the prefix '/' for aliases nodes
Jaehoon Chung [Tue, 28 Jun 2016 10:47:25 +0000 (19:47 +0900)] 
ARM: exynos4: dts: add the prefix '/' for aliases nodes

It's correct to use '/' as prefix for aliases nodes.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Mon, 11 Jul 2016 22:50:29 +0000 (18:50 -0400)] 
Merge branch 'master' of git://git.denx.de/u-boot-spi

7 years agotools: patman: Handle missing 'END' in non-last commit of a series
Bin Meng [Mon, 27 Jun 2016 06:24:32 +0000 (23:24 -0700)] 
tools: patman: Handle missing 'END' in non-last commit of a series

The following python error:

Traceback (most recent call last):
  File "./tools/patman/patman", line 144, in <module>
    series = patchstream.FixPatches(series, args)
  File "./tools/patman/patchstream.py", line 477, in FixPatches
    commit = series.commits[count]
IndexError: list index out of range

is seen when:

- 'END' is missing in those tags
- those tags are put in the last part in a commit message
- the commit is not the last commit of the series

Add testing logic to see if a new commit starts.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agotools: patman: Handle missing blank line for 'Series-changes'
Bin Meng [Mon, 27 Jun 2016 06:24:31 +0000 (23:24 -0700)] 
tools: patman: Handle missing blank line for 'Series-changes'

'Series-changes' uses blank line to indicate its end. If that is
missing, series internal state variable 'in_change' may be wrong.
Correct its state.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agotools: patman: Generate cover letter correctly when 'END' is missing
Bin Meng [Mon, 27 Jun 2016 06:24:30 +0000 (23:24 -0700)] 
tools: patman: Generate cover letter correctly when 'END' is missing

If 'END' is missing in a 'Cover-letter' section, and that section
happens to show up at the very end of the commit message, and the
commit is the last commit of the series, patman fails to generate
cover letter for us. Handle this in CloseCommit of patchstream.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agotools: patman: Handle tag sections without an 'END'
Bin Meng [Mon, 27 Jun 2016 06:24:29 +0000 (23:24 -0700)] 
tools: patman: Handle tag sections without an 'END'

'Cover-letter', 'Series-notes' and 'Commit-notes' tags require an
'END' to be put at the end of its section. If we forget to put an
'END' in those sections, and these sections are followed by another
patman tag, patman generates incorrect patches. This adds codes to
handle such scenario.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agotools: patman: Use cover_match for 'Cover-letter'
Bin Meng [Mon, 27 Jun 2016 06:24:28 +0000 (23:24 -0700)] 
tools: patman: Use cover_match for 'Cover-letter'

Like other patman tags, use a new variable cover_match to indicate
a match for 'Cover-letter'.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agodm: Sort the uclass id in alphabetical order
Bin Meng [Wed, 22 Jun 2016 09:29:47 +0000 (02:29 -0700)] 
dm: Sort the uclass id in alphabetical order

Some uclass ids are out of order. Per the comments, sort them
in alphabetical order.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agosandbox: Find keyboard driver using driver model
Simon Glass [Sun, 19 Jun 2016 23:33:15 +0000 (17:33 -0600)] 
sandbox: Find keyboard driver using driver model

The cros-ec keyboard is always a child of the cros-ec node. Rather than
searching the device tree, looking at the children. Remove the compat string
which is now unused.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agofdt: x86: Tidy up a few COMPAT string definitions
Simon Glass [Sun, 19 Jun 2016 23:33:14 +0000 (17:33 -0600)] 
fdt: x86: Tidy up a few COMPAT string definitions

The 'COMPAT_' part should appear only once so drop the duplicate part. It is
ignored anyway, but let's keep things consistent.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agofdt: Add a note to avoid adding new compatible strings
Simon Glass [Sun, 19 Jun 2016 23:33:13 +0000 (17:33 -0600)] 
fdt: Add a note to avoid adding new compatible strings

The list is shrinking and we should avoid adding new things. Instead, a
proper driver should be created with driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agofdt: Drop unused exynos compatible strings
Simon Glass [Sun, 19 Jun 2016 23:33:12 +0000 (17:33 -0600)] 
fdt: Drop unused exynos compatible strings

A few drivers have moved to driver model, so we can drop these strings.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agox86: fdt: Drop the unused compatible strings in fdtdec
Simon Glass [Sun, 19 Jun 2016 23:33:11 +0000 (17:33 -0600)] 
x86: fdt: Drop the unused compatible strings in fdtdec

We have drivers for several more devices now, so drop the strings which are
no-longer used.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agocommon: block: fix compiler error with CONFIG_FASTBOOT_FLASH_MMC_DEV
Xu Ziyuan [Wed, 15 Jun 2016 08:56:18 +0000 (16:56 +0800)] 
common: block: fix compiler error with CONFIG_FASTBOOT_FLASH_MMC_DEV

This fixes the following compiler error:

common/fb_mmc.c: In function ‘fb_mmc_erase’:
common/fb_mmc.c:209:17: error: ‘struct blk_desc’ has no member named
‘block_erase’

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agodm: gpio: MPC85XX GPIO platform data support
Hamish Martin [Mon, 13 Jun 2016 22:17:05 +0000 (10:17 +1200)] 
dm: gpio: MPC85XX GPIO platform data support

Define a platform data structure for the MPC85XX GPIO driver to allow
use of the driver without device tree. Users should define the GPIO
blocks for their platform like this:
  struct mpc85xx_gpio_plat gpio_blocks[] = {
         {
                 .addr = 0x130000,
                 .ngpios = 32,
         },
         {
                 .addr = 0x131000,
                 .ngpios = 32,
         },
  };

  U_BOOT_DEVICES(my_platform_gpios) = {
         { "gpio_mpc85xx", &gpio_blocks[0] },
         { "gpio_mpc85xx", &gpio_blocks[1] },
  };

This is intended to build upon the recent submission of the base
MPC85XX driver from Mario Six. We need to use that new driver
without dts support and this patch gives us that flexibility.
This has been tested on a Freescale T2080 CPU, although only the first
GPIO block.

Signed-off-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
Reviewed-by: Mario Six <mario.six@gdsys.cc>
Tested-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agodm: dfu: mmc: Support CONFIG_BLK in DFU for MMC
Simon Glass [Mon, 13 Jun 2016 05:30:33 +0000 (23:30 -0600)] 
dm: dfu: mmc: Support CONFIG_BLK in DFU for MMC

Update the method of accessing the block device so that it works with
CONFIG_BLK enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodm: spl: mmc: Support CONFIG_BLK in SPL MMC
Simon Glass [Mon, 13 Jun 2016 05:30:32 +0000 (23:30 -0600)] 
dm: spl: mmc: Support CONFIG_BLK in SPL MMC

Update the method of accessing the block device so that it works with
CONFIG_BLK enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>