- Jan 29, 2016
-
-
Stephen Warren authored
The PCI bus must be enumerated before PCI devices, such as Ethernet devices, are known to U-Boot. Enhance the distro boot commands to perform PCI enumeration when needed. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
Currently, the distro boot commands always enumerate USB devices before performing network operations. However, depending on the board and end- user configuration, network devices may not be attached to USB, and so enumerating USB may not be necessary. Enhance the scripts to make this step optional, so that the user can decrease boot time if they don't need USB. This change is performed by moving the "usb start" invocation into a standalone variable. If the user desires, they can replace that variable's value with some no-op command such as "true" instead. Booting from a USB storage device always needs to enumerate USB devices, so this action is still hard-coded. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
With CONFIG_DM_PCI enabled, PCI buses are not enumerated at boot, as they are without that config option enabled. No command exists to enumerate the PCI buses. Hence, unless some board-specific code causes PCI enumeration, PCI-based Ethernet devices are not detected, and network access is not available. This patch implements "pci enum" in the CONFIG_DM_PCI case, thus giving a mechanism whereby PCI can be enumerated. do_pci()'s handling of case 'e' is moved into a single location before the dev variable is assigned, in order to skip calculation of dev. The enum sub-command doesn't need the dev value, and skipping its calculation avoids an irrelevant error being printed. Using a command to initialize PCI like this has a disadvantage relative to enumerating PCI at boot. In particular, Ethernet devices are not probed during PCI enumeration, but only when used. This defers setting variables such as ethact, ethaddr, etc. until the first network-related command is executed. Hopefully this will not cause further issues. Perhaps in the long term, we need a "net start/enum" command too? Signed-off-by:
Stephen Warren <swarren@nvidia.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Stephen Warren authored
The DFU test requests U-Boot configure its USB controller in device mode, then waits for the host machine to enumerate the USB device and create a device node for it. However, this wait can be fooled if the USB device node already exists before the test starts, e.g. if some previous software stack already configured the USB controller into device mode and never de-configured it. This "previous software stack" could even be another test/py test, if U-Boot's own USB teardown does not operate correctly. If this happens, dfu-util may be run before U-Boot is ready to serve DFU commands, which may cause false test failures. Enhance the dfu test to fail if the device node exists before it is expected to. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
When loading U-Boot into RAM over USB protocols using tools such as tegrarcm or L4T's exec-uboot.sh/tegraflash.py, Tegra's USB device mode controller is initialized and enumerated by the host PC running the tool. Unfortunately, these tools do not shut down the USB controller before executing the downloaded code, and so the host PC does not "de-enumerate" the USB device. This patch implements optional code to shut down the USB controller when U-Boot boots to avoid leaving a stale USB device present. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
test/py contains logic to detect the target crashing and rebooting by searching the console output for a U-Boot signon message, which will presumably be emitted when the system boots after the crash/reset. Currently, this logic only searches for the exact signon message that was printed by the U-Boot version under test, upon the assumption that binary is written into flash, and hence will be the version booted after any reset. However, this is not a valid assumption; some test setups download the U-Boot-under-test into RAM and boot it from there, and in such a scenario an arbitrary U-Boot version may be located in flash and hence run after any reset. Fix the reset detection logic to match any U-Boot signon message. This prevents false negatives. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This function is not used as the use case for it did not eventuate. Remove it to avoid confusion. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Stephen Warren authored
This tests: - dhcp (if indicated by boardenv file). - Static IP network setup (if provided by boardenv file). - Ping. - TFTP get. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
find_ram_base() is a shared utility function, not a core part of the U-Boot console interaction. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
Add a test of DFU functionality to the Python test suite. The test starts DFU in U-Boot, waits for USB device enumeration on the host, executes dfu-util multiple times to test various transfer sizes, many of which trigger USB driver edge cases, and finally aborts the DFU command in U-Boot. This test mirrors the functionality previously available via the shell scripts in test/dfu, and hence those are removed too. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Lukasz Majewski <l.majewski@samsung.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
Enhance the UMS test to optionally mount a partition and read/write a file to it, validating that the content written and read back are identical. This enhancement is backwards-compatible; old boardenv contents that don't define the new configuration data will cause the test code to perform as before. test/ums/ is deleted since the Python test now performs the same testing that it did. The code is also re-written to make use of the recently added utility module, and split it up into nested functions so the overall logic of the test process can be followed more easily without the details cluttering the code. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Lukasz Majewski <l.majewski@samsung.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
Add various common utility functions. These will be used by a forthcoming re-written UMS test, and a brand-new DFU test. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
Sometimes it's useful to run shell commands and ignore any errors. One example might be cleanup logic; if a test-case experiences an error, the cleanup logic might experience an error too, and we don't want that error to mask the original error, so we want to ignore the subsequent error. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
Write a note to the log file when a test sends CTRL-C to U-Boot. This makes it easier to follow what's happening in the logs, especially since U-Boot doesn't echo the character back to its output, so there's no other signal of what's going on. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
Tests may fail for a number of reasons, and in particular for reasons other than a timeout waiting for U-Boot to print expected data. If the last operation that a failed test performs is not waiting for U-Boot to print something, then any trailing output from U-Boot during that test's operation will not be logged as part of that test, but rather either along with the next test, or even thrown away, potentiall hiding clues re: the test failure reason. Solve this by explicitly draining (and hence logging) the U-Boot output in the case of failed tests. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
Prior to this change, U-Boot was lazilly (re-)spawned if/when a test attempted to interact with it, and no active connection existed. This approach was simple, yet had the disadvantage that U-Boot might be spawned in the middle of a test function, e.g. after the test had already performed actions such as creating data files, etc. In that case, this could cause the log to contain the sequence (1) some test logs, (2) U-Boot's boot process, (3) the rest of that test's logs. This isn't optimally readable. This issue will affect the upcoming DFU and enhanced UMS tests. This change converts u_boot_console to be a function-scoped fixture, so that pytest attempts to re-create the object for each test invocation. This allows the fixture factory function to ensure that U-Boot is spawned prior to every test. In practice, the same object is returned each time so there is essentially no additional overhead due to this change. This allows us to remove: - The explicit ensure_spawned() call from test_sleep, since the core now ensures that the spawn happens before the test code is executed. - The laxy calls to ensure_spawned() in the u_boot_console_* implementations. The one downside is that test_env's "state_ttest_env" fixture must be converted to a function-scoped fixture too, since a module-scoped fixture cannot use a function-scoped fixture. To avoid overhead, we use the same trick of returning the same object each time. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Stephen Warren authored
Currently, Spawn.expect() imposes its timeout solely upon receipt of new data, not on its overall operation. In theory, this could cause the timeout not to fire if U-Boot continually generated output that did not match the expected patterns. Fix the code to additionally impose a timeout on overall operation, which is the intended mode of operation. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Reviewed-by:
Lukasz Majewski <l.majewski@samsung.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Christophe Ricard authored
Add support for TPM ST33ZP24 spi. The ST33ZP24 does have a spi interface. The transport protocol is proprietary. For spi we are relying only on DM_SPI. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com>
-
Christophe Ricard authored
Add support for TPM ST33ZP24 family with i2c. For i2c we are relying only on DM_I2C. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com>
-
Christophe Ricard authored
I2C protocol is not standardize for TPM 1.2. TIS prococol is define by the Trusted Computing Group and potentially available on several TPMs. tpm_tis_infineon.h header is not generic enough. Rename tpm_tis_infineon.h to tpm_tis.h and move infineon specific defines/variables to tpm_tis_infineon.c Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com>
-
Christophe Ricard authored
TPM_TIS_LPC is connected to the LPC bus, not I2C. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com>
-
Christophe Ricard authored
In case CONFIG_DM_TPM was set without any TPM chipset configured a fault was generated (NULL pointer access). Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com>
-
- Jan 28, 2016
-
-
git://git.denx.de/u-boot-tegraTom Rini authored
-
Stephen Warren authored
The PMIC is configured such that its GPIOs have the correct configuration at power-up, so no programming is required. In fact, the current programming is actively wrong, since: (a) the AS3722 driver configures the GPIO to be an output before setting its output value, which causes a 0v glitch on the output. (b) the AS3722 driver configures the GPIO to drive a high voltage from its VSUP_GPIO power source rather than its VDD_GPIO_LV power source, so the pin drives 5V not 1.8V as desired. Solve these problems by removing the code which configures the PMIC GPIOs. Note that this patch was tested directly on top of v2016.01; since then, commit 96350f72 "dm: tegra: net: Convert tegra boards to driver model for Ethernet" prevents PCIe from being initialized. Alternatively, simply revert that commit to get PCIe Ethernet working again, then apply this patch to test. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Signed-off-by:
Tom Warren <twarren@nvidia.com>
-
git://git.denx.de/u-boot-x86Tom Rini authored
-
Bin Meng authored
With recent changes spi node was moved to a place as a subnode under pch, so update the alias to refer to its correct place as well. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Miao Yan authored
This patch adds a config option for loading ACPI table from QEMU. When enabled, U-Boot won't generate ACPI tables, but use those provided by QEMU. Signed-off-by:
Miao Yan <yanmiaobest@gmail.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com>
-
Miao Yan authored
This patch adds the ability to load and link ACPI tables provided by QEMU. QEMU tells guests how to load and patch ACPI tables through its fw_cfg interface, by adding a firmware file 'etc/table-loader'. Guests are supposed to parse this file and execute corresponding QEMU commands. Signed-off-by:
Miao Yan <yanmiaobest@gmail.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com>
-
Miao Yan authored
Enable ACPI IO space for piix4 (for pc board) and ich9 (for q35 board) Signed-off-by:
Miao Yan <yanmiaobest@gmail.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com>
-
Miao Yan authored
Re-write the logic in qemu_fwcfg_list_firmware(), add a function qemu_fwcfg_read_firmware_list() to handle reading firmware list. Signed-off-by:
Miao Yan <yanmiaobest@gmail.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com>
-
Stefan Roese authored
This patch adds a parameter to the function setup_early_uart() to either enable or disable the internal BayTrail legacy UART. Since the name setup_early_uart() does not match its functionality any more, lets rename it to setup_internal_uart() as well in this patch. Signed-off-by:
Stefan Roese <sr@denx.de> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Stefan Roese authored
On most x86 boards, the legacy serial ports (io address 0x3f8/0x2f8) are provided by a superio chip connected to the LPC bus. We must program the superio chip so that serial ports are available for us. Signed-off-by:
Stefan Roese <sr@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Stefan Roese authored
This patch adds the generic FS commands (ls, load) to all x86 boards. Signed-off-by:
Stefan Roese <sr@denx.de> Cc: Miao Yan <yanmiaobest@gmail.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Bin Meng <bmeng.cn@gmail.com>
-
Stefan Roese authored
This patch adds the documentation for the memory-down parameters of the Intel FSP. To configure a board without SPD DDR DIMM but with onboard DDR chips. The values are taken from the coreboot header: src/soc/intel/fsp_baytrail/chip.h (git ID da1a70ea from 2016-01-16 as reference). Signed-off-by:
Stefan Roese <sr@denx.de> Cc: Andrew Bradford <andrew.bradford@kodakalaris.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
- Jan 27, 2016
-
-
Qianyu Gong authored
Enable the U-Boot Driver Model(DM) to use the Freescale QSPI driver. Signed-off-by:
Gong Qianyu <Qianyu.Gong@nxp.com> Reviewed-by:
York Sun <york.sun@nxp.com>
-
Gong Qianyu authored
QSPI and IFC are pin-multiplexed on LS1043A. So we use ls1043aqds_sdcard_ifc_defconfig to support IFC in SD boot and ls1043aqds_sdcard_qspi_defconfig to support QSPI in SD boot. Signed-off-by:
Gong Qianyu <Qianyu.Gong@freescale.com> Reviewed-by:
York Sun <york.sun@nxp.com>
-
Gong Qianyu authored
Enable three DSPI flash memories on board. Commands: => sf probe 1:0 SF: Detected N25Q128A with page size 256 Bytes, erase size 64 KiB, total 16 MiB => sf probe 1:1 SF: Detected SST25WF040B with page size 256 Bytes, erase size 4 KiB, total 512 KiB => sf probe 1:2 SF: Detected EN25S64 with page size 256 Bytes, erase size 64 KiB, total 8 MiB Signed-off-by:
Gong Qianyu <Qianyu.Gong@freescale.com> Reviewed-by:
York Sun <york.sun@nxp.com>
-
Gong Qianyu authored
It might be missed when converting spi_flash_probe() in cmd_sf.c. This patch refers to commit fbb09918 ("dm: Convert spi_flash_probe() and 'sf probe' to use driver model"). Signed-off-by:
Gong Qianyu <Qianyu.Gong@freescale.com> Reviewed-by:
York Sun <york.sun@nxp.com>