summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2016-03-16arm64: Replace fdt_name env variables with fdtfileAlexander Graf
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>
2016-03-16efi_loader: Add distro boot script for removable mediaAlexander Graf
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>
2016-03-16efi_loader: Implement memory allocation and mapAlexander Graf
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>
2016-03-15efi_loader: Add disk interfacesAlexander Graf
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>
2016-03-15efi_loader: Add runtime servicesAlexander Graf
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>
2016-03-15efi_loader: Add console interfaceAlexander Graf
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>
2016-03-15efi_loader: Add boot time servicesAlexander Graf
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>
2016-03-15efi_loader: Add PE image loaderAlexander Graf
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>
2016-03-15include/efi_api.h: Add more detailed API definitionsAlexander Graf
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>
2016-03-15disk/part.c: Expose list of available block driversAlexander Graf
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>
2016-03-15arm64: Remove non-full-va map codeAlexander Graf
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>
2016-03-15hikey: Add MMU tablesAlexander Graf
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>
2016-03-15vexpress64: Add MMU tablesAlexander Graf
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>
2016-03-15tegra: Replace home grown mmu code with generic table approachAlexander Graf
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>
2016-03-15zymqmp: Replace home grown mmu code with generic table approachAlexander Graf
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>
2016-03-15thunderx: Move mmu table into board fileAlexander Graf
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>
2016-03-15arm64: Make full va map code more dynamicAlexander Graf
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>
2016-03-15thunderx: Calculate TCR dynamicallyAlexander Graf
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>
2016-03-15kc1: Power off when the power on reason is not a valid onePaul Kocialkowski
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>
2016-03-15input: TWL6030 input support for power button, USB and chargerPaul Kocialkowski
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>
2016-03-15power: twl6030: Power off supportPaul Kocialkowski
This adds support for powering off (the omap SoC) from the twl6030. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2016-03-15kc1: OMAP4 reboot mode supportPaul Kocialkowski
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>
2016-03-15kc1: MUSB USB controller and fastboot USB gadget supportPaul Kocialkowski
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>
2016-03-15power: twl6030: Clear VUSB_IN_PMID bit on USB device setupPaul Kocialkowski
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>
2016-03-15power: twl6030: Configure VUSB voltage on USB device setupPaul Kocialkowski
This explicitly sets VUSB voltage to 3.3V when enabling USB. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2016-03-15Amazon Kindle Fire (first generation) codename kc1 supportPaul Kocialkowski
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>
2016-03-15omap-common: Remove deprecated arch_cpu_init codePaul Kocialkowski
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>
2016-03-15power: twl6030: Device-index-specific MMC power initializationPaul Kocialkowski
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>
2016-03-15power: twl6030: Enable VAUX1 for eMMC power, depending on BOOT2 valuePaul Kocialkowski
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>
2016-03-15power: twl6030: Some more explicit registers and values definitionsPaul Kocialkowski
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>
2016-03-15Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini
2016-03-14Merge git://git.denx.de/u-boot-dmTom Rini
2016-03-14Merge git://git.denx.de/u-boot-marvellTom Rini
2016-03-14ARM: DRA7: configs: Prepare for detecting memory > 2GBLokesh Vutla
Enable configs that are required for detecting memory > 2GB. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2016-03-14ARM: DRA7: Enable EEPROM supportLokesh Vutla
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>
2016-03-14ARM: keystone2: use SPD info to configure K2HK and K2E DDR3Vitaly Andrianov
This commit replaces hard-coded EMIF and PHY DDR3 configurations for predefined SODIMMs to a calculated configuration. The SODIMM parameters are read from SODIMM's SPD and used to calculated the configuration. The current commit supports calculation for DDR3 with 1600MHz and 1333MHz only. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-14include/crc.h: Remove unreferenced cyg_xxx() prototypesStefan Roese
These cyg_ prototypes are not referenced anywhere in current mainline U-Boot. So lets remove them. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-14lib/crc16.c: Rename cyg_crc16() to crc16_ccitt() and add crc start valueStefan Roese
The original name of this function is unclear. This patch renames this CRC16 function to crc16_ccitt() matching its name with its implementation. To make the usage of this function more flexible, lets add the CRC start value as parameter to this function. This way it can be used by other functions requiring different start values than 0 as well. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-14arm: Add support for LEGO MINDSTORMS EV3David Lechner
This is based on the davinci da850evm. It can boot from either the on-board 16MB flash or from a microSD card. It also reads board information from an I2C EEPROM. The EV3 itself initally boots from write-protected EEPROM, so no u-boot SPL is needed. Signed-off-by: David Lechner <david@lechnology.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-14configs: k2g_evm: Add TI power processor supportNishanth Menon
Enable support for PMMC the TI power processor on K2G. This processor manages all power management related activities on the SoC and and allows the Operating Systems on compute processors such as ARM, DSP to offload the power logic away into the power processor. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-14board: ti: AM57xx: Add detection logic for AM57xx-evmKipisz, Steven
Current AM57xx evm supports both BeagleBoard-X15 (http://beagleboard.org/x15) and AM57xx EVM (http://www.ti.com/tool/tmdxevm5728). The AM572x EValuation Module(EVM) provides an affordable platform to quickly start evaluation of Sitara. ARM Cortex-A15 AM57x Processors (AM5728, AM5726, AM5718, AM5716) and accelerate development for HMI, machine vision, networking, medical imaging and many other industrial applications. This EVM is based on the same BeagleBoard-X15 Chassis and adds mPCIe, mSATA, LCD, touchscreen, Camera, push button and TI's wlink8 offering. Since the EEPROM contents are compatible between the BeagleBoard-X15 and the AM57xx-evm, we add support for the detection logic to enable support for various user programmable scripting capability. NOTE: U-boot configuration is currently a superset of AM57xx evm and BeagleBoard-X15 and no additional configuration tweaking is needed. This change also sets up the stage for future support of TI AM57xx EVMs to the same base bootloader build. Signed-off-by: Steve Kipisz <s-kipisz2@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-14spl: Add an option to load a FIT containing U-BootSimon Glass
This provides a way to load a FIT containing U-Boot and a selection of device tree files. The board can select the correct device tree by probing the hardware. Then U-Boot is started with the selected device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-03-14spl: Add a way for boards to select which device tree to loadSimon Glass
SPL calls this function with each device tree it can find in the FIT. The board should implement this function, using whatever hardware detection it can muster to determine the correct device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-03-14image: Add functions to obtain short namesSimon Glass
Sometimes it is useful to obtain the short name for an Operating System, architecture or compression mechanism. Provide functions for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-03-14sunxi: Display the board model on start-upSimon Glass
It is useful to know which sunxi board you are booting. Display this on start-up to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-03-14fdt: Allow libfdt to be used in SPLSimon Glass
Add an option to enable libfdt in SPL. This can be useful when decoding FIT files in SPL. We need to make sure this option is not enabled in SPL by this change. Also this option needs to be enabled in host builds. Si add a new IMAGE_USE_LIBFDT #define which can be used in files that are built on the host but must also build for U-Boot and SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-03-14Kconfig: Move CONFIG_FIT and related options to KconfigSimon Glass
There are already two FIT options in Kconfig but the CONFIG options are still in the header files. We need to do a proper move to fix this. Move these options to Kconfig and tidy up board configuration: CONFIG_FIT CONFIG_OF_BOARD_SETUP CONFIG_OF_SYSTEM_SETUP CONFIG_FIT_SIGNATURE CONFIG_FIT_BEST_MATCH CONFIG_FIT_VERBOSE CONFIG_OF_STDOUT_VIA_ALIAS CONFIG_RSA Unfortunately the first one is a little complicated. We need to make sure this option is not enabled in SPL by this change. Also this option is enabled automatically in the host builds by defining CONFIG_FIT in the image.h file. To solve this, add a new IMAGE_USE_FIT #define which can be used in files that are built on the host but must also build for U-Boot and SPL. Note: Masahiro's moveconfig.py script is amazing. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Add microblaze change, various configs/ re-applies] Signed-off-by: Tom Rini <trini@konsulko.com>
2016-03-14ARM: sheevaplug: drop unneded 'usb start' from boot commandPeter Korsgaard
The default bootcommand executes x_bootcmd_usb AFTER loading a kernel from nand and just before executing it, which only slows down boot without adding any functionality - So drop it. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-03-14ARM: sheevaplug: unbreak kernel bootargs / mtdparts command by dropping ↵Peter Korsgaard
double mtdparts= Commit 1e3d640316 (ARM: sheevaplug: redefine MTDPARTS) prepended mtdparts= to the flash partition information in CONFIG_MTDPARTS, but it is used like "mtdparts=" CONFIG_MTDPARTS - So we end up passing mtdparts=mtdparts=.. to the kernel, confusing the cmdline partition parser. Fix it by dropping the double 'mtdparts='. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-03-14ARM: sheevaplug: unbreak default environmentPeter Korsgaard
Commit 1e3d640316 (ARM: sheevaplug: redefine MTDPARTS) changed the mtdparts part of the default environment, but dropped the trailing zero termination - So the definition of x_bootcmd_kernel becomes part of the x_bootargs variable. Fix it by reintroducing the zero termination. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>