]> git.ipfire.org Git - people/ms/u-boot.git/log
people/ms/u-boot.git
6 years agoomap2: set the ethaddr as well as the usbethaddr env var to ensure static MAC
Peter Robinson [Thu, 23 Nov 2017 13:14:17 +0000 (13:14 +0000)] 
omap2: set the ethaddr as well as the usbethaddr env var to ensure static MAC

The kernel gets the ethernet MAC from the ethaddr variable, the omap boards for
devices with USB based eth adapters just set the usbethaddr which doesn't appear
to get passed to the kernel. The same Raspberry Pi code sets both ethaddr and
usbethaddr so lets do that so linux (tested 4.13 and 4.14) get a static rather
than a random MAC address, while not regressing users of usbethaddr.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
6 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Sat, 2 Dec 2017 00:08:30 +0000 (19:08 -0500)] 
Merge git://git.denx.de/u-boot-rockchip

6 years agorockchip: clk: rk3128: fix DCLK_VOP_DIV_CON_MASK
Philipp Tomsich [Fri, 1 Dec 2017 23:19:14 +0000 (00:19 +0100)] 
rockchip: clk: rk3128: fix DCLK_VOP_DIV_CON_MASK

The DCLK_VOP_DIV_CON_MASK should cover only bits 8 through 15.
Fix this to remove an "integer-overflow on shifted constant" warning.

Fixes: 9246d9e ("rockchip: rk3128: add clock driver")
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: clk: rk3128: fix NANDC_PLL_SEL_MASK
Philipp Tomsich [Fri, 1 Dec 2017 23:14:55 +0000 (00:14 +0100)] 
rockchip: clk: rk3128: fix NANDC_PLL_SEL_MASK

The PLL selector field for NANDC is only 2 bits wide.
This fixes an 'int-overflow on shift' warning.

Fixes: 9246d9e ("rockchip: rk3128: add clock driver")
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoefi_loader helloworld.efi: Fix building with -Os
Alexander Graf [Fri, 1 Dec 2017 21:09:50 +0000 (22:09 +0100)] 
efi_loader helloworld.efi: Fix building with -Os

Depending on your compiler, when compiling the hello world efi binary
with -Os, gcc might think it's a smart idea to replace common patterns
such as memory copies with explicit calls to memcpy().

While that sounds great at first, we don't have any memcpy() available
in our helloworld build target. So let's indicate to gcc that we really
do want to have the code be built as freestanding.

Fixes: bbf75dd9 ("efi_loader: output load options in helloworld")
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: Fix partition offsets
Alexander Graf [Fri, 1 Dec 2017 15:10:33 +0000 (16:10 +0100)] 
efi_loader: Fix partition offsets

Commit 884bcf6f65 (efi_loader: use proper device-paths for partitions) tried
to introduce the el torito scheme to all partition table types: Spawn
individual disk objects for each partition on a disk.

Unfortunately, that code ended up creating partitions with offset=0 which meant
that anyone accessing these objects gets data from the raw block device instead
of the partition.

Furthermore, all the el torito logic to spawn devices for partitions was
duplicated. So let's merge the two code paths and give partition disk objects
good offsets to work from, so that payloads can actually make use of them.

Fixes: 884bcf6f65 (efi_loader: use proper device-paths for partitions)
Reported-by: Yousaf Kaukab <yousaf.kaukab@suse.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: add missing breaks
Rob Clark [Thu, 30 Nov 2017 14:02:45 +0000 (09:02 -0500)] 
efi_loader: add missing breaks

Otherwise with GUID partition types you would end up with things like:

  .../HD(Part0,Sig6252c819-4624-4995-8d16-abc9cd5d4130)/HD(Part0,MBRType=02,SigType=02)

Signed-off-by: Rob Clark <robdclark@gmail.com>
[agraf: rebased]
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: comments for EFI_DEVICE_PATH_TO_TEXT_PROTOCOL
Heinrich Schuchardt [Thu, 23 Nov 2017 21:21:58 +0000 (22:21 +0100)] 
efi_loader: comments for EFI_DEVICE_PATH_TO_TEXT_PROTOCOL

Provide comments for efi_convert_device_node_to_text()
and efi_convert_device_path_to_text().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: helper function to add EFI object to list
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:23 +0000 (14:05 +0100)] 
efi_loader: helper function to add EFI object to list

