summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | test: Silenece the echo and print testsSimon Glass2021-03-272-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests current produce unwanted output on sandbox. Use the correct functions to controller console output, to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | sandbox: image: Allow sandbox to load any imageSimon Glass2021-03-272-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sandbox is special in that it is used for testing and it does not match any particular target architecture. Allow it to load an image from any architecture, so that 'bootm' can be used as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | sandbox: Provide a way to bind fixed/removeable devicesSimon Glass2021-03-274-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present when a file is bound to a host device it is always marked as removeable. Arguably the device is removeable, since it can be unbound at will. However while it is bound, it is not considered removable by the user. Also it is useful to be able to model both fixed and removeable devices for code that distinguishes them. Add a -r flag to the 'host bind' command and plumb it through to provide this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | sandbox: Update do_host_bind() argument countingSimon Glass2021-03-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the 'bind' subcommand before processing the arguments. This will make it easier to add an optional flag. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | sandbox: Disintangle declarations in do_host_bind()Simon Glass2021-03-271-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function has a strange mix of declarations and argument parsing which is a bit hard to follow and harder to modify. Separate out the declarations at the start of the function and adjust the ordering of the code slightly. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | sandbox: cros_ec: Only write EC state when the EC is probedSimon Glass2021-03-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can crash if the EC has not yet been probed. Add a check to prevent this. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | sandbox: Only delete the executable if requestedSimon Glass2021-03-271-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present sandbox removes its executable after failing to run it, since there is no other way that it would get cleaned up. However, this is actually only wanted if the image was created within sandbox. For the case where the image was generated by the build system, such as u-boot-spl, we don't want to delete it. Handle the two code paths accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | sandbox: Only call timer_timebase_fallback() if presentSimon Glass2021-03-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function only exists if CPU is enabled. Update the code to take account of this, so that it does not have to be enabled on all sandbox builds. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sean Anderson <seanga2@gmail.com>
| | * | | x86: coreboot: Don't setup MTRR when booting from corebootSimon Glass2021-03-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This currently hangs and it is not necessary in any case. Drop the code when booting from coreboot. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: fsp: Don't notify if booted from corebootSimon Glass2021-03-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When booting from coreboot there is no need to notify the FSP of anything, since coreboot has already done it. Nor it is possible, since the FSP details are not provided by coreboot. Skip it in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: coral: Fall back to coreboot video when FSP missingSimon Glass2021-03-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When booting from coreboot the FSP video information is no-longer available. Enable the coreboot driver so that we can get some sort of display in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: coral: Allow init of debug UART in U-Boot properSimon Glass2021-03-274-58/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present the debug UART is only set up in SPL, on the assumption that the boot flow will always pass through there. When booting from coreboot, SPL is not used, so the debug UART is not available. Move the code into a common place so that it can be used in U-Boot proper also. Add the required init to start_from_spl.S as well. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: coral: Avoid build error with !CONFIG_ACPIGENSimon Glass2021-03-271-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_ACPIGEN is not enabled the CPU code does not build. Fix this by moving things around. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | dm: core: Add CBFS support to flashmapSimon Glass2021-03-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow referencing a CBFS file in the flashmap, so that it is possible to boot from coreboot, where files are not available from binman. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: fsp: Don't enable FSP graphics if booted from corebootSimon Glass2021-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver cannot work when booted from coreboot, since the FSP information is not available. Disable it in that case, so that the coreboot video driver can be used instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: video: Allow coreboot video to be used on any x86 boardSimon Glass2021-03-272-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When booting from coreboot we need this driver for the video to work. Update the driver to be usable on any board. The driver disables itself if it sees that is not booted from coreboot. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | video: Fix video on coreboot with the copy bufferSimon Glass2021-03-271-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The copy buffer, if enabled, prevents booting from coreboot correctly, since no memory is allocated for it. Allow it to fall back to disabled in this situation. This ensures that a console is displayed, even if it is slow. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | cmd: Add missing check for CONFIG_SYS_LONGHELPSimon Glass2021-03-272-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two commands are missing this check, so compilation fails when building without CONFIG_CMDLINE. Add it. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: Add a command to display coreboot sysinfoSimon Glass2021-03-275-0/+430
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This information is interesting to look at and can be important for debugging and inspection. Add a command to display it in a helpful format. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: Allow installing an e820 when booting from corebootSimon Glass2021-03-275-29/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move this code into a generic location so that it can be used by other x86 boards which want to boot from coreboot. Also ensure that this is called if booting from coreboot. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: coreboot: Update parsing of the latest sysinfoSimon Glass2021-03-273-57/+525
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quite a few new tag types have been added over the years. Bring these into U-Boot so that all required tags can be parsed. Add a proper comment to struct sysinfo_t while we are here, since many of the meanings are not obvious. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: Move coreboot sysinfo parsing into generic x86 codeSimon Glass2021-03-275-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is useful to be able to parse coreboot tables on any x86 build which is booted from coreboot. Add a new Kconfig option to enable this feature and move the code so it can be used on any board, if enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: coreboot: Sync up timestamp codesSimon Glass2021-03-272-2/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new timestamp codes that are present in coreboot, so that we can decode these in U-Boot. At present TS_U_BOOT_START_KERNEL is used twice. It should only be used just before jumping to Linux, so update the other call site to use TS_START_KERNEL. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: Move coreboot timestamp info into coreboot_tables.hSimon Glass2021-03-273-36/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This all relates to the sysinfo structure provided by coreboot. Put the timestamp definitions into the same file as the others. Tidy up a few comments at the same time. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: Make coreboot sysinfo available to any x86 boardSimon Glass2021-03-2710-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible to boot U-Boot for chromebook_coral either 'bare metal' or from coreboot. In the latter case we want to provide access to the coreboot sysinfo tables. Move the definitions into a file available to any x86 board. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | cbfs: Drop unnecessary cast in file_cbfs_fill_cache()Simon Glass2021-03-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The results of malloc() are a void * and so this cast is unnecessary. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | cbfs: Support reading compression informationSimon Glass2021-03-272-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CBFS now supports compressed filed. Add support for reading this information so that the correct decompression can be applied. The decompression itself is not implemented in CBFS. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | cbfs: Simplify file iterationSimon Glass2021-03-271-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In file_cbfs_next_file() there is a lot of complicated code to move to the next file. Use the ALIGN() macros to simplify this. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | cbfs: Factor out filling a cache node into a new functionSimon Glass2021-03-271-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file_cbfs_next_file() function is already fairly long. Before expanding it further, move the core part into a separate function. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | cbfs: Allow file traversal with any CBFSSimon Glass2021-03-272-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file traversal functions currently use a single global CBFS. In some cases we need to access multiple CBFSs to obtain different files. Add new functions to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | cbfs: Allow access to CBFS without a headerSimon Glass2021-03-273-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases CBFS does not start with a header but is just a collection of files. It is possible to support this so long as the size of the CBFS is provided. Update the cbfs_init_mem() function to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | smbios: Allow writing to the coreboot version stringSimon Glass2021-03-273-4/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When U-Boot is booted from coreboot the SMBIOS tables are written by coreboot, not U-Boot. The existing method of updating the BIOS version string does not work in that case, since gd->smbios_version is only set when U-Boot writes the tables. Add a new function which allows the version to be updated by parsing the tables and writing the string in the correct place. Since coreboot provides a pointer to the SMBIOS tables in its sysinfo structure, this makes it easy to do the update. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | cbfs: Rename new_node to nodeSimon Glass2021-03-271-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename this variable since there is no need to distinguish it from an old node. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | cbfs: Add support for attributesSimon Glass2021-03-272-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CBFS now supports attributes for things that cannot fit in the header as originally conceived. Add the structures for these. Also rename attributes_offset to something shorter, to ease code readability. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | mmc: pci_mmc: Set up the card detectSimon Glass2021-03-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver currently reads the card-detect but does not register it with the MMC stack. Update this so that card-detect works as expected. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | tegra: i2c: Drop LOG_DEBUGSimon Glass2021-03-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not enable debugging by default. Drop this. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: coral: Update the SD card-detect GPIOSimon Glass2021-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the recent bug fix, it doesn't matter which GPIO phandle is used so long as the GPIO number is right. Still, we may as well use the correct one to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| | * | | x86: coral: Put the eMMC firstSimon Glass2021-03-272-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present the eMMC device does not have an alias so it appears after the SD card which is device 1. There is no device 0 which is odd. Make the eMMC device be the first one. Update the boot script to use the new device. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| | * | | x86: Probe device if needed in intel_gpio_xlate()Simon Glass2021-03-271-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Intel GPIO binding allows GPIOs to be globally numbered, so that it does not matter which GPIO bank is specified in the device tree. This is convenient and avoid confusion since the banks do not have the same number of GPIOs and the numbering is not sequential. The GPIO uclass ensures that the device mentioned in the devicetree binding is probed. It is fine for the driver to update gpio_desc to point to a different driver, but this may not have been probed. If it has not been, then it cannot be claimed since there is no uclass data. We could handle this in the GPIO uclass but so far it is an unusual situation so it is probably not worth the extra code. Handle this case in the GPIO driver by probing the selected device if necessary. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: p2sb: Drop LOG_DEBUGSimon Glass2021-03-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not enable debugging by default. Drop this. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: coral: Add information about building / runningSimon Glass2021-03-271-17/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add detailed information on how to build the coral image, since it needs binary blobs. Provide a way to avoid the memory-training delay. Also show the console output from a sample run. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | x86: coral: Free the ACPI GPIOs after using themSimon Glass2021-03-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These GPIOs are needed later if Chromium OS verified boot is running, so free them after use. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | mtd: spi_flash_free()Heinrich Schuchardt2021-03-272-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dfu_free_entities() invoking dfu_free_entity_sf() has let to segementation faults due to double freeing the same device. spi_flash_free() is not relevant for the driver model but exists only for compatibility with old drivers. We must not remove any device here: * The device may still be referenced. * We don't want to have to probe again. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| | * | | sandbox: dtsi: add rngVincent Stehlé2021-03-271-0/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having an rng in the sandbox is useful not only for tests but also for e.g. UEFI. Therefore, copy the rng node from test.dts to sandbox.dtsi. In the case of UEFI, it can then be verified with `efidebug dh' that a "Random Number Generator" protocol is indeed present. This also fixes the following `bootefi' error: Missing RNG device for EFI_RNG_PROTOCOL Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Simon Glass <sjg@chromium.org>
| * | | Merge tag 'dm-pull-26mar21-take2' of git://git.denx.de/u-boot-dm into nextTom Rini2021-03-26192-1551/+6566
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dtoc support for of-platdata-inst driver model support for of-platdata-inst support of-platdata-inst on x86 / coral binman support for exapanded entries binman convert docs to reST ti-sysc fix for duplicate uclass driver patman minor improvements pylibfdt build only if needed correct obscure CI error with OF_PLATDATA_INST
| | * | | binman: Update various pieces of the documentationSimon Glass2021-03-262-39/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few sections are a little out of date now. Update them. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | binman: Drop repetitive heading for each entrySimon Glass2021-03-2620-57/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many entries start 'Entry containing a'. This looks fine in the source code but is annoying when viewed in the htmldocs table of contents. Drop these unnecessary words. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | binman: Incorporate entry documentationSimon Glass2021-03-2610-77/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update this to avoid sphinx warnings and incorporate it into the new documentaiton tree. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | binman: Rearrange documentation into headingsSimon Glass2021-03-261-257/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collect the material into different top-level headings to make it easier to read. Signed-off-by: Simon Glass <sjg@chromium.org>
| | * | | binman: doc: Add documentation to htmldocsSimon Glass2021-03-2611-245/+294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a link to binman's documentation and adjust the files so that it is accessible. Use the name README.rst so it is easy to discover when binman is installed without U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>