]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
8 years agousb: dwc2: Call board_usb_init() from usb_lowlevel_init()
Peter Griffin [Wed, 29 Jul 2015 21:39:29 +0000 (22:39 +0100)]
usb: dwc2: Call board_usb_init() from usb_lowlevel_init()

This patch makes the dwc2 controller like ehci / ohci / xhci controllers
by calling the board_usb_init() function from usb_lowlevel_init.

This can then be implemented by specific platforms to initialise
their USB hardware (phys / clocks etc).

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
8 years agoefi: Add a README to explain how things work
Simon Glass [Tue, 4 Aug 2015 18:34:05 +0000 (12:34 -0600)]
efi: Add a README to explain how things work

Add some documentation on the EFI implementation in U-Boot.

Signed-off-by: Ben Stoltz <stoltz@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Gracefully disable the vesa driver when running from EFI
Simon Glass [Tue, 4 Aug 2015 18:34:04 +0000 (12:34 -0600)]
x86: Gracefully disable the vesa driver when running from EFI

We cannot use this driver when running from EFI as we have no direct hardware
access. In fact coreboot uses a different driver which uses tables provided
by coreboot. So far it does not seem possible to use a normal video driver
when booting from EFI.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: Support operation as an EFI payload
Simon Glass [Tue, 4 Aug 2015 18:34:03 +0000 (12:34 -0600)]
x86: qemu: Support operation as an EFI payload

Disable a few things which interfere with the EFI init. This allows QEMU to
to boot into EFI, load a U-Boot payload then boot to the U-Boot prompt.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: baytrail: Support operation as an EFI payload
Simon Glass [Tue, 4 Aug 2015 18:34:02 +0000 (12:34 -0600)]
x86: baytrail: Support operation as an EFI payload

Disable a few things which interfere with the EFI init. This allows the
Minnowboard MAX to boot into EFI, load a U-Boot payload then boot to the
U-Boot prompt.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add helper code for running from EFI
Simon Glass [Tue, 4 Aug 2015 18:34:01 +0000 (12:34 -0600)]
x86: Add helper code for running from EFI

When U-Boot is running from EFI some of the x86 init is replaced with
EFI-specific init. For example, since DRAM has already been set up, we only
need to find it, not init it. Add these functions so that boards can easily
allow booting from EFI if required.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Handle running as EFI payload
Simon Glass [Tue, 4 Aug 2015 18:34:00 +0000 (12:34 -0600)]
x86: Handle running as EFI payload

When U-Boot runs as an EFI payload it needs to avoid setting up the CPU
again. Also U-Boot currently does not handle interrupts for many devices, so
run with interrupts disabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoefi: Add a command to display the memory map
Simon Glass [Tue, 4 Aug 2015 18:33:59 +0000 (12:33 -0600)]
efi: Add a command to display the memory map

The EFI memory map is passed from the stub to U-Boot in a table. Add a
command to display it in a vaguely readable fashion.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested on QEMU
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoefi: Add functions for decoding the EFI tables
Simon Glass [Tue, 4 Aug 2015 18:33:58 +0000 (12:33 -0600)]
efi: Add functions for decoding the EFI tables

The EFI stub can pass a table to U-Boot with information about the memory map
Potentially other things will follow. Add a way to access this table.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add support for passing tables into U-Boot
Simon Glass [Tue, 4 Aug 2015 18:33:57 +0000 (12:33 -0600)]
x86: Add support for passing tables into U-Boot

The EFI stub provides information to U-Boot in a table. This includes the
memory map which is needed to decide where to relocate U-Boot. Collect this
information in the early init code and store it in global_data.

Fix up the BIST code at the same time since we don't have it when booting
from EFI and can assume it is 0.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoefi: Add 64-bit payload support
Simon Glass [Tue, 4 Aug 2015 18:33:56 +0000 (12:33 -0600)]
efi: Add 64-bit payload support

Most EFI implementations use 64-bit. Add a way to build U-Boot as a 64-bit
EFI payload. The payload unpacks a (32-bit) U-Boot and starts it. This can
be enabled for x86 boards at present.

Signed-off-by: Simon Glass <sjg@chromium.org>
Improvements to how the payload is built:
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add a way to call 32-bit code from 64-bit mode
Simon Glass [Tue, 4 Aug 2015 18:33:55 +0000 (12:33 -0600)]
x86: Add a way to call 32-bit code from 64-bit mode

The procedure to drop from 64-bit mode to 32-bit is a bit messy. Add a
function to take care of it. It requires identity-mapped pages and that
the calling code is running below 4GB.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add an enum for some commonly-used GDT bits
Simon Glass [Tue, 4 Aug 2015 18:33:54 +0000 (12:33 -0600)]
x86: Add an enum for some commonly-used GDT bits