To avoid duplicate coding provide a helper function that
initializes an EFI object and adds it to the EFI object
list.

efi_exit() is the only place where we dereference a handle
to obtain a protocol interface. Add a comment to the function.

Suggested-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: pass handle of loaded image
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:22 +0000 (14:05 +0100)] 
efi_loader: pass handle of loaded image

The handle of a loaded image is the value of the handle
member of the loaded image info object and not the
address of the loaded image info.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agotest/py: check return code of helloworld
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:21 +0000 (14:05 +0100)] 
test/py: check return code of helloworld

Check that helloworld.efi returns EFI_SUCCESS.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: output load options in helloworld
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:20 +0000 (14:05 +0100)] 
efi_loader: output load options in helloworld

We need to test if we pass a valid image handle when loading
and EFI application. This cannot be done in efi_selftest as
it is not loaded as an image.

So let's enhance helloworld a bit.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: add missing line feed
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:19 +0000 (14:05 +0100)] 
efi_selftest: add missing line feed

Add a missing line feed for an error message.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: compile without special compiler flags
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:18 +0000 (14:05 +0100)] 
efi_selftest: compile without special compiler flags

As the selftest is not compiled as an EFI binary we do not
need special compiler flags.

This avoids the checkarmreloc error on vexpress_ca15_tc2.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: manage protocols in a linked list
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:17 +0000 (14:05 +0100)] 
efi_loader: manage protocols in a linked list

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: simplify find_obj
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:16 +0000 (14:05 +0100)] 
efi_loader: simplify find_obj

Use function efi_search_protocol().

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: simplify efi_open_protocol
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:15 +0000 (14:05 +0100)] 
efi_loader: simplify efi_open_protocol

Use function efi_search_protocol.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: efi_gop: use efi_add_protocol
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:14 +0000 (14:05 +0100)] 
efi_loader: efi_gop: use efi_add_protocol

Use efi_add_protocol to add protocol.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: efi_net: use efi_add_protocol
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:13 +0000 (14:05 +0100)] 
efi_loader: efi_net: use efi_add_protocol

Use efi_add_protocol to add protocols.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: efi_disk: use efi_add_protocol
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:12 +0000 (14:05 +0100)] 
efi_loader: efi_disk: use efi_add_protocol

Use efi_add_protocol to install protocols.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: test EFI_DEVICE_PATH_TO_TEXT_PROTOCOL
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:11 +0000 (14:05 +0100)] 
efi_selftest: test EFI_DEVICE_PATH_TO_TEXT_PROTOCOL

Provide a test for the EFI_DEVICE_PATH_TO_TEXT_PROTOCOL protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: reimplement LocateDevicePath
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:10 +0000 (14:05 +0100)] 
efi_loader: reimplement LocateDevicePath

The current implementation of efi_locate_device_path does not match
the UEFI specification. It completely ignores the protocol
parameters.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: fix efi_convert_device_node_to_text
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:09 +0000 (14:05 +0100)] 
efi_loader: fix efi_convert_device_node_to_text

We need to implement to different functions for the
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL:
ConvertDeviceNodeToText
ConvertDevicePathToText

A recent patch screwed up efi_convert_device_node_to_text
to expect a device path and not a node.

The patch makes both service functions work again.

efi_convert_device_node_to_text is renamed to
efi_convert_single_device_node_to_text and
efi_convert_device_node_to_text_ext is renamed to
efi_convert_device_node_to_text to avoid future
confusion.

A test of ConvertDeviceNodeToText will be provided in
a follow-up patch.

Fixes: adae4313cdd efi_loader: flesh out device-path to text
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: efi_dp_str should print path not node
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:08 +0000 (14:05 +0100)] 
efi_loader: efi_dp_str should print path not node

efi_dp_str is meant to print a device path and not a device
node.

The old coding only worked because efi_convert_device_node_to_text
was screwed up to expect paths instead of nodes.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: size of media device path node represenation
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:07 +0000 (14:05 +0100)] 
efi_loader: size of media device path node represenation

In the format specifier we want to specify the maximum width
in case an ending \0 is missing.

So slen must be used as precision and not as field width.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: Exit in efi_set_bootdev() upon invalid "desc"
Stefan Roese [Fri, 17 Nov 2017 07:47:09 +0000 (08:47 +0100)] 
efi_loader: Exit in efi_set_bootdev() upon invalid "desc"

