summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* x86: Fix a header nit in x86-chromebook.hSimon Glass2016-03-171-1/+0
| | | | | | | There is an extra line in the comment in the header. Remove it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: Use white on black for the console on chromebooksSimon Glass2016-03-171-0/+2
| | | | | | | | This is a little easier on the eyes, particularly when the backlight is set to maximum. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: Add a default address for reference codeSimon Glass2016-03-171-0/+2
| | | | | | | | Add an address which can be used for loading and running the reference code when needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: broadwell: Add a pinctrl driverSimon Glass2016-03-171-0/+12
| | | | | | | | | | | GPIO pins need to be set up on start-up. Add a driver to provide this, configured from the device tree. The binding is slightly different from the existing ICH6 binding, since that is quite verbose. The new binding should be just as extensible. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Bin Meng <bmeng.cn@gmail.com>
* x86: Drop all the old pin configuration codeSimon Glass2016-03-171-1/+0
| | | | | | | | We don't need this anymore - we can use device tree and the new pinconfig driver instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* input: i8042: Make sure the keyboard is enabledSimon Glass2016-03-171-0/+1
| | | | | | | | | Add one more step into the init sequence. This fixes the keyboard on samus, which otherwise does not work. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* pci: Correct a few comments and nitsSimon Glass2016-03-171-2/+4
| | | | | | | | Two comments are missing a parameter and there is an extra blank line. Also two of the region access macros are misnamed. Correct these problems. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* pci: Add functions to update PCI configuration registersSimon Glass2016-03-171-0/+23
| | | | | | | | | It is common to read a config register value, clear and set some bits, then write back the updated value. Add functions to do this in one step, for convenience. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* gpio: Use const where possibleSimon Glass2016-03-171-5/+5
| | | | | | | | Some functions do not change the struct gpio_desc parameter. Update these to use const so this is clear. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* gpio: Add a function to obtain a GPIO vector valueSimon Glass2016-03-171-0/+12
| | | | | | | | | | We can use GPIOs as binary digits for reading 'strapping' values. Each GPIO is assigned a single bit and can be set high or low on the circuit board. We already have a legacy function for reading these values. Add one that supports driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* cpu: Add support for microcode version and CPU IDSimon Glass2016-03-171-0/+5
| | | | | | | | | Some CPUs use microcode and each core can have a different version of microcode loaded. Also some CPUs support the concept of an integer ID used for identification purposes. Add support for these in the CPU uclass. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* ti_armv7_common: env: Add NFS loading support to default enviromentAndrew F. Davis2016-03-151-0/+6
| | | | | | | | | | | 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>
* keystone2: env: Set mmc as default boot for k2g-evmYan Liu2016-03-155-1/+4
| | | | | | | | | | 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>
* keystone2: env: add env script for booting with an initramfs with firmwareMurali Karicheri2016-03-155-3/+17
| | | | | | | | | | | | | | | | | | | | | 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>
* k2g: configs: Add support to save env in MMCLokesh Vutla2016-03-151-0/+6
| | | | | | | | 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>
* k2g: env: Allow use of a script and plain text env filesLokesh Vutla2016-03-151-0/+1
| | | | | | | | | 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>
* ti_armv7_common: env: Consolidate support for loading script and text env filesLokesh Vutla2016-03-155-54/+32
| | | | | | | | | 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>
* am43xx: configs: Enable USB commands for non usb boot alsoMugunthan V N2016-03-151-1/+3
| | | | | | | | | | | 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>
* am335x: configs: Fix usb ether boot supportLokesh Vutla2016-03-151-1/+3
| | | | | | | | | | | | | 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>
* ti_armv7_keystone2: env: Remove securedb.key.bin loadCarlos Hernandez2016-03-151-2/+1
| | | | | | | | | 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>
* ti_armv7_keystone2: env: Update UBIFS image pathsCarlos Hernandez2016-03-151-4/+5
| | | | | | | | | | | 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>
* ti_armv7_keystone2: configs: add usb mass storage supportMugunthan V N2016-03-151-0/+1
| | | | | | | | | 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>
* efi_loader: Pass proper device path in on bootAlexander Graf2016-03-151-0/+10
| | | | | | | | | | | | | | | | | 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>
* arm64: Replace fdt_name env variables with fdtfileAlexander Graf2016-03-153-8/+8
| | | | | | | | 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>
* efi_loader: Add distro boot script for removable mediaAlexander Graf2016-03-151-1/+46
| | | | | | | | | | | | | | | | | | 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>
* efi_loader: Implement memory allocation and mapAlexander Graf2016-03-151-0/+19
| | | | | | | | | | | | | | | | | | | 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>
* efi_loader: Add disk interfacesAlexander Graf2016-03-151-0/+2
| | | | | | | | | | | | | | | 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>
* efi_loader: Add runtime servicesAlexander Graf2016-03-151-0/+17
| | | | | | | | | | | | | | | | | 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>
* efi_loader: Add console interfaceAlexander Graf2016-03-151-0/+5
| | | | | | | | | | | | | | 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>
* efi_loader: Add boot time servicesAlexander Graf2016-03-151-0/+85
| | | | | | | | | | | | | | 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>
* efi_loader: Add PE image loaderAlexander Graf2016-03-152-0/+283
| | | | | | | | | 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>
* include/efi_api.h: Add more detailed API definitionsAlexander Graf2016-03-152-37/+163
| | | | | | | | | | | | 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>
* disk/part.c: Expose list of available block driversAlexander Graf2016-03-151-0/+7
| | | | | | | | | | | | | | 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>
* arm64: Remove non-full-va map codeAlexander Graf2016-03-155-20/+0
| | | | | | | | | | | 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>
* hikey: Add MMU tablesAlexander Graf2016-03-151-2/+3
| | | | | | | | 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>
* vexpress64: Add MMU tablesAlexander Graf2016-03-151-3/+3
| | | | | | | | 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>
* tegra: Replace home grown mmu code with generic table approachAlexander Graf2016-03-151-0/+2
| | | | | | | 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>
* zymqmp: Replace home grown mmu code with generic table approachAlexander Graf2016-03-151-0/+2
| | | | | | | 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>
* thunderx: Move mmu table into board fileAlexander Graf2016-03-151-11/+0
| | | | | | | | | 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>
* arm64: Make full va map code more dynamicAlexander Graf2016-03-151-8/+6
| | | | | | | | | | | | | | | | | | | 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>
* thunderx: Calculate TCR dynamicallyAlexander Graf2016-03-151-3/+0
| | | | | | | | 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>
* kc1: Power off when the power on reason is not a valid onePaul Kocialkowski2016-03-151-0/+6
| | | | | | | 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>
* input: TWL6030 input support for power button, USB and chargerPaul Kocialkowski2016-03-151-0/+21
| | | | | | | 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>
* power: twl6030: Power off supportPaul Kocialkowski2016-03-151-0/+7
| | | | | | This adds support for powering off (the omap SoC) from the twl6030. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* kc1: OMAP4 reboot mode supportPaul Kocialkowski2016-03-151-0/+4
| | | | | | | | 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>
* kc1: MUSB USB controller and fastboot USB gadget supportPaul Kocialkowski2016-03-151-0/+35
| | | | | | | | | 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>
* power: twl6030: Clear VUSB_IN_PMID bit on USB device setupPaul Kocialkowski2016-03-151-0/+1
| | | | | | | | | | | | 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>
* power: twl6030: Configure VUSB voltage on USB device setupPaul Kocialkowski2016-03-151-0/+2
| | | | | | This explicitly sets VUSB voltage to 3.3V when enabling USB. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* Amazon Kindle Fire (first generation) codename kc1 supportPaul Kocialkowski2016-03-151-0/+230
| | | | | | | | | | 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>
* omap-common: Remove deprecated arch_cpu_init codePaul Kocialkowski2016-03-152-2/+0
| | | | | | | 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>
OpenPOWER on IntegriCloud