Rather than add these as open-coded values, create an enum with the commonly
used flags.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Support building the EFI stub
Simon Glass [Tue, 4 Aug 2015 18:33:53 +0000 (12:33 -0600)]
x86: Support building the EFI stub

Add support for building a 32/64-bit EFI stub for x86. This involves
building the startup and relocation code for either i386 or x86_64.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoefi: Add support for loading U-Boot through an EFI stub
Simon Glass [Tue, 4 Aug 2015 18:33:52 +0000 (12:33 -0600)]
efi: Add support for loading U-Boot through an EFI stub

It is useful to be able to load U-Boot onto a board even if is it already
running EFI. This can allow access to the U-Boot command interface, flexible
booting options and easier development.

The easiest way to do this is to build U-Boot as a binary blob and have an
EFI stub copy it into RAM. Add support for this feature, targeting 32-bit
initially.

Also add a way to detect when U-Boot has been loaded via a stub. This goes
in common.h since it needs to be widely available so that we avoid redoing
initialisation that should be skipped.

Signed-off-by: Simon Glass <sjg@chromium.org>
Improvements to how the payload is built:
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add relocation and link script for a 64-bit EFI application
Simon Glass [Tue, 4 Aug 2015 18:33:51 +0000 (12:33 -0600)]
x86: Add relocation and link script for a 64-bit EFI application

Add a linker script and relocation code for building 64-bit EFI
applications. This can be used for the EFI stub.

Signed-off-by: Simon Glass <sjg@chromium.org>
Improvements to how the payload is built:
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add definitions for the x86-efi board and plumb it in
Ben Stoltz [Tue, 4 Aug 2015 18:33:50 +0000 (12:33 -0600)]
x86: Add definitions for the x86-efi board and plumb it in

Add configuration and Kconfig changes for this board.

Signed-off-by: Ben Stoltz <stoltz@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Allow relocation code to build without text base
Simon Glass [Tue, 4 Aug 2015 18:33:49 +0000 (12:33 -0600)]
x86: Allow relocation code to build without text base

This code currently requires CONFIG_SYS_TEXT_BASE but this should be
unnecessary. As a first step, remove the build-time limitation and report an
error instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: dts: Add a device tree file for EFI
Simon Glass [Tue, 4 Aug 2015 18:33:48 +0000 (12:33 -0600)]
x86: dts: Add a device tree file for EFI

This contains just enough to bring up the serial UART.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add EFI board code
Ben Stoltz [Tue, 4 Aug 2015 18:33:47 +0000 (12:33 -0600)]
x86: Add EFI board code

Add support for the efi-x86 board, which supports running U-Boot as an
EFI 32-bit application.

Signed-off-by: Ben Stoltz <stoltz@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add support for U-Boot as an EFI application
Ben Stoltz [Tue, 4 Aug 2015 18:33:46 +0000 (12:33 -0600)]
x86: Add support for U-Boot as an EFI application

Add the required x86 glue code. This includes the initial start-up,
relocation and jumping to efi_main(). We also need to avoid fiddling with
interrupts.

Signed-off-by: Ben Stoltz <stoltz@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add asm/elf.h for x86-specific ELF definitions
Simon Glass [Tue, 4 Aug 2015 18:33:45 +0000 (12:33 -0600)]
x86: Add asm/elf.h for x86-specific ELF definitions

Bring in this file from Linux 4.1. It supports relocation features specific
to x86.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Support skipping relocation for EFI
Simon Glass [Tue, 4 Aug 2015 18:33:44 +0000 (12:33 -0600)]
x86: Support skipping relocation for EFI

When running as an EFI application we must skip relocation. Add support for
this in the x86 relocation code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoefi: Support building a u-boot-app.efi executable
Simon Glass [Tue, 4 Aug 2015 18:33:43 +0000 (12:33 -0600)]
efi: Support building a u-boot-app.efi executable

Add support for building U-Boot as an EFI application with a .efi suffix.
This can be loaded by EFI provided that EFI has the same bit width (32-
or 64-bit) as U-Boot. This unfortunate limitation is imposed by EFI.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Set up toolchain flags for running as EFI application
Ben Stoltz [Tue, 4 Aug 2015 18:33:42 +0000 (12:33 -0600)]
x86: Set up toolchain flags for running as EFI application

Adjust the toolchain flags to build U-Boot as a relocatable shared library,
as required by EFI.

Signed-off-by: Ben Stoltz <stoltz@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoefi: Drop CONFIG_SYS_TEXT_BASE for EFI
Ben Stoltz [Tue, 4 Aug 2015 18:33:41 +0000 (12:33 -0600)]
efi: Drop CONFIG_SYS_TEXT_BASE for EFI

When U-Boot runs as an EFI application is does not have a definition of
CONFIG_SYS_TEXT_BASE. U-Boot is a relocatable application and the relocation
is done by EFI. U-Boot can be loaded at any address.

Ensure that this CONFIG option is not set in this case.