When trying to load an image from a non-existent USB key, U-Boot v2017.11
crashes on my x86 platform:

=> load usb 0:1 03000000 abc
General Protection
EIP: 0010:[<7b59030d>] EFLAGS: 00010286
Original EIP :[<fff4330d>]
...

This used to work in v2017.09. Testing has shown, that this bug was
introduced with patch 95c5553e [efi_loader: refactor boot device and
loaded_image handling].

This patch now checks if a valid "desc" is returned from blk_get_dev()
and only continues when "desc" is available. Resulting in this cmd
output (again):

=> load usb 0:1 03000000 abc
** Bad device usb 0 **

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: helloworld.c: remove superfluous include
Heinrich Schuchardt [Sun, 26 Nov 2017 13:05:06 +0000 (14:05 +0100)] 
efi_loader: helloworld.c: remove superfluous include

Remove a superfluous include from helloworld.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: initialise partition_signature memory
Jonathan Gray [Wed, 22 Nov 2017 03:18:59 +0000 (14:18 +1100)] 
efi_loader: initialise partition_signature memory

Zero partition_signature in the efi_device_path_hard_drive_path
structure when signature_type is 0 (no signature) as required by the
UEFI specification.

This is required so that efi_dp_match() will work as expected
when doing memcmp() comparisons.  Previously uninitialised memory
would cause it not match nodes when it should have when the signature
type was not GUID.

Corrects a problem where the loaded image protocol would not return a
device path with MEDIA_DEVICE causing the OpenBSD bootloader to fail
on rpi_3 and other targets.

v2: Also handle signature_type 1 (MBR) as described in the specification

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Tested-by: Artturi Alm <artturi.alm@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: efi_console: use helper functions
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:59 +0000 (19:25 +0200)] 
efi_loader: efi_console: use helper functions

Use helper functions efi_created_handle and efi_add_protocol
for creating the console handles and instaling the respective
protocols.

This change is needed if we want to move from an array of
protocols to a linked list of protocols.

Eliminate EFI_PROTOCOL_OBJECT which is not used anymore.

Currently we have not defined protocol interfaces to be const.
So efi_con_out and efi_console_control cannot be defined as const.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: refactor efi_setup_loaded_image
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:58 +0000 (19:25 +0200)] 
efi_loader: refactor efi_setup_loaded_image

Use helper functions to add protocols.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: simplify efi_locate_protocol
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:57 +0000 (19:25 +0200)] 
efi_loader: simplify efi_locate_protocol

Use helper function efi_search_protocol.

Do not print protocol guid twice in debug mode.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: simplify efi_uninstall_protocol_interface
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:56 +0000 (19:25 +0200)] 
efi_loader: simplify efi_uninstall_protocol_interface

Use function efi_search_obj, efi_search_protocol and
efi_remove_protocol to simplify the coding.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: simplify efi_search
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:55 +0000 (19:25 +0200)] 
efi_loader: simplify efi_search

Use helper function efi_search_protocol in efi_search.
Add missing comments.
Put default handling into default branch of switch statement.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: simplify efi_install_protocol_interface
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:54 +0000 (19:25 +0200)] 
efi_loader: simplify efi_install_protocol_interface

Use helper functio efi_add_protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: helper functions for protocol management
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:53 +0000 (19:25 +0200)] 
efi_loader: helper functions for protocol management

This patch provides helper functions to manage protocols.
efi_search_protocol - find a protocol on a handle
efi_add_protocol - install a protocol on a handle
efi_remove_protocol - remove a protocol from a handle
efi_remove_all_protocols - remove all protocols from a handle

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: test for graphics output protocol
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:52 +0000 (19:25 +0200)] 
efi_selftest: test for graphics output protocol

Supply a test for the graphics output protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: efi_gop: use correct types for parameters
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:51 +0000 (19:25 +0200)] 
efi_loader: efi_gop: use correct types for parameters

Use efi_uintn_t instead of unsigned long.

EFI_GRAPHICS_OUTPUT_BLT_OPERATION is an enum. If we don't
define an enum we have to pass it as u32.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: argument of efi_search_obj should be const
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:50 +0000 (19:25 +0200)] 
efi_loader: argument of efi_search_obj should be const

