]> git.ipfire.org Git - people/ms/u-boot.git/log
people/ms/u-boot.git
8 years agoserial: stm32x7: migrate serial struct to driver
Patrice Chotard [Tue, 18 Jul 2017 07:29:07 +0000 (09:29 +0200)] 
serial: stm32x7: migrate serial struct to driver

This allow to remove include/dm/platform_data/serial_stm32x7.h
which was included in the past by stm32x7 driver and by
stm32f746-disco.c board file.
Since patch 42bf5e7c27 "serial: stm32f7: add device tree support"
this file is no more needed in board file.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
8 years agoclk: stm32f7: cleanup clocks unused definitions
Patrice Chotard [Tue, 18 Jul 2017 07:29:06 +0000 (09:29 +0200)] 
clk: stm32f7: cleanup clocks unused definitions

clean the code by removing unused enums, structs and
defines related to clocks

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
8 years agoclk: stm32f7: add clock .get_rate() callback
Patrice Chotard [Tue, 18 Jul 2017 07:29:05 +0000 (09:29 +0200)] 
clk: stm32f7: add clock .get_rate() callback

Add clock framework .get_rate callback.
This step will allow to convert all drivers which was using
proprietary clock_get() to use clock framework .get_rate().

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
8 years agoclk: stm32f7: get RCC base address from DT
Patrice Chotard [Tue, 18 Jul 2017 07:29:04 +0000 (09:29 +0200)] 
clk: stm32f7: get RCC base address from DT

Retrieve RCC base address from DT, this will prepare
the ground for future STM32 SoCs support.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
8 years agoclk: stm32f7: add static for configure_clocks()
Patrice Chotard [Tue, 18 Jul 2017 07:29:03 +0000 (09:29 +0200)] 
clk: stm32f7: add static for configure_clocks()

Also remove its declaration from stm32.h which
is no more needed.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
8 years agoARM: DTS: stm32: align DT clock declaration with kernel
Patrice Chotard [Tue, 18 Jul 2017 07:29:02 +0000 (09:29 +0200)] 
ARM: DTS: stm32: align DT clock declaration with kernel

Use the same clocks macro than the one used by kernel DT.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
8 years agoarm: mach-keystone: Fixes issue with return values in inline assembly
Srinivas, Madan [Mon, 17 Jul 2017 18:02:02 +0000 (13:02 -0500)] 
arm: mach-keystone: Fixes issue with return values in inline assembly

The inline assembly functions in mon.c assume that the caller will
check for the return value in r0 according to regular ARM calling
conventions.

However, this assumption breaks down if the compiler inlines the
functions. The caller is then under no obligation to use r0 for the
result.

To fix this disconnect, we must explicitly move the return value
from the smc/bl call to the variable that the function returns.

Signed-off-by: Madan Srinivas <madans@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: ti: armv7: Fixes bug in fit_loadaddr for ramfs boot
Madan Srinivas [Mon, 17 Jul 2017 18:01:36 +0000 (13:01 -0500)] 
configs: ti: armv7: Fixes bug in fit_loadaddr for ramfs boot

The load address of ramdisk, rdaddr is 0x88080000 and fit_loadaddr
is defined as 0x88000000. This leaves only 512Kbytes for the
fit image. When the FIT images are larger than this, it will
overwite the ramdisk and cause the boot to fail.

For eg, The K2 HS fit images are a few MB and end up overwriting
the ramdsk. This patch moves the fit_loadaddr to 0x87000000,
leaving a 16MB window for the fit image. This memory can be
reclaimed once the kernel starts running.

Signed-off-by: Madan Srinivas <madans@ti.com>
8 years agoarm: mach-keystone: Updates mon_install for K2G HS
Madan Srinivas [Mon, 17 Jul 2017 17:59:15 +0000 (12:59 -0500)] 
arm: mach-keystone: Updates mon_install for K2G HS

On early K2 devices (eg. K2HK) the secure ROM code does not support
loading secure code to firewall protected memory, before decrypting,
authenticating and executing it.

To load the boot monitor on these devices, it is necessary to first
authenticate and run a copy loop from non-secure memory that copies
the boot monitor behind firewall protected memory, before decrypting
and executing it.

On K2G, the secure ROM does not allow secure code executing from
unprotected memory. Further, ROM first copies the signed and encrypted
image into firewall protected memory, then decrypts, authenticates
and executes it.

As a result of this, we cannot use the copy loop for K2G. The
mon_install has to be modified to pass the address the signed and
encrypted secure boot monitor image to the authentication API.

For backward compatibility with other K2 devices and K2G GP,
the mon_install API still supports a single argument. In this case
the second argument is set to 0 by u-boot and is ignored by ROM

Signed-off-by: Thanh Tran <thanh-tran@ti.com>
Signed-off-by: Madan Srinivas <madans@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: k2x_evm: Reorder default boot command
Andrew F. Davis [Mon, 17 Jul 2017 17:59:14 +0000 (12:59 -0500)] 
configs: k2x_evm: Reorder default boot command

We first split the CONFIG_BOOTCOMMAND into its components to improve
readability. We then make the following order changes:

 - Run findfdt first so the fdt name can be used in envboot like OMAP
 - Install the boot monitor before running the PMMC so we can make any
     needed secure changes before PMMC, do this on both HS and non-HS
 - Move set_name_pmmc to just before get_pmmc_${boot}

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: k2x_evm: Adds environment variables for secure devices
Madan Srinivas [Mon, 17 Jul 2017 17:59:13 +0000 (12:59 -0500)] 
configs: k2x_evm: Adds environment variables for secure devices

Updates the default u-boot environment variables to support secure
boot. On secure devices, a secure boot monitor (sec-bm) needs to
be installed by u-boot.

