oweals/u-boot.git
8 years agox86: Change to use start/end address pair in write_tables()
Bin Meng [Sun, 28 Feb 2016 06:57:58 +0000 (22:57 -0800)]
x86: Change to use start/end address pair in write_tables()

Add a new variable rom_table_start and pass it to ROM table write
routines. This reads better than previous single rom_table_end.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Clean up coreboot_tables.h
Bin Meng [Sun, 28 Feb 2016 06:57:57 +0000 (22:57 -0800)]
x86: Clean up coreboot_tables.h

Clean up this file a little bit:
- Remove inclusion of <linux/compiler.h>
- Use tab in the macro definition

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Move sysinfo related to sysinfo.h
Bin Meng [Sun, 28 Feb 2016 06:57:56 +0000 (22:57 -0800)]
x86: Move sysinfo related to sysinfo.h

coreboot_tables.h should not include sysinfo related stuff.
Move those to asm/arch-coreboot/sysinfo.h.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Move asm/arch-coreboot/tables.h to a common place
Bin Meng [Sun, 28 Feb 2016 06:57:55 +0000 (22:57 -0800)]
x86: Move asm/arch-coreboot/tables.h to a common place

Move asm/arch-coreboot/tables.h to asm/coreboot_tables.h so that
coreboot table definitions can be used by other x86 builds.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agospl: arm: Make sure to include all of the u_boot_list entries
Tom Rini [Tue, 15 Mar 2016 21:56:29 +0000 (17:56 -0400)]
spl: arm: Make sure to include all of the u_boot_list entries

Starting with 96e5b03 we use a linker list for partition table
information.  However since we use this in SPL we need to make sure that
the SPL linker scripts include these as well.  While doing this, it's
best to simply include all linker lists to future proof ourselves.

Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reported-by: Nishanth Menon <nm@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agomvebu: ds414: Move cmd_syno into ds414 directory
Tom Rini [Wed, 16 Mar 2016 19:25:46 +0000 (15:25 -0400)]
mvebu: ds414: Move cmd_syno into ds414 directory

When we switch to including all linker lists in SPL it is important to
not include commands as that may lead to link errors due to other things
we have already discarded.  In this case as we don't have other common
code nor other Synology borads, move the cmd_syno.c file (which claims
to be ds414 specific anyways!) into the ds414 directory and only build
it for non-SPL builds.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm: omap-common: Guard some parts of the code with CONFIG_OMAP44XX/OMAP54XX
Tom Rini [Wed, 16 Mar 2016 14:38:21 +0000 (10:38 -0400)]
arm: omap-common: Guard some parts of the code with CONFIG_OMAP44XX/OMAP54XX

On OMAP4 platforms that also need to calculate their DDR settings we are
now getting very close to the linker limit size.  Since OMAP44XX is only
seen with LPDDR2, remove some run time tests for LPDDR2 or DDR3 as we
will know that we don't have it for OMAP44XX.

Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agolpc32xx: work_92105: Rework Makefile
Tom Rini [Wed, 16 Mar 2016 13:56:55 +0000 (09:56 -0400)]
lpc32xx: work_92105: Rework Makefile

When we switch to including all linker lists in SPL it is important
to not include commands as that may lead to link errors due to other
things we have already discarded.  In this case change things so that we
only build the right objects for SPL or non-SPL

Cc: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agocmd: scsi: Group the command portion together, guard with !CONFIG_SPL_BUILD
Tom Rini [Wed, 16 Mar 2016 13:45:03 +0000 (09:45 -0400)]
cmd: scsi: Group the command portion together, guard with !CONFIG_SPL_BUILD

When we switch to including all linker lists in SPL it is important
to not include commands as that may lead to link errors due to other
things we have already discarded.  In this case, the SCSI code needs a lot
of attention so for now just guard the command portions.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: Only link cmd_ddr3.o on non-SPL builds
Tom Rini [Wed, 16 Mar 2016 13:24:00 +0000 (09:24 -0400)]
ARM: keystone2: Only link cmd_ddr3.o on non-SPL builds

When we switch to including all linker lists in SPL it is important
to not include commands as that may lead to link errors due to other
things we have already discarded.  In this case simply move cmd_ddr3.o
over to the list with the rest.

Cc: Vitaly Andrianov <vitalya@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: Switch to using the poweroff command
Tom Rini [Wed, 16 Mar 2016 13:19:43 +0000 (09:19 -0400)]
ARM: keystone2: Switch to using the poweroff command

Now that we have a standard way to power off the hardware, switch to
using that rather than our own command.

Cc: Vitaly Andrianov <vitalya@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: Split monitor code / command code
Tom Rini [Wed, 16 Mar 2016 13:10:08 +0000 (09:10 -0400)]
ARM: keystone2: Split monitor code / command code

When we switch to including all linker lists in SPL it is important
to not include commands as that may lead to link errors due to other
things we have already discarded.  In this case, we split the code for
supporting the monitor out from the code for loading it.

