platform/kernel/u-boot.git
9 years agodebug_uart: Support board-specific UART initialisation
Simon Glass [Mon, 19 Oct 2015 01:51:24 +0000 (19:51 -0600)]
debug_uart: Support board-specific UART initialisation

Some boards need to set things up before the debug UART can be used. On
these boards a call to debug_uart_init() is insufficient. When this option
is enabled, the function board_debug_uart_init() will be called when
debug_uart_init() is called. You can put any code here that is needed to
set up the UART ready for use, such as set pin multiplexing or enable
clocks.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodebug_uart: Adjust the declaration of debug_uart_init()
Simon Glass [Mon, 19 Oct 2015 01:51:23 +0000 (19:51 -0600)]
debug_uart: Adjust the declaration of debug_uart_init()

We want to be able to add other common code to this function. So change the
driver's version to have an underscore before it, just like
_debug_uart_putc(). Define debug_uart_init() to call this version.

Update all drivers to this new method.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: spi: Add support for Wildcat Point
George McCollister [Mon, 12 Oct 2015 21:18:41 +0000 (16:18 -0500)]
x86: spi: Add support for Wildcat Point

Add the Wildcat Point ID so Broadwell U based boards can use SPI.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: pci: Add PCI IDs for Wildcat Point
George McCollister [Mon, 12 Oct 2015 21:18:40 +0000 (16:18 -0500)]
x86: pci: Add PCI IDs for Wildcat Point

Add Wildcat Point AHCI and LPC PCI IDs which are present on Broadwell U
based (and possibly other) boards.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Pass correct cpu_index to ap_init()
Bin Meng [Wed, 14 Oct 2015 09:01:21 +0000 (02:01 -0700)]
x86: Pass correct cpu_index to ap_init()

In sipi_vector.S, cpu_index (passed as %eax) is wrongly overwritten
by the ap_init() function address. Correct it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: galileo: Enable mrc cache
Bin Meng [Mon, 12 Oct 2015 08:30:43 +0000 (01:30 -0700)]
x86: galileo: Enable mrc cache

Now that we have added MRC cache on quark support codes,
enable it on Intel Galileo board.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: quark: Implement mrc cache
Bin Meng [Mon, 12 Oct 2015 08:30:42 +0000 (01:30 -0700)]
x86: quark: Implement mrc cache

Using existing mrccache library to implement mrc cache support
for Intel Quark.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Correct two typos for MRC
Bin Meng [Mon, 12 Oct 2015 04:37:47 +0000 (21:37 -0700)]
x86: ivybridge: Correct two typos for MRC

It should be MRC, not MCR.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Remove unused rw-mrc-cache properties in the link and panther dts files
Bin Meng [Mon, 12 Oct 2015 04:37:46 +0000 (21:37 -0700)]
x86: Remove unused rw-mrc-cache properties in the link and panther dts files

"type" and "wipe-value" are never used by the mrccache codes.
Remove them to avoid confusion. This also removes the alignment
comment in the panther dts file.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: baytrail: Issue full system reset in reset_cpu()
Bin Meng [Mon, 12 Oct 2015 04:37:45 +0000 (21:37 -0700)]
x86: baytrail: Issue full system reset in reset_cpu()

With MRC cache enabled, when typing 'reset' in the U-Boot shell,
BayTrail FSP initialization hangs at "Configuring Memory Start":

  Setting BootMode to 0
  Install PPI: 1F4C6F90-B06B-48D8-A201-BAE5F1CD7D56
  Register PPI Notify: F894643D-C449-42D1-8EA8-85BDD8C65BDE
  About to call MrcInit();
  BayleyBay Platform Type
  CurrentMrcData.BootMode = 4
  Taking Fastboot path!
  Configuring Memory Start...

Changing reset_cpu() to do a full system reset fixes this issue.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Enable mrc cache for bayleybay and minnowmax
Bin Meng [Mon, 12 Oct 2015 04:37:44 +0000 (21:37 -0700)]
x86: Enable mrc cache for bayleybay and minnowmax

Now that we have added MRC cache for Intel FSP and BayTrail codes,
enable it for all BayTrail boards (Bayley Bay and Minnow Max).

Note it turns out that FSP for Intel Atom E6xx does not produce
the HOB for NV storage, so we don't have such functionality on
Intel Crown Bay board.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: baytrail: Save mrc cache to spi flash
Bin Meng [Mon, 12 Oct 2015 04:37:43 +0000 (21:37 -0700)]
x86: baytrail: Save mrc cache to spi flash

Save MRC cache to SPI flash in arch_misc_init().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: fsp: Pass mrc cache to fsp_init() and save it to gd after fsp_init()
Bin Meng [Mon, 12 Oct 2015 04:37:42 +0000 (21:37 -0700)]
x86: fsp: Pass mrc cache to fsp_init() and save it to gd after fsp_init()

fsp_init() call has a parameter nvs_buf which is used by FSP as the
MRC cache but currently is blindly set to NULL. Retreive the MRC
cache from SPI flash and pass it to fsp_init() call. After the call,
save FSP produced MRC cache to SPI flash too.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Use struct mrc_region to describe a mrc region
Bin Meng [Mon, 12 Oct 2015 04:37:41 +0000 (21:37 -0700)]
x86: Use struct mrc_region to describe a mrc region