Signed-off-by: Ben Stoltz <stoltz@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoefi: Add a serial driver
Simon Glass [Tue, 4 Aug 2015 18:33:40 +0000 (12:33 -0600)]
efi: Add a serial driver

Add a serial driver which makes use of EFI's console in/out service.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested on Intel Crown Bay and QEMU
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoAdd a way to skip relocation
Simon Glass [Tue, 4 Aug 2015 18:33:39 +0000 (12:33 -0600)]
Add a way to skip relocation

When running U-Boot as an EFI application we cannot relocate since we do not
have relocation information. U-Boot has already been relocated to a suitable
address.

Add a global_data flag to control skipping relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Update README to explain booting Ubuntu on Minnowmax
Simon Glass [Mon, 27 Jul 2015 21:47:31 +0000 (15:47 -0600)]
x86: Update README to explain booting Ubuntu on Minnowmax

The steps required to boot a Linux distribution from U-Boot on x86 are not
very complicated, but it is a good idea to have these written down in an
accessible place.

Document how to examine the boot media from U-Boot, how to load a kernel,
load a ramdisk, set the kernel boot arguments and start the kernel. With
these instructions Ubuntu boots mostly normally on Minnowmax.

Note that the TSC timer does not operate correctly and gives warnings in
the boot log. I expect that ACPI support will solve this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: minnowmax: Drop the old PCI settings
Simon Glass [Mon, 27 Jul 2015 21:47:29 +0000 (15:47 -0600)]
x86: minnowmax: Drop the old PCI settings

These are now in the device tree so we don't need to use the CONFIG options.
Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: dts: Fix typo in intel,irq-router.txt
Simon Glass [Mon, 27 Jul 2015 21:47:26 +0000 (15:47 -0600)]
x86: dts: Fix typo in intel,irq-router.txt

Fix a small typo in this binding file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Drop CONFIG_DCACHE_RAM_MRC_VAR_SIZE from header file
Simon Glass [Mon, 27 Jul 2015 21:47:25 +0000 (15:47 -0600)]
x86: Drop CONFIG_DCACHE_RAM_MRC_VAR_SIZE from header file

This is provided in Kconfig so we don't need it here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Move CONFIG_X86_SERIAL to Kconfig
Simon Glass [Mon, 27 Jul 2015 21:47:23 +0000 (15:47 -0600)]
x86: Move CONFIG_X86_SERIAL to Kconfig

Move this config option to Kconfig and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Move Chrome OS options to defconfig
Simon Glass [Mon, 27 Jul 2015 21:47:22 +0000 (15:47 -0600)]
x86: Move Chrome OS options to defconfig

Drop these from the header file and use Kconfig instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: Add a return value comment to device_get_child()
Simon Glass [Mon, 27 Jul 2015 21:47:19 +0000 (15:47 -0600)]
dm: Add a return value comment to device_get_child()

At present this function does not specify its return value. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agopci: Indicate prefetchable memory allocate when debugging
Simon Glass [Mon, 27 Jul 2015 21:47:18 +0000 (15:47 -0600)]
pci: Indicate prefetchable memory allocate when debugging

At present the PCI output displays 'Mem' when it allocates memory for a PCI
device, whether it is prefetchable or not. There is a distinction since the
memory comes from separate pools. Use 'Prf' instead of 'Mem' when allocating
prefetchable memory.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agopci: Add a constant for an invalid interrupt
Simon Glass [Mon, 27 Jul 2015 21:47:17 +0000 (15:47 -0600)]
pci: Add a constant for an invalid interrupt

Rather than using 0xff in the code, add a constant.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoefi: Display the correct initcall pre-relocation values
Simon Glass [Fri, 31 Jul 2015 15:31:38 +0000 (09:31 -0600)]
efi: Display the correct initcall pre-relocation values

With EFI the start address of U-Boot is specified differently. We could
consider just setting GD_FLG_RELOC and then setting up reloc_off. But that
flag has other implementations and we are not able to use U-Boot relocation
which this flag implies.

Instead, just add a special case for EFI.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoefi: Avoid using non-existent text base
Ben Stoltz [Fri, 31 Jul 2015 15:31:37 +0000 (09:31 -0600)]
efi: Avoid using non-existent text base

When U-Boot runs as an EFI application is does not have a definition of
CONFIG_SYS_TEXT_BASE. U-Boot is a relocatable application and the relocation
is done by EFI. U-Boot can be loaded at any address.

This is similar to how sandbox works. Adjust the early board init to deal
with this.

Signed-off-by: Ben Stoltz <stoltz@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoefi: Add start-up library code
Simon Glass [Fri, 31 Jul 2015 15:31:36 +0000 (09:31 -0600)]
efi: Add start-up library code

When running as an EFI application, U-Boot must request memory from EFI,
and provide access to the boot services U-Boot needs.