Cc: Vitaly Andrianov <vitalya@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA7xx: Enable NFS boot command
Andrew F. Davis [Fri, 11 Mar 2016 21:22:20 +0000 (15:22 -0600)]
ARM: DRA7xx: Enable NFS boot command

NFS loading works on DRA7 variants, remove the undefinition.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoti_armv7_common: env: Add NFS loading support to default enviroment
Andrew F. Davis [Fri, 11 Mar 2016 21:04:03 +0000 (15:04 -0600)]
ti_armv7_common: env: Add NFS loading support to default enviroment

NFS loading is similar to net loading except initial files are loaded
over NFS instead of TFTP, this removes the need for multiple different
protocol servers running on the host and allows the use of a single
network file system containing boot related files in their usual
in-filesystem directory. Add defaults for this boot style here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agospl_nor: fix warning when compiled for 64bit target
Masahiro Yamada [Mon, 29 Feb 2016 11:50:34 +0000 (20:50 +0900)]
spl_nor: fix warning when compiled for 64bit target

Fix "warning: cast to pointer from integer of different size".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA7: DDR: Enable SR in Power Management Control
Nishanth Menon [Wed, 9 Mar 2016 12:09:56 +0000 (17:39 +0530)]
ARM: DRA7: DDR: Enable SR in Power Management Control

If EMIF is idle for certain amount of DDR cycles, EMIF will put the
DDR in self refresh mode to save power if EMIF_PWR_MGMT_CTRL register
is programmed. And also before entering suspend-resume ddr needs to
be put in self-refresh. Linux kernel does not program this register
before entering suspend and relies on u-boot setting.
So configuring it in u-boot.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Tested-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agokeystone2: env: Set mmc as default boot for k2g-evm
Yan Liu [Wed, 9 Mar 2016 10:09:39 +0000 (15:39 +0530)]
keystone2: env: Set mmc as default boot for k2g-evm

For k2l, k2e and k2hk, ubi is set to default boot in uboot
environment settings; while for k2g, mmc should be the
default boot. This patch is to set mmc as default for k2g-evm

Signed-off-by: Yan Liu <yan-liu@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agokeystone2: env: add env script for booting with an initramfs with firmware
Murali Karicheri [Wed, 9 Mar 2016 10:09:38 +0000 (15:39 +0530)]
keystone2: env: add env script for booting with an initramfs with firmware

This patch updates the env script to include a initramfs with firmware
loaded and provided to kernel through second argument of bootz command
during boot. Defined DEFAULT_FW_INITRAMFS_BOOT_ENV to have all of the
required env variables and use it in evm specific config file.

The K2 linux drivers for PCIe and NetCP (1G, 10G) requires serdes
firmwares. These requires firmware to be available early through the boot
process in some cases to satisfy firmware requests from driver. Hence use
a small initramfs to provide the same and update boot env to accommodate
this in the boot flow. This method is used when rootfs is nfs and ubifs.
This fs contains just lib/firmware folder with all required firmware.

When rootfs is on initramfs, then the filesystem has the firmware under
lib/firmware and this early initramfs is not required and is not used.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agok2g: configs: Add support to save env in MMC
Lokesh Vutla [Wed, 9 Mar 2016 10:09:37 +0000 (15:39 +0530)]
k2g: configs: Add support to save env in MMC

Adding support to save env in MMC on k2g platforms, as it is the
preferred peripheral in saving env.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agok2g: env: Allow use of a script and plain text env files
Lokesh Vutla [Wed, 9 Mar 2016 10:09:36 +0000 (15:39 +0530)]
k2g: env: Allow use of a script and plain text env files

For development purposes, it is easier to use the env import command
and plain text or script files instead of script-images. So allow
u-boot to load env var from a text file or a script file.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoti_armv7_common: env: Consolidate support for loading script and text env files
Lokesh Vutla [Wed, 9 Mar 2016 10:09:35 +0000 (15:39 +0530)]
ti_armv7_common: env: Consolidate support for loading script and text env files

Support for loading bootscript and text env file is duplicated in all TI
platforms. Add this information to DEFAULT_MMC_TI_ARGS so that it can be
reused in all TI platforms.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoam43xx: configs: Enable USB commands for non usb boot also
Mugunthan V N [Wed, 9 Mar 2016 10:09:34 +0000 (15:39 +0530)]
am43xx: configs: Enable USB commands for non usb boot also

With commit aee119bd70b8 ('am43xx_evm: add usb host boot support') usb
commands is removed from U-boot second stage and enbaled only on USB
boot config. Fixing this by enable USB commands for both USB boot and
in second stage u-boot.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoam335x: configs: Fix usb ether boot support
Lokesh Vutla [Wed, 9 Mar 2016 10:09:33 +0000 (15:39 +0530)]
am335x: configs: Fix usb ether boot support

CONFIG_SPL_NET_VCI_STRING is available only with BOOTP. So if
CMD_DHCP is enabled for SPL in usb ether boot, it will not pass
the right vendor name and failing to download the right file.
Also all the net CMD_* are not required in SPL builds. So defining
these only for non-SPL builds.