The argument of efi_search_obj is not changed so it should
be marked as const.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: make efi_create_handle non-static
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:49 +0000 (19:25 +0200)] 
efi_loader: make efi_create_handle non-static

Export function efi_create_handle.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: efi_dp_match should have const arguments
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:48 +0000 (19:25 +0200)] 
efi_loader: efi_dp_match should have const arguments

efi_dp_match does not change its arguments.
So they should be marked as const.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: efi_net: check return value of calloc
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:47 +0000 (19:25 +0200)] 
efi_loader: efi_net: check return value of calloc

Calloc may return NULL. So we must check the return value.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: efi_disk: check return value of calloc
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:46 +0000 (19:25 +0200)] 
efi_loader: efi_disk: check return value of calloc

Calloc may return NULL. We should check the return value.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: efi_gop: check calloc return value
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:45 +0000 (19:25 +0200)] 
efi_loader: efi_gop: check calloc return value

Calloc may return NULL. We have to check the return value.

Fixes: be8d324191f efi_loader: Add GOP support
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader implement UninstallMultipleProtocolInterfaces
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:44 +0000 (19:25 +0200)] 
efi_loader implement UninstallMultipleProtocolInterfaces

Implement UninstallMultipleProtocolInterfaces.
The efi_uninstall_multipled_protocol_interfaces tries to
uninstall protocols one by one. If an error occurs all
uninstalled protocols are reinstalled.

As the implementation efi_uninstall_protocol_interface is
still incomplete the function will fail.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: debug output efi_install_protocol_interface
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:43 +0000 (19:25 +0200)] 
efi_loader: debug output efi_install_protocol_interface

efi_install_protocol_interface should provide the created or
provided handle in the debug output.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: fix typo efi_install_multiple_protocol_interfaces
Heinrich Schuchardt [Thu, 26 Oct 2017 17:25:42 +0000 (19:25 +0200)] 
efi_loader: fix typo efi_install_multiple_protocol_interfaces

%s/occured/occurred/g

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: rework efi_search_obj
Heinrich Schuchardt [Mon, 6 Nov 2017 20:17:50 +0000 (21:17 +0100)] 
efi_loader: rework efi_search_obj

EFI_HANDLEs are used both in boottime and in runtime services.
efi_search_obj is a function that can be used to validate
handles. So let's make it accessible via efi_loader.h.

We can simplify the coding using list_for_each_entry.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: rework efi_locate_handle
Heinrich Schuchardt [Mon, 6 Nov 2017 20:17:49 +0000 (21:17 +0100)] 
efi_loader: rework efi_locate_handle

Check the parameters in efi_locate_handle.

Use list_for_each_entry instead of list_for_each.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: consistently use efi_uintn_t in boot services
Heinrich Schuchardt [Mon, 6 Nov 2017 20:17:48 +0000 (21:17 +0100)] 
efi_loader: consistently use efi_uintn_t in boot services

Consistenly use efi_uintn_t wherever the UEFI spec uses
UINTN in boot services interfaces.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: replace UINTN by efi_uintn_t
Heinrich Schuchardt [Mon, 6 Nov 2017 20:17:47 +0000 (21:17 +0100)] 
efi_loader: replace UINTN by efi_uintn_t

UINTN is used in the UEFI specification for unsigned integers
matching the bitness of the CPU.

Types in U-Boot should be lower case. The patch replaces it
by efi_uintn_t.

Suggested-by: Simon Glass <sjg@chromium.org>
Suggested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: remove unused typedef for INTN
Heinrich Schuchardt [Mon, 6 Nov 2017 20:17:46 +0000 (21:17 +0100)] 
efi_loader: remove unused typedef for INTN

INTN is not used in the coding.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: eliminate efi_uninstall_protocol_interface_ext
Heinrich Schuchardt [Mon, 6 Nov 2017 20:17:45 +0000 (21:17 +0100)] 
efi_loader: eliminate efi_uninstall_protocol_interface_ext

As we now have EFI_CALL there is no need for separate
functions efi_uninstall_protocol_interface_ext and
efi_uninstall_protocol_interface.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: eliminate efi_install_protocol_interface_ext
Heinrich Schuchardt [Mon, 6 Nov 2017 20:17:44 +0000 (21:17 +0100)] 
efi_loader: eliminate efi_install_protocol_interface_ext