Currently struct fmap_entry is used to describe a mrc region.
However this structure contains some other fields that are not
related to mrc cache and causes confusion. Besides, it does not
include a base address field to store SPI flash's base address.
Instead in the mrccache.c it tries to use CONFIG_ROM_SIZE to
calculate the SPI flash base address, which unfortunately is
not 100% correct as CONFIG_ROM_SIZE may not match the whole
SPI flash size.

Define a new struct mrc_region and use it instead.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Use APIs provided in the mrccache lib
Bin Meng [Mon, 12 Oct 2015 04:37:40 +0000 (21:37 -0700)]
x86: ivybridge: Use APIs provided in the mrccache lib

Remove the call to custom mrc cache APIs, and use the ones
provided in the mrccache lib.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add more common routines to manipulate mrc cache
Bin Meng [Mon, 12 Oct 2015 04:37:39 +0000 (21:37 -0700)]
x86: Add more common routines to manipulate mrc cache

This adds mrccache_reserve(), mrccache_get_region() and
mrccache_save() APIs to the mrccache codes. They are ported
from the ivybridge implementation, but with some changes.
For example, in the mrccache_reserve(), ivybridge version
only reserves the pure MRC data, which causes additional
malloc() when saving the cache as the save API needs some
meta data. Now we change it to save the whole MRC date plus
the meta data to elinimate the need for the malloc() later.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add various minor tidy-ups in mrccache codes
Bin Meng [Mon, 12 Oct 2015 04:37:38 +0000 (21:37 -0700)]
x86: Add various minor tidy-ups in mrccache codes

Fix some nits, improve some comments and reorder some codes
a little bit.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Do sanity test on the cache record in mrccache_update()
Bin Meng [Mon, 12 Oct 2015 04:37:37 +0000 (21:37 -0700)]
x86: Do sanity test on the cache record in mrccache_update()

For the cache record to write in mrccache_update(), we should
perform a sanity test to see if it is a valid one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Move mrccache.[c|h] to a common place
Bin Meng [Mon, 12 Oct 2015 04:37:36 +0000 (21:37 -0700)]
x86: Move mrccache.[c|h] to a common place

mrccache implementation can be common for all boards. Move it
from ivybridge cpu directory to the common lib directory.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add ENABLE_MRC_CACHE Kconfig option
Bin Meng [Mon, 12 Oct 2015 04:37:35 +0000 (21:37 -0700)]
x86: Add ENABLE_MRC_CACHE Kconfig option

Create a Kconfig option for enabling MRC cache.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: fsp: Add a hdr sub-command to show header information
Bin Meng [Sat, 10 Oct 2015 08:47:59 +0000 (01:47 -0700)]
x86: fsp: Add a hdr sub-command to show header information

It would be helpful to have a command to show FSP header. So far
it only supports FSP header which conforms to FSP spec 1.0.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: fsp: Make hob command a sub-command to fsp
Bin Meng [Sat, 10 Oct 2015 08:47:58 +0000 (01:47 -0700)]
x86: fsp: Make hob command a sub-command to fsp

Introduce a new fsp command and make the existing hob command a
sub-command to fsp for future extension. Also move cmd_hob.c to
the dedicated fsp sub-directory in arch/x86/lib.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: fsp: Print GUID whenever applicable in the hob command output
Bin Meng [Sat, 10 Oct 2015 08:47:57 +0000 (01:47 -0700)]
x86: fsp: Print GUID whenever applicable in the hob command output

When examining a HOB, it's useful to see which GUID this HOB
belongs to. Add GUID output in the hob command to aid this.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: fsp: Compact the output of hob command
Bin Meng [Sat, 10 Oct 2015 08:47:56 +0000 (01:47 -0700)]
x86: fsp: Compact the output of hob command

Compact hob command output, especially by making hob type string a
little bit shorter so that we can leave room for future extension.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add SMBIOS table support
Bin Meng [Mon, 12 Oct 2015 12:23:41 +0000 (05:23 -0700)]
x86: Add SMBIOS table support

System Management BIOS (SMBIOS) is a specification for how
motherboard and system vendors present management information
about their products in a standard format by extending the BIOS
interface on Intel architecture systems. As of today the latest
spec is 3.0 and can be downloaded from DMTF website. This commit
adds a simple and minimum required implementation.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoMakefile: Generate U_BOOT_DMI_DATE for SMBIOS
Bin Meng [Mon, 12 Oct 2015 12:23:40 +0000 (05:23 -0700)]
Makefile: Generate U_BOOT_DMI_DATE for SMBIOS

Add U_BOOT_DMI_DATE (format mm/dd/yyyy) generation to be used by
SMBIOS tables, as required by SMBIOS spec 3.0 [1]. See chapter 7.1,
BIOS information structure offset 08h for details.

[1] http://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.0.0.pdf

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodoc: Complement document about booting VxWorks
Bin Meng [Thu, 8 Oct 2015 03:19:20 +0000 (20:19 -0700)]
doc: Complement document about booting VxWorks

Current document about how to boot VxWorks is limited.
Add several chapters in README.vxworks to document this.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agocmd: bootvx: Add asmlinkage to the VxWorks x86 entry
Bin Meng [Thu, 8 Oct 2015 03:19:19 +0000 (20:19 -0700)]
cmd: bootvx: Add asmlinkage to the VxWorks x86 entry