Reported-by: Yan Liu <yan-liu@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoti_armv7_keystone2: env: Remove securedb.key.bin load
Carlos Hernandez [Wed, 9 Mar 2016 10:09:32 +0000 (15:39 +0530)]
ti_armv7_keystone2: env: Remove securedb.key.bin load

securedb.key.bin is not supported so it should not be loaded by
default init_ubi command.

Signed-off-by: Carlos Hernandez <ceh@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoti_armv7_keystone2: env: Update UBIFS image paths
Carlos Hernandez [Wed, 9 Mar 2016 10:09:31 +0000 (15:39 +0530)]
ti_armv7_keystone2: env: Update UBIFS image paths

UBI images created by OE does not contain boot partition by default,
instead kernel and dtb are placed in /boot directory inside rootfs
partition. So update env commands to load files from correct
location.

Signed-off-by: Carlos Hernandez <ceh@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoti_armv7_keystone2: configs: add usb mass storage support
Mugunthan V N [Wed, 9 Mar 2016 10:09:30 +0000 (15:39 +0530)]
ti_armv7_keystone2: configs: add usb mass storage support

Add USB mass storage support so that kernel can be read from
connected usb storage.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoefi_loader: Pass proper device path in on boot
Alexander Graf [Fri, 4 Mar 2016 00:10:14 +0000 (01:10 +0100)]
efi_loader: Pass proper device path in on boot

EFI payloads can query for the device they were booted from. Because
we have a disconnect between loading binaries and running binaries,
we passed in a dummy device path so far.

Unfortunately that breaks grub2's logic to find its configuration
file from the same device it was booted from.

This patch adds logic to have the "load" command call into our efi
code to set the device path to the one we last loaded a binary from.

With this grub2 properly detects where we got booted from and can
find its configuration file, even when searching by-partition.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: Call fdt preparation functions
Alexander Graf [Fri, 4 Mar 2016 00:10:13 +0000 (01:10 +0100)]
efi_loader: Call fdt preparation functions

We have a nice framework around image fils to prepare a device tree
for OS execution. That one patches in missing device tree nodes and
fixes up the memory range bits.

We need to call that one from the EFI boot path too to get all those
nice fixups. This patch adds the call.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm: Allow EFI payload code to take exceptions
Alexander Graf [Fri, 4 Mar 2016 00:10:12 +0000 (01:10 +0100)]
arm: Allow EFI payload code to take exceptions

There are 2 ways an EFI payload could return into u-boot:

  - Callback function
  - Exception

While in EFI payload mode, r9 is owned by the payload and may not contain
a valid pointer to gd, so we need to fix it up. We do that properly for the
payload to callback path already.

This patch also adds gd pointer restoral for the exception path.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm64: Replace fdt_name env variables with fdtfile
Alexander Graf [Fri, 4 Mar 2016 00:10:11 +0000 (01:10 +0100)]
arm64: Replace fdt_name env variables with fdtfile

The commonly defined environment variable to determine the device tree
file name is called fdtfile rather than fdt_name. Replace all occurences
of fdt_name with fdtfile.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: Add MAINTAINERS entry
Alexander Graf [Fri, 4 Mar 2016 00:10:10 +0000 (01:10 +0100)]
efi_loader: Add MAINTAINERS entry

Now that everything's in place, let's add myself as the maintainer for
the efi payload support.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoefi_loader: Add README section in README.efi
Alexander Graf [Fri, 4 Mar 2016 00:10:09 +0000 (01:10 +0100)]
efi_loader: Add README section in README.efi

To preserve all cover letter knowledge of the status on UEFI payload
support, let's add some sections to README.efi.

Signed-off-by: Alexander Graf <agraf@suse.de>
v3 -> v4:

  - Add section about config options
  - s/10kb/10KB/

8 years agoefi_loader: Add distro boot script for removable media
Alexander Graf [Wed, 9 Mar 2016 23:26:15 +0000 (00:26 +0100)]
efi_loader: Add distro boot script for removable media

UEFI defines a simple boot protocol for removable media. There we should look
at the EFI (first GPT FAT) partition and search for /efi/boot/bootXXX.efi with
XXX being different between different platforms (x86, x64, arm, aa64, ...).

This patch implements a simple version of that protocol for the default distro
boot script. With this we can automatically boot from valid UEFI enabled
removable media.

Because from all I could see U-Boot by default doesn't deliver device tree
blobs with its firmware, we also need to load the dtb from somewhere. Traverse
the same EFI partition for an fdt file that fits our current board so that
an OS receives a valid device tree when booted automatically.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoefi_loader: hook up in build environment
Alexander Graf [Fri, 4 Mar 2016 00:10:07 +0000 (01:10 +0100)]
efi_loader: hook up in build environment

Now that we have all the bits and pieces ready for EFI payload loading
support, hook them up in Makefiles and KConfigs so that we can build.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
[trini: Enable only when we of OF_LIBFDT, disable on kwb and colibri_pxa270]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm64: Allow EFI payload code to take exceptions
Alexander Graf [Fri, 4 Mar 2016 00:10:06 +0000 (01:10 +0100)]
arm64: Allow EFI payload code to take exceptions