As we now have EFI_CALL there is no need for separate
functions efi_install_protocol_interface_ext and
efi_install_protocol_interface.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: test protocol management
Heinrich Schuchardt [Mon, 6 Nov 2017 20:17:43 +0000 (21:17 +0100)] 
efi_selftest: test protocol management

This unit test checks the following protocol services:
InstallProtocolInterface, UninstallProtocolInterface,
InstallMultipleProtocolsInterfaces,
UninstallMultipleProtocolsInterfaces,
HandleProtocol, ProtocolsPerHandle,
LocateHandle, LocateHandleBuffer.

As UninstallProtocolInterface and UninstallMultipleProtocolsInterfaces
are not completely implemented a TODO message will shown for
their failure.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: capitalize EFI_LOCATE_SEARCH_TYPE values
Heinrich Schuchardt [Mon, 6 Nov 2017 20:17:42 +0000 (21:17 +0100)] 
efi_loader: capitalize EFI_LOCATE_SEARCH_TYPE values

Constants should be capitalized.
So rename the values of enum efi_locate_search_type.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: set parent handle in efi_load_image
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:20 +0000 (18:13 +0200)] 
efi_loader: set parent handle in efi_load_image

The parent_handle of the loaded image must be set.
Set the system table.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: provide test for EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:19 +0000 (18:13 +0200)] 
efi_selftest: provide test for EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL

The following services are tested:
OutputString, TestString, SetAttribute.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agotest/py: fix typo in test_efi_loader.py
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:18 +0000 (18:13 +0200)] 
test/py: fix typo in test_efi_loader.py

Make a comment line easier to read.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agotest/py: test reboot by EFI watchdog
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:17 +0000 (18:13 +0200)] 
test/py: test reboot by EFI watchdog

Clear environment variable efi_selftest before executing the
default tests.

Provide a test verifying that the EFI watchdog
reboots the system upon timeout.

The test depends on CONFIG_CMD_EFI_SELFTEST=y.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: test reboot by watchdog
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:16 +0000 (18:13 +0200)] 
efi_selftest: test reboot by watchdog

A test is added that verifies that the watchdog timer actually
causes a reboot upon timeout. The test is only executed on
request using

    setenv efi_selftest watchdog reboot
    bootefi selftest

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: use bootargs as load options
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:15 +0000 (18:13 +0200)] 
efi_loader: use bootargs as load options

Use environment variable bootargs used as load options
for bootefi payloads.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: correctly cleanup after selftest
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:14 +0000 (18:13 +0200)] 
efi_selftest: correctly cleanup after selftest

After executing bootefi selftest
* restore GD
* unlink the load image handle
* return 0 or 1 and not a truncated efi_status_t.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: allow to select a single test for execution
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:13 +0000 (18:13 +0200)] 
efi_selftest: allow to select a single test for execution

Environment variable efi_selftest is passed as load options
to the selftest application. It is used to select a single
test to be executed.

The load options are an UTF8 string. Yet I decided to keep
the name propertiy of the tests as char[] to reduce code
size.

Special value 'list' displays a list of all available tests.

Tests get an on_request property. If this property is set
the tests are only executed if explicitly requested.

The invocation of efi_selftest is changed to reflect that
bootefi selftest with efi_selftest = 'list' will call the
Exit bootservice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: deduplicate code
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:12 +0000 (18:13 +0200)] 
efi_selftest: deduplicate code

Move duplicate code to the new function efi_st_do_tests.

Suggested-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: efi_st_memcmp should return 0
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:11 +0000 (18:13 +0200)] 
efi_selftest: efi_st_memcmp should return 0

If the compared memory areas match the return value should be 0.
We should not use the unrelated constant EFI_ST_SUCCESS.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: reformat code
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:10 +0000 (18:13 +0200)] 
efi_selftest: reformat code

Remove superfluous spaces.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: provide a dummy device path
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:09 +0000 (18:13 +0200)] 
efi_selftest: provide a dummy device path

Currently we pass bootefi_device_path and bootefi_image_path as
device and image path without initializing them. They may carry
values from previous calls to bootefi.

With the patch the variables are initialized valid dummy values.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: consistently use efi_status_t in bootefi
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:08 +0000 (18:13 +0200)] 
efi_loader: consistently use efi_status_t in bootefi

