summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-01arm: mark save_boot_params_ret as a functionPhilipp Tomsich
As no '.type' was set for save_boot_params_ret in start.S, binutils did not track whether it was emitted as A32 or T32. By properly marking save_boot_params_ret as a potential function entry, we can make sure that the compiler will insert the appropriate instructions for branching to save_boot_params_ret both for call-sites emitted as A32 and T32. Reported-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Andy Yan <andy.yan@rock-chips.com> Series-changes: 3 - tracked the root-cause why no interwork branch was emitted and fixed it using a '.type'-directive in start.S to mark save_boot_params_ret as a (possible) function-entry.
2017-11-01arm: make save_boot_params_ret prototype visible for AArch64Philipp Tomsich
The save_boot_params_ret() prototype (for those of us, that have a valid SP on entry and can implement save_boot_params() in C), was previously only defined for !defined(CONFIG_ARM64). This moves the declaration to a common block to ensure the prototype is available to everyone that might need it. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Andy Yan <andy.yan@rock-chips.com>
2017-11-01rockchip: boot0 hook: support early return for RK3188/RK3066-style BROMPhilipp Tomsich
Some Rockchip BROM versions (e.g. the RK3188 and RK3066) first read 1KB data from NAND into SRAM and executes it. Then, following a return to bootrom, the BROM loads additional code to SRAM (not overwriting the first block read) and reenters at the same address as the first time. To support booting either a TPL (on the RK3066) or SPL (on the RK3188) using this model of having to count entries, this commit adds code to the boot0 hook to track the number of entries and handle them accordingly. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Paweł Jarosz <paweljarosz3691@gmail.com> Tested-by: Andy Yan <andy.yan@rock-chips.com> Series-changes: 5 - set return value to 0 before returning to the BROM
2017-11-01bcm281xx: boot0 hook: adjust to unified boot0 semanticsPhilipp Tomsich
This updates the BCM281xx boot0-hook to the updated boot0 semantics by emitting _start and the vector table before the boot0 hook (as was the case before). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01bcm235xx: boot0 hook: adjust to unified boot0 semanticsPhilipp Tomsich
This updates the BCM235xx boot0-hook to the updated boot0 semantics by emitting _start and the vector table before the boot0 hook (as was the case before). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Version-changes: 5 - ran 'whitespace-cleanup'
2017-11-01socfpga: boot0 hook: adjust to unified boot0 semanticsPhilipp Tomsich
With the updated boot0 semantics (i.e. giving the boot0-hook control over when and where the vector table is emitted), the boot0-hook for the socfpga needs to be adjusted. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: rk3036: use aligned address for SPL_TEXT_BASEPhilipp Tomsich
With the boot0-hook inserting the additional padding to receive our SPL magic, the SPL_TEXT_BASE can be aligned again. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: rk3288: use aligned address for SPL_TEXT_BASEKever Yang
After we use boot0 hook, we can use offset '000' instead of '004' as SPL_TEXT_BASE. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> [Updated tag in commit summary:] Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: mkimage: use spl_boot0 for all Rockchip SoCsKever Yang
Enable the spl_boot0 in SPL and use the pre-padding TAG memory, the mkimage do not need to pad it but only need to replace the value with correct TAG value. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> [Updated:] Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: enable boot0-hook for all Rockchip SoCsPhilipp Tomsich
Rockchip SoCs bootrom design is like this: - First 2KB or 4KB internal memory is for bootrom stack and heap; - Then the first 4-byte suppose to be a TAG like 'RK33'; - The the following memory address end with '0004' is the first instruction load and running by bootrom; Let's use the boot0 hook to reserve the first 4-byte tag for all the Rockchip SoCs. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems> [Commit message:] Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2017-11-01rockchip: boot0: align to 0x20 for armv7 '_start'Kever Yang
The '_start' is using as vector table base address, and will write to VBAR register, so it needs to be aligned to 0x20 for armv7. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> [Updated to current code base:] Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: defconfig: lion-rk3368: sync up with SPL changes for ATFPhilipp Tomsich
This tracks the SPL changes for ATF for the RK3368-uQ7: * renames ATF_SUPPORT to ATF * drops CONFIG_SPL_ATF_TEXT_BASE (now dynamically retrieved from the .itb file) Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Series-cc: Kever Yang <kever.yang@rock-chips.com> Series-cc: sjg Series-cc: Klaus Goger <klaus.goger@theobroma-systems.com> Cover-letter: spl: atf: update booting images via ATF to use info from FIT images A number of things about how we boot the RK3368 and RK3399 through ATF are less than ideal today, especially when considering future platforms that will follow a similar boot concept: - the auto-detection of images from the FIT images was limited (i.e. the start address of the BL33 image could not automatically retrieved) - no implementation for the platform-specific parameters existed (and there is a danger that we'll end up with highly different, proprietary platform parameters for different SOCs and boards, even though the ATF code base already has FDT support) This series tries to put us into a better position to support various boot scenarios (e.g. loading an OPTEE from the FIT image; and: booting a Linux kernel via ATF) in the future... and it establishes the FDT as a mechanism to pass boot-info to later stages. For a practical example, refer to how we use this on the RK3399-Q7: * the ATF can read the full U-Boot's FDT to determine how to best issue a cold-reset for the board * we inject information on where we loaded the M0 firmware into the same FDT that is now visible to the ATF, so the ATF can relocate it to its final destination---and we no longer need to overwrite parts of the SPL binary during bootup Note that there are still some limitations (e.g. the support for passing OPTEE as a BL3-2, is not in this version ... and there isn't support for booting Linux directly via ATF yet, either), but these can now be plugged cleanly into this infrastructure. END
2017-11-01rockchip: defconfig: puma-rk3399: sync up with SPL changes for ATFPhilipp Tomsich
This defconfig update makes use of the new features: * CONFIG_ROCKCHIP_SPL_RESERVE_IRAM is now set to 0, as there is no overlap between the M0 firmware and the ATF (we load this to DRAM and relocate it to its final location within the ATF) * tracks the ATF_SUPPORT -> ATF renaming Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: 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>
2017-11-01rockchip: 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>
2017-11-01rockchip: 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>
2017-11-01rockchip: dts: rk3399-puma: add /config/arm-trusted-firmware,reset-gpio propertyPhilipp Tomsich
With the ATF capable of accessing the FDT passed to the next stage, we can specify configuration items for the ATF in the /config path. This adds the arm-trusted-firmware,reset-gpio that conveys the number of the GPIO used to reset the board (used, when a reboot is requested from ATF via PSCI). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01spl: 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>
2017-11-01spl: 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>
2017-11-01spl: 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>
2017-11-01spl: 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>
2017-11-01spl: 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>
2017-11-01spl: 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>
2017-11-01spl: 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>
2017-11-01spl: 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>
2017-11-01image: 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>
2017-11-01rockchip: lion-rk3368: defconfig: select PHY_MICREL_KSZ90X1Philipp Tomsich
The RK3368-uQ7 uses a KSZ9031 PHY on-module. Enable PHY_MICREL_KSZ90X1 in the associated defconfig. References: da3b9e7f ("Move PHY_MICREL and PHY_MICREL_KSZ90X1 to Kconfig") Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: puma-rk3399: defconfig: select PHY_MICREL_KSZ90X1Philipp Tomsich
The RK3368-uQ7 uses a KSZ9031 PHY on-module. Enable PHY_MICREL_KSZ90X1 in the associated defconfig (this somehow got lost with da3b9e7f). References: da3b9e7f ("Move PHY_MICREL and PHY_MICREL_KSZ90X1 to Kconfig") Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: evb-rk3328: remove CONFIG_ENV_OFFSETKever Yang
Remove CONFIG_ENV_OFFSET for there already have one in rockchip_common.h 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-01rockchip: rk3328: fix rockchip_get_cru apiKever Yang
The API for get priv pointer is wrong, fix it. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: rk3399: init CPU clock when rkclk_init()Kever Yang
Init the CPU and its buses to speed up the boot time. Move rkclk_init() to a place after rk3399_configure_cpu has defined at the same time, or else there will be a warning. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: configs: only add available BOOT_TARGET_DEVICESKlaus Goger
BOOT_TARGET_DEVICES should only be added if the corresponding u-boot command is enabled. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: configs: use rockchip-common.h for rk3368Klaus Goger
rockchip-common.h already defines values that are missing from rk3368_common.h For example BOOT_TARGET_DEVICES was defined empty and therefore distroboot had no boot targets. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-31Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini
2017-10-31mx6slevk: Call gpio_request()Fabio Estevam
We should call gpio_request() prior to reading the GPIO value. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-31udoo: Remove cpu type check prior to setup_sata()Fabio Estevam
Inside setup_sata() there is a cpu type check, so there is no need to do this check in the board file. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2017-10-31wandboard: Remove cpu type check prior to setup_sata()Fabio Estevam
Inside setup_sata() there is a cpu type check, so there is no need to do this check in the board file. This also brings the benefit to allowing setup_sata() to be called for the mx6qp wandboard variant. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2017-10-31ARM: imx6: Enable UMS and DFU on DHCOM i.MX6 PDKMarek Vasut
Enable UMS and DFU, so that the eMMC can be accessed via the USB gadget port on the board. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2017-10-31imx: mx6slevk: cleanup board usb codePeng Fan
Since DM_USB enabled, no need the usb code in board file. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-31mx6slevk: Fix MMC breakage for the SPL targetFabio Estevam
Commit 001cdbbb32ef1f6 ("imx: mx6slevk: enable more DM drivers") breaks MMC support in U-Boot proper on the mx6slevk_spl_defconfig target: U-Boot SPL 2017.09-00396-g6ca43a5 (Oct 01 2017 - 16:20:18) Trying to boot from MMC1 U-Boot 2017.09-00396-g6ca43a5 (Oct 01 2017 - 16:20:18 -0300) CPU: Freescale i.MX6SL rev1.0 792 MHz (running at 396 MHz) CPU: Commercial temperature grade (0C to 95C) at 33C Reset cause: POR Board: MX6SLEVK I2C: ready DRAM: 1 GiB MMC: FSL_SDHC: 0 MMC Device 1 not found *** Warning - No MMC card found, using default environment As mx6slevk_spl_defconfig does not use CONFIG_DM_MMC and its board file does not register the mmc controller for U-Boot proper, let's fix this by adding CONFIG_DM_MMC=y and device tree support. While at it, add more DM drivers, so that it becomes closer to mx6slevk_defconfig. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-31wandboard: Add support for the MX6QP variantFabio Estevam
Add support for the latest MX6QP wandboard variant. Based on Richard Hu's work from Technexion's U-Boot tree. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-31configs: vf610: increase maximum size and enforce correct limitStefan Agner
On Vybrid SoCs U-Boot gets loaded into GFX SRAM which is 512KiB. Currently 32KiB is reserved for the IMX header. However, this is not reflected in the size limit. In v2017.11-rc2 the actual size limit (512KiB-32KiB) has been reached for Colibri VF61, which lead to a successful build of U-Boot but not a working binary. The IMX header is much smaller than 32KiB, typically around 1KiB. Decrease the reserved size to 4KiB and specify the correct U-Boot size limit. Apply this new base address and limit for all Vybrid based boards. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-10-30Prepare v2017.11-rc3v2017.11-rc3Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-30net: fec_mxc: Change "error frame" message to debug levelFabio Estevam
As reported by Jonathan Gray: "After the recent changes to add SimpleNetworkProtocol to efi_loader when booting off mmc via an efi payload that doesn't use SimpleNetworkProtocol U-Boot's fec_mxc driver will now display various "error frame" messages. .... MMC Device 1 not found MMC Device 2 not found MMC Device 3 not found Scanning disks on sata... Found 6 disks reading efi/boot/bootarm.efi 67372 bytes read in 32 ms (2 MiB/s) ## Starting EFI application at 12000000 ... >> OpenBSD/armv7 BOOTARM 1.0 error frame: 0x8f57ec40 0x00003d74 error frame: 0x8f57ec40 0x00007079 error frame: 0x8f57ec40 0x00006964 error frame: 0x8f57ec40 0x00006f6f error frame: 0x8f57ec40 0x0000726f error frame: 0x8f57ec40 0x00002074 error frame: 0x8f57ec40 0x00006f6f" Heinrich Schuchardt explains: "A receive FIFO overrun can be expected if network packages are not processed. With the network patches we check if a package is available quite often." Move the "error frame" messages to debug level so that a clean output log can be seen. Reported-by: Jonathan Gray <jsg@jsg.id.au> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-30imx: Fix regression with CONFIG_DM_MMC=yFabio Estevam
When CONFIG_DM_MMC=y, CONFIG_BLK should be selected, otherwise the SD/eMMC card cannot be used. Also, select CONFIG_DM_USB=y when CONFIG_USB=y to avoid build failure. Tested on mx6slevk, mx7dsabresd and mx6ullevk. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Tested-by: Adam Ford <aford173@gmail.com> Tested-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> Tested-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-10-30configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-29scripts/get_maintainer.pl: enable find_maintainer_filesHeinrich Schuchardt
Many MAINTAINERS files are in subdirectories. We should enable searching these. Reported-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2017-10-29checkpatch: Support wide stringsHeinrich Schuchardt
Allow prefixing typical strings with L for wide strings Patch originally by Joe Perches https://lkml.org/lkml/2017/10/17/1117 Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2017-10-29Merge git://git.denx.de/u-boot-videoTom Rini
2017-10-29exynos: video: fix typo in DisplayPort driverDongjin Kim
Signed-off-by: Dongjin Kim <tobetter@gmail.com> CC: Simon Glass <sjg@chromium.org> CC: Minkyu Kang <mk7.kang@samsung.com>