There are 2 ways an EFI payload could return into u-boot:

  - Callback function
  - Exception

While in EFI payload mode, x18 is owned by the payload and may not contain
a valid pointer to gd, so we need to fix it up. We do that properly for the
payload to callback path already.

This patch also adds gd pointer restoral for the exception path.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm64: Allow exceptions to return
Alexander Graf [Fri, 4 Mar 2016 00:10:05 +0000 (01:10 +0100)]
arm64: Allow exceptions to return

Our current arm64 exception handlers all panic and never return to the
exception triggering code.

But if any handler wanted to continue execution after fixups, it would
need help from the exception handling code to restore all registers.

This patch implements that help. With this code, exception handlers on
aarch64 can successfully return to the place the exception happened (or
somewhere else if they modify elr).

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: Implement memory allocation and map
Alexander Graf [Fri, 4 Mar 2016 00:10:04 +0000 (01:10 +0100)]
efi_loader: Implement memory allocation and map

The EFI loader needs to maintain views of memory - general system memory
windows as well as used locations inside those and potential runtime service
MMIO windows.

To manage all of these, add a few helpers that maintain an internal
representation of the map the similar to how the EFI API later on reports
it to the application.

For allocations, the scheme is very simple. We basically allow allocations
to replace chunks of previously done maps, so that a new LOADER_DATA
allocation for example can remove a piece of the RAM map. When no specific
address is given, we just take the highest possible address in the lowest
RAM map that fits the allocation size.

Signed-off-by: Alexander Graf <agraf@suse.de>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agoefi_loader: Add "bootefi" command
Alexander Graf [Wed, 9 Mar 2016 23:27:20 +0000 (00:27 +0100)]
efi_loader: Add "bootefi" command

In order to execute an EFI application, we need to bridge the gap between
U-Boot's notion of executing images and EFI's notion of doing the same.

The best path forward IMHO here is to stick completely to the way U-Boot
deals with payloads. You manually load them using whatever method to RAM
and then have a simple boot command to execute them. So in our case, you
would do

  # load mmc 0:1 $loadaddr grub.efi
  # bootefi $loadaddr

which then gets you into a grub shell. Fdt information known to U-boot
via the fdt addr command is also passed to the EFI payload.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
[trini: Guard help text with CONFIG_SYS_LONGHELP]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoefi_loader: Add disk interfaces
Alexander Graf [Fri, 4 Mar 2016 00:10:02 +0000 (01:10 +0100)]
efi_loader: Add disk interfaces

A EFI applications usually want to access storage devices to load data from.

This patch adds support for EFI disk interfaces. It loops through all block
storage interfaces known to U-Boot and creates an EFI object for each existing
one. EFI applications can then through these objects call U-Boot's read and
write functions.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
[trini: Update for various DM changes since posting]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoefi_loader: Add runtime services
Alexander Graf [Fri, 4 Mar 2016 00:10:01 +0000 (01:10 +0100)]
efi_loader: Add runtime services

After booting has finished, EFI allows firmware to still interact with the OS
using the "runtime services". These callbacks live in a separate address space,
since they are available long after U-Boot has been overwritten by the OS.

This patch adds enough framework for arbitrary code inside of U-Boot to become
a runtime service with the right section attributes set. For now, we don't make
use of it yet though.

We could maybe in the future map U-boot environment variables to EFI variables
here.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agoefi_loader: Add console interface
Alexander Graf [Fri, 4 Mar 2016 00:10:00 +0000 (01:10 +0100)]
efi_loader: Add console interface

One of the basic EFI interfaces is the console interface. Using it an EFI
application can interface with the user. This patch implements an EFI console
interface using getc() and putc().

Today, we only implement text based consoles. We also convert the EFI Unicode
characters to UTF-8 on the fly, hoping that everyone managed to jump on the
train by now.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agoefi_loader: Add boot time services
Alexander Graf [Fri, 4 Mar 2016 00:09:59 +0000 (01:09 +0100)]
efi_loader: Add boot time services

When an EFI application runs, it has access to a few descriptor and callback
tables to instruct the EFI compliant firmware to do things for it. The bulk
of those interfaces are "boot time services". They handle all object management,
and memory allocation.

This patch adds support for the boot time services and also exposes a system
table, which is the point of entry descriptor table for EFI payloads.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agoefi_loader: Add PE image loader
Alexander Graf [Fri, 4 Mar 2016 00:09:58 +0000 (01:09 +0100)]
efi_loader: Add PE image loader

EFI uses the PE binary format for its application images. Add support to EFI PE
binaries as well as all necessary bits for the "EFI image loader" interfaces.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agoinclude/efi_api.h: Add more detailed API definitions
Alexander Graf [Fri, 4 Mar 2016 00:09:57 +0000 (01:09 +0100)]
include/efi_api.h: Add more detailed API definitions

The EFI API header is great, but missing a good chunk of function prototype,
GUID defines and enum declarations.

