oweals/u-boot.git
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Mon, 13 Jun 2016 03:28:57 +0000 (23:28 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

8 years agoautoboot: follow-up cleanup after CONFIG_BOOTDELAY moves
Masahiro Yamada [Sat, 11 Jun 2016 09:44:09 +0000 (18:44 +0900)]
autoboot: follow-up cleanup after CONFIG_BOOTDELAY moves

Tidy up garbage left by commit bb597c0eeb7e ("common: bootdelay: move
CONFIG_BOOTDELAY into a Kconfig option").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: stm32: remove unused CONFIG_AUTOBOOT
Masahiro Yamada [Sat, 11 Jun 2016 09:44:08 +0000 (18:44 +0900)]
ARM: stm32: remove unused CONFIG_AUTOBOOT

At this point, this is not referenced from anywhere, so remove it
(but it will be re-added later for a different meaning).

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: fix define2mk.sed to not add quotes around negative integers
Masahiro Yamada [Sat, 11 Jun 2016 09:44:10 +0000 (18:44 +0900)]
tools: fix define2mk.sed to not add quotes around negative integers

The sed script, tools/scripts/define2mk.sed, converts config defines
from C headers into include/autoconf.mk for the use in Makefiles.

I found the tool adds quotes around negative integer values.

For example, at the point of the v2016.07-rc1 tag,
include/configs/microblaze-generic.h defines
  #define CONFIG_BOOTDELAY         -1     /* -1 disables auto-boot */

Because it is an integer option, it should be converted to:
  CONFIG_BOOTDELAY=-1

But, the script actually converts it to:
  CONFIG_BOOTDELAY="-1"

This is a fatal problem for the tools/moveconfig.py because it parses
include/autoconf.mk for the config defines from the board headers.
CONFIG_BOOTDELAY="-1" is considered as a string type option and it
is dropped due to the type mismatch from the entry in Kconfig.

This commit fixes the script so that the tools/moveconfig.py can
correctly convert integer options with a negative value.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: moveconfig: Add a new --git-ref option
Joe Hershberger [Fri, 10 Jun 2016 19:53:32 +0000 (14:53 -0500)]
tools: moveconfig: Add a new --git-ref option

This option allows the 'make autoconf.mk' step to run against a former
repo state, while the savedefconfig step runs against the current repo
state. This is convenient for the case where something in the Kconfig
has changed such that the defconfig is no longer complete with the new
Kconfigs. This feature allows the .config to be built assuming those old
Kconfigs, but then savedefconfig based on the new state of the Kconfigs.

If in doubt, always specify this switch. It will always do the right
thing even if not required, but if it was required and you don't use it,
the moved configs will be incorrect. When not using this switch, you
must very carefully evaluate that all moved configs are correct.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: moveconfig: New color used for changed defconfig
Joe Hershberger [Fri, 10 Jun 2016 19:53:30 +0000 (14:53 -0500)]
tools: moveconfig: New color used for changed defconfig

The old color blends in with similar messages and makes them not stand
out.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: moveconfig: Fix another typo
Joe Hershberger [Fri, 10 Jun 2016 19:53:29 +0000 (14:53 -0500)]
tools: moveconfig: Fix another typo

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: moveconfig: make Slot.poll() more readable with helper methods
Masahiro Yamada [Wed, 8 Jun 2016 02:47:37 +0000 (11:47 +0900)]
tools: moveconfig: make Slot.poll() more readable with helper methods

The Slot.poll() method is already complicated and a new feature
we are going to add will make it more difficult to understand
the execution flow.

Refactor it with helper methods, .handle_error(), .do_defconfig(),
.do_autoconf(), .do_savedefconfig, and .update_defconfig().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: moveconfig: allow to run without any CONFIG specified
Masahiro Yamada [Thu, 19 May 2016 06:52:09 +0000 (15:52 +0900)]
tools: moveconfig: allow to run without any CONFIG specified

I found "tools/moveconfig -s" might be useful for defconfig re-sync.
I could optimize it for re-sync if I wanted, but I do not want to
make the code complex for this feature.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: add --force-sync option
Masahiro Yamada [Thu, 19 May 2016 06:52:08 +0000 (15:52 +0900)]
tools: moveconfig: add --force-sync option

Now, this tools invokes "make savedefconfig" only when it needs to
do so, but there might be cases where a user wants the tool to do
savedefconfig forcibly, for example, some defconfigs were already
out of sync and the user wants to fix it as well.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: report when defconfig is updated
Masahiro Yamada [Thu, 19 May 2016 06:52:07 +0000 (15:52 +0900)]
tools: moveconfig: report when defconfig is updated

There are various factors that determine if the given defconfig is
updated, and it is probably what users are more interested in.

Show the log when the defconfig is updated.  Also, copy the file
only when the file content was really updated to avoid changing
the time stamp needlessly.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: report when CONFIGs are removed by savedefconfig
Masahiro Yamada [Thu, 19 May 2016 06:52:06 +0000 (15:52 +0900)]
tools: moveconfig: report when CONFIGs are removed by savedefconfig

This is a rare case, but there is still possibility that some CONFIG
is moved to the .config, but it is removed by "make savedefconfig".
(For example, it happens when the specified CONFIG has no prompt in
the Kconfig entry, i.e. it is not user-configurable.)

It might be an unexpected case.  So, display the log in this case
(in yellow color to gain user's attention if --color option is given).

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: display log when savedefconfig occurs
Masahiro Yamada [Thu, 19 May 2016 06:52:05 +0000 (15:52 +0900)]
tools: moveconfig: display log when savedefconfig occurs

Now, "make savedefconfig" does not always happen.  Display the log
when it happens.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: skip savedefconfig if .config was not updated
Masahiro Yamada [Thu, 19 May 2016 06:52:04 +0000 (15:52 +0900)]
tools: moveconfig: skip savedefconfig if .config was not updated

If no CONFIG option is moved to the .config, no need to sync the
defconfig file.  This accelerates the processing by skipping
needless "make savedefconfig".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: refactor code to go back to idle state
Masahiro Yamada [Thu, 19 May 2016 06:52:03 +0000 (15:52 +0900)]
tools: moveconfig: refactor code to go back to idle state

Move similar code to finish() function.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: display log atomically in more readable format
Masahiro Yamada [Thu, 19 May 2016 06:52:02 +0000 (15:52 +0900)]
tools: moveconfig: display log atomically in more readable format

Before this commit, the log was displayed in the format:

<defconfig_name>   : <action1>
<defconfig_name>   : <action2>
<defconfig_name>   : <action3>

When we move multiple CONFIGs at the same time, we see as many
<defconfig_name> strings as actions for every defconfig, which is
redundant information.

Moreover, since normal log and error log are displayed separately,
Messages from different threads could be mixed, like this:

<foo>              : <action1>
<foo>              : <action2>
<bar>              : <action1>
<bar>              : <action2>
<foo>              : <error_log>

This commit makes sure to call "print" once a defconfig, which
enables atomic logging for each defconfig.  It also makes it
possible to refactor the log format as follows:

<foo_defconfig>
    <action1>
    <action2>
    <error_log>

<bar_defconfig>
    <action1>
    <action2>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: move log output code out of Kconfig Parser class
Masahiro Yamada [Thu, 19 May 2016 06:52:01 +0000 (15:52 +0900)]
tools: moveconfig: move log output code out of Kconfig Parser class

This will help further improvement/clean-up.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: compute file paths just once
Masahiro Yamada [Thu, 19 May 2016 06:52:00 +0000 (15:52 +0900)]
tools: moveconfig: compute file paths just once

The paths to .config, include/autoconf.mk, include/config/auto.conf
are not changed during the defconfig walk.  Compute them only once
when a new class instance is created.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: allow to give CONFIG names as argument directly
Masahiro Yamada [Thu, 19 May 2016 06:51:58 +0000 (15:51 +0900)]
tools: moveconfig: allow to give CONFIG names as argument directly

We still pass the input file with CONFIG name, type, default value
in each line, but the last two fields are just ignored by the tool.
So, let's deprecate the input file and allow users to give CONFIG
names directly from the command line.  The types and default values
are automatically detected and handled nicely by the tool.

Going forward, we can use this tool more easily like:

  tools/moveconfig.py CONFIG_FOO CONFIG_BAR

Update the documentation and fix some typos I noticed while I was
working on.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: drop code for handling type and default value
Masahiro Yamada [Thu, 19 May 2016 06:51:57 +0000 (15:51 +0900)]
tools: moveconfig: drop code for handling type and default value

Now types and defalut values given by the input file are just
ignored.  Delete unnecessary code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: do not rely on type and default value given by users
Masahiro Yamada [Thu, 19 May 2016 06:51:56 +0000 (15:51 +0900)]
tools: moveconfig: do not rely on type and default value given by users

Commit 96464badc794 ("moveconfig: Always run savedefconfig on the
moved config") changed the work flow of this tool a lot from the
original intention when this tool was designed first.

Since then, before running this tool, users must edit the Kconfig to
add the menu entries for the configs they are moving.  It means users
had already specified the type and the default value for each CONFIG
via its Kconfig entry.  Nevertheless, users are still required to
dictate the same type and the default value in the input file.  This
is tedious to use.  So, my idea here is to deprecate the latter.

Before moving forward with it, there is one issue worth mentioning;
since the savedefconfig re-sync was introduced, this tool has not
been able to move bool options with "default y".  Joe sent a patch
to solve this problem about a year ago, but it was not applied for
some reasons.  Now, he came back with an updated patch, so this
problem will be fixed soon.

For other use cases, I see no reason to require redundant dictation
in the input file.  Instead, the tool can know the types and default
values by parsing the .config file.

This commit changes the tool to use the CONFIG names, but ignore the
types and default values given by the input file.

This commit also fixes one bug.  Prior to this commit, it could not
move an integer-typed CONFIG with value 1.

For example, assume we are moving CONFIG_CONS_INDEX.  Please note
this is an integer type option.

Many board headers define this CONFIG as 1.

  #define CONFIG_CONS_INDEX    1

It will be converted to

  CONFIG_CONS_INDEX=y

and moved to include/autoconf.mk, by the tools/scripts/define2mk.sed.
It will cause "make savedefconfig" to fail due to the type conflict.

This commit takes care of it by detecting the type and converting the
CONFIG value correctly.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: increment number of processed files monotonically
Masahiro Yamada [Thu, 19 May 2016 06:51:55 +0000 (15:51 +0900)]
tools: moveconfig: increment number of processed files monotonically

Currently, the progress " * defconfigs out of 1133" does not increase
monotonically.

Moreover, the number of processed defconfigs does not match the total
number of defconfigs when this tool finishes, like:

 1132 defconfigs out of 1133
Clean up headers? [y/n]:

It looks like the task was not completed, and some users might feel
upset about it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: exit with error message for not clean directory
Masahiro Yamada [Thu, 19 May 2016 06:51:54 +0000 (15:51 +0900)]
tools: moveconfig: exit with error message for not clean directory

When the source tree is not clean, this tool raises an exception
with a message like follows:

Traceback (most recent call last):
  File "tools/moveconfig.py", line 939, in <module>
    main()
  File "tools/moveconfig.py", line 934, in main
    move_config(config_attrs, options)
  File "tools/moveconfig.py", line 808, in move_config
    while not slots.available():
  File "tools/moveconfig.py", line 733, in available
    if slot.poll():
  File "tools/moveconfig.py", line 645, in poll
    self.parser.update_dotconfig(self.defconfig)
  File "tools/moveconfig.py", line 503, in update_dotconfig
    with open(autoconf_path) as f:
IOError: [Errno 2] No such file or directory: '/tmp/tmpDtzCgl/include/autoconf.mk'

This does not explain what is wrong.  Show an appropriate error
message "source tree is not clean, please run 'make mrproper'"
in such a situation.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: check compilers before starting defconfig walk
Masahiro Yamada [Thu, 19 May 2016 06:51:53 +0000 (15:51 +0900)]
tools: moveconfig: check compilers before starting defconfig walk

Since commit 25400090b1e2 ("moveconfig: Print a message for
missing compiler"), this tool parses an error message every time an
error occurs during the process in order to detect missing compiler.

Instead of that, we can look for compilers in the PATH environment
only once before starting the defconfig walk.  If a desired compiler
is missing, "make include/config/auto.conf" will apparently fail for
that architecture.  So, the tool can just skip those board, showing
"Compiler is missing.  Do nothing.".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: check directory location before compilers
Masahiro Yamada [Thu, 19 May 2016 06:51:52 +0000 (15:51 +0900)]
tools: moveconfig: check directory location before compilers

We must ensure this tool is run from the top of source directory
before calling update_cross_compile().  Otherwise, the following
exception is thrown:

Traceback (most recent call last):
  File "./moveconfig.py", line 918, in <module>
    main()
  File "./moveconfig.py", line 908, in main
    update_cross_compile()
  File "./moveconfig.py", line 292, in update_cross_compile
    for arch in os.listdir('arch'):
OSError: [Errno 2] No such file or directory: 'arch'

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: remove redundant else: after sys.exit()
Masahiro Yamada [Thu, 19 May 2016 06:51:51 +0000 (15:51 +0900)]
tools: moveconfig: remove redundant else: after sys.exit()

Nesting by "else:" is not generally useful after such statements
as return, break, sys.exit(), etc.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: rename update_defconfig() to update_dotconfig()
Masahiro Yamada [Thu, 19 May 2016 06:51:50 +0000 (15:51 +0900)]
tools: moveconfig: rename update_defconfig() to update_dotconfig()

Commit 96464badc794 ("moveconfig: Always run savedefconfig on the
moved config") changed how defconfig files were updated.

Since then, the function update_defconfig() does not modify defconfig
files at all (instead, they are updated by "make savedefconfig"), so
update_dotconfig() is a better fit for this function.  Also, update
the comment block to match the actual behavior.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: fix --dry-run option
Masahiro Yamada [Thu, 19 May 2016 06:51:49 +0000 (15:51 +0900)]
tools: moveconfig: fix --dry-run option

Since commit 96464badc794 ("moveconfig: Always run savedefconfig on
the moved config"), --dry-run option is broken.

The --dry-run option prevents the .config from being modified,
but defconfig files might be updated by "make savedefconfig"
regardless of the --dry-run option.

Move the "if not self.options.dry_run" conditional to the correct
place.

Fixes 96464badc794 ("moveconfig: Always run savedefconfig on the moved config")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agoverified-boot: Minimal support for booting U-Boot proper from SPL
Teddy Reed [Fri, 10 Jun 2016 02:18:44 +0000 (19:18 -0700)]
verified-boot: Minimal support for booting U-Boot proper from SPL

This allows a board to configure verified boot within the SPL using
a FIT or FIT with external data. It also allows the SPL to perform
signature verification without needing relocation.

The board configuration will need to add the following feature defines:
CONFIG_SPL_CRYPTO_SUPPORT
CONFIG_SPL_HASH_SUPPORT
CONFIG_SPL_SHA256

In this example, SHA256 is the only selected hashing algorithm.

And the following booleans:
CONFIG_SPL=y
CONFIG_SPL_DM=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_FIT=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_SPL_OF_LIBFDT=y
CONFIG_SPL_FIT_SIGNATURE=y

Signed-off-by: Teddy Reed <teddy.reed@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Andreas Dannenberg <dannenberg@ti.com>
Acked-by: Sumit Garg <sumit.garg@nxp.com>
8 years agoti_armv7_common: env: Remove no longer needed mem_reserve
Andrew F. Davis [Wed, 8 Jun 2016 15:19:14 +0000 (10:19 -0500)]
ti_armv7_common: env: Remove no longer needed mem_reserve

The kernel can now use DT to reserve memory carveouts and
these areas are now the default for drivers that need reserved
memory, so reserving more here is unneeded and any memory reserved
this way will be wasted.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agocmd: gpt: add - partition size parsing
Michael Trimarchi [Wed, 8 Jun 2016 08:18:16 +0000 (10:18 +0200)]
cmd: gpt: add - partition size parsing

This patch try to parse name=userdata,size=-,uuid=${uuid_gpt_userdata};

gpt mmc write 0 $partitions
gpt mmc verify 0 $partitions

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarm: dra7xx: Assign omap_vcores based on board type
Keerthy [Tue, 7 Jun 2016 10:35:25 +0000 (16:05 +0530)]
arm: dra7xx: Assign omap_vcores based on board type

Currently omap_vcores which holds pmic data is being assigned based
on the SoC type. PMIC is not a part of SoC. It is logical to
to assign omap_vcores based on board type. Hence over ride the
vcores_init function and assign omap_vcores based on the board type.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
8 years agoMerge branch 'master' of http://git.denx.de/u-boot-sunxi
Tom Rini [Sun, 12 Jun 2016 16:52:33 +0000 (12:52 -0400)]
Merge branch 'master' of git.denx.de/u-boot-sunxi

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Sun, 12 Jun 2016 16:52:19 +0000 (12:52 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Sun, 12 Jun 2016 16:51:34 +0000 (12:51 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Tom Rini [Sun, 12 Jun 2016 13:55:16 +0000 (09:55 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

8 years agox86: broadwell: gpio: Remove the codes to set up pin control
Bin Meng [Wed, 8 Jun 2016 12:07:39 +0000 (05:07 -0700)]
x86: broadwell: gpio: Remove the codes to set up pin control

Now that we have set up pin control in cpu_init_r(), remove the
duplicated codes in the broadwell gpio driver.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Probe pinctrl driver in cpu_init_r()
Bin Meng [Wed, 8 Jun 2016 12:07:38 +0000 (05:07 -0700)]
x86: Probe pinctrl driver in cpu_init_r()

At present pinctrl driver gets probed in ich6_gpio driver's probe
routine, which has two issues:

 - Pin's PADs only gets configured when GPIO driver is probed, which
   is not done by default. This leaves the board in a partially
   functional state as we must initialize PADs correctly to get
   perepherals fully working.
 - The probe routine of pinctrl driver is called multiple times, as
   normally there are multiple GPIO controllers. It should really
   be called just once.

Move the call to syscon_get_by_driver_data() from ich6_gpio driver
to cpu_init_r().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: George McCollister <george.mccollister@gmail.com>
Tested-by: George McCollister <george.mccollister@gmail.com>
8 years agox86: Enable regmap and syscon for coreboot and qemu-x86
Bin Meng [Wed, 8 Jun 2016 12:07:37 +0000 (05:07 -0700)]
x86: Enable regmap and syscon for coreboot and qemu-x86

These are generic and should be turned on on coreboot and qemu-x86.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Update x86-pinctrl driver device-tree-bindings doc
Bin Meng [Wed, 8 Jun 2016 12:07:36 +0000 (05:07 -0700)]
x86: Update x86-pinctrl driver device-tree-bindings doc

This updates the device-tree-bindings doc for x86-pinctrl driver:

 - clarify "gpio-offset" is required only when "mode-gpio" is set
 - correct property name "pull-strength"
 - use tab instead of space at several places

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: baytrail: Configure card detect pin of the SD controller
Bin Meng [Wed, 8 Jun 2016 12:07:35 +0000 (05:07 -0700)]
x86: baytrail: Configure card detect pin of the SD controller

As of today, the latest version FSP (gold4) for BayTrail misses the
PAD configuration of the SD controller's Card Detect signal. The
default PAD value for the CD pin sets the pin to work in GPIO mode,
which causes card detect status cannot be reflected by the Present
State register in the SD controller (bit 16 & bit 18 are always zero).

Add a configuration for this pin in the pinctrl node.

Note I've checked the PAD configuration for all the pins in all the
3 controllers (eMMC/SDIO/SD). Only this SDMMC3_CD_B pin does not get
initialized to correct mode by FSP. With fsp,emmc-boot-mode set to
2 (eMMC 4.1), eMMC pins are initialized to func 1, but if we set
fsp,emmc-boot-mode to 1 (auto), those pins are initialized to func 3
which is correct according to datasheet.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: baytrail: Change fsp, emmc-boot-mode to "auto"
Bin Meng [Wed, 8 Jun 2016 12:07:34 +0000 (05:07 -0700)]
x86: baytrail: Change fsp, emmc-boot-mode to "auto"

At present all BayTrail boards configure fsp,emmc-boot-mode to 2,
which means "eMMC 4.1" per FSP documentation. However, eMMC 4.1
only shows up on some early stepping silicon of BayTrail SoC.
Newer stepping SoC integrates an eMMC 4.5 controller. Intel FSP
provides a config option fsp,emmc-boot-mode which tells FSP which
eMMC controller it initializes. Instead of hardcoded to 2, now
we change it to 1 which means "auto".

With this change, MinnowMax board (with a D0 stepping BayTrail SoC)
can see the eMMC 4.5 controller at PCI address 00.17.00 via U-Boot
'pci' command.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: baytrail: Add 'reg' property in the pinctrl node
Bin Meng [Wed, 8 Jun 2016 12:07:33 +0000 (05:07 -0700)]
x86: baytrail: Add 'reg' property in the pinctrl node

Without a 'reg' property, pinctrl driver probe routine fails in
its pre_probe() with a return value of -EINVAL.

Add 'reg' property for all BayTrail boards. Note for BayleyBay,
the pinctrl node is newly added.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: ich6_gpio: Output return value of syscon_get_by_driver_data()
Bin Meng [Wed, 8 Jun 2016 12:07:32 +0000 (05:07 -0700)]
x86: ich6_gpio: Output return value of syscon_get_by_driver_data()

The call to syscon_get_by_driver_data() does not save its return value.
Print it out to aid debugging.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: acpi: Fix madt lapic generation
George McCollister [Tue, 7 Jun 2016 18:40:18 +0000 (13:40 -0500)]
x86: acpi: Fix madt lapic generation

An accumulated length was incorrectly added to current each pass
through the loop. On system with more than 2 cores this caused a
corrupt MADT to be generated.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoarmv8: ls2080aqds: Enable QSPI boot support
Yuan Yao [Wed, 8 Jun 2016 10:25:00 +0000 (18:25 +0800)]
armv8: ls2080aqds: Enable QSPI boot support

This patch adds QSPI boot support for LS2080AQDS board.
The QSPI boot image need to be programmed into the QSPI flash
first. Then we can switch to booting from QSPI memory space.

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoconfigs: ls2080aqds_nand_defconfig: Enable QSPI
Yuan Yao [Wed, 8 Jun 2016 10:24:59 +0000 (18:24 +0800)]
configs: ls2080aqds_nand_defconfig: Enable QSPI

The Freescale QSPI driver has been converted to Driver Model.
This patch enables FSL_QSPI and its dependence options, DM, DM_SPI,
OF_CONTROL and so on.

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoconfigs: ls2080a: Increase load image len in NAND boot
Yuan Yao [Wed, 8 Jun 2016 10:24:58 +0000 (18:24 +0800)]
configs: ls2080a: Increase load image len in NAND boot

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls2080aqds: Config QSPI pin mux via FPGA in NAND boot
Yuan Yao [Wed, 8 Jun 2016 10:24:57 +0000 (18:24 +0800)]
armv8: ls2080aqds: Config QSPI pin mux via FPGA in NAND boot

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agodts: ls2080aqds: Add QSPI dts node
Yuan Yao [Wed, 8 Jun 2016 10:24:56 +0000 (18:24 +0800)]
dts: ls2080aqds: Add QSPI dts node

Add QSPI controller and slave dts node for LS2080AQDS board.

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoconfigs: ls2080aqds: Enable QSPI flash support
Yuan Yao [Wed, 8 Jun 2016 10:24:55 +0000 (18:24 +0800)]
configs: ls2080aqds: Enable QSPI flash support

Enable QSPI flash related configure options.

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls2080aqds: disable IFC NOR & QIXIS when QSPI enable
Yuan Yao [Wed, 8 Jun 2016 10:24:54 +0000 (18:24 +0800)]
armv8: ls2080aqds: disable IFC NOR & QIXIS when QSPI enable

When QSPI is enabled, NOR flash and QIXIS can't be accessed
through IFC due to pin mux. Enable I2C QIXIS access and I2C
early init to read the sysclk and ddrclk.

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoconfigs: ls2080a_common: Remove duplicate NOR configs
Yuan Yao [Wed, 8 Jun 2016 10:24:53 +0000 (18:24 +0800)]
configs: ls2080a_common: Remove duplicate NOR configs

The NOR flash related configure options appear in ls2080aqds.h and
ls2080ardb.h, and the two files both includ ls2080a_common.h.
This patch remove the duplicated options in ls2080a_common.h.

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls2080aqds: Select QSPI CLK div via SCFG
Yuan Yao [Wed, 8 Jun 2016 10:24:52 +0000 (18:24 +0800)]
armv8: ls2080aqds: Select QSPI CLK div via SCFG

QSPI module output SCLK divisor value is configured through SCFG.

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agodrivers: i2c: mxc: Add early init
Yuan Yao [Wed, 8 Jun 2016 10:24:51 +0000 (18:24 +0800)]
drivers: i2c: mxc: Add early init

Add early i2c init function with conservative divider when the exact
clock rate is not available.

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoboard: ls2080a: Add "mcinitcmd" env for MC & DPL deployment
Pratiyush Mohan Srivastava [Wed, 20 Jan 2016 06:59:03 +0000 (12:29 +0530)]
board: ls2080a: Add "mcinitcmd" env for MC & DPL deployment

Environment variable mcinitcmd is defined to initiate MC and DPL
deployment from the location where it is stored (NOR, NAND, SD, SATA,
USB) during booting. If this variable is not defined then macro
MC_BOOT_ENV_VAR will be null and MC will not be booted and DPL will
not be applied during U-boot booting.

Signed-off-by: Pratiyush Mohan Srivastava <pratiyush.srivastava@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8/ls2080a: configure PMU's PCTBENR to enable WDT
Yunhui Cui [Wed, 8 Jun 2016 02:31:42 +0000 (10:31 +0800)]
armv8/ls2080a: configure PMU's PCTBENR to enable WDT

The SP805-WDT module on LS2080A requires configuration of PMU's
PCTBENR register to enable watchdog counter decrement and reset
signal generation. The watchdog clock needs to be enabled first.

Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agosunxi: Move the SPL stack top to 0x1A000 on Allwinner A64/A80
Siarhei Siamashka [Mon, 30 May 2016 22:48:06 +0000 (01:48 +0300)]
sunxi: Move the SPL stack top to 0x1A000 on Allwinner A64/A80

Since the SRAM C corruption issue is now resolved on Allwinner
A64, it is possible to move the stack top to the address 0x1A000
on both A64 and A80. The boot ROM can load SPL binaries with
up to 32 KiB size on A64 (the 24 KiB SPL size limitation only
affects A10/A20), and this patch also ensures the availability
of 8 KiB stack.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Downclock AHB1 to 100MHz on Allwinner A64
Siarhei Siamashka [Mon, 30 May 2016 22:48:05 +0000 (01:48 +0300)]
sunxi: Downclock AHB1 to 100MHz on Allwinner A64

Currently the AHB1 clock speed is configured as 200MHz by
the SPL, but this causes a subtle and hard to reproduce data
corruption in SRAM C (for example, this can't be easily
detected with a trivial memset/memcmp test).

For what it's worth, the Allwinner's BSP configures AHB1
as 200MHz, as can be verified by running the devmem2 tool
in the system running the Allwinner's kernel 3.10.x:

   0x1C20028: PLL_PERIPH0_CTRL_REG = 0x90041811
   0x1C20054: AHB1_APB1_CFG_REG    = 0x3180
   0x1C20058: APB2_CFG_REG         = 0x1000000
   0x1C2005C: AHB2_CFG_REG         = 0x1

However the FEL mode uses more conservative settings (100MHz
for AHB1):

   0x1C20028: PLL_PERIPH0_CTRL_REG = 0x90041811
   0x1C20054: AHB1_APB1_CFG_REG    = 0x3190
   0x1C20058: APB2_CFG_REG         = 0x1000000
   0x1C2005C: AHB2_CFG_REG         = 0x0

It is yet to be confirmed whether faster AHB1/AHB2 clock settings
can be used safely if we initialize the AXP803 PMIC instead of
using reset defaults. But in order to resolve the data corruption
problem right now, it's best to downclock AHB1 to a safe level.

Note that this issue only affects the SPL, which is not fully
supported on Allwinner A64 yet and it should not affect the boot0
usage (unless somebody can confirm SRAM C corruption with the
boot0 too).

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agospi: pic32_spi: add SPI master driver for PIC32 SoC.
Purna Chandra Mandal [Thu, 2 Jun 2016 08:56:08 +0000 (14:26 +0530)]
spi: pic32_spi: add SPI master driver for PIC32 SoC.

This driver implements SPI protocol in master mode to communicate
with the SPI device connected on SPI bus. It handles /CS explicitly
by controlling respective pin as gpio ('cs-gpios' property in dt node)
and uses PIO mode for SPI transaction. It is configurable based
on driver-model only.

Cc: Jagan Teki <jteki@openedev.com>
Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: Make CONFIG_SYS_DCACHE_LINE_SIZE int, not hex
Paul Burton [Thu, 9 Jun 2016 12:09:52 +0000 (13:09 +0100)]
MIPS: Make CONFIG_SYS_DCACHE_LINE_SIZE int, not hex

For consistency with the other cache-related Kconfig entries & the
values actually set by boards, make CONFIG_SYS_DCACHE_LINE_SIZE an int
entry instead of a hex entry.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Fixes: 372286217f05 ("MIPS: Split I & D cache line size config")

8 years agoMIPS: Fix invalidate_dcache_range to operate on L1 Dcache
Paul Burton [Thu, 9 Jun 2016 12:09:51 +0000 (13:09 +0100)]
MIPS: Fix invalidate_dcache_range to operate on L1 Dcache

Commit fb64cda57998 ("MIPS: Abstract cache op loops with a macro")
accidentally modified invalidate_dcache_range to operate on the L1
Icache instead of the Dcache. Fix the cache op used to operate on the
Dcache.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Fixes: fb64cda57998 ("MIPS: Abstract cache op loops with a macro")

8 years agosunxi: musb: Properly turn of musb controller before booting
Hans de Goede [Sun, 5 Jun 2016 14:53:04 +0000 (16:53 +0200)]
sunxi: musb: Properly turn of musb controller before booting

Turn of the clock and assert the reset when musb_stop gets called, so that
the os gets the musb controller in a pristine state. This fixes a spurious
VBus error interrupt triggering as soon as the Linux musb driver loads.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Add INITIAL_USB_SCAN_DELAY to Mele_A1000G_quad_defconfig
Hans de Goede [Sun, 5 Jun 2016 12:40:44 +0000 (14:40 +0200)]
sunxi: Add INITIAL_USB_SCAN_DELAY to Mele_A1000G_quad_defconfig

The Mele_A1000G_quad has an onboard usb <-> sata conversion which needs
longer then the usb-spec allows to connect after getting power.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Enable ALDO3 and ALDO4 in Wobo_i5_defconfig
Hans de Goede [Thu, 2 Jun 2016 16:46:09 +0000 (18:46 +0200)]
sunxi: Enable ALDO3 and ALDO4 in Wobo_i5_defconfig

These are used for the usb wifi and if we leave the enabling up to the
kernel, we get hit by the axp209 issues with enabling ldo3 or 4 post boot
and the systems hangs as soon as it is enabled.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosiemens,am33x: add draco etamin board
Heiko Schocher [Tue, 7 Jun 2016 06:55:45 +0000 (08:55 +0200)]
siemens,am33x: add draco etamin board

In the draco CPU board family, etamin is a new variant
with bigger flash and more RAM. Due to new flash that
uses larger pages (4K) some changes are necessary because
it impacts the MTD partition layout and the ubi mount
parameters.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
[trini: Move BOOTDELAY into defconfig, just always be 3 now]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agodfu, nand, ubi: fix erasing after write finish
Heiko Schocher [Tue, 7 Jun 2016 06:55:44 +0000 (08:55 +0200)]
dfu, nand, ubi: fix erasing after write finish

writting to ubi nand partitions need after write ends an erase
of the remaining sectors. This fail, if dfu write size was not
a multiple of erasesize, example log:

Failure erase: -1

Fix this error.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agoam335x, dxr2: get ECC sType from I2C eeprom
Heiko Schocher [Tue, 7 Jun 2016 06:55:43 +0000 (08:55 +0200)]
am335x, dxr2: get ECC sType from I2C eeprom

read the ECC Type field from the i2c eeprom, instead
configuring it static in the U-Boot binary.

see RM:
Table 26-17. NAND Geometry Information on I2C EEPROM

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agomtd: nand: omap: allow to switch to BCH16
Heiko Schocher [Tue, 7 Jun 2016 06:55:42 +0000 (08:55 +0200)]
mtd: nand: omap: allow to switch to BCH16

support in omap_nand_switch_ecc() also an eccstrength
from 16.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agonand: add nand mtd concat support
Heiko Schocher [Tue, 7 Jun 2016 06:55:41 +0000 (08:55 +0200)]
nand: add nand mtd concat support

add for nand devices mtd concat support. Generic MTD concat
support is already ported to mainline, and used in the cfi_mtd
driver. This patch adds it similiar for nand devices.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agoubi: add new ubi command "ubi detach"
Heiko Schocher [Tue, 7 Jun 2016 06:55:40 +0000 (08:55 +0200)]
ubi: add new ubi command "ubi detach"

simple detachs ubi from the mtd partition.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agosiemens,am33x: add ubi fastmap support
Samuel Egli [Tue, 7 Jun 2016 06:55:39 +0000 (08:55 +0200)]
siemens,am33x: add ubi fastmap support

From: Samuel Egli <samuel.egli@siemens.com>

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agoam335x, shc: add support for the am335x based bosch shc board
Heiko Schocher [Tue, 7 Jun 2016 06:31:25 +0000 (08:31 +0200)]
am335x, shc: add support for the am335x based bosch shc board

U-Boot SPL 2016.03-rc3-00019-g6dfb4c2-dirty (Mar 09 2016 - 07:40:06)
SHC C3-Sample
MPU reference clock runs at 6 MHz
Setting MPU clock to 594 MHz
Enabling Spread Spectrum of 18 permille for MPU
Trying to boot from MMC
reading u-boot.img
reading u-boot.img

U-Boot 2016.03-rc3-00019-g6dfb4c2-dirty (Mar 09 2016 - 07:05:35 +0100)

       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
reloc off 1f783000
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Net:   cpsw
U-Boot#

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agodoc, spl, am335x: update am335x-network
Heiko Schocher [Tue, 7 Jun 2016 06:31:24 +0000 (08:31 +0200)]
doc, spl, am335x: update am335x-network

on the shc board we see when booting in net boot mode,
that the ROM bootloader sends "AM335x ROM" as
vendor-class-identifier. U-Boots doc says "DM814x ROM".

So, add the info to the doc, that there is also
"AM335x ROM" possible.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoarmv7: omap-common: make SPL board_mmc_init() weak
Heiko Schocher [Tue, 7 Jun 2016 06:31:23 +0000 (08:31 +0200)]
armv7: omap-common: make SPL board_mmc_init() weak

make this function weak, so board code can setup in SPL
MMC init with board special values.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agommc: omap_hsmmc: enable 8bit interface for eMMC for AM33xx
Heiko Schocher [Tue, 7 Jun 2016 06:31:22 +0000 (08:31 +0200)]
mmc: omap_hsmmc: enable 8bit interface for eMMC for AM33xx

Enable 8bit interface on HSMMC2 for am33xx to support 8bit eMMC chips.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agommc: revert mmc: Handle switch error status bit in MMC card status
Heiko Schocher [Tue, 7 Jun 2016 06:31:21 +0000 (08:31 +0200)]
mmc: revert mmc: Handle switch error status bit in MMC card status

revert patch:
commit: 6b2221b008e0: mmc: Handle switch error status bit in MMC card status

to get eMMC working on shc board

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agobootstage: call show_boot_progress also in SPL
Heiko Schocher [Tue, 7 Jun 2016 06:31:20 +0000 (08:31 +0200)]
bootstage: call show_boot_progress also in SPL

show_boot_progress() is now called from SPL also.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agoarm, am335x: Enable Spread Spectrum for the MPU
Heiko Schocher [Tue, 7 Jun 2016 06:31:19 +0000 (08:31 +0200)]
arm, am335x: Enable Spread Spectrum for the MPU

Enable Spread Spectrum for the MPU by calculating the required
values and setting the registers accordingly.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoam335x: add some missing CM_CLKMODE_DPLL_SSC macros
Heiko Schocher [Tue, 7 Jun 2016 06:31:18 +0000 (08:31 +0200)]
am335x: add some missing CM_CLKMODE_DPLL_SSC macros

add missing CM_CLKMODE_DPLL_SSC_ACK_MASK,
CM_CLKMODE_DPLL_SSC_DOWNSPREAD_MASK and
CM_CLKMODE_DPLL_SSC_TYPE_MASK
defines. Used for enabling spread spectrum.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoarm, am335x: add some missing GPIO register definitions
Heiko Schocher [Tue, 7 Jun 2016 06:31:17 +0000 (08:31 +0200)]
arm, am335x: add some missing GPIO register definitions

add missing:
OMAP_GPIO_IRQSTATUS_SET_0 and OMAP_GPIO_IRQSTATUS_SET_1
registers.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agopower, tps65217: add some defines
Heiko Schocher [Tue, 7 Jun 2016 06:31:16 +0000 (08:31 +0200)]
power, tps65217: add some defines

add the following defines, needed for the upcoming shc board
support:

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agotests: py: disable main_signon check for printenv cmd
Heiko Schocher [Tue, 7 Jun 2016 06:31:15 +0000 (08:31 +0200)]
tests: py: disable main_signon check for printenv cmd

if CONFIG_VERSION_VARIABLE is set, the U-Boot environment
contains a "vers" variable with the current U-Boot version
string. If now "printenv" is called, test/py fails as it
detects the main_sign string, which is in this case correct.

So check only the main_sign as an error, if CONFIG_VERSION_VARIABLE
is not set.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agocommon: bootdelay: move CONFIG_BOOTDELAY into a Kconfig option
Heiko Schocher [Tue, 7 Jun 2016 06:31:14 +0000 (08:31 +0200)]
common: bootdelay: move CONFIG_BOOTDELAY into a Kconfig option

move CONFIG_BOOTDELAY into a Kconfig option. Used for this
purpose the moveconfig.py tool in tools.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
8 years agotiny-printf: Correct the snprintf() implementation
Simon Glass [Thu, 9 Jun 2016 02:55:15 +0000 (20:55 -0600)]
tiny-printf: Correct the snprintf() implementation

This current code passes the variable arguments list to sprintf(). This is
not correct. Fix it by calling _vprintf() directly.

This makes firefly-rk3288 boot again.

Fixes: abeb272 ("tiny-printf: Support snprintf()")
Reviewed-by: Stefan Roese <sr@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoARM: uniphier: insert dsb barrier to ensure visibility of store
Masahiro Yamada [Wed, 8 Jun 2016 09:02:32 +0000 (18:02 +0900)]
ARM: uniphier: insert dsb barrier to ensure visibility of store

I noticed secondary CPUs sometimes fail to wake up, and the root
cause is that the sev instruction wakes up slave CPUs before the
preceding the register write is observed by them.

The read-back of the accessed register does not guarantee the order.
In order to ensure the order between the register write and the sev
instruction, a dsb instruction should be executed prior to the sev.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: do not erase when updating U-Boot image in eMMC device
Masahiro Yamada [Tue, 7 Jun 2016 12:03:46 +0000 (21:03 +0900)]
ARM: uniphier: do not erase when updating U-Boot image in eMMC device

Unlike NAND, eMMC can be re-written without erasing.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: do not overwrite fdt_file environment
Masahiro Yamada [Tue, 7 Jun 2016 12:03:44 +0000 (21:03 +0900)]
ARM: uniphier: do not overwrite fdt_file environment

This code auto-detects the best-match FDT file name, but it should
respect the user's choice if "fdt_file" environment is found in a
saved set of environments.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: check return code of setenv()
Masahiro Yamada [Tue, 7 Jun 2016 12:03:43 +0000 (21:03 +0900)]
ARM: uniphier: check return code of setenv()

Because setenv() may fail, it is better to check its return code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: fix boot mode for PH1-LD11
Masahiro Yamada [Sat, 4 Jun 2016 13:39:09 +0000 (22:39 +0900)]
ARM: uniphier: fix boot mode for PH1-LD11

This function is shared between PH1-LD11 and PH1-LD20.  The difference
is the boot-mode latch for the USB boot mode.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: support eMMC boot for PH1-LD11 and PH1-LD20
Masahiro Yamada [Sat, 4 Jun 2016 13:39:08 +0000 (22:39 +0900)]
ARM: uniphier: support eMMC boot for PH1-LD11 and PH1-LD20

The Boot ROM on PH1-LD11/LD20 exports built-in APIs to load images
from an eMMC device.  They are useful to reduce the memory footprint
of SPL, rather than compiling the whole MMC framework.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoarm: mxs: Remove misleading comments
Michael Heimpold [Mon, 6 Jun 2016 12:26:39 +0000 (14:26 +0200)]
arm: mxs: Remove misleading comments

Both comments look like being copy & paste errors.

Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
Cc: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
8 years agoboard: ge: bx50v3: add missing partnum variable
Kimmo Surakka [Tue, 24 May 2016 13:56:23 +0000 (15:56 +0200)]
board: ge: bx50v3: add missing partnum variable

Add missing ${partnum} to set rootdev correctly when
booting from USB or MMC.

Signed-off-by: Kimmo Surakka <kimmo.surakka@ge.com>
[Rebased against v2016.05 and adjusted the variable name]
Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
8 years agoboard: ge: bx50v3: disable unused features to improve size and boot speed
Andrew Shadura [Tue, 24 May 2016 13:56:22 +0000 (15:56 +0200)]
board: ge: bx50v3: disable unused features to improve size and boot speed

Disable unused FPGA, NFS, FAT and EFI support to reduce the bootloader
size. Don't clear memory reserved for malloc to improve boot speed.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
8 years agoboard: ge: bx50v3: make SATA optional and disabled by default
Andrew Shadura [Tue, 24 May 2016 13:56:21 +0000 (15:56 +0200)]
board: ge: bx50v3: make SATA optional and disabled by default

The SATA support is only useful for development and shouldn't be enabled
in production, so it has to be disabled in U-boot by default.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
8 years agoboard: ge: bx50v3: make network support optional and disabled by default
Andrew Shadura [Tue, 24 May 2016 13:56:20 +0000 (15:56 +0200)]
board: ge: bx50v3: make network support optional and disabled by default

The network support is only useful for development and shouldn't be enabled
in production, so it has to be disabled in U-boot by default.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
8 years agoboard: ge: bx50v3: make USB support optional and disabled by default
Andrew Shadura [Tue, 24 May 2016 13:56:19 +0000 (15:56 +0200)]
board: ge: bx50v3: make USB support optional and disabled by default

The USB support is only useful for development and shouldn't be enabled
in production, so it has to be disabled in U-boot by default.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
8 years agoboard: ge: bx50v3: make CONFIG_VIDEO optional and disabled by default
Andrew Shadura [Tue, 24 May 2016 13:56:18 +0000 (15:56 +0200)]
board: ge: bx50v3: make CONFIG_VIDEO optional and disabled by default

The kernel already knows how to initialise the display, and initialising
the display from U-boot is only useful for debugging and isn't necessary
in production, so no need to have it enabled in U-boot by default.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
8 years agoboard: ge: bx50v3: don't configure the backlight when there's no display
Andrew Shadura [Tue, 24 May 2016 13:56:17 +0000 (15:56 +0200)]
board: ge: bx50v3: don't configure the backlight when there's no display

Don't try to configure the backlight when CONFIG_VIDEO_IPUV3 isn't set.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
8 years agoPrepare v2016.07-rc1 v2016.07-rc1
Tom Rini [Mon, 6 Jun 2016 21:43:54 +0000 (17:43 -0400)]
Prepare v2016.07-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>