Where ulong or unsigned long are used to hold an EFI status
code we should consistenly use efi_status_t.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: guard against double inclusion of efi_loader.h
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:07 +0000 (18:13 +0200)] 
efi_loader: guard against double inclusion of efi_loader.h

Use a define to detect double inclusion of efi_loader.h.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: new function utf8_to_utf16
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:06 +0000 (18:13 +0200)] 
efi_loader: new function utf8_to_utf16

Provide a conversion function from utf8 to utf16.

Add missing #include <linux/types.h> in include/charset.h.
Remove superfluous #include <common.h> in lib/charset.c.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: provide test for watchdog timer
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:05 +0000 (18:13 +0200)] 
efi_selftest: provide test for watchdog timer

The test verifies that resetting the watchdog timer ensures
that it is not called during the timeout period.

Testing that the watchdog timer actually executes a reset
would require a test outside the efi_selftest framework.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: implement SetWatchdogTimer
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:04 +0000 (18:13 +0200)] 
efi_loader: implement SetWatchdogTimer

The watchdog is initialized with a 5 minute timeout period.
It can be reset by SetWatchdogTimer.
It is stopped by ExitBoottimeServices.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: move efi_search_obj up in code
Heinrich Schuchardt [Wed, 18 Oct 2017 16:13:03 +0000 (18:13 +0200)] 
efi_loader: move efi_search_obj up in code

To avoid a forward declaration move efi_search_obj before
all protocol services functions.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agorockchip: dts: rk3399-puma: add /config/sysreset-gpio property
Philipp Tomsich [Tue, 28 Nov 2017 16:56:12 +0000 (17:56 +0100)] 
rockchip: dts: rk3399-puma: add /config/sysreset-gpio property

On the RK3399-Q7, we want to trigger a full platform reset (so the
various software stacks supported don't have to deal with the same
complexities over and over again) in case that anything other than a
power-on reset occurred.

To do so, this defines the /config/sysreset-gpio property and has it
point to a GPIO that will perform a power-on reset of the entire
platform.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
6 years agorockchip: rk3399-puma: add code to allow forcing a power-on reset
Philipp Tomsich [Tue, 28 Nov 2017 16:56:11 +0000 (17:56 +0100)] 
rockchip: rk3399-puma: add code to allow forcing a power-on reset

The reset circuitry in the RK3399 only resets 'almost all logic' when
a software reset is performed.  To make our software maintenance
easier in the future, we want to have the option (controlled by a DTS
property) to force all reset causes other than a power-on reset to
trigger a power-on reset via a GPIO trigger.

This adds the necessary support to the rk3399-puma (i.e. RK3399-Q7)
board-support and the documentation for the new property
(sysreset-gpio) within the /config-node.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agorockchip: dts: rk3399-puma: add a 'tsd, usb-port-power' stringlist for USB1
Philipp Tomsich [Wed, 22 Nov 2017 16:15:19 +0000 (17:15 +0100)] 
rockchip: dts: rk3399-puma: add a 'tsd, usb-port-power' stringlist for USB1

USB1 is connected to the on-module USB 3.0 hub and power to the hub
(actually it's a reset signal, modeled as a fixed regulator, that will
be released) should be enabled only during the first probing of the
device to avoid the hub from entering its low-power mode (where it
tries to attach on a fixed interval, but we always miss the timeslot
when U-Boot has the controller listening).

This adds a 'tsd,usb-port-power' stringlist to enable the
infrastructure in the board-specific usb_hub_reset_devices to find and
control the fixed regulator associated with control of the USB hub.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
6 years agorockchip: rk3399-puma: implement usb_hub_reset_devices for puma-rk3399
Philipp Tomsich [Wed, 22 Nov 2017 16:15:18 +0000 (17:15 +0100)] 
rockchip: rk3399-puma: implement usb_hub_reset_devices for puma-rk3399

For some versions of the RK3399-Q7 (at least revisions v1.1 and v1.2
are affected), we need to turn on the power for the port connected to
the on-module USB hub only when the device is probed for the first
time to ensure that the hub does not enter a low-power mode (that
U-Boot's USB stack can't deal with).

Note that this is needed for U-Boot only, as Linux eventually manages
to attach the hub even when it has entered into its low-power state
(when the hub wakes up the next time) after a few seconds.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
6 years agorockchip: rk3036: sdram: correct setting for pll integer mode
Kever Yang [Thu, 30 Nov 2017 08:51:21 +0000 (16:51 +0800)] 
rockchip: rk3036: sdram: correct setting for pll integer mode