VxWorks on x86 uses stack to pass parameters.

Reported-by: Jian Luo <jian.luo4@boschrexroth.de>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agocmd: bootvx: Pass E820 information to an x86 VxWorks kernel
Bin Meng [Thu, 8 Oct 2015 03:19:18 +0000 (20:19 -0700)]
cmd: bootvx: Pass E820 information to an x86 VxWorks kernel

E820 is critical to the kernel as it provides system memory map
information. Pass it to an x86 VxWorks kernel.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
9 years agocmd: bootvx: Always get VxWorks bootline from env
Bin Meng [Thu, 8 Oct 2015 03:19:17 +0000 (20:19 -0700)]
cmd: bootvx: Always get VxWorks bootline from env

So far VxWorks bootline can be contructed from various environment
variables, but when these variables do not exist we get these from
corresponding config macros. This is not helpful as it requires
rebuilding U-Boot, and to make sure these config macros take effect
we should not have these environment variables. This is a little
bit complex and confusing.

Now we change the logic to always contruct the bootline from
environments (the only single source), by adding two new variables
"bootdev" and "othbootargs", and adding some comments about network
related settings mentioning they are optional. The doc about the
bootline handling is also updated.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
9 years agocmd: bootvx: Pass netmask and gatewayip to VxWorks bootline
Bin Meng [Thu, 8 Oct 2015 03:19:16 +0000 (20:19 -0700)]
cmd: bootvx: Pass netmask and gatewayip to VxWorks bootline

There are fields in VxWorks bootline for netmask and gatewayip.
We can get these from U-Boot environment variables and pass them
to VxWorks, just like ipaddr and serverip.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agocmd: bootvx: Avoid strlen() calls when constructing VxWorks bootline
Bin Meng [Thu, 8 Oct 2015 03:19:15 +0000 (20:19 -0700)]
cmd: bootvx: Avoid strlen() calls when constructing VxWorks bootline

Remember the position in the VxWorks bootline buffer to avoid the call
to strlen() each time.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agocmd: elf: Reorder load_elf_image_phdr() and load_elf_image_shdr()
Bin Meng [Thu, 8 Oct 2015 03:19:14 +0000 (20:19 -0700)]
cmd: elf: Reorder load_elf_image_phdr() and load_elf_image_shdr()

Move load_elf_image_phdr() and load_elf_image_shdr() to the beginning
of the cmd_elf.c so that forward declaration is not needed.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agocmd: Clean up cmd_elf a little bit
Bin Meng [Thu, 8 Oct 2015 03:19:13 +0000 (20:19 -0700)]
cmd: Clean up cmd_elf a little bit

This commit cleans up cmd_elf.c per U-Boot coding convention,
and removes the unnecessary DECLARE_GLOBAL_DATA_PTR and out-of-date
powerpc comments (it actually supports not only powerpc targets).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agocmd: Convert CONFIG_CMD_ELF to Kconfig
Bin Meng [Thu, 8 Oct 2015 03:19:12 +0000 (20:19 -0700)]
cmd: Convert CONFIG_CMD_ELF to Kconfig

Convert CONFIG_CMD_ELF to Kconfig and tidy up affected boards.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Remove quotation mark in CONFIG_HOSTNAME
Bin Meng [Thu, 8 Oct 2015 03:19:11 +0000 (20:19 -0700)]
x86: Remove quotation mark in CONFIG_HOSTNAME

CONFIG_HOSTNAME is an environment varible, so that quotation mark
is not needed.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Move install_e820_map() out of zimage.c
Bin Meng [Thu, 8 Oct 2015 03:19:10 +0000 (20:19 -0700)]
x86: Move install_e820_map() out of zimage.c

install_e820_map() has nothing to do with zimage related codes.
Move it to a dedicated place.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Initialize GDT entry 1 to be the 32-bit CS as well
Bin Meng [Thu, 8 Oct 2015 03:19:09 +0000 (20:19 -0700)]
x86: Initialize GDT entry 1 to be the 32-bit CS as well

Some OS (like VxWorks) requires GDT entry 1 to be the 32-bit CS.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
9 years agox86: Allow disabling IGD on Intel Queensbay
Bin Meng [Thu, 1 Oct 2015 07:36:04 +0000 (00:36 -0700)]
x86: Allow disabling IGD on Intel Queensbay

Add a Kconfig option to disable the Integrated Graphics Device (IGD)
so that it does not show in the PCI configuration space as a VGA
disaplay controller. This gives a chance for U-Boot to run PCI/PCIe
based graphics card's VGA BIOS and use that for the graphics console.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Remove the dead codes that programs pci bridge
Bin Meng [Thu, 1 Oct 2015 07:36:03 +0000 (00:36 -0700)]
x86: ivybridge: Remove the dead codes that programs pci bridge

Remove bd82x6x_pci_bus_enable_resources() that is not called anywhere.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: pci: Enable VGA address forwarding on bridges
Bin Meng [Thu, 1 Oct 2015 07:36:02 +0000 (00:36 -0700)]
dm: pci: Enable VGA address forwarding on bridges

