summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-31dfu: allow to manage DFU on several devicesPatrick Delaunay
Add support of DFU for several interface/device with one command. The format for "dfu_alt_info" in this case is : - <interface> <dev>'='alternate list (';' separated) - each interface is separated by '&' The previous behavior is always supported. One example for NOR (bootloaders) + NAND (rootfs in UBI): U-Boot> env set dfu_alt_info \ "sf 0:0:10000000:0=spl part 0 1;u-boot part 0 2; \ u-boot-env part 0 3&nand 0=UBI partubi 0,3" U-Boot> dfu 0 list DFU alt settings list: dev: SF alt: 0 name: spl layout: RAW_ADDR dev: SF alt: 1 name: ssbl layout: RAW_ADDR dev: SF alt: 2 name: u-boot-env layout: RAW_ADDR dev: NAND alt: 3 name: UBI layout: RAW_ADDR U-Boot> dfu 0 $> dfu-util -l Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ intf=0, alt=3, name="UBI", serial="002700333338511934383330" Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ intf=0, alt=2, name="u-boot-env", serial="002700333338511934383330" Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ intf=0, alt=1, name="u-boot", serial="002700333338511934383330" Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ intf=0, alt=0, name="spl", serial="002700333338511934383330" Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-10-31dfu: prepare the support of multiple interfacePatrick Delaunay
Split the function dfu_config_entities with 2 new functions - dfu_alt_init - dfu_alt_add Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-10-31dfu: sf: add partition support for nor backendPatrick Delaunay
Copy the partition support from NAND backend to SF, support part and partubi option. In case of ubi partition, erase the rest of the partition as it is mandatory for UBI. The added code is under compilation flag CONFIG_DFU_SF_PART activated by default. for example: U-Boot> env set dfu_alt_info "spl part 0 1;\ u-boot part 0 2;u-boot-env part 0 3;UBI partubi 0 4" U-Boot> dfu 0 sf 0:0:10000000:0 Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-10-31doc: dfu: Add dfu documentationPatrick Delaunay
Add documentation for dfu stack and "dfu" command. Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-10-31dfu: cosmetic: cleanup sf to avoid checkpatch errorPatrick Delaunay
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Lukasz Majewski <lukma@denx.de>
2019-10-31thor: fix error path after g_dnl_register() failureMarek Szyprowski
Set command return value and perform needed cleanup when g_dnl_register() function fails. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2019-10-31dwc3: flush cache only if there is a buffer attached to a requestMarek Szyprowski
Calling cache flush on invalid buffer, even with zero length might cause an exception on certain platforms. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2019-10-31dfu: mmc: add support for in-partition offsetMarek Szyprowski
Add possibility to define a part of partition as a separate DFU entity. This allows to have more than one items on the given partition. The real use case for this option is TM2 board. It can use u-boot stored as Linux kernel on the defined partition (as RAW data) and load the real kernel from the same partition, but stored under the certain offset. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Lukasz Majewski <lukma@denx.de>
2019-10-31cmd: thor: select DFU subsystem also for 'thor' download toolMarek Szyprowski
'THOR' download command requires DFU infrastructure to properly flash board images. It can be used without enabling DFU command, so add such dependency to Kconfig. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Lukasz Majewski <lukma@denx.de>
2019-10-31gadget: f_thor: properly enable 3rd endpoint defined by the protocolMarek Szyprowski
This is needed to make Windows THOR flash tool happy, because it starts sending data only when interrupt packet is received on the 3rd endpoint. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Lukasz Majewski <lukma@denx.de>
2019-10-31dfu: dfu_nand: reduce verbosityRalph Siemsen
In combination with multiple partitions in NAND, this printf() ends up being more noise than helpful. Change it to debug() instead. Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Acked-by: Lukasz Majewski <lukma@denx.de>
2019-10-31dwc3-generic: Don't fail probe if clk/reset entries are absentVignesh Raghavendra
Some boards don't populate clk/reset entries as these are are optional as per binding documentation. Therefore, don't fail driver probe if clk/reset entries are absent in DT. This fixes fastboot failures seen due to enabling of CONFIG_CLK on AM57xx Fixes: e8e683d33b0c ("board: ti: am57xx-idk: Configure the CDCE913 clock synthesizer") Reported-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2019-10-30Merge tag 'u-boot-clk-23Oct2019' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-clk - Add I2C clocks for i.MX6Q CCF driver - Fix check in clk_set_default_parents() - Managed API to get clock from device tree - Fixes for core clock code (including sandbox regression tests)
2019-10-30Prepare v2020.01-rc1Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30Merge tag 'mmc-10-29-2019' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-mmc - fsl_esdhc driver cleanup - spl_mmc bug fix to avoid access wrong emmc partition
2019-10-30Merge branch '2019-10-28-azure-ci-support'Tom Rini
- Clean up Travis-CI slightly and then add support for Microsoft Azure pipelines, all from Bin Meng.
2019-10-30Merge https://gitlab.denx.de/u-boot/custodians/u-boot-sunxiTom Rini
- H6 dts(i) sync (Clément) - H6 PIO (Icenowy) - Fix pll1 clock calculation (Stefan) - H6 dram, half DQ (Jernej) - A64 OLinuXino eMMC (Sunil)
2019-10-29Bring all testings in gitlab and travis CI to Azure PipelinesBin Meng
This expands current Azure Pipelines Windows host tools build testing to cover all the CI testing in gitlab and travis CI. Note for some unknown reason, the 'container' cannot be used for any jobs that have buildman, for buildman does not exit properly and hangs the job forever. As a workaround, we manually call docker to run the image to perform the CI tasks. A complete run on Azure Pipelines takes about 2 hours and 10 minutes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-29.travis.yml: Remove the unneeded '&' for ls20xx buildmanBin Meng
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-10-29arm: mvebu: Avoid generating kwbimage.cfg in the source treeBin Meng
At present some boards generate kwbimage.cfg in the source tree during the build. This breaks buildman testing on some systems where the source tree is read-only. Update makefile rules to generate it in the build tree instead. Note some other boards have the kwbimage.cfg file written in advance, hence we need check if the file exists in the build tree first, otherwise we fall back to one in the source tree. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-29tools: buildman: Remove useless mkdir() in Make() in test.pyBin Meng
In the 'Make' function, the codes tries to create a directory if current stage is 'build'. But the directory isn't used at all anywhere. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-29tools: buildman: Honor output directory when generating boards.cfgBin Meng
buildman always generates boards.cfg in the U-Boot source tree. When '-o' is given, we should generate boards.cfg to the given output directory. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-29spl: spl_mmc: fix getting raw_sect when boot from emmc boot partitionPeng Fan
On i.MX8, when booting from eMMC boot partition, the whole flash.bin is stored in boot partition, however SPL switches to user partition during the init of mmc driver: spl_mmc_load() -> mmc_init() Then it tries to load the container image in spl_mmc_get_uboot_raw_sector(), but here it reads the data from user partition and the header is not recognized as a valid header. So we move spl_mmc_get_uboot_raw_sector after eMMC partition switch to address this issue. Anyway put spl_mmc_get_uboot_raw_sector before eMMC partition switch is not correct, so let's move it after eMMC partition switch. Reported-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-10-29mmc: fsl_esdhc: drop i.MX DDR support codeYangbo Lu
A previous patch below adding DDR mode support was actually for i.MX platforms. Now i.MX eSDHC driver is fsl_esdhc_imx.c. For QorIQ eSDHC, it uses different process for DDR mode, and hasn't been supported. Let's drop DDR support code for i.MX in fsl_esdhc driver. 0e1bf61 mmc: fsl_esdhc: Add support for DDR mode Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2019-10-29mmc: fsl_esdhc: remove redundant DM_MMC checkingYangbo Lu
Remove redundant DM_MMC checking which is already in DM_MMC conditional compile block. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2019-10-29mmc: fsl_esdhc: make BLK as hard requirement of DM_MMCYangbo Lu
U-boot prefers DM_MMC + BLK for MMC. Now eSDHC driver has already support it, so let's force to use it. - Drop non-BLK support for DM_MMC introduced by below patch. 66fa035 mmc: fsl_esdhc: fix probe issue without CONFIG_BLK enabled - Support only DM_MMC + BLK (assuming BLK is always enabled for DM_MMC). - Use DM_MMC instead of BLK for conditional compile. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2019-10-28Add Microsoft Azure Pipelines configurationBin Meng
Microsoft Azure Pipelines [1] provides unlimited CI/CD minutes and 10 parallel jobs to every open source project for free. This adds a configuration file for Azure Pipelines to utilize the free Windows VM hosted by Microsoft to ensure no build broken in building U-Boot host tools for Windows. [1] https://azure.microsoft.com/en-us/blog/announcing-azure-pipelines-with-unlimited-ci-cd-minutes-for-open-source/ Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28tools: Avoid creating symbolic links for tools/version.hBin Meng
When building U-Boot host tools for Windows from Microsoft Azure Pipelines, the following errors were seen: HOSTCC tools/mkenvimage.o In file included from tools/mkenvimage.c:25: ./tools/version.h:1:1: error: expected identifier or ‘(’ before ‘.’ token 1 | ../include/version.h | ^ tools/mkenvimage.c: In function ‘main’: tools/mkenvimage.c:117:4: warning: implicit declaration of function ‘usage’ [-Wimplicit-function-declaration] 117 | usage(prg); | ^~~~~ tools/mkenvimage.c:120:35: error: ‘PLAIN_VERSION’ undeclared (first use in this function) 120 | printf("%s version %s\n", prg, PLAIN_VERSION); | ^~~~~~~~~~~~~ tools/mkenvimage.c:120:35: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [scripts/Makefile.host:114: tools/mkenvimage.o] Error 1 It turns out tools/version.h is a symbolic link and with Windows default settings it is unsupported hence the actual content of tools/version.h is not what file include/version.h has, but the the linked file path, which breaks the build. To fix this, remove the symbolic links for tools/version.h. Instead we perform a copy from include/version.h during the build. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28Add .gitattributes for line endingsBin Meng
When building U-Boot host tools for Windows from Microsoft Azure Pipelines, we see tons of weird warnings and errors emitted from every Kconfig files: Kconfig:6:warning: ignoring unsupported character '' Kconfig:6:warning: ignoring unsupported character '' Kconfig:8:warning: ignoring unsupported character '' Kconfig:9:warning: ignoring unsupported character '' Kconfig:10:warning: ignoring unsupported character '' Kconfig:10:warning: ignoring unsupported character '' Kconfig:13:warning: ignoring unsupported character '' arch/Kconfig:1:warning: ignoring unsupported character '' arch/Kconfig:2:warning: ignoring unsupported character '' arch/Kconfig:2:warning: ignoring unsupported character '' arch/Kconfig:4:warning: ignoring unsupported character '' ... After several rounds of experiments, it turns out this is caused by line endings. Historically, Linux and macOS used linefeed (LF) characters while Windows used a carriage return plus a linefeed (CRLF). When Azure Pipelines checks out the U-Boot repo, Git tries to compensate for the difference by automatically making lines end in CRLF in the working directory on Windows, which confuses the Kconfig file parsing logic. Fortunately Git provides a way for repos to tell Git not to do such automatical line endings conversion via .gitattributes file below: * text eol=lf Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28doc: Add documentation for how to build U-Boot host toolsBin Meng
This adds a reST document for how to build U-Boot host tools, including information for both Linux and Windows. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28tools: ifwitool: Define __packed when it is not definedBin Meng
Some compilers may provide __packed define for us. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28linux/types.h: Surround 'struct ustat' with __linux__Bin Meng
'struct ustat' uses linux-specific typedefs to declare its memebers: __kernel_daddr_t and __kernel_ino_t. It is currently not used by any U-Boot codes, but when we build U-Boot tools for other platform like Windows, this becomes a problem. Let's surround it with __linux__. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28tools: zynqmpbif: Use compiler builtin instead of linux-specific __swab32Bin Meng
__swab32() is a Linux specific macro defined in linux/swab.h. Let's use the compiler equivalent builtin function __builtin_bswap32() for better portability. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28tools: mtk_image.h: Use portable uintXX_t instead of linux-specific __leXXBin Meng
__leXX has Linux kernel specific __attribute__((bitwise)) which is not portable. Use corresponding uintXX_t instead. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28tools: image.h: Use portable uint32_t instead of linux-specific __be32Bin Meng
__be32 has Linux kernel specific __attribute__((bitwise)) which is not portable. Use uint32_t instead. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-25Merge tag 'mips-pull-2019-10-25' of git://git.denx.de/u-boot-mipsTom Rini
- bmips: add BCRM NAND support for BCM6368, BCM6328, BCM6362 and BCM63268 SoCs - bmips: various small fixes - mtmips: add new drivers for clock, reset-controller and pinctrl - mtmips: add support for high speed UART - mtmips: update/enhance drivers for SPI and ethernet - mtmips: add support for MMC
2019-10-25Merge branch '2019-10-24-ti-imports'Tom Rini
- Enable DFU on dra7xx boards - Further Keystone 3 platform improvements
2019-10-25arm: dts: k3-am65: Add R5F ranges in interconnect nodesSuman Anna
Add the address spaces for the R5F cores in MCU domain to the ranges property of the cbass_mcu interconnect node so that the addresses within the R5F nodes can be translated properly by the relevant OF address API. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-10-25armv7R: K3: j721e: Add support for triggering ddr init from SPLLokesh Vutla
In SPL, DDR should be made available by the end of board_init_f() so that apis in board_init_r() can use ddr. Adding support for triggering DDR initialization from board_init_f(). Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-10-25arm: dts: k3-j721e: Add ddr nodeLokesh Vutla
Use the 3733MTs DDR configuration that is auto generated from DDR_Regconfig tool. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Kevin Scholz <k-scholz@ti.com>
2019-10-25ram: k3-j721e: Add support for J721E DDR controllerKevin Scholz
The J721E DDR subsystem comprises DDR controller, DDR PHY and wrapper logic to integrate these blocks in the device. The DDR subsystem is used to provide an interface to external SDRAM devices which can be utilized for storing program or data. Introduce support for the DDR controller and DDR phy within the DDR subsystem. Signed-off-by: Kevin Scholz <k-scholz@ti.com Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-10-25dt-bindings: memory-controller: Introduce J721E DDRSS bindingsLokesh Vutla
Add DT binding documentation for DDR sub system present on J721E device. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-10-25ram: k3-am654: Do not rely on default values for certain DDR registerJames Doublesin
Added the following registers to the DDR configuration: - ACIOCR0, - ACIOCR3, - V2H_CTL_REG, - DX8SLxDQSCTL. Modified enable_dqs_pd and disable_dqs_pd to only touch the associated bit fields for pullup and pulldown registers (to preserve slew rate and other bits in that same register). Also update the dts files in the same patch to maintain git bisectability. Signed-off-by: James Doublesin <doublesin@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-10-25ram: k3-am654: add support for LPDDR4 and DDR3L DDRsJames Doublesin
Added training support for LPDDR4 and DDR3L DDRs. Also added/changed some register configuration to support all 3 DDR types Signed-off-by: James Doublesin <doublesin@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-10-25armv7r: dts: am654-base-board: Rename 1600MHz to 1600MTs in dtsi filenameJames Doublesin
The current configuration of DDR on AM654 base board is for 1600MTs but the file name is specified as k3-am654-base-board-ddr4-1600MHz.dtsi. Since 1600MHz is misleading, rename it to k3-am654-base-board-ddr4-1600MTs.dtsi Signed-off-by: James Doublesin <doublesin@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-10-25arm: K3: Clean and invalidate Linux Image before jumping to LinuxLokesh Vutla
U-Boot cleans and invalidate L1 and L2 caches before jumping to Linux by set/way in cleanup_before_linux(). Additionally there is a custom hook provided to clean and invalidate L3 cache. Unfortunately on K3 devices(having a coherent architecture), there is no easy way to quickly clean all the cache lines for L3. The entire address range needs to be cleaned and invalidated by Virtual Address. This can be implemented using the L3 custom hook but it take lot of time to clean the entire address range. In the interest of boot time this might not be a viable solution. The best hit is to make sure the loaded Linux image is flushed so that the entire image is written to DDR from L3. When Linux starts running with caches disabled the full image is available from DDR. Reported-by: Andrew F. Davis <afd@ti.com> Reported-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-10-25cmd: booti: Store OS start and end info in images structureLokesh Vutla
Store the start and end of the OS image that is loaded in images structure. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-10-25boot: arm: Enable support for custom board_prep_linuxLokesh Vutla
Once the arch specific boot_prepare_linux completes, boards wants to have a custom preparation for linux. Add support for a custom board_prep_linux. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-10-25configs: dra7xx_evm: Increase the size of SPL_MULTI_DTB_FITFaiz Abbas
Expand SPL_MULTI_DTB_FIT to accommodate usb peripheral nodes being added to support SPL_DFU bootmode. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-10-25configs: dra7xx_evm: Add Kconfigs for SPL_DFU bootmodeFaiz Abbas
Enable configs for supporting SPL_DFU bootmode. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>