Signed-off-by: Madan Srinivas <madans@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: k2x_evm: Adds FIT loading environment variables
Andrew F. Davis [Mon, 17 Jul 2017 17:59:12 +0000 (12:59 -0500)] 
configs: k2x_evm: Adds FIT loading environment variables

Updates the default u-boot environment variables to support FIT image
loading.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoboard: ti: x15: Add support for beagle_X15 revC
Lokesh Vutla [Sun, 16 Jul 2017 14:29:19 +0000 (19:59 +0530)] 
board: ti: x15: Add support for beagle_X15 revC

BeagleBoard X15 revC board is similar to X15 revB1 except
with a SR2.0 where revB1 uses a SR1.1. Add board detection
support for revC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoboard: ti: am57xx: Fix detection of board version
Lokesh Vutla [Sun, 16 Jul 2017 14:29:18 +0000 (19:59 +0530)] 
board: ti: am57xx: Fix detection of board version

board_is*("rev", board_ti_get_rev()) uses strncmp() for
revison detection and assumes it is success if return value
is <= 0. This will fail in case of multiple versions, as
revb will be true for board_is_*revb() and board_is_*reva().
Fix it by looking for exact match of the string.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoodroid-c2: enable GPIO
Beniamino Galvani [Sun, 9 Jul 2017 22:30:05 +0000 (00:30 +0200)] 
odroid-c2: enable GPIO

GPIOs are now supported on Meson GXBB, enable driver and command in
the config.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agopinctrl: meson: add GPIO support
Beniamino Galvani [Sun, 9 Jul 2017 22:30:04 +0000 (00:30 +0200)] 
pinctrl: meson: add GPIO support

This commit adds GPIO support to the Amlogic Meson pin controller
driver, based on code from Linux kernel.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
8 years agoarm: dts: meson: import dts files from Linux 4.12
Beniamino Galvani [Sun, 9 Jul 2017 22:30:03 +0000 (00:30 +0200)] 
arm: dts: meson: import dts files from Linux 4.12

Import Amlogic Meson DTS files from Linux kernel version 4.12

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoARM: uniphier: enable CONFIG_CMD_FS_GENERIC
Masahiro Yamada [Thu, 13 Jul 2017 11:32:18 +0000 (20:32 +0900)] 
ARM: uniphier: enable CONFIG_CMD_FS_GENERIC

Enable file system commands such as load, ls.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: remove part number info from the boot log
Masahiro Yamada [Thu, 13 Jul 2017 11:32:17 +0000 (20:32 +0900)] 
ARM: uniphier: remove part number info from the boot log

As is often the case with SoC development, slightly different
products (i.e. different part number) are developed based on the
same silicon-die.  Such fine grained information is unmaintainable.

Also, "SoC:" is a better fit that "CPU:".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agodoc: uniphier: rework README.uniphier
Masahiro Yamada [Thu, 13 Jul 2017 11:32:16 +0000 (20:32 +0900)] 
doc: uniphier: rework README.uniphier

Rework the readme to reflect the latest boot mechanism on ARMv8 SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: remove SPL support for ARMv8 SoCs
Masahiro Yamada [Thu, 13 Jul 2017 11:32:15 +0000 (20:32 +0900)] 
ARM: uniphier: remove SPL support for ARMv8 SoCs

It has been a while since ARM Trusted Firmware supported UniPhier SoC
family.  U-Boot SPL was intended as a temporary loader that runs in
secure world.  It is a maintenance headache to support two different
boot mechanisms.  Secure firmware is realm of ARM Trusted Firmware
and now U-Boot only serves as a non-secure boot loader for UniPhier
ARMv8 SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoefi_loader: Fix configuration table override
Alexander Graf [Wed, 26 Jul 2017 11:41:05 +0000 (13:41 +0200)] 
efi_loader: Fix configuration table override