To support graphics card behind a PCI bridge, the bridge control
register (offset 0x3e) in the configuration space must turn on
VGA address forwarding.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: pci: Fix pci_last_busno() to return the real last bus no
Bin Meng [Thu, 1 Oct 2015 07:36:01 +0000 (00:36 -0700)]
dm: pci: Fix pci_last_busno() to return the real last bus no

Currently pci_last_busno() only checks the last bridge device
under the first UCLASS_PCI device. This is not the case when
there are multiple bridge devices.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agovideo: vesa_fb: Fix wrong return value check of pci_find_class()
Bin Meng [Thu, 1 Oct 2015 07:36:00 +0000 (00:36 -0700)]
video: vesa_fb: Fix wrong return value check of pci_find_class()

When pci_find_class() fails to find a device, it returns -ENODEV.
But now we check the return value against -1. Fix it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
9 years agopci: Set PCI_COMMAND_IO bit for VGA device
Bin Meng [Thu, 1 Oct 2015 07:35:59 +0000 (00:35 -0700)]
pci: Set PCI_COMMAND_IO bit for VGA device

PCI_COMMAND_IO bit must be set for VGA device as it needs to respond
to legacy VGA IO address.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: pci: Adjust pci_find_and_bind_driver() to return -EPERM
Simon Glass [Tue, 8 Sep 2015 23:52:49 +0000 (17:52 -0600)]
dm: pci: Adjust pci_find_and_bind_driver() to return -EPERM

The current code returns 0 even if it failed to find or bind a driver. The
caller then has to check the returned device to see if it is NULL. It is
better to return an error code in this case so that it is clear what
happened.

Adjust the code to return -EPERM, indicating that the device was not bound
because it is not needed for pre-relocation use. Add comments so that the
return value is clear.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: pci: Correct a few debug() statements
Simon Glass [Tue, 8 Sep 2015 23:52:48 +0000 (17:52 -0600)]
dm: pci: Correct a few debug() statements

One debug() statement is missing a newline. The other has a repeated word.
Fix these.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: pci: Tidy up auto-config error handling
Simon Glass [Tue, 8 Sep 2015 23:52:47 +0000 (17:52 -0600)]
dm: pci: Tidy up auto-config error handling

When the auto-configuration process fails for a device (generally due to
lack of memory) we should return the error correctly so that we don't
continue to try memory allocations which will fail.

Adjust the code to check for errors and abort if something goes wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agomalloc_simple: Add debug() information
Simon Glass [Tue, 8 Sep 2015 23:52:46 +0000 (17:52 -0600)]
malloc_simple: Add debug() information

It's useful to get a a trace of memory allocations in early init. Add a
debug() call to provide that. It can be enabled by adding '#define DEBUG'
to the top of the file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agoPrepare v2015.10 v2015.10
Tom Rini [Mon, 19 Oct 2015 22:46:28 +0000 (18:46 -0400)]
Prepare v2015.10

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agopowerpc: Drop old non-generic-board code
Simon Glass [Sat, 17 Oct 2015 18:58:50 +0000 (12:58 -0600)]
powerpc: Drop old non-generic-board code

This code is no-longer used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agosbc8641d: enable and test CONFIG_SYS_GENERIC_BOARD
Paul Gortmaker [Sat, 17 Oct 2015 20:40:30 +0000 (16:40 -0400)]
sbc8641d: enable and test CONFIG_SYS_GENERIC_BOARD

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agosbc8641d: increase monitor size from 256k to 384k
Paul Gortmaker [Sat, 17 Oct 2015 20:40:31 +0000 (16:40 -0400)]
sbc8641d: increase monitor size from 256k to 384k