Add library code to perform these tasks. This includes efi_main() which is
the entry point from EFI. U-Boot is built as a shared library.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Allow use of global_data with EFI
Simon Glass [Fri, 31 Jul 2015 15:31:35 +0000 (09:31 -0600)]
x86: Allow use of global_data with EFI

On x86 the global_data pointer is provided through a somewhat-bizarre and
x86-specific mechanism: the F segment register is set to a pointer to the
start of global_data, so that accesses can use this build-in register.

When running as an EFI application we don't want to mess with the Global
Descriptor Table (GDT) and there is little advantage (in terms of code size)
to doing so.

Allow global_data to be a simple variable in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agopci: Fix up code for CONFIG_PCI_ENUM_ONLY
Simon Glass [Fri, 31 Jul 2015 15:31:34 +0000 (09:31 -0600)]
pci: Fix up code for CONFIG_PCI_ENUM_ONLY

This option is not used by any board but appears to still be useful, at least
for testing. With recent commits it does not build, so fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agopci: Use debug() instead of DEBUGF() in pci_auto.c
Simon Glass [Fri, 31 Jul 2015 15:31:33 +0000 (09:31 -0600)]
pci: Use debug() instead of DEBUGF() in pci_auto.c

This file does not need its own way of doing debug(). Clean it up to use the
new way.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Tidy up a few minor issues with interrupts
Simon Glass [Fri, 31 Jul 2015 15:31:32 +0000 (09:31 -0600)]
x86: Tidy up a few minor issues with interrupts

Fix a typo, remove an unused field and make sure to use existing #define
constants instead of open-coded values.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add some missing global_data declarations in files that use gd
Simon Glass [Fri, 31 Jul 2015 15:31:31 +0000 (09:31 -0600)]
x86: Add some missing global_data declarations in files that use gd

Some files use global_data but don't declare it. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Tidy up the 64-bit calling code
Simon Glass [Fri, 31 Jul 2015 15:31:30 +0000 (09:31 -0600)]
x86: Tidy up the 64-bit calling code

The GDT works but technically the length is incorrect. Fix this and add a
comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Drop unused copy_fdt_to_ram()
Simon Glass [Fri, 31 Jul 2015 15:31:29 +0000 (09:31 -0600)]
x86: Drop unused copy_fdt_to_ram()

This is now handled by generic U-Boot code so we do not need an x86 version.
It is no-longer called, so remove it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Tidy up global_data flags
Simon Glass [Fri, 31 Jul 2015 15:31:28 +0000 (09:31 -0600)]
x86: Tidy up global_data flags

These flags now overlap some global ones. Adjust the x86-specific flags to
avoid this. Since this requires a change to the start.S code, add a way for
tools to find the 32-bit cold reset entry point. Previously this was at a
fixed offset.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoReserve the top 16 flag bits for architecture-specific use
Simon Glass [Fri, 31 Jul 2015 15:31:27 +0000 (09:31 -0600)]
Reserve the top 16 flag bits for architecture-specific use

Add a convention that the generic global_data only occupy the bottom 16 bits
of the flags word, so that there is less chance of a conflict. At present the
x86 flags conflict.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Use CR0 constants in CPU init
Simon Glass [Fri, 31 Jul 2015 15:31:26 +0000 (09:31 -0600)]
x86: Use CR0 constants in CPU init

We should use these constants where possible.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add various minor tidy-ups to the 32-bit startup code
Simon Glass [Fri, 31 Jul 2015 15:31:25 +0000 (09:31 -0600)]
x86: Add various minor tidy-ups to the 32-bit startup code

Fix a typo, improve some comments and add a little more detail in some
cases.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoBring in __aligned_u64 and friends to linux/types.h
Simon Glass [Fri, 31 Jul 2015 15:31:24 +0000 (09:31 -0600)]
Bring in __aligned_u64 and friends to linux/types.h

These will be used for efi.h both for U-Boot running as an EFI application
and as a payload. They come from Linux 4.1.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoAllow objcopy to work without filling gaps with 0xff
Simon Glass [Fri, 31 Jul 2015 15:31:23 +0000 (09:31 -0600)]
Allow objcopy to work without filling gaps with 0xff

This is currently done for all targets, since 0xff is the default erased
value for most flash devices. In some cases this is not what we want (e.g.
for EFI images) so provide a command to do a vanilla objcopy.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoelf: Add a few definitions for 64-bit relocation
Simon Glass [Fri, 31 Jul 2015 15:31:21 +0000 (09:31 -0600)]
elf: Add a few definitions for 64-bit relocation

Provide the types necessary to relocate 64-bit images.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: serial: Correct logic in serial_find_console_or_panic()
Simon Glass [Fri, 31 Jul 2015 15:31:20 +0000 (09:31 -0600)]
dm: serial: Correct logic in serial_find_console_or_panic()

In a final attempt to find a console UART this function uses the first
first available serial device. However the check for a valid device is
inverted.

