summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* pci: sandbox: Support dynamically binding device driverBin Meng2018-08-081-1/+2
| | | | | | | | | | At present all emulated sandbox pci devices must be present in the device tree in order to be used. The real world pci uclass driver supports pci device driver matching, and we should add such support on sandbox too. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: core: Add ofnode function to read PCI vendor and device idBin Meng2018-08-081-0/+13
| | | | | | | | We don't have the live-tree version of fdtdec_get_pci_vendev(). This adds the API. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: Correct typos in uclass_first/next_device_check()Bin Meng2018-08-081-2/+2
| | | | | | | Correct typos in the comment block of uclass_first/next_device_check(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* pci: Remove 440ep-specific macrosBin Meng2018-08-081-15/+0
| | | | | | | | These macros should not be put in the generic pci.h header file. Since they are not referenced anywhere, remove them completely. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge tag 'xilinx-for-v2018.09-rc2' of git://git.denx.de/u-boot-microblazeTom Rini2018-08-078-11/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xilinx fixes for v2018.09-rc2 xilinx: - Add support for zybo z7 and ultra96 - Tune zynq and zynqmp mini configurations - Move SYS_MALLOC_LEN to Kconfig fdt - make static funcs gpio: - Fix soft gpio driver - Fix Zynq gpio driver by using platdata microblaze: - Fix Kconfig entry spi - Move ISSI to Kconfig
| * Kconfig: Move config SYS_MALLOC_LEN to Kconfig for zynqSiva Durga Prasad Paladugu2018-08-062-5/+0
| | | | | | | | | | | | | | | | | | | | This patch moves the the config SYS_MALLOC_LEN to Kconfig. It will be just for Zynq arch and to do will be for all other archs. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm: zynqmp: Move NR_DRAM_BANKS for mini confirationMichal Simek2018-08-064-3/+1
| | | | | | | | | | | | | | There is no reason to have the same setting in subsequent config if we can have it only once in shared. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * spi: Kconfig: Create ISSI Kconfig entryMichal Simek2018-08-063-3/+0
| | | | | | | | | | | | | | Add ISSI to Kconfig to make it selectable via menuconfig. Also convert all current platforms. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | Merge git://git.denx.de/u-boot-marvellTom Rini2018-08-079-49/+120
|\ \
| * | arm64: a37xx: add CONFIG_MTD_DEVICE and CONFIG_MTD_PARTITIONSVladimir Vid2018-08-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_MTD_DEVICE is required for the mtdparts command and but it is missing from the mvebu_armada-37xx.h CONFIG_MTD_PARTITIONS is needed for the ubi support. Some of the Marvell based devices may require this as well. Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr> Signed-off-by: Luka Perkov <luka.perkov@sartura.hr> Signed-off-by: Stefan Roese <sr@denx.de>
| * | ARM: kirkwood: add SBx81LIFXCAT boardChris Packham2018-08-071-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a series of line cards for Allied Telesis's SBx8100 chassis switch. The CPU block is common to the SBx81GP24 and SBx81GT24 cards cards collectively referred to as SBx81LIFXCAT in u-boot. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | configs: kirkwood: Move RTC_MV to DM and KconfigChris Packham2018-08-078-42/+0
| | | | | | | | | | | | | | | | | | | | | | | | Now that there is DM support in the RTC_MV driver update board configs to use it. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | configs: move RTC_MV config from mv-plug-common.h to boardsChris Packham2018-08-075-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | To aid in migrating CONFIG_RTC_MV to Kconfig move the definition of it from mv-plug-common.h to the board config headers that nest it. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | mvebu: clearfog: use kconfig symbols to select boot deviceBaruch Siach2018-08-061-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | This allows selection of the boot device at build time without source code modification. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
| * | mvebu: consolidate SPL boot device config symbolsBaruch Siach2018-08-061-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | Use MVEBU_SPL_BOOT_DEVICE_* to select between SPI and MMC, instead of board specific symbols. This commit enables the boot device selection menu to all mvebu platforms, but it is only effective on Turris Omnia and gdsys Controlcenter DC platforms. A following commit will enable boot selection for other platforms. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2018-08-071-0/+18
|\ \
| * | dm: panel: get timings from panelYannick Fertré2018-08-011-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>
* | | i2c: imx_lpi2c: add uclass api supportPeng Fan2018-08-061-0/+3
| | | | | | | | | | | | | | | | | | | | | Use uclass clk api to get per clk when CONFIG_CLK enabled. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
* | | power-domain: add dummy functions when CONFIG_POWER_DOMAIN not definedPeng Fan2018-08-061-0/+29
| |/ |/| | | | | | | | | | | | | Add dummy functions when CONFIG_POWER_DOMAIN not defined. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini2018-08-0411-28/+260
|\ \
| * | configs: sunxi: Drop CONFIG_SUNXI_USB_PHYSJagan Teki2018-07-316-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | Now number of PHY on Allwinner is handling via dt data, drivers at phy/allwinner/phy-sun4i-usb.c Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
| * | sunxi: add support for Allwinner H6 SoCIcenowy Zheng2018-07-314-0/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allwinner H6 is a new SoC from Allwinner features USB3 and PCIe interfaces. This patch adds support for it. The corresponding DTSI file, from Linux next-20180720, is also introduced. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
| * | sunxi: change GIC address on H6Icenowy Zheng2018-07-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the Allwinner H6 chip has a new memory map, its GIC MMIO address is thus different. Change the address on H6. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
| * | sunxi: add config for SPL at 0x20000 on H6Icenowy Zheng2018-07-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the new Allwinner H6 SoC, the SRAM A2 address (SPL load address) is at 0x20000, which is different with any old Allwinner SoCs. Add SPL position and size configuration for this. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jagan Teki <jagan@openedev.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
| * | sunxi: change SUNXI_HIGH_SRAM option to SUNXI_SRAM_ADDRESSIcenowy Zheng2018-07-311-8/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new Allwinner H6 SoC has its SRAM A1 at neither 0x0 nor 0x10000, but it's at 0x20000. Thus the SUNXI_HIGH_SRAM option needs to be refactored to support this new configuration. Change it to SUNXI_SRAM_ADDRESS, which holds the real address of SRAM A1 in the memory map. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
* | ti_omap3_common: Add CONFIG_SYS_NS16550_COMx entriesAdam Ford2018-08-033-8/+2
| | | | | | | | | | | | | | | | | | | | | | Several boards do not use the default UART3, so they do a check for ifdef CONFIG_SPL_BUILD and enable the pointer for CONFIG_SYS_NS16550_COMx to point to OMAP34XX_UARTx. Let's consoldate this all into one place, and remove them from the individual boards. Signed-off-by: Adam Ford <aford173@gmail.com>
* | clk: add clk_valid()Fabrice Gasnier2018-08-031-0/+10
| | | | | | | | | | | | | | | | | | Add clk_valid() to check for optional clocks are valid. Call clk_valid() in test/dm/clk.c and add relevant test routine to sandbox clk tests. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Add Beaglebone Enhanced supportKoen Kooi2018-08-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black, but with the following differences: * Gigabit capable PHY * Extra USB hub, optional i2c control * lps3331ap barometer connected over i2c * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c * 1GiB DDR3 RAM * RTL8723 Wifi/Bluetooth connected over USB Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Reviewed-by: Tom Rini <trini@konsulko.com>
* | binman: Add a new 'image-pos' propertySimon Glass2018-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present each entry has an offset within its parent section. This is useful for figuring out how entries relate to one another. However it is sometimes necessary to locate an entry within an image, regardless of which sections it is nested inside. Add a new 'image-pos' property to provide this information. Also add some documentation for the -u option binman provides, which updates the device tree with final entry information. Since the image position is a better symbol to use for the position of U-Boot as obtained by SPL, update the SPL symbols to use this instead of offset, which might be incorrect if hierarchical sections are used. Signed-off-by: Simon Glass <sjg@chromium.org>
* | binman: Rename 'position' to 'offset'Simon Glass2018-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After some thought, I believe there is an unfortunate naming flaw in binman. Entries have a position and size, but now that we support hierarchical sections it is unclear whether a position should be an absolute position within the image, or a relative position within its parent section. At present 'position' actually means the relative position. This indicates a need for an 'image position' for code that wants to find the location of an entry without having to do calculations back through parents to discover this image position. A better name for the current 'position' or 'pos' is 'offset'. It is not always an absolute position, but it is always an offset from its parent offset. It is unfortunate to rename this concept now, 18 months after binman was introduced. However I believe it is the right thing to do. The impact is mostly limited to binman itself and a few changes to in-tree users to binman: tegra sunxi x86 The change makes old binman definitions (e.g. downstream or out-of-tree) incompatible if they use the 'pos = <...>' property. Later work will adjust binman to generate an error when it is used. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Merge tag 'arc-updates-for-2018.09-rc2' of git://git.denx.de/u-boot-arcTom Rini2018-08-011-0/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That's a set of prety minor changes and fixes for ARC. Among them: * Improvement in CREG GPIO driver used on ARC dev boards that allow us to re-use the driver for SPI's chip select * Enable SPI-flsh on AXS10x boards which allows to update U-Boot binary that gets loaded by boot-ROM * Fix accommodating always utilized unaligned access by GCC for ARC starting from 8.1.0
| * | ARC: AXS10x: add tool and make target to generate bspEugeniy Paltsev2018-07-311-0/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | AXS10x boards have preloader that reads SPI flash pages and searches special image header to fetch and load binary. Add tool, make target (bsp-generate) to generate update script and u-boot binary image with header for preloader. Also add script to default environment to apply updates. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* | Merge git://git.denx.de/u-boot-mpc85xxTom Rini2018-07-312-2/+0
|\ \ | |/ |/|
| * Revert "powerpc/T104xRDB: Fix endian access issue on EHCI intinalization"Ran Wang2018-07-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | There was an EHCI endian accessor issue. Now it's fixed by commit 9829ce2ff25c ("usb: ehci: Fix accessors for big-endian platforms and descriptors"). Revert commit e6a727fffec7 ("powerpc/T104xRDB: Fix endian access issue on EHCI intinalization"). On T104x platform, USB EHCI register use little endian. Signed-off-by: Ran Wang <ran.wang_1@nxp.com> [YS: revised commit message] Reviewed-by: York Sun <york.sun@nxp.com>
| * Revert "powerpc/p1_p2_rdb_pc: Fix endian access issue on EHCI intinalization"Ran Wang2018-07-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | There was an EHCI endian accessor issue. Now it's fixed by commit 9829ce2ff25c ("usb: ehci: Fix accessors for big-endian platforms and descriptors"). Revert commit 0f2296bab141 ("powerpc/p1_p2_rdb_pc: Fix endian access issue on EHCI intinalization"). On P1 P2 platforms, USB EHCI register use little endian. Signed-off-by: Ran Wang <ran.wang_1@nxp.com> [YS: revised commit message] Reviewed-by: York Sun <york.sun@nxp.com>
* | Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2018-07-304-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
| * | efi_loader: remove unused efi_get_time_init()Heinrich Schuchardt2018-07-251-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>
| * | efi_loader: correct signature of CalculateCrc32()Heinrich Schuchardt2018-07-251-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>
| * | efi_loader: allocate configuration table arrayHeinrich Schuchardt2018-07-251-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>
| * | efi_loader: calculate crc32 for EFI tablesHeinrich Schuchardt2018-07-251-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>
| * | efi_loader: provide firmware revisionHeinrich Schuchardt2018-07-251-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>
| * | efi_loader: correct EFI_RUNTIME_SERVICES_SIGNATUREHeinrich Schuchardt2018-07-251-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>
| * | efi_loader: specify UEFI spec revisionHeinrich Schuchardt2018-07-251-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>
| * | efi_loader: set revision in loaded image protocolHeinrich Schuchardt2018-07-251-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>
| * | efi_loader: check map_key in ExitBootServicesHeinrich Schuchardt2018-07-251-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>
| * | efi_loader: Rename sections to allow for implicit dataAlexander Graf2018-07-251-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]
| * | elf: Move x86 reloc defines to common elf.hAlexander Graf2018-07-251-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>
| * | efi_loader: Introduce ms abi vararg helpersAlexander Graf2018-07-251-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>
* | | u-boot: remove driver lookup loop from env_save()Nicholas Faustini2018-07-301-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>
* | | tpm: allow TPM v1 and v2 to be compiled at the same timeMiquel Raynal2018-07-281-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>