This patch extends it to cover more of the EFI API. It's still not 100%
complete, but sufficient enough for our EFI payload interface.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agodisk/part.c: Expose list of available block drivers
Alexander Graf [Fri, 4 Mar 2016 00:09:56 +0000 (01:09 +0100)]
disk/part.c: Expose list of available block drivers

We have a pretty nice and generic interface to ask for a specific block
device. However, that one is still based around the magic notion that
we know the driver name.

In order to be able to write fully generic disk access code, expose the
currently internal list to other source files so that they can scan through
all available block drivers.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agoarm64: Only allow dcache disabled in SPL builds
Alexander Graf [Fri, 4 Mar 2016 00:09:55 +0000 (01:09 +0100)]
arm64: Only allow dcache disabled in SPL builds

Now that we have an easy way to describe memory regions and enable the MMU,
there really shouldn't be anything holding people back from running with
caches enabled on AArch64. To make sure people catch early if they're missing
on the caching fun, give them a compile error.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm64: Remove non-full-va map code
Alexander Graf [Fri, 4 Mar 2016 00:09:54 +0000 (01:09 +0100)]
arm64: Remove non-full-va map code

By now the code to only have a single page table level with 64k page
size and 42 bit address space is no longer used by any board in tree,
so we can safely remove it.

To clean up code, move the layerscape mmu code to the new defines,
removing redundant field definitions.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agohikey: Add MMU tables
Alexander Graf [Fri, 4 Mar 2016 00:09:53 +0000 (01:09 +0100)]
hikey: Add MMU tables

The hikey runs with dcache disabled today. There really should be no reason
not to use caches on AArch64, so let's add MMU definitions and enable the
dcache.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agodwmmc: Increase retry timeout
Alexander Graf [Fri, 4 Mar 2016 00:09:52 +0000 (01:09 +0100)]
dwmmc: Increase retry timeout

When enable dcache on HiKey, we're running into MMC command timeouts
because our retry loop is now faster than the eMMC (or an external SD
card) can answer.

Increase the retry count to the same as the timeout value for status
reports.

The real fix is obviously to not base this whole thing on a cycle counter
but on real wall time, but that would be slightly more intrusive.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agovexpress64: Add MMU tables
Alexander Graf [Fri, 4 Mar 2016 00:09:51 +0000 (01:09 +0100)]
vexpress64: Add MMU tables

There's no good excuse for running with caches disabled on AArch64,
so let's just move the vexpress64 target to enable the MMU and run
with caches on.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agotegra: Replace home grown mmu code with generic table approach
Alexander Graf [Fri, 4 Mar 2016 00:09:50 +0000 (01:09 +0100)]
tegra: Replace home grown mmu code with generic table approach

Now that we have nice table driven page table creating code that gives
us everything we need, move to that.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agozymqmp: Replace home grown mmu code with generic table approach
Alexander Graf [Fri, 4 Mar 2016 00:09:49 +0000 (01:09 +0100)]
zymqmp: Replace home grown mmu code with generic table approach

Now that we have nice table driven page table creating code that gives
us everything we need, move to that.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agothunderx: Move mmu table into board file
Alexander Graf [Fri, 4 Mar 2016 00:09:48 +0000 (01:09 +0100)]
thunderx: Move mmu table into board file

The MMU range table can vary depending on things we may only find
out at runtime. While the very simple ThunderX variant does not
change, other boards will, so move the definition from a static
entry in a header file to the board file.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm64: Make full va map code more dynamic
Alexander Graf [Fri, 4 Mar 2016 00:09:47 +0000 (01:09 +0100)]
arm64: Make full va map code more dynamic

The idea to generate our pages tables from an array of memory ranges
is very sound. However, instead of hard coding the code to create up
to 2 levels of 64k granule page tables, we really should just create
normal 4k page tables that allow us to set caching attributes on 2M
or 4k level later on.

So this patch moves the full_va mapping code to 4k page size and
makes it fully flexible to dynamically create as many levels as
necessary for a map (including dynamic 1G/2M pages). It also adds
support to dynamically split a large map into smaller ones when
some code wants to set dcache attributes.

With all this in place, there is very little reason to create your
own page tables in board specific files.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm64: Disable TTBR1 maps in EL1
Alexander Graf [Fri, 4 Mar 2016 00:09:46 +0000 (01:09 +0100)]
arm64: Disable TTBR1 maps in EL1

When running in EL1, AArch64 knows two page table maps. One with addresses
that start with all zeros (TTBR0) and one with addresses that start with all
ones (TTBR1).

In U-Boot we don't care about the high up maps, so just disable them to ensure
we don't walk an invalid page table by accident.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agothunderx: Calculate TCR dynamically
Alexander Graf [Fri, 4 Mar 2016 00:09:45 +0000 (01:09 +0100)]
thunderx: Calculate TCR dynamically

Based on the memory map we can determine a lot of hard coded fields of
TCR, like the maximum VA and max PA we want to support. Calculate those
dynamically to reduce the chance for pit falls.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agokc1: Clear reboot mode garbage on cold reset
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:15 +0000 (19:19 +0100)]
kc1: Clear reboot mode garbage on cold reset