This code is only executed when there is in fact no serial UART, but at
present it can fail to reach the panic_str() call in this case, and start
trying to use a non-existent UART.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: core: Check for empty list in uclass_find_device()
Simon Glass [Fri, 31 Jul 2015 15:31:19 +0000 (09:31 -0600)]
dm: core: Check for empty list in uclass_find_device()

This function needs to check the list has entries before traversing it.
Fix this bug.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoSupport removing default assembler flags
Simon Glass [Fri, 31 Jul 2015 15:31:18 +0000 (09:31 -0600)]
Support removing default assembler flags

The CFLAGS_REMOVE_<file> feature allows default C compiler flags to be
removed for particular files. Add the same feature for assembler, using
AFLAGS_REMOVE_<file>.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agocommon: command add '\n' for debug msg
Peng Fan [Tue, 28 Jul 2015 14:45:37 +0000 (22:45 +0800)]
common: command add '\n' for debug msg

Add '\n' for debug msg.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agolib: fdt: fix indent of #ifdef..#endif conditional
Masahiro Yamada [Sat, 1 Aug 2015 07:03:25 +0000 (16:03 +0900)]
lib: fdt: fix indent of #ifdef..#endif conditional

Match the depth of indentation between #ifdef and #endif
for better readability.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agocommon: Print nothing in the __weak checkboard()
Bin Meng [Fri, 31 Jul 2015 07:24:40 +0000 (00:24 -0700)]
common: Print nothing in the __weak checkboard()

Do not print confusing "Board: Unknown" during boot.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agogitignore: Add defconfig and fdtgrep
Bin Meng [Fri, 31 Jul 2015 07:24:39 +0000 (00:24 -0700)]
gitignore: Add defconfig and fdtgrep

Ignore defconfig and tools/fdtgrep.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agox86: bayleybay: Configure PCI IRQ
Bin Meng [Thu, 30 Jul 2015 10:49:18 +0000 (03:49 -0700)]
x86: bayleybay: Configure PCI IRQ

Add PCI IRQ routing information in the board device tree and enable
writing PIRQ routing table and MP table.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agox86: Add Intel Bayley Bay board support
Bin Meng [Thu, 30 Jul 2015 10:49:17 +0000 (03:49 -0700)]
x86: Add Intel Bayley Bay board support

Intel Bayley Bay board is a BayTrail based board. Add this board
with existing baytrail fsp support.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agox86: Add microcode for BayTrail-I B0 stepping
Bin Meng [Thu, 30 Jul 2015 10:49:16 +0000 (03:49 -0700)]
x86: Add microcode for BayTrail-I B0 stepping

This commit adds the microcode blob for BayTrail-I B0 stepping,
CPUID signature 30671h.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agox86: baytrail: Update UPD setting for FSP Gold4 release
Bin Meng [Thu, 30 Jul 2015 10:49:15 +0000 (03:49 -0700)]
x86: baytrail: Update UPD setting for FSP Gold4 release

BayTrail FSP Gold4 release adds one UPD parameter to control IGD
enable/disable.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agox86: minnowmax: Remove smsc47x superio codes
Bin Meng [Thu, 30 Jul 2015 10:49:14 +0000 (03:49 -0700)]
x86: minnowmax: Remove smsc47x superio codes

On Intel BayTrail SoC, there is a legacy UART (I/O 0x3f8) integrated
into the SoC which is enabled by the FSP. Remove the smsc47x superio
initialization codes.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agox86: Sanity test on vesa parameters before setting up kernel screen_info
Bin Meng [Thu, 30 Jul 2015 10:49:13 +0000 (03:49 -0700)]
x86: Sanity test on vesa parameters before setting up kernel screen_info

We should not set up kernel screen_info when the vesa parameters are
insane, otherwise kernel will panic.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agox86: qemu: Add MP initialization
Bin Meng [Mon, 27 Jul 2015 11:16:08 +0000 (19:16 +0800)]
x86: qemu: Add MP initialization

Add a cpu1 node to the device tree and enable the MP initialization
on QEMU targets (i440fx and q35).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: Add a 'pause' instruction in __udelay() for QEMU target
Miao Yan [Mon, 27 Jul 2015 11:16:07 +0000 (19:16 +0800)]
x86: Add a 'pause' instruction in __udelay() for QEMU target

When running SMP configuration on QEMU (tcg mode, no kvm), there is
a busy loop in start_aps(), calling udelay(), that waits for APs to
show up online. However, there is a chance that VCPU1 will be timeout
waiting, IOW the secondary VCPUs haven't started their execution yet.

This patch adds a 'pause' instruction in __udelay() only for QEMU
target, to give other VCPUs a chance to run. When QEMU sees the
'pause' instruction, it will yeild the execution to other CPUs.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agodoc: dm: Update pci-info.txt for pci support
Bin Meng [Mon, 27 Jul 2015 07:33:43 +0000 (00:33 -0700)]
doc: dm: Update pci-info.txt for pci support

