summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2019-02-16efi_loader: use efi_start_image() for bootefiHeinrich Schuchardt
Remove the duplicate code in efi_do_enter() and use efi_start_image() to start the image invoked by the bootefi command. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-02-16efi_loader: set entry point in efi_load_pe()Heinrich Schuchardt
Up to now efi_load_pe() returns the entry point or NULL in case of an error. This does not allow to return correct error codes from LoadImage(). Let efi_load_pe() return a status code and fill in the entry point in the corresponding field of the image object. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-02-16efi_loader: LoadImage: always allocate new pagesHeinrich Schuchardt
If we want to properly unload images in Exit() the memory should always be allocated in the same way. As we allocate memory when reading from file we should do the same when the original image is in memory. A further patch will be needed to free the memory when Exit() is called. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-02-14arm64: zynqmp: Remove board config filesMichal Simek
All options have been moved to Kconfig and there is no need to have board header files. Mini configurations require them that's why they are still there. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-14arm64: zynqmp: Remove SPD related configurationsMichal Simek
SPD autodetection hasn't been enabled that's why there is zero size difference if that options are enabled/disabled. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-14arm64: zynqmp: Fix logic around CONFIG_ZYNQ_SDHCIMichal Simek
Replace SDHCI controller listing by Kconfig symbol to let SPL know that this board is using multiple SDHCIs controllers. Kconfig help message should explain why this is needed. Origin symbols were used in full u-boot but with moving to distro boot this was fixed already. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-14arm64: zynqmp: Switch all platforms to DM_I2CMichal Simek
CONFIG_PCA953X is not needed because of PCA953X is integrated in gpio subsystem already. That's why also remove CMD_PCA953X which is only for this driver. zcu102/zcu104-revC/zcu106/zcu111 contain links to eeprom which stores MAC address. DM_I2C is not enabled for the whole SoC because it increase size for mini configurations and there is no I2C symbol present to setup dependencies. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-02-14ARM: zynq: Convert dlc20 and zc70x board to DM_I2CMichal Simek
All these board have also eeprom enabled that's why it is also enabled via defconfig. There is also no need to have zc70x specific config file that's why also remove it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-02-14ARM: zynq: Convert Syzygy to DM_I2CMichal Simek
Boards have only one controller enabled that's why move to DM_I2C is easy. Add also i2c alias for not to be shown as i2c bus -1 because alias doesn't exist. Config file points to MAC stored in eeprom but it is not listed that's why I have added 24c08 part. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-02-14arm64: versal: Add mini configuration for VersalSiva Durga Prasad Paladugu
This patch adds new mini target for versal. This configuration is very minimal in size which runs from OCM. It contains support for mtest which can be used for running DDR memory tests. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-14arm64: versal: Define distro boot commnads for qspi ospi and mmcSiva Durga Prasad Paladugu
This patch adds distro boot commands for qspi, ospi and mmc. The distro boot commands now reads the script from flash offset of 63.5MB for qspi and ospi and executes it. For mmc its same as generic distro boot command. As either one of the qspi or ospi can exist on hardware, defined a single distroboot command as xspi that works for both. Setup default location via script_offset_f to 63.5MB to match the most xilinx reference boards for qspi, ospi for now. 512kB allocated space for script size (script_size_f) should be more than enough to cover custom boot logic. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-14arm: zynq: Define distro boot commnads for qspi, nand and norSiva Durga Prasad Paladugu
This patch adds distro boot commands for qspi, nand and nor. The distro boot commands now reads the script from flash offset of 15.75MB and executes it. Setup default location via script_offset_f to 15.75MB to match the most xilinx reference boards for qspi, nand and set the same using script_offset_nor to 0xE2EC0000 for nor. 256kB allocated space for script size (script_size_f) should be more than enough to cover custom boot logic. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-14arm64: versal: Add mini eMMC configurationSiva Durga Prasad Paladugu
This patch adds mini eMMC configuration which has only emmc0 and emmc1 functionalities and can run from small amount of memory. This is required for memory constraint devices. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-14xilinx: Move zynq_board_read_rom_ethaddr to shared locationMichal Simek
Zynq and ZynqMP are sharing similar code and there is no reason to do code duplication. Move zynq_board_read_rom_ethaddr() to common file for easier conversion to DM. Use ZynqMP version that's why also add CONFIG_ZYNQ_EEPROM_BUS to Syzygy which is only one Zynq board which is using this feature. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-14arm64: zynqmp: Define distro boot commnads for qspi and nandSiva Durga Prasad Paladugu
This patch adds distro boot commands for qspi and nand. The distro boot commands now reads the script from flash offset of 63.5MB and executes it. Setup default location via script_offset_f to 63.5MB to match the most xilinx reference boards. 512kB allocated space for script size (script_size_f) should be more than enough to cover custom boot logic. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-14ARM: zynq: Run distribution boot commands firstMichal Simek
This patch is doing two things. 1. Exchanging order of boot commands. distro_bootcmd is run first followed by Xilinx boot command. 2. Remove CONFIG_BOOTCOMMAND from configs (and follow mainline) by creating Xilinx distribution bootcommand and wiring it as the last bootcommand. QSPI, NAND distribution boot command will be added later. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-13efi: hii: add HII config routing/access protocolsAKASHI Takahiro
This patch is a place holder for HII configuration routing protocol and HII configuration access protocol. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi: hii: add keyboard layout package supportAKASHI Takahiro
Allow for handling keyboard layout package in HII database protocol. A package can be added or deleted in HII database protocol, but we don't set 'current' keyboard layout as there is no driver that requests a keyboard layout. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi: hii: add guid package supportAKASHI Takahiro
Allow for handling GUID package in HII database protocol. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi_loader: Initial HII database protocolsLeif Lindholm
This patch provides enough implementation of the following protocols to run EDKII's Shell.efi and UEFI SCT: * EfiHiiDatabaseProtocol * EfiHiiStringProtocol Not implemented are: * ExportPackageLists() * RegisterPackageNotify()/UnregisterPackageNotify() * SetKeyboardLayout() (i.e. *current* keyboard layout) HII database protocol in this patch series can handle only: * GUID package * string package * keyboard layout package (The other packages, except Device path package, will be necessary for interactive and graphical UI.) Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi_loader: remove duplicate GUID definitionHeinrich Schuchardt
Remove duplicate definition o EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi_loader: use u16* for file nameHeinrich Schuchardt
UTF-16 strings in our code should all be u16 *. Fix an inconsistency for file names which may lead to a warning for printf("%ls", ). Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi_loader: refactor switch to non-secure modeHeinrich Schuchardt
Refactor the switch from supervisor to hypervisor to a new function called at the beginning of do_bootefi(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi_loader: efi_set_variable use const void *Heinrich Schuchardt
The SetVariable() runtime service does not change the data passed to it. So mark the parameter as constant. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi_loader: use const efi_guid_t * for variable servicesHeinrich Schuchardt
The runtime variable services never change GUIDs. So we should declare the GUID parameters as constant. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi_loader: move efi_init_obj_list() to a new efi_setup.cAKASHI Takahiro
The function, efi_init_obj_list(), can be shared in different pseudo efi applications, like bootefi/bootmgr as well as my efishell. Moreover, it will be utilized to extend efi initialization, for example, my "removable disk support" patch and "capsule-on-disk support" patch in the future. So with this patch, it will be moved to a new file, efi_setup.c, under lib/efi_loader and exported, making no changes in functionality. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Remove lines deactivated by #if 1 #else Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi_loader: signature of StartImage and ExitHeinrich Schuchardt
We use u16* for Unicode strings and efi_uintn_t for UINTN. Correct the signature of efi_exit() and efi_start_image(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13distro: not taint environment variables if possibleAKASHI Takahiro
The aim of this patch is not to have temporary variables used in distro_bootcmd left as environment variables after run something. See the discussion[1]. Without this patch, saveenv command also saves those variables, too. While they are apparently safe, scsi_need_init can be harmful. Please note that, in most cases, a variable should be converted to hush's local variable, while "devplist" cannot because it is created by "part" command as an environment variable. [1] https://lists.denx.de/pipermail/u-boot/2018-December/350209.html Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13distro_bootcmd: add NVME supportHeinrich Schuchardt
Some boards support NVME drives. We should be able to use them as boot devices. NVME access requires running 'nvme scan'. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13lib: add u16_strcpy/strdup functionsAkashi, Takahiro
Add u16_strcpy() and u16_strdup(). The latter function will be used later in implementing efi HII database protocol. Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi_loader: struct efi_configuration_tableHeinrich Schuchardt
Commit 393fccdf6c73 ("efi_loader: efi_guid_t must be 64-bit aligned") has changed the alignment of efi_guid_t. This changed the size of struct efi_configuration_table on 32-bit systems form 20 to 24 bytes. As an array of this type is pointed to by the system table this breaks compatibility with existing versions of GRUB and Linux. Let's get back the original size by using the attribute __packed. Fixes: 393fccdf6c73 ("efi_loader: efi_guid_t must be 64-bit aligned") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi_loader: efi_guid_t must be 64-bit alignedHeinrich Schuchardt
The UEFI Specification Version 2.7 Errata A defines: "EFI_GUID 128-bit buffer containing a unique identifier value. Unless otherwise specified, aligned on a 64-bit boundary." Before this patch efi_guid_t was 8-bit aligned. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-11Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini
- DM I2C improvements
2019-02-10Merge tag 'dm-pull-10feb19' of git://git.denx.de/u-boot-dmTom Rini
Samsung sound patches (applied for Samsung maintainer) Common sound support buildman environment support of-platdata documentation improvements
2019-02-09sound: i2s: Tidy up a few commentsSimon Glass
Fix a struct typo and drop a comment (and function prototype) which is not actually used. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-02-09power: regulator: Introduce regulator_set_enable_if_allowed apiLokesh Vutla
regulator_set_enable() api throws an error in the following three cases: - when requested to disable an always-on regulator - when set_enable() ops not provided by regulator driver - when enabling is actually failed.(Error returned by the regulator driver) Sometimes consumer drivers doesn't want to track the first two scenarios and just need to worry about the case where enabling is actually failed. But it is also a good practice to have an error value returned in the first two cases. So introduce an api regulator_set_enable_if_allowed() which ignores the first two error cases and returns an error as given by regulator driver. Consumer drivers can use this api need not worry about the first two error conditions. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-02-09fdt: tegra: Drop COMPAT_AMS_AS3722Simon Glass
This is no-longer used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-02-09fdt: samsung: Drop unused fdt_compat_id valuesSimon Glass
This enum still exists but we can shrink it a little based on recent driver-model conversions with samsung. Update it to remove unused items. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-02-09exynos: Drop duplicate 'model' lineSimon Glass
At present the model is shown twice, once in the generic code and once in the exynos code. Drop the latter. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2019-02-09Convert CONFIG_BOARD_TYPES to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_BOARD_TYPES Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2019-02-09am65x_evm: Allow bootm to load larger kernelsAndrew F. Davis
Bootm will fail to load kernels over 8MB, this is not enough for our 64bit kernel images. Increase this to 64MB. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-02-09bcm963158: add initial supportPhilippe Reynes
This add the initial support of the broadcom reference board bcm963158 with a bcm63158 SoC. This board has 1 GB of ram, 512 MB of flash (nand), 2 usb port, 1 uart, 4 ethernet ports (LAN), 1 ethernet port (WAN). Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-02-09initcall: Move to inline functionAlexander Graf
The board_r init function was complaining that we are looping through an array, calling all our tiny init stubs sequentially via indirect function calls (which can't be speculated, so they are slow). The solution to that is pretty easy though. All we need to do is inline the function that loops through the functions and the compiler will automatically convert almost all indirect calls into direct inlined code. With this patch, the overall code size drops (by 40 bytes on riscv64) and boot time should become measurably faster for every target. Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-09dts: stm32mp1: clock tree updatePatrick Delaunay
- Add st,digbypass on clk_hse node (needed for board rev.C) - MLAHB/AHB max frequency increased from 200 to 209MHz, with: - PLL3P set to 208.8MHz for MCU sub-system - PLL3Q set to 24.57MHz for 48kHz SAI/SPI2S - PLL3R set to 11.29MHz for 44.1kHz SAI/SPI2S - PLL4P set to 99MHz for SDMMC and SPDIFRX - PLL4Q set to 74.25MHz for EVAL board Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-02-09omap3_cairo: remove empty #ifdef/#endif blockChris Packham
The content between these guards was removed in commit 9baa2bce2890 ("Removed unused references to CONFIG_SERIALx"). Remove the now empty #ifdef/#endif block and the accompanying comment. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2019-02-09test: provide unit test for memory functionsHeinrich Schuchardt
Memory functions may have architecture specific implementations. These should be tested. Provide unit tests for memset(), memcpy(), memmove(). Provide a 'ut lib' sub-command to execute the tests. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-02-08dm: core: Introduce dev_read_alias_highest_id()Michal Simek
It is wrapper for calling of_alias_get_highest_id() when live tree is enabled and fdtdec_get_alias_highest_id() if not. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-02-08fdt: Introduce fdtdec_get_alias_highest_id()Michal Simek
Find out the highest alias ID used for certain subsystem. This call will be used for alocating IDs for i2c buses which are not described in DT. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-02-08dm: core: Add of_alias_get_highest_id()Michal Simek
The same functionality was added to Linux for i2c bus registration with this commit message: " of: base: add function to get highest id of an alias stem I2C supports adding adapters using either a dynamic or fixed id. The latter is provided by aliases in the DT case. To prevent id collisions of those two types, install this function which gives us the highest fixed id, so we can then let the dynamically created ones come after this highest number. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> " Add it also to U-Boot for DM I2C support. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-02-07Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini
- SPI-NOR support