summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pci: Add boundary check for hose->regionsThierry Reding2019-04-231-0/+5
| | | | | | | | | | | Make sure that we don't overflow the hose->regions array, otherwise we would end up overwriting the hose->region_count field and cause mayhem to ensue. Also print an error message when we'd be overflowing because it indicates that there aren't enough regions available and the number needs to be increased. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* ARM: da850evm: Remove legacy MMC codeAdam Ford2019-04-231-19/+0
| | | | | | | With the migration to DM in SPL and the DT support, the old legacy code is no longer neaded, so this patch removes it Signed-off-by: Adam Ford <aford173@gmail.com>
* bcm963158: enable led supportPhilippe Reynes2019-04-231-0/+3
| | | | | | | Enable the led support in the configuration of the board bcm963158. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* dt: bcm963158: enable led controllerPhilippe Reynes2019-04-231-0/+49
| | | | | | | Enable the led controller in the device tree of the board bcm963158. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* dt: bcm63158: add led controllerPhilippe Reynes2019-04-231-0/+7
| | | | | | Add the led controller in the bcm63158 device tree. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* led: bcm6858: allow to use this driver on ARCH_963158Philippe Reynes2019-04-231-1/+1
| | | | | | | Allow the led bcm6858 driver to be used on bcm63158. They have the same led controller. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* bcm968580xref: enable led supportPhilippe Reynes2019-04-231-0/+3
| | | | | | | Enable the led support in the configuration of the board bcm968580xref. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* dt: bcm968580xref: enable led controllerPhilippe Reynes2019-04-231-0/+48
| | | | | | | Enable the led controller in the device tree of the board bcm968580xref. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* dt: bcm6858: add led controllerPhilippe Reynes2019-04-221-0/+7
| | | | | | Add the led controller in the bcm6858 device tree. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* led: add initial support for bcm6858Philippe Reynes2019-04-224-0/+309
| | | | | | | | | The driver add the support of the led IP on bcm6858. This led IP can drive up to 32 leds, and can handle blinking. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* arm: arm64 32bit address relocationIbai Erkiaga2019-04-221-7/+12
| | | | | | | | | | Current relocation code is limited to 21bit PC-relative addressing which might not be enough for bigger code sizes. The following patch increases the addressing to 32bit PC-relative. This feature is specially interesting if U-Boot is build without optimiation (-O0) as the text section is increased significativelly. Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com>
* travis: Add srecord packageMarek Vasut2019-04-221-0/+1
| | | | | | | | | | | At least MIPS Boston currently uses srec_cat tool to fiddle with srecords. There will be other platforms coming, so install the tool to prevent build problems. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Tom Rini <trini@konsulko.com>
* Add target to generate initial environmentStefano Babic2019-04-221-0/+7
| | | | | | | | | | | | | | | | | | The initial environment is linked to the u-boot binary. Modifying the environment from User Space with the env tools requires that the tools are always built together with the bootloader to be sure that they contain the initial environment in case no environment is stored into persistent storage or when a board boots with just the default environment. This makes difficult for distros to provide a general package to access the environment. A simpler way is if the tools are generic for all boards and a configuration file is given to provide the initial environment. The patch just generates the initial environment by extracting it from the compiled object. This file can then be used for tools in user space to initialize the environment. Signed-off-by: Stefano Babic <sbabic@denx.de>
* spl: ymodem: Add support for loading full fitImagesMarek Vasut2019-04-221-1/+19
| | | | | | | | | Add support for loading fully featured fitImages over YModem in SPL. This is useful when various advanced features of full fitImages are needed in SPL. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com>
* fit: load all fragments from the extra configurationsPeter Ujfalusi2019-04-221-0/+12
| | | | | | | | | Currently only the first fdt is loaded from the extra configuration of FIT image. If the configuration have multiple fdt, load them all as well. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
* misc: fs_loader: Replace label with DT phandleTien Fong Chee2019-04-222-34/+64
| | | | | | | | | In previously label which will be expanded to the node's full path was used, and now replacing label with most commonly used DT phandle. The codes were changed accordingly to the use of DT phandle and supporting multiple instances. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
* arm: fix hvc callIbai Erkiaga2019-04-221-2/+1
| | | | | | | | | | | | | | | HVC call makes use of 6 mandatory arguments rather than 7 in the same way as SMC calls. The 7th argument is optional (Client ID) for both HVC and SMC but is implemented as 16-bit parameter and register R7 or W7. The aim of this patch is just fix compilation error due to an invalid asm code in the HVC call so that's why the 7th argument is removed. The issue does not report any error in a normal build as hvc_call is not used at all and is optimized by the compiler. Using -O0 triggers the error so the patch is intended to fix issues on a ongoing effor to build U-Boot with -O0. Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com>
* Support boot Android image without address on bootm commandShawn Guo2019-04-222-2/+2
| | | | | | | | | | | | | | | | | | It works perfectly fine to boot an Android boot.img with bootm command followed by an explicit address argument that holds the image. But if we have boot.img downloaded into default 'loadaddr', and then boot it using bootm command without the address argument, we will run into problem, because U-Boot fails to find ramdisk and fdt (second area) in boot.img. The current Android image support assumes there is always an address argument on bootm command. However just like booting any other images, 'loadaddr' should be used when address argument is missing from bootm command. It patches boot_get_ramdisk() and boot_get_fdt() a bit to support this quite common usage of bootm command for Android image. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* cmd: ximg.c: Add support for getting external data address and lengthTien Fong Chee2019-04-221-3/+3
| | | | | | | This function supports getting both data address and length for existing FIT subimage and FIT external data. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
* ARMv8: Disable fwcall when PSCI is enabledAng, Chee Hong2019-04-221-0/+2
| | | | | | | | When PSCI is enabled, we are expecting U-Boot which now act as EL3 software will handle all the PSCI calls. We won't need fwcall as no further HVC or SMC are needed. Signed-off-by: Ang, Chee Hong <chee.hong.ang@intel.com>
* ARMv8: Allow SiP service extensions on top of PSCI codeChee Hong Ang2019-04-223-6/+62
| | | | | | | | | | | | | Allow PSCI layer to handle any SiP service functions added by platform vendors. PSCI layer will look for SiP service function in the SiP function table located in '._secure_svc_tbl_entries' section if the SMC function identifier is not found in the PSCI standard functions table. Use DECLARE_SECURE_SVC macro to declare and add platform specific SiP service function. This new section '._secure_svc_tbl_entries' is located next to '._secure.text' section. Refer to arch/arm/cpu/armv8/u-boot.lds. Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
* test: call hexdump tests via `ut lib`Heinrich Schuchardt2019-04-221-4/+5
| | | | | | | | The unit tests in test/lib/hexdump.c are not related to the device tree. So they should be executed via `ut lib` and not via `ut dm`. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* misc: fs_loader: Add support for initializing block deviceTien Fong Chee2019-04-221-0/+23
| | | | | | | | | | Firmware loader would encounter problem if the block device is accessed before initializing it. This patch would adding the support of probing block device and initializing block before the block device is accessed by firmware loader. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd: add exception commandHeinrich Schuchardt2019-04-2211-0/+232
| | | | | | | | | | | The 'exception' command allows to test exception handling. This implementation supports ARM, x86, RISC-V and the following exceptions: * 'breakpoint' - prefetch abort exception (ARM 32bit only) * 'unaligned' - data abort exception (ARM only) * 'undefined' - undefined instruction exception Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* bcm963158: add nand supportPhilippe Reynes2019-04-222-0/+13
| | | | | | | Enable the nand support (driver and command) in the configuration of the board bcm963158. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* dt: bcm963158: enable nand controllerPhilippe Reynes2019-04-221-0/+15
| | | | | | | Enable the nand controller in the device tree of the board bcm963158. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* dt: bcm63158: add nand controllerPhilippe Reynes2019-04-221-0/+13
| | | | | | Add the nand controller in the bcm63158 device tree. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* bcm968580xref: add nand supportPhilippe Reynes2019-04-222-0/+14
| | | | | | | Enable the nand support (driver and command) in the configuration of the board bcm968580xref. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* dt: bcm968580xref: enable nand controllerPhilippe Reynes2019-04-221-0/+15
| | | | | | | Enable the nand controller in the device tree of the board bcm968580xref. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* dt: bcm6858: add nand controllerPhilippe Reynes2019-04-221-0/+13
| | | | | | Add the nand controller in the bcm6858 device tree. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* bcm968380gerg: add nand supportPhilippe Reynes2019-04-222-0/+14
| | | | | | | Enable the nand support (driver and command) in the configuration of the board bcm96838gerg. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* dt: bcm968380gerg: enable nand controllerPhilippe Reynes2019-04-221-0/+12
| | | | | | | Enable the nand controller in the device tree of the board bcm96838gerg. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* dt: bcm6838: add nand controllerPhilippe Reynes2019-04-221-0/+13
| | | | | | Add the nand controller in the bcm6838 device tree. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* drivers: nand: brcmnand: add an option to read the write-protect from device ↵Philippe Reynes2019-04-221-0/+3
| | | | | | | | | tree The option write-protect may only change on the kernel command line, we add a property in the device tree to be more flexible. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* drivers: nand: brcmnand: add parameter parameter-page-big-endianPhilippe Reynes2019-04-221-2/+15
| | | | | | | The parameter page isn't always in big endian, so we add an option to choose the endiannes of the parameter page. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* drivers: nand: brcmnand: add initial supportPhilippe Reynes2019-04-2210-0/+3334
| | | | | | | The driver brcmnand come from linux kernel 4.18. Only SoC bcm6838 and bcm6858 are supported. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* compat linux: import completion from linux 4.18Philippe Reynes2019-04-221-0/+173
| | | | | | | | This patch port the file include/linux/completion.h from linux 4.18 to u-boot. It define the structure but all the function are stubbed. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* include: linux: io: define devm_ioremap on board with ioremapPhilippe Reynes2019-04-221-1/+1
| | | | | | | | | | The macro devm_ioremap is only defined for configuration that doesn't have ioremap. But this macro may also be defined on configuration with ioremap. This patch remove the condition for the macro devm_ioremap, so it's always defined. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* arm: asm: io.h: define readX_relaxed and writeX_relaxedPhilippe Reynes2019-04-221-0/+21
| | | | | | | This patch port the function readX_relaxed and writeX_relaxed from kernel 4.18. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* mtd: nand: provide several helpers to do common NAND operationsBoris Brezillon2019-04-222-160/+883
| | | | | | | | | | | | | | | | | | | | | Linux commit 97d90da8a88 ("mtd: nand: provide several helpers to do common NAND operations") This is part of the process of removing direct calls to ->cmdfunc() outside of the core in order to introduce a better interface to execute NAND operations. Here we provide several helpers and make use of them to remove all direct calls to ->cmdfunc(). This way, we can easily modify those helpers to make use of the new ->exec_op() interface when available. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [miquel.raynal@free-electrons.com: rebased and fixed some conflicts] Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com> [Philippe Reynes: adapt code to u-boot and only keep new function] Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* mtd: nand: import nand_hw_control_init()Marc Gonzalez2019-04-221-0/+7
| | | | | | | | | | | | | Linux commit d45bc58dd3b ("mtd: nand: import nand_hw_control_init()") The code to initialize a struct nand_hw_control is duplicated across several drivers. Factorize it using an inline function. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Philippe Reynes: adapt code to u-boot and only keep new function] Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* mtd: add get/set of_node/flash_node helpersBrian Norris2019-04-221-0/+12
| | | | | | | | | | | | | | | | Linux commit 28b8b26b308 ("mtd: add get/set of_node/flash_node helpers") We are going to begin using the mtd->dev.of_node field for MTD device nodes, so let's add helpers for it. Also, we'll be making some conversions on spi_nor (and nand_chip eventually) too, so get that ready with their own helpers. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Philippe Reynes: only add function nand_set_flash_node and nand_get_flash_node because others were already backported] Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* Merge tag 'u-boot-atmel-2019.07-b' of git://git.denx.de/u-boot-atmelTom Rini2019-04-2213-5/+550
|\ | | | | | | Second set of u-boot-atmel features and fixes for 2019.07 cycle
| * at91: corvus_defconfig: get rid of build warningsHeiko Schocher2019-04-222-2/+5
| | | | | | | | | | | | | | fix CONFIG_OF_EMBED and add CONFIG_DM_USB build warnings. Signed-off-by: Heiko Schocher <hs@denx.de>
| * board: sama5d2_icp: Enable MACB driverRazvan Stefanescu2019-04-181-0/+2
| | | | | | | | Signed-off-by: Razvan Stefanescu <razvan.stefanescu@microchip.com>
| * ARM: dts: at91-sama5d2-icp: Add MACB nodeRazvan Stefanescu2019-04-181-0/+37
| | | | | | | | | | | | MACB has a fixed link connection to KSZ8563 switch port. Signed-off-by: Razvan Stefanescu <razvan.stefanescu@microchip.com>
| * board: atmel: add SAMA5D2 ICP boardEugen Hristev2019-04-1810-0/+503
| | | | | | | | | | | | | | | | The SAMA5D2 ICP Board features the SAMA5D27 SoC, together with QSPI Flash, Wilc3000 wireless device and EtherCat support. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
| * at91sam9260.dtsi: add some labelsHeiko Schocher2019-04-151-3/+3
| | | | | | | | | | | | | | | | | | add labels to rtc, pinctrl and watchdog node. This makes it possible to reference the nodes from board dts files. Signed-off-by: Heiko Schocher <hs@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2019-04-2139-251/+680
|\ \ | | | | | | | | | - Various fastboot, dwc2/stm32 updates
| * | usb: dwc2: fix gadget disconnectFabrice Gasnier2019-04-212-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a disconnect issue detected with fastboot command, when using dwc2 driver. - On u-boot side: uboot>$ fastboot 0 - On USB host PC side, few seconds after PC>$ fastboot reboot # Get stuck, uboot target never reboots By enabling DEBUG_ISR logs, the bus suspend interrupt is seen before the PC command has been issued. When the USB bus suspend occurs, there's a HACK that disables the fastboot (composite driver). Here is the call stack upon USB bus suspend: - dwc2_handle_usb_suspend_intr() - dev->driver->disconnect() - composite_disconnect() - reset_config() - f->disable() - fastboot_disable() - usb_ep_disable(f_fb->out_ep); - usb_ep_disable(f_fb->in_ep); .. other disable calls. When the resume interrupt happens, everything has been disabled, then nothing happens. fastboot command gets stuck on HOST side. Remove original HACK, that disconnects the composite driver upon USB bus suspend. Implement disconnect detection instead: - check GINTSTS OTG interrupt - read GOTGINT register - check GOTGINT, SesEndDet bit (e.g. session end) This is inspired by what is implemented currently in Linux dwc2 driver. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Marek Vasut <marex@denx.de>