Correct two typos and mention how pci bus will be probed.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: pci: Allow scan bridge child devices before relocation
Bin Meng [Mon, 27 Jul 2015 07:33:39 +0000 (00:33 -0700)]
dm: pci: Allow scan bridge child devices before relocation

On some platforms pci devices behind bridge need to be probed (eg:
a pci uart on recent x86 chipset) before relocation. Remove such
limitation so that dm pci can be used before relocation.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoconfigs: ti_armv7_keystone2: replace addr_uboot with loadaddr
Vitaly Andrianov [Mon, 3 Aug 2015 19:54:32 +0000 (15:54 -0400)]
configs: ti_armv7_keystone2: replace addr_uboot with loadaddr

This patch replaces not existing addr_uboot environment variable by
loadaddr at get_uboot_net and burn_uboot_xxx commands. Otherwise these
commands are broken.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
8 years agoarmv8/ls2085ardb: Add USB support for ls2085ardb
Nikhil Badola [Fri, 26 Jun 2015 11:32:18 +0000 (17:02 +0530)]
armv8/ls2085ardb: Add USB support for ls2085ardb

Add USB XHCI support for ls2085rdb platform

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/ls2085aqds: Add USB support for ls2085aqds
Nikhil Badola [Fri, 26 Jun 2015 11:32:00 +0000 (17:02 +0530)]
armv8/ls2085aqds: Add USB support for ls2085aqds

Add USB XHCI support for ls2085qds platform

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/lsch3/config: Define USB XHCI controller base address for LS2085A
Nikhil Badola [Fri, 26 Jun 2015 11:31:50 +0000 (17:01 +0530)]
armv8/lsch3/config: Define USB XHCI controller base address for LS2085A

Define base address of both usb xhci controllers in lsch3 config
in the format (IMMR + offset) for LS2085A

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv8/lsch3/config: Define CONFIG_SYS_CACHELINE_SIZE for LS2085A
Nikhil Badola [Fri, 26 Jun 2015 11:29:21 +0000 (16:59 +0530)]
armv8/lsch3/config: Define CONFIG_SYS_CACHELINE_SIZE for LS2085A

Define CONFIG_SYS_CACHELINE_SIZE for LS2085A which is required by
USB XHCI stack for alignment

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodrivers/ddr/fsl: Adjust bstopre value
York Sun [Thu, 23 Jul 2015 21:04:48 +0000 (14:04 -0700)]
drivers/ddr/fsl: Adjust bstopre value

By default the bstopre value has been set to 0x100, used to be 1/4
value of refint. Modern DDR has increased the refresh time. Adjust
to 1/4 of refresh interval dynamically. Individual board can still
override this value in board ddr file, or to use auto-precharge.

Signed-off-by: York Sun <yorksun@freescale.com>
8 years agodrivers/crypto/fsl: clean-up - use fdt_setprop_u32 helper
horia.geanta@freescale.com [Wed, 8 Jul 2015 14:24:58 +0000 (17:24 +0300)]
drivers/crypto/fsl: clean-up - use fdt_setprop_u32 helper

Signed-off-by: Horia Geantă <horia.geanta@freescale.com>
Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodrivers/crypto/fsl: fix snooping for write transactions
horia.geanta@freescale.com [Wed, 8 Jul 2015 14:24:57 +0000 (17:24 +0300)]
drivers/crypto/fsl: fix snooping for write transactions

HW coherency won't work properly for CAAM write transactions
if AWCACHE is left to default (POR) value - 4'b0001.
It has to be programmed to 4'b0010.

For platforms that have HW coherency support:
-PPC-based: the update has no effect; CAAM coherency already works
due to the IOMMU (PAMU) driver setting the correct memory coherency
attributes
-ARM-based: the update fixes cache coherency issues,
since IOMMU (SMMU) driver is not programmed to behave similar to PAMU

Fixes: b9eebfade974c ("fsl_sec: Add hardware accelerated SHA256 and SHA1")
Signed-off-by: Horia Geantă <horia.geanta@freescale.com>
Reviewed-by: Aneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodrivers/crypto/fsl: fix "era" property value on LE platforms
horia.geanta@freescale.com [Wed, 8 Jul 2015 14:24:56 +0000 (17:24 +0300)]
drivers/crypto/fsl: fix "era" property value on LE platforms

Use fdt_setprop_u32() instead of fdt_setprop().

Fixes: 0181937fa371a ("crypto/fsl: Add fixup for crypto node")
Signed-off-by: Horia Geantă <horia.geanta@freescale.com>
Reviewed-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodrivers/pci/layerscape: Add EP mode support
Minghuan Lian [Fri, 10 Jul 2015 03:35:09 +0000 (11:35 +0800)]
drivers/pci/layerscape: Add EP mode support

