aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2018-08-01dm: panel: get timings from panelYannick Fertré1-0/+18
Get timings from panel instead of read device tree. Signed-off-by: Yannick Fertré <yannick.fertre@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-30Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini4-8/+64
Patch queue for efi - 2018-07-25 Highlights this time: - Many small fixes to improve spec compatibility (found by SCT) - Almost enough to run with sandbox target - GetTime() improvements - Enable EFI_LOADER and HYP entry on ARMv7 with NONSEC=y
2018-07-30u-boot: remove driver lookup loop from env_save()Nicholas Faustini1-1/+1
When called with ENVOP_SAVE, env_get_location() only returns the gd->env_load_location variable without actually checking for the environment location and priority. This behaviour causes env_save() to fall into an infinite loop when the low-level drv->save() call fails. The env_save() function should not loop through the environment location list but it should save the environment into the location stored in gd->env_load_location by the last env_load() call. Signed-off-by: Nicholas Faustini <nicholas.faustini@azcomtech.com> Reviewed-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
2018-07-28tpm: allow TPM v1 and v2 to be compiled at the same timeMiquel Raynal1-6/+34
While there is probably no reason to do so in a real life situation, it will allow to compile test both stacks with the same sandbox defconfig. As we cannot define two 'tpm' commands at the same time, the command for TPM v1 is still called 'tpm' and the one for TPM v2 'tpm2'. While this is the exact command name that must be written into eg. test files, any user already using the TPM v2 stack can continue to do so by just writing 'tpm' because as long as TPM v1 support is not compiled, U-Boot prompt will search for the closest command named after 'tpm'. The command set can also be changed at runtime (not supported yet, but ready to be), but as one can compile only either one stack or the other, there is still one spot in the code where conditionals are used: to retrieve the v1 or v2 command set. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: In sandbox_tpm2_fill_buf() use NULL not \0 to ensure NULL terminated string due to LLVM warning] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-28tpm: fix typo in kernel docMiquel Raynal1-1/+1
The udevice given to the open() function of course must be opened, not closed. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-27Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini15-45/+39
2018-07-27openrd: Once again shrink binary sizeTom Rini2-11/+1
With some recent changes to relevant drivers here the openrd board (openrd_client in this case) does not fit within its size constraint. We can however drop the slightly extended baudrate table and then the duplication of mtdparts/mtdids in the default environment. These defaults are set in the environment by the 'mtdparts' command and otherwise referenced throughout the code. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-26net: phy: add ofnode node to struct phy_deviceGrygorii Strashko1-0/+13
Now the UCLASS_ETH device "node" field is owerwritten by some network drivers in case of Ethernet PHYs which are linked to UCLASS_ETH device using "phy-handle" DT property and when Ethernet PHY driver needs to read some additional information from DT. In such cases following happens (in general): - network drivers priv->phydev = phy_connect(priv->bus, priv->phyaddr, dev, priv->interface); <-- phydev is connected to dev which is UCLASS_ETH device if (priv->phy_of_handle > 0) dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle); <-- phydev->dev->node is overwritten by phy-handle DT node - PHY driver in .config() callback int node = dev_of_offset(dev); <-- PHY driver uses overwritten dev->node const void *fdt = gd->fdt_blob; if (fdtdec_get_bool(fdt, node, "property")) ... As result, UCLASS_ETH device can't be used any more for DT accessing. This patch adds additional ofnode node field to struct phy_device which can be set explicitly by network drivers and used by PHY drivers, so overwriting can be avoided. Also add helper function phy_get_ofnode() which will check and return phy_device->node or dev_ofnode(phydev->dev) for backward compatibility with existing drivers. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26phy: Break include cycleJoe Hershberger3-56/+67
Because some phy wants to export some functions [1], export.h was including the whole phy subsystem which pulls in lots of stuff that causes some ordering and redefinition issues. Split out the only part that is actually needed in export.h and include it there and in phy.h. [1] commit 95279315076c ("board/ls2085rdb: Export functions for standalone AQ FW load apps") Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: Consolidate the parsing of bootfileJoe Hershberger1-0/+11
The same basic parsing was implemented in tftp and nfs, so add a helper function to do the work once. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: When checking prerequisites, consider boot_file_nameJoe Hershberger1-0/+3
For net_boot_common, we allow the serverip to be specified as part of the boot file name. For net commands that require serverip, include that source as a valid specification of serverip. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Alexander Graf <agraf@suse.de>
2018-07-26armv8: ls1046ardb: Add falcon mode for for QSPI bootYork Sun2-6/+25
A new defconfig is introduced to support SPL boot from QSPI NOR flash. This is to support falcon mode for faster booting into Linux. Signed-off-by: York Sun <york.sun@nxp.com>
2018-07-26powerpc: mpc85xx: Drop u-boot-with-spl.bin on selected boardsYork Sun8-8/+0
For SoCs with PBL, u-boot-with-spl-pbl.bin is the final image for SPL boot. Drop unused u-boot-with-spl.bin. Signed-off-by: York Sun <york.sun@nxp.com> CC: Ashish Kumar <ashish.kumar@nxp.com> CC: Ruchika Gupta <ruchika.gupta@nxp.com> CC: Priyanka Jain <priyanka.jain@nxp.com> CC: Shengzhou Liu <Shengzhou.Liu@nxp.com>
2018-07-26armv8: layerscape: Drop u-boot-with-spl.bin for selected boardsYork Sun4-6/+0
For SPL boot with PBL, u-boot-with-spl-pbl.bin is the final image. Drop unused u-boot-with-spl.bin. Signed-off-by: York Sun <york.sun@nxp.com> CC: Mingkai Hu <mingkai.hu@nxp.com> CC: Ruchika Gupta <ruchika.gupta@nxp.com> CC: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> CC: Udit Agarwal <udit.agarwal@nxp.com> CC: Sumit Garg <sumit.garg@nxp.com> CC: Priyanka Jain <priyanka.jain@nxp.com>
2018-07-26armv8: ls1046ardb: Enable IFC for SPL buildYork Sun1-1/+3
Commit a52ff334c5b1 ("armv8: ls1046ardb: SPL size reduction") reduced image size for SPL. IFC was disabled. If PPA is loaded in SPL, MMU is enabled as a result. Removing IFC skips IFC region in the MMU table, causing later failure in RAM version U-boot when accessing CPLD through IFC. Only disable IFC if PPA is not enabled for SPL. Signed-off-by: York Sun <york.sun@nxp.com>
2018-07-26armv8: ls1046ardb: ls1046aqds: Move SPL macros to defconfigYork Sun1-9/+0
Instead of defining Kconfig macros in header file, move them to defconfig files. Signed-off-by: York Sun <york.sun@nxp.com>
2018-07-26armv8: ls2088ardb: Move CONFIG_SPI_FLASH, CONFIG_SPI_FLASH_SPANSION to defconfigAshish Kumar1-4/+0
Move CONFIG_SPI_FLASH_SPANSION, CONFIG_SPI_FLASH, to defconfig. Also disable disable 4K erase size option. Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-07-26LS1088ARDB: Secure Boot:Change load address of dpl header in SDVinitha V Pillai1-1/+1
Change address of DPL header in SD. Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-07-26armv8: ls1088a: change dpl load command from apply to lazyapplyJagdish Gediya2-11/+11
use "fsl_mc lazyapply dpl addr" instead of "fsl_mc apply dpl addr" change dpl load addr to 0x80001000 from 0x80200000 because dpl gets corrupted at 0x80200000 during bootm command excecution. Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-07-25efi_loader: remove unused efi_get_time_init()Heinrich Schuchardt1-1/+0
Remove unused function efi_get_time_init(). Initialization of the RTC has to be done in board bring up not in the EFI subsystem. There is no RTC device in the UEFI spec. The RTC is only accessed through the runtime services. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-25efi_loader: correct signature of CalculateCrc32()Heinrich Schuchardt1-2/+3
Use const for the buffer. We are not changing the buffer. Use efi_uintn_t where prescribed by the UEFI spec. Prefer u32 over uint32_t. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-25efi_loader: allocate configuration table arrayHeinrich Schuchardt1-0/+3
The system table contains a link to the list of configurations tables. These include the device tree, SMBIOS table, and the ACPI table. This array is currently statically linked. With the patch it is allocated as EFI_RUNTIME_SERVICES_DATA. Due to the structure of the system table we cannot work with a linked list here. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-25efi_loader: calculate crc32 for EFI tablesHeinrich Schuchardt1-0/+2
For the boot and runtime services tables and for the system table the crc32 has to be set in the header. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-25efi_loader: provide firmware revisionHeinrich Schuchardt1-1/+1
Provide a firmware revision in the system table using the Makefile variables VERSION and PATCHLEVEL, e.g. 0x20180700 for v2018.07. Correct the type of the firmware vendor. It is a u16* pointer. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-25efi_loader: correct EFI_RUNTIME_SERVICES_SIGNATUREHeinrich Schuchardt1-1/+1
The value for EFI_RUNTIME_SERVICES_SIGNATURE does not match the UEFI spec 2.7. Reported-by: Takahiro Akashi <takahiro.akashi@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-25efi_loader: specify UEFI spec revisionHeinrich Schuchardt1-1/+4
Both in the boot and the runtime services tables we have to specify the UEFI spec revision. The same value is already used for the system table. So let's use a common constant. In the boot services table we have to provide the header signature. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-25efi_loader: set revision in loaded image protocolHeinrich Schuchardt1-0/+2
The revision number has to be set in the loaded image protocol. The problem was detected by running the SCT in Protocol/LoadedImage/BlackBoxTest/LoadedImageBBTestMain.c:890 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-25efi_loader: check map_key in ExitBootServicesHeinrich Schuchardt1-0/+3
The UEFI spec requires that the memory map key is checked in ExitBootServices(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-25efi_loader: Rename sections to allow for implicit dataAlexander Graf1-2/+2
Some times gcc may generate data that is then used within code that may be part of an efi runtime section. That data could be jump tables, constants or strings. In order to make sure we catch these, we need to ensure that gcc emits them into a section that we can relocate together with all the other efi runtime bits. This only works if the -ffunction-sections and -fdata-sections flags are passed and the efi runtime functions are in a section that starts with ".text". Up to now we had all efi runtime bits in sections that did not interfere with the normal section naming scheme, but this forces us to do so. Hence we need to move the efi_loader text/data/rodata sections before the global *(.text*) catch-all section. With this patch in place, we should hopefully have an easier time to extend the efi runtime functionality in the future. Signed-off-by: Alexander Graf <agraf@suse.de> [agraf: Fix x86_64 breakage]
2018-07-25elf: Move x86 reloc defines to common elf.hAlexander Graf1-0/+35
We need to know about x86 relocation definitions even in cases where we don't officially build against the x86 target, such as with sandbox. So let's move the x86 definitions into the common elf header, where all other architectures already have them. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-25efi_loader: Introduce ms abi vararg helpersAlexander Graf1-0/+8
Varargs differ between sysv and ms abi. On x86_64 we have to follow the ms abi though, so we also need to make sure we use x86_64 varargs helpers. This patch introduces generic efi vararg helpers that adhere to the respective EFI ABI. That way we can deal with them properly from efi loader code and properly interpret variable arguments. This fixes the InstallMultipleProtocolInterfaces tests in the efi selftests on x86_64 for me. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-24Merge branch 'master' of git://git.denx.de/u-boot-uniphierTom Rini2-47/+48
2018-07-25ARM: uniphier: enable distro bootMasahiro Yamada1-44/+40
Switch to the distro boot for UniPhier platform. - Remove the environment vairalbes used to load images from raw block devices. - Keep the command to download images via tftp. This will be useful to boot the kernel when no valid kernel image is ready yet in the file system. - Use root.cpio.gz instead of root.cpio.uboot because we always know the file size of the init ramdisk; it is loaded via either a file system or network. - Rename fit_addr_r to kernel_addr_r, which the distro command checks to get the load address of FIT image. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-07-25fdt_support: make fdt_fixup_mtdparts() prototype more specificMasahiro Yamada1-3/+8
The second argument of fdt_fixup_mtdparts() is an opaque pointer, 'void *node_info', hence callers can pass any pointer. Obviously, fdt_fixup_mtdparts() expects 'struct node_info *' otherwise, it crashes run-time. Change the prototype so that it is compile-time checked. Also, add 'const' qualifier to it so that callers can constify the struct node_info arrays. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-24config: remove unused CONFIG_SPL_RELOC_STACK_SIZEHeinrich Schuchardt12-12/+0
Symbol CONFIG_SPL_RELOC_STACK_SIZE is not used anywhere. So remove it. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-07-24board: STiH410-B2260: Set SYS_BOOTM_LEN to 16MPatrice Chotard1-0/+3
With recent kernel v4.18-rcx, uImage becomes bigger than 8MB. Set SYS_BOOTM_LEN to 16MB, this fix the following error message: "Fix Loading Kernel Image ... Image too large: increase CONFIG_SYS_BOOTM_LEN" Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-07-24mtd: remove stale comment in mtd_oob_ops structureMiquel Raynal1-4/+0
A comment in the kernel doc of the mtd_oob_ops structure tells that it is not possible to write more than one page with OOB. This was probably true at some time in the past but today it is entirely wrong. As one can see for instance in the nand_do_write_ops() helper available in the NAND core, this implementation called by mtd->_write_oob() simply loops over the pages until everything has been written. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2018-07-23mtd: nand: add new enum for storing ECC algorithmRafał Miłecki1-0/+8
Our nand_ecc_modes_t is already a bit abused by value NAND_ECC_SOFT_BCH. This enum should store ECC mode only and putting algorithm details there is a bad idea. It would result in too many values impossible to support in a sane way. To solve this problem let's add a new enum. We'll have to modify all drivers to set it properly but once it's done it'll be possible to drop NAND_ECC_SOFT_BCH. That will result in a cleaner design and more possibilities like setting ECC algorithm for hardware ECC mode. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Linux commit: b0fcd8ab7b3c89b5da7fff5224d06ed73e7a33cc] [Philippe Reynes: adapt code to u-boot] Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2018-07-23Convert CONFIG_DA8XX_GPIO to KconfigAdam Ford4-4/+0
This converts the following to Kconfig: CONFIG_DA8XX_GPIO Signed-off-by: Adam Ford <aford173@gmail.com>
2018-07-23doc: Replace DocBook with sphinx-based docsMario Six1-111/+53
The Linux kernel moved to sphinx-based documentation and got rid of the DocBook based documentation quite a while ago. Hence, the DocBook documentation for U-Boot should be converted as well. To achieve this, import the necessary files from Linux v4.17, and convert the current DocBook documentation (three files altogether) to sphinx/reStructuredText. For now, all old DocBook documentation was merged into a single handbook, tentatively named "U-Boot Hacker Manual". For some source files, the documentation style was changed to comply with kernel-doc; no functional changes were applied. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-07-23ARM: dts: Resync OMAP3 and omap36xx with Linux 4.18-RC4Adam Ford1-0/+22
There have been several minor changes to the OMAP3.dtsi, so this patch re-syncs it with Linux. An addition include/dt-binding was also brought with it. Signed-off-by: Adam Ford <aford173@gmail.com>
2018-07-23m68k: m5253evbe: Remove this boardTom Rini1-163/+0
The m5253evbe board has been marked as orphan since June of 2014 and should have been dropped a while ago. Do so now. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-23Merge branch 'master' of git://git.denx.de/u-boot-imxTom Rini5-68/+299
trini: Update colibri-imx6ull to use Kconfig for mtdparts related options. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-23configs: imx6q_logic: Cleanup ramdiskaddr and fdtaddrAdam Ford1-11/+9
There are already definitions for ramdisk_addr_r and fdt_addr_r, so having a duplicate copy called ramdiskaddr and fdtaddr is confusing. This patch converts any references to ramdisk_addr_r and fdt_addr_r and removes the duplicates. Signed-off-by: Adam Ford <aford173@gmail.com>
2018-07-23imx: i.mx6q: imx6q_logic: Migrate to SPL and enable SDPAdam Ford1-2/+24
Since the vast majority of i.MX6 boards are migrating to SPL, this patch converts im6q_logic to SPL and enables the SDP for loading SPL and u-boot.img over USB. The Falcon mode only supports NAND flash as of now due to limited space/RAM, but all i.MX6D/Q SOM's from Logic PD have internal NAND from which to boot. Signed-off-by: Adam Ford <aford173@gmail.com>
2018-07-23pico-imx7d: Allow default fdtfile to be overridden by defconfigOtavio Salvador1-1/+1
This allow the addition of extra default configurations for each baseboard, removing the boot menu when user boots for the first time. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-07-23pico-imx7d: Add Falcon mode supportFabio Estevam1-0/+12
Falcon mode boots the kernel directly from SPL, without loading the full U-Boot. As pico-imx7d does not have a GPIO for selecting Falcon versus normal mode, enter in Falcon mode when the customer selects the CONFIG_SPL_OS_BOOT option in menuconfig. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-07-23pico-imx7d: Add bootmenu to choose the baseboardOtavio Salvador1-1/+11
Currently the baseboards do not offer a way to autodetect which one is in use, so we ask the user if no value has been set. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-07-23pico-imx7d: Add support for update SPL using DFUFabio Berton1-1/+3
Add spl entry on dfu_alt_info to be able to update U-Boot with SPL for pico imx7d board. Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-07-23pico-imx7d: Add SPL supportFabio Estevam1-1/+1
Convert pico-imx7d to SPL support. There are two variants of pico-imx7d SOMs: - One with 512MB of RAM - One with 1GB of RAM The 512MB module contains two Hynix H5TC2G63GFR-PBA. The 1GB module contains two Hynix H5TC4G63GFR-PBA. The RAM size is determined in runtime by reading GPIO1_12. While at it, also add USB Serial Download mode support as it is very helpful for loading SPL and u-boot.img via imx_usb_loader. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>