Between v2015.07-rc1 and v2015.07-rc2 this board started
silent boot failure.  A bisect led to commit 6eed3786c68c8a49d
("net: Move the CMD_NET config to defconfigs").  This commit
looks harmless in itself, but it did implicitly add a feature
to the image which led to this:

 u-boot$git describe 6eed3786c68c8a49d
 v2015.07-rc1-412-g6eed3786c68c
              ^^^

 u-boot$ls -l ../41*/u-boot.bin
 -rwxrwxr-x 1 paul paul 261476 Oct 16 16:47 ../411/u-boot.bin
 -rwxrwxr-x 1 paul paul 266392 Oct 16 16:43 ../412/u-boot.bin
 u-boot$bc
 bc 1.06.95
 Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
 This is free software with ABSOLUTELY NO WARRANTY.
 For details type `warranty'.
 256*1024
 262144

i.e. we finally broke through the 256k monitor size.  Jump it
up to 384k and fix the hard coded value used in the env offset
at the same time.

We were probably flirting with the 256k size issue without
knowing it when testing on different baselines in earlier
commits, but since this is all board specific, a rebase or
reorder to put this commit 1st is of little value.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agosbc8641d: add basic flash setup instructions to README file
Paul Gortmaker [Sat, 17 Oct 2015 20:40:29 +0000 (16:40 -0400)]
sbc8641d: add basic flash setup instructions to README file

...so that I don't have to go work them out from scratch again
by peering at the manual.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agosbc8641d: set proper environment sector size.
Paul Gortmaker [Sat, 17 Oct 2015 20:40:28 +0000 (16:40 -0400)]
sbc8641d: set proper environment sector size.

When debugging an env fail due to too small a malloc pool, it
was noted that the env write was 256k.  But the device sector
size is 1/2 that, as can be seen from "fli" output:

Bank # 1: CFI conformant flash (16 x 16)  Size: 16 MB in 131 Sectors
  Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x1888
  Erase timeout: 4096 ms, write timeout: 1 ms
  Buffer write timeout: 2 ms, buffer size: 64 bytes

  Sector Start Addresses:
  FF000000 E RO   FF020000 E RO   FF040000 E RO   FF060000 E RO   FF080000 E RO
  FF0A0000 E RO   FF0C0000 E RO   FF0E0000 E RO   FF100000 E RO   FF120000 E RO
  [...]
  FFF00000   RO   FFF20000   RO   FFF40000   RO   FFF60000   RO   FFF80000   RO
  FFFA0000   RO   FFFC0000   RO   FFFE0000 E RO   FFFE8000   RO   FFFF0000 E RO
  FFFF8000   RO
=>

The desired env sector is FFF40000->FFF60000, or 0x20000 in length,
just after the 256k u-boot image which starts @ FFF00000.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agosbc8641d: increase malloc pool size to a sane default
Paul Gortmaker [Sat, 17 Oct 2015 20:40:27 +0000 (16:40 -0400)]
sbc8641d: increase malloc pool size to a sane default

Currently the board fails to save its env, since the env size
is much smaller than the sector size, and the malloc fails for
the pad buffer, giving the user visible symptom of:

Unable to save the rest of sector (253952)

Allow for 1M malloc pool, the same as used on the sbc8548 board.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agosbc8641d: enable command line editing
Paul Gortmaker [Sat, 17 Oct 2015 20:40:26 +0000 (16:40 -0400)]
sbc8641d: enable command line editing

It is just too painful to use interactively without it.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
9 years agoimage-fit: Fix signature checking
Andrej Rosano [Wed, 14 Oct 2015 15:45:40 +0000 (17:45 +0200)]
image-fit: Fix signature checking

On signature verification failures fit_image_verify() should
exit with error.

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
9 years agoigep00x0: Use BCH8 ECC
Ladislav Michl [Mon, 12 Oct 2015 16:09:14 +0000 (18:09 +0200)]
igep00x0: Use BCH8 ECC

Used NAND chips requires at least 4-bit error correction, so use BCH8
as it is what kernel uses.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Javier Martinez Canillas <javier@osg.samsung.com>
9 years agovexpress64: Juno: Add initialisation code for Juno R1 PCIe host bridge.
Liviu Dudau [Mon, 19 Oct 2015 10:08:32 +0000 (11:08 +0100)]
vexpress64: Juno: Add initialisation code for Juno R1 PCIe host bridge.

Juno R1 has an XpressRICH3 PCIe host bridge that needs to be initialised
in order for the Linux kernel to be able to enumerate the bus. Add
support code here that enables the host bridge, trains the links and
sets up the Address Translation Tables.

Signed-off-by: Liviu Dudau <Liviu.Dudau@foss.arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
[trini: Always declare vexpress64_pcie_init and continue handling logic
inside the function]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agovexpress64: Juno: Declare all 8GB of RAM and make them visible to the kernel.
Liviu Dudau [Mon, 19 Oct 2015 10:08:31 +0000 (11:08 +0100)]
vexpress64: Juno: Declare all 8GB of RAM and make them visible to the kernel.

Juno comes with 8GB RAM, but U-Boot only passes 2GB to the kernel.
Declare a secondary memory bank and set the sizes correctly.

Signed-off-by: Liviu Dudau <Liviu.Dudau@foss.arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
9 years agodfu: dfu_sf: Take the start address into account
Fabio Estevam [Wed, 23 Sep 2015 03:50:39 +0000 (00:50 -0300)]
dfu: dfu_sf: Take the start address into account

The dfu_alt_info_spl variable allows passing a starting point
for the binary to be flashed in the SPI NOR.

For example, if we have 'dfu_alt_info_spl=spl raw 0x400', this means
that we want to flash the binary starting at address 0x400.

In order to do so we need to erase the entire sector and write to
the the subsequent SPI NOR sectors taking such start address
into account for the address calculations.

Tested by succesfully writing SPL binary into 0x400 offset and
the u-boot.img at offset 64 kiB of a SPL NOR.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
[trini: Use lldiv for the math]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agodfu: dfu_sf: Use the erase sector size for erase operations
Fabio Estevam [Tue, 22 Sep 2015 03:55:00 +0000 (00:55 -0300)]
dfu: dfu_sf: Use the erase sector size for erase operations

SPI NOR flashes need to erase the entire sector size and we cannot pass
any arbitrary length for the erase operation.

To illustrate the problem:

Copying data from PC to DFU device
Download    [=========================] 100%       478208 bytes
Download done.
state(7) = dfuMANIFEST, status(0) = No error condition is present
state(10) = dfuERROR, status(14) = Something went wrong, but the
device does not know what it was
Done!

In this case, the binary has 478208 bytes and the M25P32 SPI NOR
has an erase sector of 64kB.

478208  = 7 entire sectors of 64kiB + 19456 bytes.

Erasing the first seven 64 kB sectors works fine, but when trying
to erase the remainding 19456 causes problem and the board hangs.

Fix the issue by always erasing with the erase sector size.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agodoc/README.scrapyard: Add more entries
Tom Rini [Mon, 19 Oct 2015 17:32:09 +0000 (13:32 -0400)]
doc/README.scrapyard: Add more entries

- Add deletions from August 30 2015.
- A few from Sept 12, one from Oct 2nd.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoRevert "arm: Remove inetspace_v2_cmc board"
Tom Rini [Mon, 19 Oct 2015 16:24:52 +0000 (12:24 -0400)]
Revert "arm: Remove inetspace_v2_cmc board"

Upon further review when populating README.scrapyard, inetspace_v2_cmc
is a variant on netspace_v2 and not just an orphan config.

This reverts commit 653600a715db49859c06ba5dfb858c15c4108d54.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Mon, 19 Oct 2015 15:30:38 +0000 (11:30 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoRevert "arm: Remove d2net_v2 defconfig file"
Tom Rini [Mon, 19 Oct 2015 15:20:54 +0000 (11:20 -0400)]
Revert "arm: Remove d2net_v2 defconfig file"

Upon further review when populating README.scrapyard, d2net_v2 is a
variant on net2big_v2 and not just an orphan config.  To help in the
future also add this to board/LaCie/net2big_v2/MAINTAINERS which needed
a little consolidation anyhow.

This reverts commit 1363740e7948a8e4bee8d5adcdf0f63f7782879d.

Cc: Simon Guinot <simon.guinot@sequanux.org>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agodoc/README.scrapyard: Populate recent removals
Tom Rini [Mon, 19 Oct 2015 15:05:47 +0000 (11:05 -0400)]
doc/README.scrapyard: Populate recent removals

Add in the commit IDs / dates for boards removed on Sept 2nd.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoARM: rpi: add another revision of Raspberry Pi A+
Lubomir Rintel [Wed, 14 Oct 2015 15:17:54 +0000 (17:17 +0200)]
ARM: rpi: add another revision of Raspberry Pi A+

Seen this one in the wild. Is labelled "Raspberry Pi Model A+ V1.1,
(C) Raspberry Pi 2014". A standard A+ board, much like the one with
version 0x12, didn't notice any differencies.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
9 years agoARM: dockstar: move start of environment area
Eric Cooper [Mon, 12 Oct 2015 23:18:52 +0000 (19:18 -0400)]
ARM: dockstar: move start of environment area

The default dockstar configuration for U-Boot currently causes it to
overrun the environment area, so that a "saveenv" command bricks the
device.  This patch moves the environment to a higher address to avoid
that.

Signed-off-by: Eric Cooper <ecc@cmu.edu>
9 years agoARM: k2e/l: Apply WA for selecting PA clock source
Lokesh Vutla [Thu, 8 Oct 2015 06:01:47 +0000 (11:31 +0530)]
ARM: k2e/l: Apply WA for selecting PA clock source

On keystone2 Lamarr and Edison platforms, the PA clocksource
mux in PLL REG1, can be changed only after enabling its clock
domain.
So selecting the output of PASS PLL as input to PA only after
enabling the clockdomain.
This is as per the debug done by "Vitaly Andrianov <vitalya@ti.com>"
and based on the previous work done by "Hao Zhang <hzhang@ti.com>"

Fixes: d634a0775bcf ("ARM: keystone2: Cleanup PLL init code")
Reported-by: Vitaly Andrianov <vitalya@ti.com>
Tested-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoarch/powerpc/config.mk: Pass -fno-ira-hoist-pressure when possible
Tom Rini [Sat, 17 Oct 2015 12:04:11 +0000 (08:04 -0400)]
arch/powerpc/config.mk: Pass -fno-ira-hoist-pressure when possible

There are various toolchain issues that cause us to produce invalid
binaries with certain gcc 4.8.x and 4.9.x versions when we don't pass
this flag in.

Tested-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoMerge git://git.denx.de/u-boot-socfpga
Tom Rini [Sat, 17 Oct 2015 00:21:04 +0000 (20:21 -0400)]
Merge git://git.denx.de/u-boot-socfpga

9 years agoarm: dts: socfpga: add "u-boot,dm-pre-reloc" to socfpga_cyclone5_socdk dts
Dinh Nguyen [Mon, 12 Oct 2015 16:59:04 +0000 (11:59 -0500)]
arm: dts: socfpga: add "u-boot,dm-pre-reloc" to socfpga_cyclone5_socdk dts

We need "u-boot,dm-pre-reloc" in the socfpga_cyclone5_socdk.dts file in
order for the SPL to use SD/MMC.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
9 years agoarm: socfpga: enable data/inst prefetch and shared override in the L2
Dinh Nguyen [Thu, 15 Oct 2015 15:13:36 +0000 (10:13 -0500)]
arm: socfpga: enable data/inst prefetch and shared override in the L2

Update the L2 AUX CTRL settings for the SoCFPGA.

Enabling D and I prefetch bits helps improve SDRAM performance on the
platform.

Also, we need to enable bit 22 of the L2. By not having bit 22 set in the
PL310 Auxiliary Control register (shared attribute override enable) has the
side effect of transforming Normal Shared Non-cacheable reads into Cacheable
no-allocate reads.

Coherent DMA buffers in Linux always have a Cacheable alias via the
kernel linear mapping and the processor can speculatively load cache
lines into the PL310 controller. With bit 22 cleared, Non-cacheable
reads would unexpectedly hit such cache lines leading to buffer
corruption.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
9 years agovf610twr: Fix typo in DRAM init
Anthony Felice [Fri, 9 Oct 2015 20:38:39 +0000 (16:38 -0400)]
vf610twr: Fix typo in DRAM init

This commit fixes a typo in vf610twr DRAM init that was causing a hang in
U-Boot for the Vybrid Tower. This typo was introduced in commit 3f353cecc
(vf610: refactor DDRMC code).

Signed-off-by: Anthony Felice <tony.felice@timesys.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-samsung
Tom Rini [Fri, 16 Oct 2015 11:19:47 +0000 (07:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-samsung

9 years agoarm: mmu: Add missing volatile for reading SCTLR register
Alison Wang [Wed, 9 Sep 2015 02:22:02 +0000 (10:22 +0800)]
arm: mmu: Add missing volatile for reading SCTLR register

Add 'volatile' qualifier to the asm statement in get_cr()
so that the statement is not optimized out by the compiler.

(http://comments.gmane.org/gmane.linux.linaro.toolchain/5163)

Without the 'volatile', get_cr() returns a wrong value which
prevents enabling the MMU  and later causes a PCIE VA access
failure.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Thu, 15 Oct 2015 21:45:39 +0000 (17:45 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agopci: pcie_imx: Fix hang on mx6qp
Fabio Estevam [Tue, 13 Oct 2015 14:01:27 +0000 (11:01 -0300)]
pci: pcie_imx: Fix hang on mx6qp

PCI driver currently hangs on mx6qp.

Toggle the reset bit with the appropriate timings to fix the issue.

Based on the FSL kernel driver implementation.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
9 years agoarmv8/gic: Fix GIC v2 initialization
Thierry Reding [Thu, 20 Aug 2015 09:52:15 +0000 (11:52 +0200)]
armv8/gic: Fix GIC v2 initialization

Initialize all GICD_IGROUPRn registers and set up GICC_CTLR to enable
interrupts to the primary CPU. This fixes issues seen after booting a
Linux kernel from U-Boot.

Suggested-by: Marc Zyngier <marc.zyngier@arm.com>
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoarmv8/mmu: Set bits marked RES1 in TCR
Thierry Reding [Thu, 20 Aug 2015 09:52:14 +0000 (11:52 +0200)]
armv8/mmu: Set bits marked RES1 in TCR

For EL3 and EL2, the documentation says that bits 31 and 23 are reserved
but should be written as 1.

For EL1, only bit 23 is not reserved, so only write bit 31 as 1.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Thu, 15 Oct 2015 12:43:38 +0000 (08:43 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

9 years agoARM: uniphier: fix address mapping in README.uniphier
Masahiro Yamada [Wed, 30 Sep 2015 12:15:58 +0000 (21:15 +0900)]
ARM: uniphier: fix address mapping in README.uniphier

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoarmv8/mmu: Clean up TCR programming
Thierry Reding [Thu, 20 Aug 2015 09:52:13 +0000 (11:52 +0200)]
armv8/mmu: Clean up TCR programming

Use the inner shareable attribute for memory, which makes more sense
considering that this code is called when caches are being enabled.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoarm: vf610twr: improve memory layout
Stefan Agner [Wed, 14 Oct 2015 17:58:43 +0000 (10:58 -0700)]
arm: vf610twr: improve memory layout

Currently, the device tree relocation is disabled, likely to
keep some DDR3 RAM at the end for Cortex-M4 firmwares. This
can be archived using bootm_size, which limits the image
processing range of the boot commands.

Move the device tree standard load address to a higher address
which aligns better with what we are doing on other boards.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agocolibri_vf: Fix bstlen field
Fabio Estevam [Wed, 14 Oct 2015 02:54:32 +0000 (23:54 -0300)]
colibri_vf: Fix bstlen field

Commit 3f353cecc ("vf610: refactor DDRMC code") changed the original
bstlen field from 3 to 0.

Restore the original value for proper behaviour.

Based on the patch from Anthony Felice <tony.felice@timesys.com>
for the vf610twr board.

Reported-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agomtd: nand: vf610_nfc: resync with upstream Linux version
Stefan Agner [Wed, 14 Oct 2015 05:11:42 +0000 (22:11 -0700)]
mtd: nand: vf610_nfc: resync with upstream Linux version

This resyncs the driver changes with the Linux version of the
driver. The driver received some feedback in the LKML and got
recently acceppted, the latest version can be found here:
https://lkml.org/lkml/2015/9/2/678

Notable changes are:
- On ECC error, reread OOB and count bit flips in OOB too.
  If flipped bits are below threshold, also return an empty
  OOB buffer.
- Return the amount of bit flips in vf610_nfc_read_page.
- Use endianness aware vf610_nfc_read to read ECC status.
- Do not enable IDLE IRQ (since we do not operate with an
  interrupt service routine).
- Use type safe struct for buffer variants (vf610_nfc_alt_buf).
- Renamed variables in struct vf610_nfc (column and page_sz)
  to reflect better what they really representing.

The U-Boot version currently does not support RAW NAND write
when using the HW ECC engine.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Tested-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
Tested-by: Stefan Agner <stefan@agner.ch>
Acked-by: Scott Wood <scottwood@freescale.com>
9 years agoMerge remote-tracking branch 'u-boot/master'
Albert ARIBAUD [Wed, 14 Oct 2015 08:46:36 +0000 (10:46 +0200)]
Merge remote-tracking branch 'u-boot/master'

9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Tue, 13 Oct 2015 12:37:38 +0000 (08:37 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

9 years agoexynos: more debug and cleanup in do_sdhci_init()
Tobias Jakobi [Mon, 5 Oct 2015 11:47:53 +0000 (13:47 +0200)]
exynos: more debug and cleanup in do_sdhci_init()

Add more debug printfs in do_sdhci_init() for calls
that can potentially fail.

Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoexynos: be more verbose in process_nodes()
Tobias Jakobi [Mon, 5 Oct 2015 11:47:52 +0000 (13:47 +0200)]
exynos: be more verbose in process_nodes()

In case sdhci_get_config() or do_sdhci_init() fail, show
the error code that was returned.

Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoexynos: Fix passing of errors in exynos_mmc_init()
Tobias Jakobi [Mon, 5 Oct 2015 11:47:51 +0000 (13:47 +0200)]
exynos: Fix passing of errors in exynos_mmc_init()

exynos_mmc_init() always returns zero, so for the caller
it looks like it never fails.

Correct this by returning the error code of process_nodes().
For process_nodes() do something similar and return early
when do_sdhci_init() fails.

v2: Only fail in process_nodes() if we fail on all
    available nodes.

Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoexynos: Properly zero initialize host in s5p_sdhci_init()
Tobias Jakobi [Mon, 5 Oct 2015 11:47:50 +0000 (13:47 +0200)]
exynos: Properly zero initialize host in s5p_sdhci_init()

This makes sure that setting the host_caps in s5p_sdhci_core_init()
doesn't operate on potentially uninitialized memory.

Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoodroid: Add boot script (boot.scr) support
Guillaume GARDET [Fri, 9 Oct 2015 12:26:23 +0000 (14:26 +0200)]
odroid: Add boot script (boot.scr) support

Add boot script (boot.scr) support. If no boot script are
found, it boots as usual.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Tested-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoodroid: replace 'fatload' with 'load' to be able to use EXT* partitions
Guillaume GARDET [Fri, 9 Oct 2015 12:26:22 +0000 (14:26 +0200)]
odroid: replace 'fatload' with 'load' to be able to use EXT* partitions

Replace 'fatload' command by 'load', to be able to use EXT*
partitions while keeping FAT partition compatibility.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Tested-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agols102xa: Fix reset hang
Fabio Estevam [Sat, 3 Oct 2015 17:21:00 +0000 (14:21 -0300)]
ls102xa: Fix reset hang

Since commit 623d96e89aca6("imx: wdog: correct wcr register settings")
issuing a 'reset' command causes the system to hang.

Unlike i.MX and Vybrid, the watchdog controller on LS102x is big-endian.

This means that the watchdog on LS1021 has been working by accident as
it does not use the big-endian accessors in drivers/watchdog/imx_watchdog.c.
Commit 623d96e89aca6("imx: wdog: correct wcr register settings") only
revelead the endianness problem on LS102x.

In order to fix the reset hang, introduce a reset_cpu() implementation that
is specific for ls102x, which accesses the watchdog WCR register in big-endian
format. All that is required to reset LS102x is to clear the SRS bit.

This approach is a temporary workaround to avoid a regression for LS102x
in the 2015.10 release. The proper fix is to make the watchdog driver
endian-aware, so that it can work for i.MX, Vybrid and LS102x.

Reported-by: Sinan Akman <sinan@writeme.com>
Tested-by: Sinan Akman <sinan@writeme.com>
Reviewed-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoimx_watchdog: Add a header file for watchdog registers
Fabio Estevam [Sat, 3 Oct 2015 17:20:59 +0000 (14:20 -0300)]
imx_watchdog: Add a header file for watchdog registers

Create fsl_wdog.h to store the watchdog registers and bit fields.

This can be useful when accesses to the watchdog block are made from other
parts, such as arch/arm/ cpu code.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoPrepare v2015.10-rc5 v2015.10-rc5
Tom Rini [Mon, 12 Oct 2015 15:14:27 +0000 (11:14 -0400)]
Prepare v2015.10-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoenv_eeprom.c: Correct using saved environment
Ludger Dreier [Mon, 12 Oct 2015 11:34:24 +0000 (13:34 +0200)]
env_eeprom.c: Correct using saved environment

The changes in ed6a5d4 unintentionally broke support for reading the
environment saved to eeprom back.  To correct this the crc-check and
decision on which environment to use is now moved to env_relocate_spec.
This is done for both the "redundant env" and the "single env" case.

Signed-off-by: Ludger Dreier <ludger.dreier@keymile.com>
9 years agopcm052: fix MTD partitioning
Albert ARIBAUD (3ADEV) [Sun, 11 Oct 2015 18:06:39 +0000 (20:06 +0200)]
pcm052: fix MTD partitioning

MTD partitioning in current pcm052 configuration is inconsistent.
Fix it across MTDPARTS_DEFAULT, CONFIG_EXTRA_ENV_SETTINGS, and
CONFIG_ENV_OFFSET[_REDUND].

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>