Reboot mode garbage is found on cold reset and might be seen as valid on the
next warm reset, thus it has to be cleared on cold reset.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agokc1: Power off when the power on reason is not a valid one
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:14 +0000 (19:19 +0100)]
kc1: Power off when the power on reason is not a valid one

Some power on reasons are not desirable (e.g. too short press on the power
button), battery plug. Thus, power off the device when one of those occurs.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoinput: TWL6030 input support for power button, USB and charger
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:13 +0000 (19:19 +0100)]
input: TWL6030 input support for power button, USB and charger

This adds support for detecting a few inputs exported by the TWL6030.
Currently-supported inputs are the power button, USB and charger presence.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agopower: twl6030: Power off support
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:12 +0000 (19:19 +0100)]
power: twl6030: Power off support

This adds support for powering off (the omap SoC) from the twl6030.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agopower: twl6030: Remove ifdef around the code
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:11 +0000 (19:19 +0100)]
power: twl6030: Remove ifdef around the code

The TWL6030 power driver is only built when CONFIG_TWL6030_POWER is selected,
thus there is no reason to wrap the code with ifdef.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agokc1: Boot to bootloader (fastboot) on ID pin pull-up
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:10 +0000 (19:19 +0100)]
kc1: Boot to bootloader (fastboot) on ID pin pull-up

USB ID pin pull-up indicates factory (fastboot) cable detection.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agokc1: OMAP4 reboot mode support
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:09 +0000 (19:19 +0100)]
kc1: OMAP4 reboot mode support

This adds support for the omap4 reboot mode mechanism and exports the reboot
mode via an environment variable, that is used in the boot command to make it
possible to boot from the recovery partition or fastboot.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap4: Check warm reset for reboot mode validity
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:08 +0000 (19:19 +0100)]
omap4: Check warm reset for reboot mode validity

Since the SAR registers are filled with garbage on cold reset, this checks for a
warm reset to assert the validity of reboot mode.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap4: Reboot mode support
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:07 +0000 (19:19 +0100)]
omap4: Reboot mode support

Reboot mode is written to SAR memory before reboot in the form of a string.

This mechanism is supported on OMAP4 by various TI kernels.

It is up to each board to make use of this mechanism or not.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agokc1: MUSB USB controller and fastboot USB gadget support
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:06 +0000 (19:19 +0100)]
kc1: MUSB USB controller and fastboot USB gadget support

This adds support for the MUSB USB dual-role controller in peripheral mode,
with configuration options for the fastboot USB gadget.

At this point, flashing the internal eMMC is support.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agousb: musb-new: omap2430: OMAP4 MUSB USB controller support
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:05 +0000 (19:19 +0100)]
usb: musb-new: omap2430: OMAP4 MUSB USB controller support

This adds support for the OMAP4 MUSB USB controller, with a matching Linux
compat definition, TWL6030 USB device setup and USBOTGHS register setup.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agopower: twl6030: Clear VUSB_IN_PMID bit on USB device setup
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:04 +0000 (19:19 +0100)]
power: twl6030: Clear VUSB_IN_PMID bit on USB device setup

When booting from USB, the bootrom sets the VUSB_IN_PMID bit of the MISC2
register of the TWL6030. However, U-Boot sets the VUSB_IN_VSYS bit to enable
VBUS input. As both bits are contradictory, enabling both disables the input,
according to the TWL6030 TRM.

Thus, we need to clear the VUSB_IN_PMID bit in case of an USB boot (which could
just as well be a memory boot after USB timed out).

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agopower: twl6030: Configure VUSB voltage on USB device setup
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:03 +0000 (19:19 +0100)]
power: twl6030: Configure VUSB voltage on USB device setup

This explicitly sets VUSB voltage to 3.3V when enabling USB.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap4: Properly enable USB PHY clocks
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:02 +0000 (19:19 +0100)]
omap4: Properly enable USB PHY clocks

This correctly enables the USB PHY clocks, by enabling CM_ALWON_USBPHY_CLKCTRL
and correctly setting CM_L3INIT_USBPHY_CLKCTRL's value.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap-common: clocks-common: Setup USB DPLL when MUSB is in use
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:01 +0000 (19:19 +0100)]
omap-common: clocks-common: Setup USB DPLL when MUSB is in use

On (at least) OMAP4, the USB DPLL is required to be setup for the internal PHY
to work properly. The internal PHY is used by default with the MUSB USB OTG
controller.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoAmazon Kindle Fire (first generation) codename kc1 support
Paul Kocialkowski [Sat, 27 Feb 2016 18:19:00 +0000 (19:19 +0100)]
Amazon Kindle Fire (first generation) codename kc1 support

The Amazon Kindle Fire (first generation) codename kc1 is a tablet that was
released by Amazon back in 2011.

It is using an OMAP4430 SoC GP version, which allows running U-Boot and the
U-Boot SPL from the ground up.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap4: Move i2c clocks enable to enable_basic_clocks
Paul Kocialkowski [Sat, 27 Feb 2016 18:18:59 +0000 (19:18 +0100)]
omap4: Move i2c clocks enable to enable_basic_clocks

