summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-26rockchip: board: lion-rk3368: update .its filePhilipp Tomsich
For the RK3368-uQ7, we can now update the .its file to mark the Trusted Firmware as out 'firmware' bootable and annotate both ATF and U-Boot with an OS-type. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26rockchip: board: puma-rk3399: update .its file to use new featuresPhilipp Tomsich
This commit updates the .its file for the RK3399-Q7 to use the new features and demonstrates how to use those: * it marks the ATF as the 'firmware' * it tracks the OS-type for U-Boot and ATF * it loads the PMU (M0) firmware to DRAM and records the location to /fit-images (where our ATF reads it from) With the handoff of the next-stage FDT to ATF in place, we can now use this to pass information about the load addresses and names of each loadables to ATF: now we can load the M0 firmware into DRAM and avoid overwriting parts of the SPL stage. This is achieved by changing our .its-file to use an available area of DRAM as the load-address. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26rockchip: defconfig: firefly-rk3399: sync up with SPL changes for ATFPhilipp Tomsich
This tracks the SPL changes for ATF for the Firefly: * renames ATF_SUPPORT to ATF * drops CONFIG_SPL_ATF_TEXT_BASE Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26spl: atf: drop the SPL_ATF_TEXT_BASE configuration itemPhilipp Tomsich
The SPL_ATF_TEXT_BASE configuration item has become obsolete. Remove it from Kconfig. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26spl: rename config item SPL_ATF_SUPPORT to SPL_ATFPhilipp Tomsich
Having CONFIG_SPL_ATF seems more natural. Rename it, while it it is easy and there's few boards that use it (only RK3399 and RK3368 boards). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26spl: atf: introduce spl_invoke_atf and make bl31_entry privatePhilipp Tomsich
This adds a new interface spl_invoke_atf() that takes a spl_image_info argument and then derives the necessary parameters for the ATF entry. Based on the additional information recorded (into /fit-images) from the FIT loadables, we can now easily locate the next boot stage. We now pass a pointer to a FDT as the platform-specific parameter pointer to ATF (so we don't run into the future headache of every board/platform defining their own proprietary tag-structure), as FDT access is already available in ATF. With the necessary infrastructure in place, we can now update the support for the ARM Trusted Firmware to dispatch into the spl_invoke_atf function only if a IH_OS_ARM_TRUSTED_FIRMWARE image is loaded. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26spl: fit: implement recording of loadables into /fit-imagesPhilipp Tomsich
If a FDT was loaded (e.g. to append it to U-Boot image), we store it's address and record information for all loadables into this FDT. This allows us to easily keep track of images for multiple privilege levels (e.g. with ATF) or of firmware images preloaded into temporary locations (e.g. PMU firmware that may overlap the SPL stage). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26spl: fit: implement fdt_record_loadablePhilipp Tomsich
During the loading of more complex FIT images (e.g. when the invoked next stage needs to find additional firmware for a power-management core... or if there are multiple images for different privilege levels started in parallel), it is helpful to create a record of what images are loaded where: if a FDT is loaded for one of the next stages, it can be used to convey the status and location of loadables. This adds a fdt_record_loadable() function that can be invoked to record the status of each loadable below the /fit-images path. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26spl: fit: simplify logic for FDT loading for non-OS bootsPhilipp Tomsich
To better support bootin through an ATF or OPTEE, we need to streamline some of the logic for when the FDT is appended to an image: depending on the image type, we'd like to append the FDT not at all (the case for the OS boot), to the 'firmware' image (if it is a U-Boot) or to one of the loadables (if the 'firmware' is an ATF, an OPTEE, or some other image-type and U-Boot is listed in the loadabled). To achieve this goal, we drop the os_boot flag and track the type of image loaded. If it is of type IH_OS_U_BOOT, we append the FDT. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: York Sun <york.sun@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26spl: change load_addr and entry_point to uintptr_tPhilipp Tomsich
Mainly a stylistic change: convert the load_addr and entry_point fields of struct spl_image_info to uintptr_t (from ulong). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26spl: add a fdt_addr field to spl_image_infoPhilipp Tomsich
When loading a full U-Boot with detached device-tree using the SPL FIT backend, we should store the address of the FDT loaded as part of the SPL image info: this allows us to fixup the FDT with additional info we may want to propagate onward. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26image: add IH_OS_ARM_TRUSTED_FIRMWARE for ARM Trusted FirmwarePhilipp Tomsich
To boot on ARMv8 systems with ARM Trusted Firmware, we need to assemble an ATF-specific parameter structure and also provide the address of the images started by ATF (e.g. BL3-3, which may be the full U-Boot). To allow us to identify an ARM Trusted Firmware contained in a FIT image, this adds the necessary definitions. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-24Merge git://git.denx.de/u-boot-arcTom Rini
2017-11-24arc: cache: Add required NOPs after invalidation of instruction cacheAlexey Brodkin
As per ARC HS databook (see chapter 5.3.3.2) it is required to add 3 NOPs after each write to IC_IVIC which we do from now on. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Eugeniy Paltsev <paltsev@synopsys.com>
2017-11-24arc: bootm: Move slave cores kick-starting under !fakeAlexey Brodkin
Currently slave cores will be kick-started even if we want to dry run bootm which is not what we really want. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Eugeniy Paltsev <paltsev@synopsys.com>
2017-11-24ARC: HSDK: introduce CREG GPIO driverEugeniy Paltsev
The HSDK can manage some pins via CREG registers block. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2017-11-23Merge git://git.denx.de/u-boot-dmTom Rini
2017-11-22binman: Return non-zero exit code on test failureSimon Glass
Return exit code 1 when test fail so that callers can detect this. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Add add test for using an Intel MRC binarySimon Glass
MRC (Memory Reference Code) is a binary blob used to set up the SDRAM controller on some Intel boards. Add a test for this feature. With this test coverage on binman is back up to 100%. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Add add test for SPL with a microcode pointerSimon Glass
Add a test for this feature. It allows SPL to hold a pointer to the microcode block. This is used for 64-bit U-Boot on x86. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Add a test for x86-start16-splSimon Glass
This allows us to put the 16-bit x86 start-up code in SPL. Add a test for it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Add test for u-boot-spl-bss-padSimon Glass
Add a test that we can pad the BSS with zero bytes. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Check for files missing from test coverageSimon Glass
Files that are never imported are not shown in the test-coverage report. Detect these and show an error. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Increase test coverage back to 100%Simon Glass
Make a minor tweak to fix test coverage. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Add a main program to the testsSimon Glass
Add a main program so that the tests can be executed directly, without going through the main binman program. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Add tests for importlib availabilitySimon Glass
Add a test that the 'entry' module works with or without importlib. The tests are numbered so that they are executed in the correct order. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Set up 'entry' to permit full test coverageSimon Glass
There is a little check at the top of entry.py which decides if importlib is available. At present this has no test coverage. To add this we will need to import the module twice, once with importlib and once without. In preparation for allowing a test to control the importing of this module, remove all global imports of the 'entry' module. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Append to PYTHONPATH when running test coverageSimon Glass
Rather that overwrite this, append to it, in case the caller has already set up the path correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22dtoc: Fix up testsSimon Glass
The tool has changed slightly since it was originally written. Update the tests to suit. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22buildman: Fix up testsSimon Glass
The tests were broken by two separate commits which adjusted the output when boards are listed. Fix this by adding back a PowerPC board and putting the name of each board in the test. Fixes: b9f7d881 (powerpc, 5xx: remove some "5xx" remains) Fixes: 8d7523c5 (buildman: Allow showing the list of boards with -n) Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22buildman: Allow skipping of tests which use the networkSimon Glass
Accessing the network slows down the test and limits the environment in which it can be run. Add an option to disable network tests. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22patman: Fix up tests to pass with newest checkpatchSimon Glass
The checkpatch tool was updated but the patman tests were not. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22test/run: Report and return failureSimon Glass
This script runs the tests but does not report failure. Also it always returns an exit code of 0 even on failure. Fix these problems by checking the result of each test. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Disable the no-unit_address_vs_reg warningsSimon Glass
These warnings are not useful for binman tests. Disable them. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Rename tests to ftestSimon Glass
At present these tests use the same filename as patman. This adds confusion when running all tests, since error messages look very similar. In fact binman tries to run the wrong tests at present. Rename the tests. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Add a Makefile for test-program compilationSimon Glass
These test programs are includedd as binary files in U-Boot to avoid having to build them (and associated toolchain differences). Instructions on building are in the files themselves, but it seems better to provide a Makefile which can be manually run when desired. Add a Makefile, separate from the normal build system, to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Add docs explaining how to enable binman for a boardSimon Glass
The process is not obvious. Add a little section to explain how to move a board to use binman. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22binman: Add better Makefile debuggingSimon Glass
There is a debugging option in the Makefile to allow people to figure out which u-boot.dtsi files are used in the build. But is it not easy to use since it only shows files it finds, not those it is looking for. Update it and update the mention of it to the docs. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-11-22Merge git://git.denx.de/u-boot-rockchipTom Rini
2017-11-21rockchip: remove duplicate CONFIG_ENV_SIZE definitionsPhilipp Tomsich
A few header files still have a definition of CONFIG_ENV_SIZE, causing warnings during buildman runs. This removes the duplicate definitions from evb_px5.h, geekbox.h and rv1108_common.h. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-21rockchip: check download key before bootupAndy Yan
Enter download mode if the download key pressed. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> [Converted printfs in boot_mode.c to debug/pr_err:] Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-21rockchip: add support for enter to bootrom download modeAndy Yan
Rockchip bootrom will enter download mode if it returns from spl/tpl with a non-zero value and couldn't find a valid image in the backup partition. This patch provide a method to instruct the system to back to bootrom download mode by checking the BROM_DOWNLOAD_FLAG register. As the bootrom download function relys on some modules such as interrupts, so we need to back to bootrom as early as possbile before the tpl/spl code override the interrupt configurations. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-21rockchip: make boot_mode related codes reused across all platformsAndy Yan
setup_boot_mode function use the same logic but different mode register address across all the rockchip platforms, so it's better to make this function reused across all the platforms, and let the mode register address setting from the config file. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-21rockchip: spi: the symbol for Hertz is HzHeinrich Schuchardt
fix typo Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-21rockchip: clock: update sysreset driver bindingKever Yang
Using priv for new sysreset driver binding. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-21rockchip: sysreset: update Makefile to work with merged sysreset driverPhilipp Tomsich
After applying the merged sysreset driver, there are build failures due to an out-of-sync Makefile. This updates drivers/sysreset/Makefile to address these build failures. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-21rockchip: sysreset: merge into one common driverKever Yang
Use a common driver for all Rockchip SOC instead of one for each SoC. Use driver_data for reg offset. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-21rockchip: mkimage: remove unused code-paths (spl_boot0 is now implied)Philipp Tomsich
With all targets converted to generate prepadded images, this removes the spl_boot0 field from our config structure and removes the unused code-path (for images that are not prepadded): i.e. spl_boot0 is now implied as 'true' and the code is specialised by removing the other case. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-21rockchip: rk3188: move CONFIG_SPL_* entries from rk3188_common.h to KconfigPhilipp Tomsich
There still are a few CONFIG_SPL_* options selected using defines from rk3188_common.h instead of via Kconfig. This migrates those over to Kconfig. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-21rockchip: back-to-bootrom: allow passing a cmd to the bootromPhilipp Tomsich
The BROM supports forcing it to enter download-mode, if an appropriate result/cmd-word is returned to it. There already is a series to support this in review, so this prepares the (newly C-version) of the back-to-bootrom code to accept a cmd to passed on to the BROM. All the existing call-sites are adjusted to match the changed function signature. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Andy Yan <andy.yan@rock-chips.com>