The patch will initialize PCIe controller on EP mode
1. Setup bar:
   bar0 32bit 4K for specific configuration
   bar1 32bit 8K for MSIX
   bar2 64bit 4K for descriptor of memory
   bar4 64bit 1M for DMA memory test
2. Setup iATU:
   iATU inbound 0-3 to map bar transaction to memory address
   started at CONFIG_SYS_PCI_EP_MEMORY_BASE
   iATU outbound 0 to map 4G memory space

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodrivers/pci: Add function to find an extended capability
Minghuan Lian [Fri, 10 Jul 2015 03:35:08 +0000 (11:35 +0800)]
drivers/pci: Add function to find an extended capability

PCIe extends device's configuration space to 4k and provides
extended capability. The patch adds function to find them.
The code is ported from Linux PCIe driver.

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodrivers/fsl-mc: flib changes for mc 8.0.0
Prabhakar Kushwaha [Tue, 7 Jul 2015 10:10:06 +0000 (15:40 +0530)]
drivers/fsl-mc: flib changes for mc 8.0.0

MC firware version 8.0.0 contains new command flags. This patch
contains modifications in FLIB files to support the new command flags.

Signed-off-by: Itai Katz <itai.katz@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodrivers/crypto/fsl: enable raw data instead of von Neumann data
Alex Porosanu [Tue, 5 May 2015 13:48:35 +0000 (16:48 +0300)]
drivers/crypto/fsl: enable raw data instead of von Neumann data

The sampling of the oscillator can be done in multiple modes for
generating the entropy value. By default, this is set to von
Neumann. This patch changes the sampling to raw data, since it
has been discovered that the generated entropy has a better
'quality'.

Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodrivers/crypto/fsl: change starting entropy delay value
Alex Porosanu [Tue, 5 May 2015 13:48:34 +0000 (16:48 +0300)]
drivers/crypto/fsl: change starting entropy delay value

The entropy delay (the length in system clocks of each
entropy sample) for the RNG4 block of CAAM is dependent
on the frequency of the SoC. By elaborate methods, it
has been determined that a good starting value for all
platforms integrating the CAAM IP is 3200. Using a
higher value has additional benefit of  speeding up
the process of instantiating the RNG, since the entropy
delay will be increased and instantiation of the RNG
state handles will be reattempted by the driver. If the
starting value is low, for certain platforms, this can
lead to a quite lengthy process.
This patch changes the starting value of the length of
the entropy sample to 3200 system clocks.
In addition to this change, the attempted entropy delay
values are now printed on the console upon initialization
of the RNG block.

Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodrivers/crypto/fsl: disable RNG oscillator maximum frequency check
Alex Porosanu [Tue, 5 May 2015 13:48:33 +0000 (16:48 +0300)]
drivers/crypto/fsl: disable RNG oscillator maximum frequency check

The rtfrqmax & rtfrqmin set the bounds of the expected frequency of the
oscillator, when SEC runs at its maximum frequency. For certain platforms
(f.i. T2080), the oscillator is very fast and thus if the SEC runs at
a lower than normal frequency, the ring oscillator is incorrectly detected
as being out of bounds.

This patch effectively disables the maximum frequency check, by setting a
high enough maximum allowable frequency for the oscillator. The reasoning
behind this is that usually a broken oscillator will run too slow
(i.e. not run at all) rather than run too fast.

Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv7/ls1021a: allow OCRAM access permission as R/W in SPL
Alison Wang [Thu, 9 Jul 2015 02:50:07 +0000 (10:50 +0800)]
armv7/ls1021a: allow OCRAM access permission as R/W in SPL

On LS1021A Rev2.0, OCRAM's security level needs to be changed to
non-secure access for SD boot. This patch will allow OCRAM
access permission as R/W in SPL.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv7/ls102xa: Fix non-boot cpus cannot correctly fall in spin table
Wang Dongsheng [Thu, 18 Jun 2015 10:32:58 +0000 (18:32 +0800)]
armv7/ls102xa: Fix non-boot cpus cannot correctly fall in spin table

Bootrom will put cpus into WFE state when boot cpu release cpus, so
target cpu cannot correctly go to spin state.

Add 'sev' to wakeup non-boot cpu that hold on bootrom space, let target
cpu can fall into u-boot spin table.

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv7/ls1021atwr: program the regulator for deep sleep
chenhui zhao [Fri, 15 May 2015 06:42:30 +0000 (14:42 +0800)]
armv7/ls1021atwr: program the regulator for deep sleep

Program the external regulator to switch off voltage in deep sleep.

Signed-off-by: Chenhui Zhao <chenhui.zhao@freescale.com>
Acked-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv7/ls1021atwr: added deep sleep support in uboot
Tang Yuantian [Thu, 14 May 2015 09:20:28 +0000 (17:20 +0800)]
armv7/ls1021atwr: added deep sleep support in uboot

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Acked-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv7/lS1021atwr: Enable bootscript for secure boot
gaurav rana [Tue, 12 May 2015 06:55:01 +0000 (12:25 +0530)]
armv7/lS1021atwr: Enable bootscript for secure boot