I2C is often enabled withing the U-Boot SPL, thus those clocks are required to
be enabled early (especially when the bootrom doesn't enable them for us).

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap4: Remove duplicate CM_L3INIT_USBPHY_CLKCTRL reference and whitespace
Paul Kocialkowski [Sat, 27 Feb 2016 18:18:58 +0000 (19:18 +0100)]
omap4: Remove duplicate CM_L3INIT_USBPHY_CLKCTRL reference and whitespace

This removes a duplicate reference to CM_L3INIT_USBPHY_CLKCTRLin
enable_basic_uboot_clocks. Also, a doubled whitespace is removed.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap-common: Remove deprecated arch_cpu_init code
Paul Kocialkowski [Sat, 27 Feb 2016 18:18:57 +0000 (19:18 +0100)]
omap-common: Remove deprecated arch_cpu_init code

save_omap_boot_params is called from spl_board_init in the SPL context. Thus,
there is no reason to duplicate that call on arch_cpu_init.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap-common: Rename set_muxconf_regs_essential to set_muxconf_regs
Paul Kocialkowski [Sat, 27 Feb 2016 18:18:56 +0000 (19:18 +0100)]
omap-common: Rename set_muxconf_regs_essential to set_muxconf_regs

There is no distinction between essential and non-essential mux configuration,
so it doesn't make sense to have an "essential" prefix.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap4: Export jedec sdram timings
Paul Kocialkowski [Sat, 27 Feb 2016 18:18:55 +0000 (19:18 +0100)]
omap4: Export jedec sdram timings

Individual boards might provide their own emif_get_device_timings function and
use the jedec timings in their own way, hence those have to be exported.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap4: Export elpidia sdram timings
Paul Kocialkowski [Sat, 27 Feb 2016 18:18:54 +0000 (19:18 +0100)]
omap4: Export elpidia sdram timings

Individual boards might provide their own emif_get_device_timings function and
use the elpidia timings in their own way, hence those have to be exported.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap4: Export elpidia sdram device details
Paul Kocialkowski [Sat, 27 Feb 2016 18:18:53 +0000 (19:18 +0100)]
omap4: Export elpidia sdram device details

Individual boards might provide their own emif_get_device_details function and
use elpidia device details in their own way, hence those have to be exported.

This also wraps existing definitions with the proper ifdef logic.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomap_hsmmc: Board-specific TWL6030 MMC power initialization
Paul Kocialkowski [Sat, 27 Feb 2016 18:18:52 +0000 (19:18 +0100)]
omap_hsmmc: Board-specific TWL6030 MMC power initialization

Boards using the TWL6030 regulator may not all use the LDOs the same way.
Some might also not use MMC1 at all, so VMMC would't have to be enabled.

This delegates TWL6030 MMC power initializations to board-specific functions,
that may still call twl6030_power_mmc_init for the default behavior.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agopower: twl6030: Device-index-specific MMC power initialization
Paul Kocialkowski [Sat, 27 Feb 2016 18:18:51 +0000 (19:18 +0100)]
power: twl6030: Device-index-specific MMC power initialization

Not every device has multiple MMC slots available, so it makes sense to enable
only the required LDOs for the available slots. Generic code in omap_hsmmc will
enable both VMMC and VAUX1, in doubt.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agopower: twl6030: Enable VAUX1 for eMMC power, depending on BOOT2 value
Paul Kocialkowski [Sat, 27 Feb 2016 18:18:50 +0000 (19:18 +0100)]
power: twl6030: Enable VAUX1 for eMMC power, depending on BOOT2 value

This enables the VAUX1 supply, used for eMMC power in standard configurations.
Its voltage is determined by the value of the BOOT2 pin of the TWL6030.

Note that the TWL6030 might already have enabled this regulator at startup
(depending on the value of the BOOT3 pin of the TWL6030), according to the
TWL6030 datasheet.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agopower: twl6030: Some more explicit registers and values definitions
Paul Kocialkowski [Sat, 27 Feb 2016 18:18:49 +0000 (19:18 +0100)]
power: twl6030: Some more explicit registers and values definitions

This makes the twl6030 mmc and usb-related power registers and values
definitions more explicit and clear and adds prefixes to them.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agosniper: Clear reboot mode garbage on cold reset
Paul Kocialkowski [Sat, 27 Feb 2016 18:26:44 +0000 (19:26 +0100)]
sniper: Clear reboot mode garbage on cold reset

Reboot mode garbage is found on cold reset and might be seen as valid on the
next warm reset, thus it has to be cleared on cold reset.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agosniper: Get rid of reset_misc
Paul Kocialkowski [Sat, 27 Feb 2016 18:26:43 +0000 (19:26 +0100)]
sniper: Get rid of reset_misc

There is no need to set the reboot mode to a particular value prior to reboot,
since valid values will have been caught and cleared earlier.

In addition, this breaks the reboot-bootloader fastboot call, by overriding the
required value for fastboot.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoomap3: Use a define for reboot reason offset
Paul Kocialkowski [Sat, 27 Feb 2016 18:26:42 +0000 (19:26 +0100)]
omap3: Use a define for reboot reason offset

This introduces a define for the offset to the reboot reason, rather than
hardcoding it.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoomap3: String-based reboot mode handling
Paul Kocialkowski [Sat, 27 Feb 2016 18:26:41 +0000 (19:26 +0100)]
omap3: String-based reboot mode handling

This switches reboot mode handling to a string-based interface, that allows more
flexibility to set a common interface with the next generations of OMAP devices.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agospi: omap3: Fix multiple definition of 'priv'
Jagan Teki [Tue, 15 Mar 2016 18:26:33 +0000 (23:56 +0530)]
spi: omap3: Fix multiple definition of 'priv'

Global definition of priv seems no-sense to use it
for non-dm case and pass the pointer to functions
which are common to both dm and non-dm.

So, fix this by removing omap3_spi_slave from non-dm
and make visible to omap3_spi_priv for both dm and non-dm.

Cc: Christophe Ricard <christophe-h.ricard@st.com>
Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Tue, 15 Mar 2016 12:01:17 +0000 (08:01 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-video

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Tue, 15 Mar 2016 12:01:04 +0000 (08:01 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

8 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Mon, 14 Mar 2016 23:21:44 +0000 (19:21 -0400)]
Merge git://git.denx.de/u-boot-dm

8 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Mon, 14 Mar 2016 23:21:35 +0000 (19:21 -0400)]
Merge git://git.denx.de/u-boot-marvell

8 years agoarm64: define _image_binary_end to fix SPL_OF_CONTROL
Masahiro Yamada [Tue, 8 Mar 2016 11:34:44 +0000 (20:34 +0900)]
arm64: define _image_binary_end to fix SPL_OF_CONTROL

To make SPL_OF_CONTROL work on ARM64 SoCs, _image_binary_end must be
defined in the linker script.

 LD      spl/u-boot-spl
lib/built-in.o: In function `fdtdec_setup':
lib/fdtdec.c:1186: undefined reference to `_image_binary_end'
lib/fdtdec.c:1186: undefined reference to `_image_binary_end'
make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2

Note:
CONFIG_SPL_SEPARATE_BSS must be defined as well on ARM64 SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA72-evm: Update mux and VIRTUAL/MANUAL mode timings
Lokesh Vutla [Tue, 8 Mar 2016 04:40:20 +0000 (10:10 +0530)]
ARM: DRA72-evm: Update mux and VIRTUAL/MANUAL mode timings

All the mux configurations needs to be done as part of the IODelay
sequence to avoid glitch. Adding all the mux configuration, MANUAL/VIRTUAL
mode configuration as needed for DRA72-evm.

Also update the mux for SD card detect on DRA74-evm.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA7-evm: Update memory info in banks
Lokesh Vutla [Tue, 8 Mar 2016 03:48:09 +0000 (09:18 +0530)]
ARM: DRA7-evm: Update memory info in banks

Updating the memory banks properly so that DT is populated accordingly.
And updating this only after DDR is properly detected by eeprom, so that
git bisect is still maintained.

Acked-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: DRA7: EMIF: Add 4GB DDR settings
Lokesh Vutla [Tue, 8 Mar 2016 03:48:08 +0000 (09:18 +0530)]
ARM: DRA7: EMIF: Add 4GB DDR settings

The REVH and later versions of DRA7-evm uses MICRON MT41K512M16HA-125 memory
chips which is of size 4GB(2GB on EMIF1 and 2GB on EMIF2). Add support for the
same.

Acked-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: DRA7: configs: Prepare for detecting memory > 2GB
Lokesh Vutla [Tue, 8 Mar 2016 03:48:07 +0000 (09:18 +0530)]
ARM: DRA7: configs: Prepare for detecting memory > 2GB

Enable configs that are required for detecting memory > 2GB.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: DRA7: Move emif settings to board specific files
Lokesh Vutla [Tue, 8 Mar 2016 03:48:06 +0000 (09:18 +0530)]
ARM: DRA7: Move emif settings to board specific files

The newer versions of DRA7 boards has EEPROM populated with DDR
size specified in it. Moving DRA7 specific emif related settings
to board files so that emif settings can be identified based on EEPROM.

Acked-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: DRA7: Enable EEPROM support
Lokesh Vutla [Tue, 8 Mar 2016 03:48:05 +0000 (09:18 +0530)]
ARM: DRA7: Enable EEPROM support

Enable EEPROM support for DRA74-evm.

Acked-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoti: common: dra7: Add standard access for board description EEPROM
Lokesh Vutla [Tue, 8 Mar 2016 03:48:04 +0000 (09:18 +0530)]
ti: common: dra7: Add standard access for board description EEPROM

DRA7 EVM revH and later EVMs have EEPROM populated that can contain board
description information such as name, revision, DDR definition, etc. Adding
support for this EEPROM format.

Acked-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>