According to rk3036 TRM, should be set to '1' for the pll
integer mode, while the '0' means the frac mode.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3036: update clock driver for ddr
Kever Yang [Thu, 30 Nov 2017 08:51:20 +0000 (16:51 +0800)] 
rockchip: rk3036: update clock driver for ddr

After the MASK MACRO update, we need to update the driver at the same time.
This is a fix to:
37943aa rockchip: rk3036: clean mask definition for cru reg

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3036: fix pll config for correct frequency
Kever Yang [Thu, 30 Nov 2017 08:51:19 +0000 (16:51 +0800)] 
rockchip: rk3036: fix pll config for correct frequency

There is a fixed div-2 between PLL and clk_ddr/clk_ddrphy,
so we need to double to pll output and then ddr can work
in correct frequency.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: board: evb-rk3128: add empty Makefile
Philipp Tomsich [Tue, 28 Nov 2017 11:30:37 +0000 (12:30 +0100)] 
rockchip: board: evb-rk3128: add empty Makefile

Even if the board-specific directory Makefile doesn't have any
targets, it still needs to exist.

This adds a minimal Makefile for the board/rockchip/evb_rk3128
directory and a evk-rk3128.c (as built-in.o needs to be built
for every directory that a Makefile gets run for).

Fixes: c7a6866 ("rockchip: rk3128: add evb-rk3128 support")
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3128: add sdram driver
Kever Yang [Tue, 28 Nov 2017 08:04:21 +0000 (16:04 +0800)] 
rockchip: rk3128: add sdram driver

RK3128 support up to 2GB DDR3 sdram, one channel, 32bit data width.

This patch is only used for U-Boot, but not for SPL which will
comes later, maybe after we merge all the common code into a common
file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3128: add defconfig for evb-rk3128
Kever Yang [Tue, 28 Nov 2017 08:04:20 +0000 (16:04 +0800)] 
rockchip: rk3128: add defconfig for evb-rk3128

Enable board config for evb-rk3128.
Serial output and eMMC works in this version.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3128: add evb-rk3128 support
Kever Yang [Tue, 28 Nov 2017 08:04:19 +0000 (16:04 +0800)] 
rockchip: rk3128: add evb-rk3128 support

evb-rk3128 is an evb from Rockchip based on rk3128 SoC:
- 2 USB2.0 Host port;
- 1 HDMI port;
- 2 10/100M eth port;
- 2GB ddr;
- 16GB eMMC;
- UART to USB debug port;

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3128: add pinctrl driver
Kever Yang [Tue, 28 Nov 2017 08:04:18 +0000 (16:04 +0800)] 
rockchip: rk3128: add pinctrl driver

Add rk3128 pinctrl driver and grf/iomux structure definition.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3128: add clock driver
Kever Yang [Tue, 28 Nov 2017 08:04:17 +0000 (16:04 +0800)] 
rockchip: rk3128: add clock driver

Add rk3128 clock driver and cru structure definition.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3128: add soc basic support
Kever Yang [Tue, 28 Nov 2017 08:04:16 +0000 (16:04 +0800)] 
rockchip: rk3128: add soc basic support

RK3128 is a SoC from Rockchip with quad-core Cortex-A7 CPU
and mali400 GPU. Support Nand flash, eMMC, SD card, USB 2.0 host
and device, HDMI/LVDS/MIPI display.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3128: add device tree file
Kever Yang [Tue, 28 Nov 2017 08:04:15 +0000 (16:04 +0800)] 
rockchip: rk3128: add device tree file

Add dts binding header for rk3128, files origin from kernel.

Series-Changes: 2
- fix i2c address
- add saradc and usb phy node
- emmc using fifo mode for there is no dma support in rk3128 emmc
- add some clock id in cru.h

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: board: evb_rv1108: update README
Andy Yan [Mon, 27 Nov 2017 11:59:45 +0000 (19:59 +0800)] 
rockchip: board: evb_rv1108: update README