Enable bootscript support in secure boot for establishing
chain of trust on LS1021atwr.

Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodriver/qe: use strncpy instead of strcpy
Zhao Qiang [Tue, 5 May 2015 07:53:33 +0000 (15:53 +0800)]
driver/qe: use strncpy instead of strcpy

strncpy is safer than strcpy, use it to instead of strcpy.

Signed-off-by: Zhao Qiang <B45475@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agodrivers/qe: transform parameter to compatible type
Zhao Qiang [Tue, 5 May 2015 07:53:32 +0000 (15:53 +0800)]
drivers/qe: transform parameter to compatible type

when using printf, the parameter type need to be compatible
type, so transform them to compatible type

Signed-off-by: Zhao Qiang <B45475@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoarmv7/ls1021a: Reserve secure code into RAM instead of OCRAM
Zhuoyu Zhang [Tue, 24 Mar 2015 09:27:37 +0000 (17:27 +0800)]
armv7/ls1021a: Reserve secure code into RAM instead of OCRAM

For ls1021a, Reserve secure code in to memory in case OCRAM
is needed by other usage.

Signed-off-by: Zhuoyu Zhang <Zhuoyu.Zhang@freescale.com>
Acked-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoPrepare v2015.10-rc1
Tom Rini [Mon, 3 Aug 2015 14:52:14 +0000 (10:52 -0400)]
Prepare v2015.10-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agofsl_esdhc.c: Always make check_and_invalidate_dcache_range available
Tom Rini [Sun, 2 Aug 2015 14:27:52 +0000 (10:27 -0400)]
fsl_esdhc.c: Always make check_and_invalidate_dcache_range available

This function is called from esdhc_send_cmd so we need it available to
everyone.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm: mx6: tqma6: fix build for WRU-IV baseboard
Stefano Babic [Sun, 26 Jul 2015 12:28:25 +0000 (14:28 +0200)]
arm: mx6: tqma6: fix build for WRU-IV baseboard

Fix:
 undefined reference to `spi_flash_free'
 undefined reference to `spi_flash_probe'

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Stefan Roese <sr@denx.de>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Acked-by: Stefan Roese <sr@denx.de>
8 years agoimx: mx6ul_14x14_evk add basic board support
Peng Fan [Mon, 20 Jul 2015 11:28:35 +0000 (19:28 +0800)]
imx: mx6ul_14x14_evk add basic board support

1. Add USDHC, I2C, UART, 74LV, USB, QSPI support.
2. Support SPL
3. CONFIG_MX6UL_14X14_EVK_EMMC_REWORK is introduced, this board default
   supports sd for usdhc2, but can do hardware rework to make usdhc2 support
   emmc.

Boot Log:
U-Boot SPL 2015.07-rc3-00124-g35d727b (Jul 20 2015 - 18:40:59)
reading u-boot.img
reading u-boot.img

U-Boot 2015.07-rc3-00124-g35d727b (Jul 20 2015 - 18:40:59 +0800)

CPU:   Freescale i.MX6UL rev1.0 792 MHz (running at 396 MHz)
CPU:   Commercial temperature grade (0C to 95C)CPU:   Thermal invalid data, fuse: 0x0
 - invalid sensor device
 Reset cause: POR
 Board: MX6UL 14x14 EVK
 I2C:   ready
 DRAM:  512 MiB
 MMC:   FSL_SDHC: 0, FSL_SDHC: 1
 *** Warning - bad CRC, using default environment

 In:    serial
 Out:   serial
 Err:   serial
 Net:   CPU Net Initialization Failed
 No ethernet found.
 Hit any key to stop autoboot:  0

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
8 years agoimx: imx6_spl add mx6ul support
Peng Fan [Mon, 20 Jul 2015 11:28:34 +0000 (19:28 +0800)]
imx: imx6_spl add mx6ul support

i.MX6UL's DRAM space starts from 0x80000000, same to i.MX6SX, so use
same address with i.MX6SX.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
8 years agoimx:mx6ul add dram spl configuration and header file
Peng Fan [Mon, 20 Jul 2015 11:28:33 +0000 (19:28 +0800)]
imx:mx6ul add dram spl configuration and header file

1. Define two structures mx6ul_iomux_ddr_regs and mx6ul_iomux_grp_regs.
2. Add a new function mx6ul_dram_iocfg to configure dram io.
3. Refactor MMDC1 macro, discard "#ifdef CONFIG_MX6SX". Since
   only mmdc0 channel exists on i.MX6SX/UL, redefine MMDC1 macro support
   runtime check, but not hardcoding #ifdef macros.
4. Introduce mx6ul-ddr.h, which includes the register address for DRAM
   IO configuration.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>