Before commit 7cbc12415d ("efi_loader: initalize EFI object list
only once") we recreated the world on every bootefi invocation.

That included the object tree as well as the configuration tables.

Now however we don't recreate them, which means we must not explicitly
override the configuration tables, as otherwise we may lose our SMBIOS
table from the configuration table list on second bootefi invocation.

This patch makes bootefi call our normal configuration table modification
APIs to add/remove the FDT instead of recreating all tables from scratch.
That way the SMBIOS table gets preserved across multiple invocations.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: Improve install_configuration_table
Alexander Graf [Wed, 26 Jul 2017 11:41:04 +0000 (13:41 +0200)] 
efi_loader: Improve install_configuration_table

The INSTALL_CONFIGURATION_TABLE callback also provides the ability to
remove table entries. This patch adds that functionality.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm: socfpga: Enable all FPGA config support for Arria 10
Tien Fong Chee [Wed, 26 Jul 2017 05:05:44 +0000 (13:05 +0800)] 
arm: socfpga: Enable all FPGA config support for Arria 10

Enable all FPGA config support for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
8 years agoarm: socfpga: Add FPGA driver support for Arria 10
Tien Fong Chee [Wed, 26 Jul 2017 05:05:43 +0000 (13:05 +0800)] 
arm: socfpga: Add FPGA driver support for Arria 10

Add FPGA driver support for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
8 years agoconfigs: Add FPGA driver config for Arria 10
Tien Fong Chee [Wed, 26 Jul 2017 05:05:42 +0000 (13:05 +0800)] 
configs: Add FPGA driver config for Arria 10

Add FPGA driver config for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
8 years agodrivers: Enable FPGA driver build on SPL
Tien Fong Chee [Wed, 26 Jul 2017 05:05:41 +0000 (13:05 +0800)] 
drivers: Enable FPGA driver build on SPL

Enable FPGA driver build for Arria 10 SPL because FPGA driver is
needed by Arria 10 SPL to configure and getting DDR up before
loading U-boot into DDR and booting from there.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
8 years agokconfig: Convert FPGA_SOCFPGA configuration to Kconfig
Tien Fong Chee [Wed, 26 Jul 2017 05:05:40 +0000 (13:05 +0800)] 
kconfig: Convert FPGA_SOCFPGA configuration to Kconfig

This converts the following to Kconfig:
   CONFIG_FPGA_SOCFPGA

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
8 years agokconfig: Convert FPGA and FPGA_ALTERA configuration to Kconfig
Tien Fong Chee [Wed, 26 Jul 2017 05:05:39 +0000 (13:05 +0800)] 
kconfig: Convert FPGA and FPGA_ALTERA configuration to Kconfig

This converts the following to Kconfig:
   CONFIG_FPGA
   CONFIG_FPGA_ALTERA

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
8 years agoarm: socfpga: Restructure FPGA driver in the preparation to support A10
Tien Fong Chee [Wed, 26 Jul 2017 05:05:38 +0000 (13:05 +0800)] 
arm: socfpga: Restructure FPGA driver in the preparation to support A10

Move FPGA driver which is Gen5 specific code into Gen5 driver file
and keeping common FPGA driver intact. All the changes are still keeping
in driver/fpga/ and no functional change. Subsequent patch would move
FPGA manager driver from arch/arm into driver/fpga/.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
8 years agoarm: socfpga: Remove unused passing parameter of socfpga_bridges_reset
Tien Fong Chee [Wed, 26 Jul 2017 05:05:37 +0000 (13:05 +0800)] 
arm: socfpga: Remove unused passing parameter of socfpga_bridges_reset

Remove parameter from socfpga_bridges_reset(), and keeping this function
for single purpose which is just triggering reset on bridges.
socfpga_reset_deassert_bridges_handoff() can be called for releasing reset
on any bridges based on the bridge setting defined in fdt.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
8 years agoefi_loader: remove more double EFI_EXIT() in efi_disk.c
Rob Clark [Wed, 26 Jul 2017 00:28:29 +0000 (20:28 -0400)] 
efi_loader: remove more double EFI_EXIT() in efi_disk.c

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: remove double EFI_EXIT() with efi_unsupported
Rob Clark [Wed, 26 Jul 2017 00:17:59 +0000 (20:17 -0400)] 
efi_loader: remove double EFI_EXIT() with efi_unsupported

Probably this went unnoticed before, but it causes problems with
addition of 804b1d73 ("efi_loader: log EFI return values too")

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoConvert CONFIG_ENV_IS_IN_ONENAND to Kconfig
Simon Glass [Mon, 24 Jul 2017 03:19:48 +0000 (21:19 -0600)] 
Convert CONFIG_ENV_IS_IN_ONENAND to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_IS_IN_ONENAND

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_ENV_IS_IN_FAT to Kconfig
Simon Glass [Mon, 24 Jul 2017 03:19:47 +0000 (21:19 -0600)] 
Convert CONFIG_ENV_IS_IN_FAT to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_IS_IN_FAT

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_ENV_IS_IN_REMOTE to Kconfig
Simon Glass [Mon, 24 Jul 2017 03:19:46 +0000 (21:19 -0600)] 
Convert CONFIG_ENV_IS_IN_REMOTE to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_IS_IN_REMOTE

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_ENV_IS_IN_SPI_FLASH to Kconfig
Simon Glass [Mon, 24 Jul 2017 03:19:45 +0000 (21:19 -0600)] 
Convert CONFIG_ENV_IS_IN_SPI_FLASH to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_IS_IN_SPI_FLASH

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_ENV_IS_IN_DATAFLASH to Kconfig
Simon Glass [Mon, 24 Jul 2017 03:19:44 +0000 (21:19 -0600)] 
Convert CONFIG_ENV_IS_IN_DATAFLASH to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_IS_IN_DATAFLASH

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_ENV_IS_IN_EEPROM to Kconfig
Simon Glass [Mon, 24 Jul 2017 03:19:43 +0000 (21:19 -0600)] 
Convert CONFIG_ENV_IS_IN_EEPROM to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_IS_IN_EEPROM

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_ENV_IS_IN_NVRAM to Kconfig
Simon Glass [Mon, 24 Jul 2017 03:19:42 +0000 (21:19 -0600)] 
Convert CONFIG_ENV_IS_IN_NVRAM to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_IS_IN_NVRAM

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_ENV_IS_IN_FLASH to Kconfig
Simon Glass [Mon, 24 Jul 2017 03:19:41 +0000 (21:19 -0600)] 
Convert CONFIG_ENV_IS_IN_FLASH to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_IS_IN_FLASH

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoenv: Move help from README to Kconfig
Simon Glass [Mon, 24 Jul 2017 03:19:40 +0000 (21:19 -0600)] 
env: Move help from README to Kconfig

The CONFIG_ENV_IS_IN_... options which have already been converted to
Kconfig only have a small amount of help. Move the rest of it over from
the README.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_ENV_IS_IN_MMC/NAND/UBI and NOWHERE to Kconfig
Simon Glass [Mon, 24 Jul 2017 03:19:39 +0000 (21:19 -0600)] 
Convert CONFIG_ENV_IS_IN_MMC/NAND/UBI and NOWHERE to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_IS_IN_MMC
   CONFIG_ENV_IS_IN_NAND
   CONFIG_ENV_IS_IN_UBI
   CONFIG_ENV_IS_NOWHERE

In fact this already exists for sunxi as a 'choice' config. However not
all the choices are available in Kconfig yet so we cannot use that. It
would lead to more than one option being set.

In addition, one purpose of this series is to allow the environment to be
stored in more than one place. So the existing choice is converted to a
normal config allowing each option to be set independently.

There are not many opportunities for Kconfig updates to reduce the size of
this patch. This was tested with

   ./tools/moveconfig.py -i CONFIG_ENV_IS_IN_MMC

And then manual updates.  This is because for CHAIN_OF_TRUST boards they
can only have ENV_IS_NOWHERE set, so we enforce that via Kconfig logic
now.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agomips-relocs: Fix warning from gcc 6.3
Paul Burton [Tue, 25 Jul 2017 14:07:03 +0000 (15:07 +0100)] 
mips-relocs: Fix warning from gcc 6.3

It seems that gcc 6.3 at least is smart enough to warn about the _val
variable being unassigned in the default case in the set_hdr_field()
macro, but not smart enough to figure out that the default case is never
taken. This results in warnings such as the following:

  pfx##hdr32[idx].field = _val;   \
                          ^
 ../tools/mips-relocs.c:51:11: note: _val was declared here
   uint64_t _val;      \
            ^
 ../tools/mips-relocs.c:88:2: note: in expansion of macro set_hdr_field
   set_hdr_field(p, idx, field, val)
   ^~~~~~~~~~~~~
 ../tools/mips-relocs.c:408:3: note: in expansion of macro set_phdr_field
    set_phdr_field(i, p_filesz, load_sz);
    ^~~~~~~~~~~~~~
 ../tools/mips-relocs.c: In function main:
 ../tools/mips-relocs.c:77:25: warning: _val may be used uninitialized
    in this function [-Wmaybe-uninitialized]

Avoid this by assigning _val = 0 in the default case, and asserting that
we didn't actually hit it for good measure.

For reference gcc 7.1.1 seems to be smart enough to not hit the above
warning without this patch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Fixes: 011dd93ca97a ("MIPS: Stop building position independent code")
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
8 years agoMIPS: bootm: Fix broken boot_env_legacy codepath
Zubair Lutfullah Kakakhel [Tue, 11 Jul 2017 15:47:51 +0000 (16:47 +0100)] 
MIPS: bootm: Fix broken boot_env_legacy codepath

This patch fixes 2 bugs introduced by the following commit

2bb5b63 MIPS: bootm: rework and fix broken bootm code

The CONFIG_IS_ENABLED macro prepends 'CONFIG_' Hence, remove CONFIG_
from CONFIG_MIPS_BOOT_ENV_LEGACY usage.

Also, 2bb5b63 reworks bootm so that linux_env_legacy runs before
linux_cmdline_legacy. However, linux_env_legacy depends on
linux_cmdline_legacy running first as linux_cmdline_init initialilzes
linux_argp which linux_env_legacy later depends on during its
initialization.

Reorder the code so that linux_cmdline_legacy runs before
linux_env_legacy.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
8 years agoMIPS: Stop building position independent code
Paul Burton [Mon, 19 Jun 2017 18:53:47 +0000 (11:53 -0700)] 
MIPS: Stop building position independent code

U-Boot has up until now built with -fpic for the MIPS architecture,
producing position independent code which uses indirection through a
global offset table, making relocation fairly straightforward as it
simply involves patching up GOT entries.

Using -fpic does however have some downsides. The biggest of these is
that generated code is bloated in various ways. For example, function
calls are indirected through the GOT & the t9 register:

  8f998064   lw     t9,-32668(gp)
  0320f809   jalr   t9

Without -fpic the call is simply:

  0f803f01   jal    be00fc04 <puts>

This is more compact & faster (due to the lack of the load & the
dependency the jump has on its result). It is also easier to read &
debug because the disassembly shows what function is being called,
rather than just an offset from gp which would then have to be looked up
in the ELF to discover the target function.

Another disadvantage of -fpic is that each function begins with a
sequence to calculate the value of the gp register, for example:

  3c1c0004   lui    gp,0x4
  279c3384   addiu  gp,gp,13188
  0399e021   addu   gp,gp,t9

Without using -fpic this sequence no longer appears at the start of each
function, reducing code size considerably.

This patch switches U-Boot from building with -fpic to building with
-fno-pic, in order to gain the benefits described above. The cost of
this is an extra step during the build process to extract relocation
data from the ELF & write it into a new .rel section in a compact
format, plus the added complexity of dealing with multiple types of
relocation rather than the single type that applied to the GOT. The
benefit is smaller, cleaner, more debuggable code. The relocate_code()
function is reimplemented in C to handle the new relocation scheme,
which also makes it easier to read & debug.

Taking maltael_defconfig as an example the size of u-boot.bin built
using the Codescape MIPS 2016.05-06 toolchain (gcc 4.9.2, binutils
2.24.90) shrinks from 254KiB to 224KiB.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: u-boot@lists.denx.de
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMakefile: Allow arch post-link hook
Paul Burton [Fri, 16 Jun 2017 00:05:09 +0000 (17:05 -0700)] 
Makefile: Allow arch post-link hook

This commit allows an architecture to provide a Makefile.postlink whose
u-boot target gets invoked after the u-boot ELF is linked. This will be
of use for MIPS in a following commit.

This mirrors Linux commit fbe6e37dab97 ("kbuild: add arch specific
post-link Makefile").

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: u-boot@lists.denx.de
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 25 Jul 2017 01:10:06 +0000 (21:10 -0400)] 
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoefi_loader: expose protocols via GUID
Rob Clark [Mon, 24 Jul 2017 14:39:01 +0000 (10:39 -0400)] 
efi_loader: expose protocols via GUID

shim.efi (or rather gnu-efi's LibLocateProtocol() which shim.efi uses)
resolves protocols via efi_locate_handle() so the console protocols
need to be added to the efi object list.

Signed-off-by: Rob Clark <robdclark@gmail.com>
[agraf: whitespace fixes]
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: add helper macro to construct protocol objects
Rob Clark [Mon, 24 Jul 2017 14:39:00 +0000 (10:39 -0400)] 
efi_loader: add helper macro to construct protocol objects

There are a bunch of protocols which should be exposed by GUID but are
not.  Add a helper macro to create an efi_object, to avoid much typing.

Note that using the pointer for efiobj->handle is semi-arbitrary.  We
just need a unique value to match the efiobj supporting the protocol
with the handle that LocateHandle() returns..

See LibLocateProtocol() in gnu-efi.  It does LocateHandle() to find all
the handles, and then loops over them calling HandleProtocol() with the
GUID of the protocol it is trying to find.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: log EFI return values too
Rob Clark [Mon, 24 Jul 2017 14:31:52 +0000 (10:31 -0400)] 
efi_loader: log EFI return values too

Turns out this is rather useful to tracking down where things fail.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: implement ProtocolsPerHandle
xypron.glpk@gmx.de [Thu, 13 Jul 2017 21:24:32 +0000 (23:24 +0200)] 
efi_loader: implement ProtocolsPerHandle

Boot service ProtocolsPerHandle is implemented in
efi_protocols_per_handle.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoconfigs: Migrate RBTREE, LZO, CMD_MTDPARTS, CMD_UBI and CMD_UBIFS
Tom Rini [Sat, 22 Jul 2017 22:36:16 +0000 (18:36 -0400)] 
configs: Migrate RBTREE, LZO, CMD_MTDPARTS, CMD_UBI and CMD_UBIFS

The above CONFIG options are in Kconfig, and now have correct depends and
inter-dependencies.  Migrate these to configs/ from include/configs/.  In the
case of CMD_UBIFS also change it to be a default y if CMD_UBI.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoefi_loader: parameter types for CreateEvent, SetTimer
xypron.glpk@gmx.de [Wed, 19 Jul 2017 17:22:34 +0000 (19:22 +0200)] 
efi_loader: parameter types for CreateEvent, SetTimer

The first argument 'type' of CreateEvent is an 32bit unsigned
integer bitmap and not an enum.

The second argument 'type' of SetTimer take values of an
enum which is called EFI_TIMER_DELAY in the UEFI standard.
To avoid confusion rename efi_event_type to efi_timer_delay.

Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: initalize EFI object list only once
Heinrich Schuchardt [Wed, 19 Jul 2017 17:37:22 +0000 (19:37 +0200)] 
efi_loader: initalize EFI object list only once

If several EFI applications are executed in sequence we want
to keep the content of the EFI object list.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_console: use EFIAPI for callback functions
xypron.glpk@gmx.de [Thu, 20 Jul 2017 03:26:07 +0000 (05:26 +0200)] 
efi_console: use EFIAPI for callback functions

The call to efi_create_event requires notification functions
flagged as EFIAPI.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: workaround for grub lsefi bug
Rob Clark [Thu, 20 Jul 2017 11:59:39 +0000 (07:59 -0400)] 
efi_loader: workaround for grub lsefi bug

Patch has also been sent to fix grub to not ignore the error returned
and treat protocol_buffer_count as valid.  But that that might take a
while to trickle into distro's, so this workaround might be useful.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: implement ConvertDeviceNodeToText
xypron.glpk@gmx.de [Fri, 21 Jul 2017 17:12:08 +0000 (19:12 +0200)] 
efi_loader: implement ConvertDeviceNodeToText

Move the logic for converting a node to text from
efi_convert_device_path_to_text to convert_device_node_to_text.

Provide a wrapper function convert_device_node_to_text_ext.

As we use only shallow device paths so we can call
directly call efi_device_node_to_text from efi_device_path_to_text.

Add output for MAC addresses.

Add output for not yet supported types/subtypes.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_memory: return MapKey
xypron.glpk@gmx.de [Fri, 21 Jul 2017 17:05:44 +0000 (19:05 +0200)] 
efi_memory: return MapKey

efi_get_memory_map should set a defined value for map_key.

We later can introduce the test against this value in
efi_exit_boot_services as required by the UEFI standard.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_memory: do parameter checks first
xypron.glpk@gmx.de [Fri, 21 Jul 2017 17:04:33 +0000 (19:04 +0200)] 
efi_memory: do parameter checks first

The parameter checks should be done first.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD
Rob Clark [Fri, 21 Jul 2017 19:00:27 +0000 (15:00 -0400)] 
efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD

Make EFI GOP support work with DM_VIDEO but without legacy LCD.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: move guidcmp to header
Rob Clark [Mon, 24 Jul 2017 11:59:11 +0000 (07:59 -0400)] 
efi_loader: move guidcmp to header

Want to re-use this for file protocol, which I'm working on.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: EFI file paths should be DOS style
Rob Clark [Mon, 24 Jul 2017 11:59:09 +0000 (07:59 -0400)] 
efi_loader: EFI file paths should be DOS style

shim.efi, for example, actually tries to parse this, but is expecting
backslashes.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agocmd: Kconfig: Fix CMD_UBIFS dependencies
Karl Beldan [Wed, 12 Jul 2017 16:11:47 +0000 (16:11 +0000)] 
cmd: Kconfig: Fix CMD_UBIFS dependencies

Remove the ARCH_SUNXI and RBTREE dependencies.
CMD_UBIFS already gets RBTREE from CMD_UBI (from MTD_UBI), and should
the first become independant from the latter, there would likely be a
dependency on MTD_UBI anyway.

Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Jagan Teki <jagan@openedev.com>
Signed-off-by: Karl Beldan <karl.beldan-ext@sagemcom.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agocmd: Kconfig: Make CMD_UBI select CMD_MTDPARTS
Karl Beldan [Wed, 12 Jul 2017 16:11:46 +0000 (16:11 +0000)] 
cmd: Kconfig: Make CMD_UBI select CMD_MTDPARTS

Many configs still define CMD_MTDPARTS in their non-Kconfig but
CMD_MTDPARTS has now moved to Kconfig.

Signed-off-by: Karl Beldan <karl.beldan-ext@sagemcom.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoubi: Kconfig: Make MTD_UBI select MTD_PARTITIONS
Karl Beldan [Wed, 12 Jul 2017 16:11:45 +0000 (16:11 +0000)] 
ubi: Kconfig: Make MTD_UBI select MTD_PARTITIONS

This missing dependency has probably remained under the radar because
MTD_PARTITIONS is still whitelisted.

Signed-off-by: Karl Beldan <karl.beldan-ext@sagemcom.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agocmd: Kconfig: Fix a dependency of CMD_MTDPARTS
Karl Beldan [Wed, 12 Jul 2017 16:11:44 +0000 (16:11 +0000)] 
cmd: Kconfig: Fix a dependency of CMD_MTDPARTS

Remove the ARCH_SUNXI dependency.

Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jagan Teki <jagan@openedev.com>
Signed-off-by: Karl Beldan <karl.beldan-ext@sagemcom.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoubi: Kconfig: Fix MTD_UBI selection dependency
Karl Beldan [Wed, 12 Jul 2017 16:11:43 +0000 (16:11 +0000)] 
ubi: Kconfig: Fix MTD_UBI selection dependency

Remove the ARCH_SUNXI dependency on selection of RBTREE.

Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jagan Teki <jagan@openedev.com>
Signed-off-by: Karl Beldan <karl.beldan-ext@sagemcom.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoxilinx-ppc.h: Drop
Tom Rini [Sun, 23 Jul 2017 13:25:07 +0000 (09:25 -0400)] 
xilinx-ppc.h: Drop

With PowerPC 4xx support removed, we have removed xilinx-ppc support as
well, remove this file now.

Fixes 98f705c9cefd ("powerpc: remove 4xx support")
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoserial: ns16550: Add RX interrupt buffer support
Stefan Roese [Fri, 14 Jul 2017 15:25:54 +0000 (17:25 +0200)] 
serial: ns16550: Add RX interrupt buffer support

Pasting longer lines into the U-Boot console prompt sometimes leads to
characters missing. One problem here is the small 16-byte FIFO of the
legacy NS16550 UART, e.g. on x86 platforms.

This patch now introduces a Kconfig option to enable RX interrupt
buffer support for NS16550 style UARTs. With this option enabled, I was
able paste really long lines into the U-Boot console, without any
characters missing.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
[trini: Guard ns16550_serial_remove with
CONFIG_IS_ENABLED(SERIAL_PRESENT) to match struct assignment]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm: omap3: Detect boot mode very early
Adam Ford [Fri, 14 Jul 2017 13:53:20 +0000 (08:53 -0500)] 
arm: omap3: Detect boot mode very early

Fixes 4bd754d8abef ("arm: omap: Detect boot mode very early") where
the intent was to store the boot params information in a known
location and pass it to SPL very early. Unfortunately it didn't
account for OMAP3 boards.

This patch adds adds this functionality back into OMAP3 boards.

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Adam Ford <aford173@gmail.com>
8 years agopowerpc: Remove 8260 remainders
Christophe Leroy [Thu, 13 Jul 2017 13:10:10 +0000 (15:10 +0200)] 
powerpc: Remove 8260 remainders

commit 2eb48ff7a210d ("powerpc, 8260: remove support for mpc8260")
removed support for 8260 CPU.

This patch remove some remainders.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
8 years agopowerpc, 8xx: fix missing function declarations.
Christophe Leroy [Thu, 13 Jul 2017 13:10:08 +0000 (15:10 +0200)] 
powerpc, 8xx: fix missing function declarations.

Add missing .h and add missing declarations in .h
Declare local functions as static.  Make interrupt_init_cpu function
signatures consistent with how decrementer_count is declared.

Based on warnings reported by 'make C=2'

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[trini: drop cpu_init_f as 8xx/83xx are different from the rest, rework
interrupt_init_cpu/decrementer_count]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agopowerpc: move get_pvr() and get_svr() into C
Christophe Leroy [Thu, 13 Jul 2017 13:10:06 +0000 (15:10 +0200)] 
powerpc: move get_pvr() and get_svr() into C

Avoid unnecessary assembly functions when they can easily be written
in C.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
8 years agopowerpc, 8xx: move cache helper into C
Christophe Leroy [Thu, 13 Jul 2017 13:10:04 +0000 (15:10 +0200)] 
powerpc, 8xx: move cache helper into C

Avoid unnecessary assembly functions when they can easily be written
in C.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
8 years agopowerpc, 8xx: move get_immr() into C
Christophe Leroy [Thu, 13 Jul 2017 13:10:02 +0000 (15:10 +0200)] 
powerpc, 8xx: move get_immr() into C

Avoid unnecessary assembly functions when they can easily be written
in C.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
8 years agopowerpc, 8xx: Move cache function into C files
Christophe Leroy [Thu, 13 Jul 2017 13:10:00 +0000 (15:10 +0200)] 
powerpc, 8xx: Move cache function into C files

Avoid unnecessary assembly functions when they can easily be written
in C.

Also remove dc_read() as it is nowhere referenced

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
8 years agopowerpc, 8xx: Simplifying check_CPU()
Christophe Leroy [Thu, 13 Jul 2017 13:09:58 +0000 (15:09 +0200)] 
powerpc, 8xx: Simplifying check_CPU()

All complex case have been removed and we now only support
MPC866 and MPC885 families.

So check_CPU() can be made a lot simpler.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
8 years agopowerpc: Remove unneccessary #ifdefs in reginfo
Christophe Leroy [Thu, 13 Jul 2017 13:09:54 +0000 (15:09 +0200)] 
powerpc: Remove unneccessary #ifdefs in reginfo

reginfo command is calling mpc8xx_reginfo(), mpc85xx_reginfo()
or mpc86xx_reginfo() based on CONFIG_ symbol.
As those 3 functions can't me defined at the same time, let's
rename them print_reginfo() to avoid the #ifdefs
The name is kept generic as it is not at all dependent on
powerpc arch and any other arch could want to also print
such information.

In addition, as the Makefile compiles cmd/reginfo.c only when
CONFIG_CMD_REGINFO is set, there is no need to enclose the U_BOOT_CMD
definition inside a #ifdef CONFIG_CMD_REGINFO

Lets all remove the #ifdefs around the U_BOOT_CMD as this
file is only compiled when CONFIG_CMD_REGINFO is defined

Finally, this is a PowerPC-only command, disable it on a number of
non-PowerPC platforms.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agopowerpc: move set_msr() and get_msr() into .h
Christophe Leroy [Thu, 13 Jul 2017 13:09:52 +0000 (15:09 +0200)] 
powerpc: move set_msr() and get_msr() into .h

set_msr() and get_msr() are defined and used twice.
This patch moves them into ppc.h

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
8 years agopower, timer: reset TBL before TBU
Christophe Leroy [Thu, 13 Jul 2017 13:09:50 +0000 (15:09 +0200)] 
power, timer: reset TBL before TBU

In order to avoid TBU increment due to TBL reaching its max
and wrapping, reset TBL before resetting TBU

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
8 years agopowerpc, timer: Does 8xx specific actions in 8xx cpu_init
Christophe Leroy [Thu, 13 Jul 2017 13:09:48 +0000 (15:09 +0200)] 
powerpc, timer: Does 8xx specific actions in 8xx cpu_init

The actions inside #ifdef CONFIG_8xx in arch/powerpc/lib/time.c
can be performed before, in a 8xx dedicated function.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
8 years agopowerpc: get rid of addr_probe()
Christophe Leroy [Thu, 13 Jul 2017 13:09:46 +0000 (15:09 +0200)] 
powerpc: get rid of addr_probe()

This function has never been used, at least since the beginning
of the git repository

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
8 years agopowerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()
Christophe Leroy [Thu, 13 Jul 2017 13:09:44 +0000 (15:09 +0200)] 
powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()

divider is calculated based on SCCR_DFBRG, with:
SCCR_DFBRG 00 => divider 1  = 1 << 0
SCCR_DFBRG 01 => divider 4  = 1 << 2
SCCR_DFBRG 10 => divider 16 = 1 << 4
SCCR_DFBRG 11 => divider 64 = 1 << 6

This can be easily converted to a single shift operation:
divider = 1 << (SCCR_DFBRG * 2)

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
8 years agokm/ivm: allow to set locally administred MAC addresses
Holger Brunck [Thu, 13 Jul 2017 09:15:41 +0000 (11:15 +0200)] 
km/ivm: allow to set locally administred MAC addresses

It is possible to flag MAC addresses as locally administred. In this
case they don't need to be unique. This is only allowed for interfaces
which have no connection to the outside. For the TEGR1 board we use
this feature.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
8 years agokm/ivm: always set ethaddr after reading IVM
Holger Brunck [Thu, 13 Jul 2017 09:15:40 +0000 (11:15 +0200)] 
km/ivm: always set ethaddr after reading IVM

If we rebrand the IVM and ethaddr was set previously we need to change
ethaddr. Otherwise we end up with a wrong MAC adress for the ethernet
interface.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
8 years agoRFC: moveconfig: Use toolchains from buildman
Simon Glass [Mon, 10 Jul 2017 20:47:47 +0000 (14:47 -0600)] 
RFC: moveconfig: Use toolchains from buildman

It is annoying to have to set up and maintain two sets of toolchains, one
for buildman and one for moveconfig.

Adjust moveconfig to make use to buildman's toolchains. This should make
things easier.

One missing feature is the ability to specify the toolchain on the command
line with a special environment variable, e.g. CROSS_COMPILE_ARM. I'm not
sure if that is useful, but if it is it could be implemented in buildman.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
8 years agomoveconfig: Tidy up imply flag parsing
Simon Glass [Mon, 10 Jul 2017 20:47:46 +0000 (14:47 -0600)] 
moveconfig: Tidy up imply flag parsing

Add an option to specify 'all' to enable all flags. Also print an error
if an unrecognised flag is used. At present it just prints usage
information which is not very helpful.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoboard: ti: am43xx: Add FDT fixup for HS devices
Andrew F. Davis [Mon, 10 Jul 2017 19:45:54 +0000 (14:45 -0500)] 
board: ti: am43xx: Add FDT fixup for HS devices

Disable RNG and add TEE to FDT used on HS devices.

Signed-off-by: Andrew F. Davis <afd@ti.com>
8 years agoboard: ti: am43xx: Add TEE loading and firewall setup
Andrew F. Davis [Mon, 10 Jul 2017 19:45:53 +0000 (14:45 -0500)] 
board: ti: am43xx: Add TEE loading and firewall setup

Add support for loading a TEE and setting up firewalled regions to
AM43xx HS boards.

Signed-off-by: Andrew F. Davis <afd@ti.com>
8 years agoarm: mach-omap2: am33xx: Add FDT fixup suport for AM33xx/AM43xx boards
Andrew F. Davis [Mon, 10 Jul 2017 19:45:52 +0000 (14:45 -0500)] 
arm: mach-omap2: am33xx: Add FDT fixup suport for AM33xx/AM43xx boards

Similar to what is done with OMAP5 class boards we need to
perform fixups common to this SoC class, add support for this here
and add HS fixups.

Signed-off-by: Andrew F. Davis <afd@ti.com>
8 years agoarm: mach-omap2: fdt-common: Add OP-TEE node when firmware node is defined
Andrew F. Davis [Mon, 10 Jul 2017 19:45:51 +0000 (14:45 -0500)] 
arm: mach-omap2: fdt-common: Add OP-TEE node when firmware node is defined

If a firmware node is already present in the FDT we will fail to create
one and so fail to add our OP-TEE node, make this fixup first check for
a firmware node and then only try to add one if it is not found.

Signed-off-by: Andrew F. Davis <afd@ti.com>
8 years agoarm: mach-omap2: Factor out common FDT fixup suport
Andrew F. Davis [Mon, 10 Jul 2017 19:45:50 +0000 (14:45 -0500)] 
arm: mach-omap2: Factor out common FDT fixup suport

Some of the fixups currently done for OMAP5 class boards are common to
other OMAP family devices, move these to fdt-common.c.

Signed-off-by: Andrew F. Davis <afd@ti.com>
8 years agoarm: mach-omap2: Move omap5/sec-fxns.c into sec-common.c
Andrew F. Davis [Mon, 10 Jul 2017 19:45:49 +0000 (14:45 -0500)] 
arm: mach-omap2: Move omap5/sec-fxns.c into sec-common.c

TEE loading and firewall setup are common to all omap2 devices, move
these function out of omap5 and into mach-omap2. This allows us
to use these functions from other omap class devices.

Signed-off-by: Andrew F. Davis <afd@ti.com>
8 years agoMakefile: add dependencies to regenerate u-boot.cfg when lost
Philipp Tomsich [Wed, 5 Jul 2017 15:30:40 +0000 (17:30 +0200)] 
Makefile: add dependencies to regenerate u-boot.cfg when lost

When running a 'make clean' or carelessly removing u-boot.cfg, all
future make invocations (until autoconf is regenerated) will print
an error for a missing u-boot.cfg due to missing rules and dependencies.

This commit adds (i) an explicit rule dependency from all (which will
invokes the configuration checker) to cfg, and (b) adds a rule to
invoke scripts/Makefile.autoconf to regenerate u-boot.cfg.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodtc: mkimage: Add the possibility to specify DTC
Emmanuel Vadot [Sun, 25 Jun 2017 07:43:33 +0000 (09:43 +0200)] 
dtc: mkimage: Add the possibility to specify DTC

FreeBSD recently switch to it's BSDL dtc. While it support most of the
features of the GPL one it still lacks the incbin directive.
Add the possibility to specify which dtc we want to use for compiling dts
and generating fit image.

Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agomeson-gx: reserved memory regions
xypron.glpk@gmx.de [Fri, 9 Jun 2017 20:13:59 +0000 (22:13 +0200)] 
meson-gx: reserved memory regions

The Odroid C2 has two GiB of memory with two reserved regions.
reg = <0x0 0x0 0x0 0x1000000>;
reg = <0x0 0x10000000 0x0 0x200000>;

Patch
bfcef28ae4cf (arm: add initial support for Amlogic Meson and
ODROID-C2) provided function dram_init_banksize to reserve the
first 16 MiB of RAM for firmware in function dram_init_banksize
in arch/arm/mach-meson/board.c and defined
CONFIG_NR_DRAM_BANKS = 1.

With this patch dram_init_banksize is changed to additionally
reserve the 2MiB region for the ARM Trusted Firmware (BL31).
CONFIG_NR_DRAM_BANKS is set to 2.

Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
8 years agoenv: Switch env_nand, env_mmc and env_ubi to env_import_redund
Fiach Antaw [Wed, 25 Jan 2017 08:53:12 +0000 (18:53 +1000)] 
env: Switch env_nand, env_mmc and env_ubi to env_import_redund

The env_nand, env_mmc and env_ubi implementations all implement
redundancy using an identical serial-number scheme. This commit
migrates them to use the implementation in env_common, which is
functionally identical.

Signed-off-by: Fiach Antaw <fiach.antaw@uqconnect.edu.au>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoenv: Add generic redundant environment implementation
Fiach Antaw [Wed, 25 Jan 2017 08:53:11 +0000 (18:53 +1000)] 
env: Add generic redundant environment implementation

All current environments that implement redundancy use almost
identical implementations. This patch implements the env_nand
implementation as a function in env_common, and updates the
env_export function to export an env_nand-style 'flags' field by
default.

Signed-off-by: Fiach Antaw <fiach.antaw@uqconnect.edu.au>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agotests: test_dfu.py: Add example udev rule for host_usb_dev_node
Tom Rini [Mon, 29 Aug 2016 13:57:01 +0000 (09:57 -0400)] 
tests: test_dfu.py: Add example udev rule for host_usb_dev_node

If one does not already have a rule to create a custom device node when
a given device enumerates it can be useful to have udev create a
bus path based node to the entry in /dev/bus/usb that was just
enumerated.  Given that DFU itself does not require a /dev entry it is a
good idea to provide a rule that will generate one.

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