After commit d962e5dadc2c("rockchip: mkimage: use spl_boot0 for all Rockchip SoCs"),
the mkimage will not pad the Tag memroy, so we shoud
pass a Taged ddr.bin/spl.bin to it.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoMAINTAINERS: update maintained files for Rockchip
Philipp Tomsich [Sun, 26 Nov 2017 23:18:42 +0000 (00:18 +0100)] 
MAINTAINERS: update maintained files for Rockchip

With some of the recent cleanups (e.g. moving the DRAM controller
drivers for Rockchip devices to drivers/ram/rockchip), the files
and paths listed in MAINTAINERS no longer covered what really is
looked after as part of the Rockchip port.

This commit updates the files/paths listed in MAINTAINERS for the
Rockchip port.  I am certain, though, that this will have missed some
additional paths that should have been included...

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoMerge branch 'rmobile-mx' of git://git.denx.de/u-boot-sh
Tom Rini [Thu, 30 Nov 2017 15:39:04 +0000 (10:39 -0500)] 
Merge branch 'rmobile-mx' of git://git.denx.de/u-boot-sh

6 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Thu, 30 Nov 2017 15:38:40 +0000 (10:38 -0500)] 
Merge git://git.denx.de/u-boot-marvell

6 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Thu, 30 Nov 2017 15:37:43 +0000 (10:37 -0500)] 
Merge git://git.denx.de/u-boot-x86

6 years agoARM: rmobile: Rework the ULCB CPLD driver
Marek Vasut [Sun, 26 Nov 2017 19:32:44 +0000 (20:32 +0100)] 
ARM: rmobile: Rework the ULCB CPLD driver

Rework the ULCB CPLD driver and make it into a sysreset driver,
since that is what the ULCB CPLD driver is mostly for.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoarm: mvebu: correct comments around cas_wl/cas_l
Chris Packham [Tue, 28 Nov 2017 21:38:34 +0000 (10:38 +1300)] 
arm: mvebu: correct comments around cas_wl/cas_l

The order of members in struct hws_topology_map is cas_wl, cas_l. The
comments in the original db-88f6820-gp.c had this wrong and have been
copied to other Armada-385 based boards. Practically this hasn't made a
difference since all these boards set both cas_wl and cas_l to 0
(autodetect) but if there were ever a board that did need to set these
explicitly they would run into unexpected issued.

Update the comments to reflect the correct order of structure members.

Reported-by: Tobi Wulff <tobi.wulff@alliedtelesis.co.nz>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoarm64: mvebu: armada-7k/8k: drop useless #ifdef
Baruch Siach [Sun, 26 Nov 2017 07:21:23 +0000 (09:21 +0200)] 
arm64: mvebu: armada-7k/8k: drop useless #ifdef

CONFIG_ENV_IS_IN_NAND has been removed in commit 2be296538e2e (Convert
CONFIG_ENV_IS_IN_MMC/NAND/UBI and NOWHERE to Kconfig).
CONFIG_ENV_IS_IN_SPI_FLASH has been removed in commit 91c868fe7cd
(Convert CONFIG_ENV_IS_IN_SPI_FLASH to Kconfig). The environment #ifdef
is now empty. Remove it.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoarm: mvebu: enable boot from NAND
Sean Nyekjaer [Fri, 24 Nov 2017 13:01:47 +0000 (14:01 +0100)] 
arm: mvebu: enable boot from NAND

Check if we are booting from NAND and let the bootrom
continue to load the rest of the bootloader

Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoarm: mvebu: fix boot from UART when in fallback mode
Sean Nyekjaer [Fri, 24 Nov 2017 13:01:28 +0000 (14:01 +0100)] 
arm: mvebu: fix boot from UART when in fallback mode

It's the first 8 bits of the bootrom error register that
contain the boot error/fallback error code. Let's check that
and continue to boot from UART.

Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoarm: mvebu: add nand pins
Sean Nyekjaer [Fri, 24 Nov 2017 13:00:48 +0000 (14:00 +0100)] 
arm: mvebu: add nand pins

Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agofix: nand: pxa3xx: fix defined but not used warnings
Sean Nyekjaer [Wed, 22 Nov 2017 12:39:08 +0000 (13:39 +0100)] 
fix: nand: pxa3xx: fix defined but not used warnings

bbt_mirror_descr and bbt_main_descr is defined but not used
when compiling without CONFIG_SYS_NAND_USE_FLASH_BBT set.

Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Signed-off-by: Stefan Roese <sr@denx.de>