summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-13test: aes: fix memleakPhilippe Reynes
In the first version, the result of malloc is checked with ut_assertnonnull. But on a fail, this macro exit the function, so previously malloc are not freed. So to avoid a memleak, we don't use ut_assertnonnull, but simply check the return of malloc. If one has failed, we freed all the allocated memory and quit the function. Reported-by: Coverity (CID: 284403) Reported-by: Coverity (CID: 284404) Reported-by: Coverity (CID: 284405) Reported-by: Coverity (CID: 284406) Reported-by: Coverity (CID: 284407) Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2020-02-13pci: definition of pci_addr_t and pci_size_tHeinrich Schuchardt
Currently the size of pci_addr_t and pci_size_t depends on CONFIG_SYS_PCI_64BIT. For qemu_arm64_defconfig with 4 GiB RAM this leads to an error pci_hose_phys_to_bus: invalid physical address which is due to the truncation of the bus address in _dm_pci_phys_to_bus. Defining CONFIG_SYS_PCI_64BIT is not a solution as this results in an error PCI: Failed autoconfig bar 10 So let's use unsigned long for pci_addr_t and pci_size_t if CONFIG_SYS_PCI_64BIT is not defined. Considering that 32bit U-Boot is used to launch some 64bit x86 systems we cannot do without CONFIG_SYS_PCI_64BIT requiring u64 as type. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-02-12Merge tag 'arc-fixes-for-2020.04-rc2' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-arc As usual a bit late a couple of tiny fixes and improvements for ARC. 1. Switch from ARC UART to a convenient DW UART on ARC simulation platforms. This became avaialble when nSIM got support of that much more standard UART (starting from nSIM v2019.06). FWIW also available now in Free nSIM [1]. This among other things allows us finally to use the same one binary on all our simulators & FPGA-based emulators. 2. Disable networking support on simulated platforms as there's no network interface in them. 3. Add Virtio net & block devices for the configuration supported by QEMU so that we may leverage those virtual peripherals and in fact it's possible to load uImage from TFTP server and bootm it. 4. Minor fixes for HSDK clocks. 5. Rework of how we chose and use compiler options for ARC-based boards. In real world ARC-based designs are customized more or less but very rarely match any of our "templates" thus it makes not much sense to pretend we have some fixed configs, instead we now will fully reply on a SoC or even board on getting precise set of compiler options preferably even extracted from real HW via "tcfgen" utility. 6. Well and finally yet another simplification - switch to generic written in C accessors which are much more universal and just work for any target supported by the complier as compared to GAS implementation which is much more target-dependent. This one was heavily "inspired" by similar implementation for RISCV and ARM. [1] https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi
2020-02-12ARM: dts: stm32: Add DH Electronics DHCOM SoM and PDK2 boardMarek Vasut
Add support for DH Electronics DHCOM SoM and PDK2 rev. 400 carrier board. This is an SoM with STM32MP15xx and an evaluation kit. The baseboard provides Ethernet, UART, USB, CAN and optional display. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-02-12ARC: Switch to generic accessorsAlexey Brodkin
First of all U-Boot is not that performance oriented as real run-time software like OS or user bare-metal app so we may afford being not super fast as we only being executed once. That in return allows us to be more universal and support wider variety of devices. And looking forward that will significantly reduce maintenance and simplify support of newer architectures. And while at it we add quad-word accessors like readq(), writeq() etc. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-12ARC: rework setting of ARC CPU specific compiler optionsEugeniy Paltsev
It's a very rare if at all existing occasion when ARC CPU template is used as is w/o any changes - in the end it's a beauty and competitive advantage of ARC cores to be tailored for a particular use-case - and so it doesn't make a lot of sense to offer template-based "-mcpu" selection. Given for each and every platform we end-up adding quite a few more flags it's logical to move "-mcpu" selection to platform's definition as well which we exactly do here. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-12CLK: HSDK: fix HDMI clock calculationEugeniy Paltsev
HDMI PLL has its own xtal with 27 MHz output but we treat it the same way as other PLLs with 33.33 MHz input. Fix that. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-12CLK: HSDK: Check for PLL bypass firstlyEugeniy Paltsev
Pll bypass has priority over enable/disable. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-12ARC: nsim_hs38: Add support of Virtio NET & BLKAlexey Brodkin
Given now nsim_hs38 configuration is usable on QEMU and in QEMU we have Virtio working perfectly fine the next logical step is to add support of supported & known to work net & bkl to this config. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-12ARC: nsim_{700|700be|hs38be}_defconfigs: Disable networkingAlexey Brodkin
We don't have yet any brc700 or big-enadian platforms with networking support to run this particular configuration. Whenever QEMU for ARC supports arc700 or big-endian targets we may revisit this one. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-12ARC: nSIM: switch from ARC UART to DW UARTAlexey Brodkin
Since v2019.06 DesingWare nSIM supports DesignWare UART simulation and so we may switch from pretty unusual ARC UART to much more standard DesignWare UART (which in case of U-Boot is just an ordinary 16650 UART). This among other things makes built dinaries compatible with our other platforms to name a few: FPGA-based HAPS boards, QEMU and even ZeBU. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-12Prepare v2020.04-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-02-12Revert "gitlab: Disable SDL when building sandbox"Simon Glass
This is not needed now that we have SDL2 in the docker image. It causes test failures for tests which need video to work. This reverts commit af800722eb718bec51c5943cfb69231acf15178f. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-11Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmTom Rini
sandbox conversion to SDL2 TPM TEE driver Various minor sandbox video enhancements New driver model core utility functions
2020-02-11Merge branch '2020-02-10-master-imports'Tom Rini
- Regulator fix - Documentation fix - Correct LOGLEVEL range
2020-02-10Kconfig: update LOGLEVEL rangeMarek Bykowski
As LOGLEVEL ranges form 0 to 9 set the limit to 10. Signed-off-by: Marek Bykowski <marek.bykowski@gmail.com>
2020-02-10dm: fix design.rst documentDario Binacchi
The patch fixes some errors. Signed-off-by: Dario Binacchi <dariobin@libero.it> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-10regulator: fix: Move code to enable gpio regulator to pre_probe from ↵Lukasz Majewski
ofdata_to_platdata The commit e8e9715df2d4 ("regulator: fixed: Modify enable-active-high behavior") fixed the regulator driver behavior when 'enable-active-high' is defined. Unfortunately, this patch used dm_regulator_platdata()'s "boot_on" member to set GPIOD_IS_OUT_ACTIVE flag and enable the regulator. The issue here is that regulator_common_ofdata_to_platdata() is called _before_ regulator_pre_probe() function in which the 'regulator-boot-on' property is asserted. As a result the GPIOD_IS_OUT_ACTIVE flag is not set and gpio_request_by_name() called in the former function is not enabling the regulator. This is problematic for e.g. i.MX ethernet driver, which then tries to perform initialization without power (and fails). The solution here is to explicitly enable regulator in regulator_pre_probe() callback only when 'regulator-boot-on' property is present in device tree. The GPIOD_IS_OUT_ACTIVE flag is not set at all, but relevant gpio is requested. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Tested-by: Patrice Chotard <patrice.chotard@st.com>
2020-02-10Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86Tom Rini
- Move P2SB from Apollo Lake to a more generic location - Add a function to find a device by drvdata in DM core - Enhancement of DM IRQ uclass driver - Add a clock driver for Intel devices - Add support for ACPI general-purpose events - Add a TPM driver for H1/Cr50 - Enable TPM on Google Chromebook Coral
2020-02-10Merge tag 'fixes-for-v2020.04' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-video - fix Coverity CID 280902 issue in vid_console_color() - fix vid_console_color() build warning - fix for mxsfb to ensure correct Linux logo position
2020-02-10Merge tag 'u-boot-imx-20200210' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx - Convert to DM: - bx50v3, mx53ppd, novena, mx6sabresd - Fixes for Xea Board - Toradex im8m Verdin - Cleanup (warp7, mx6sxsabresd) Travis : https://travis-ci.org/sbabic/u-boot-imx/builds/648131788
2020-02-10Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscvTom Rini
- Fix ax25-ae350.rst document. - Refine RISC-V linker script and start.S. - Add option to print more information on exception.
2020-02-10riscv: Remove unnecessary instructionSean Anderson
The add instruction on risc-v can have any three sources and targets, so there is no need for an intermediate mov. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-10doc: fix opensbi build steps for AX25-AE350Jagan Teki
OpenSBI build steps are marked as normal text in AX25-AE350 documentation. Move them into code-block so-that it can show it as build steps. Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-10doc: fix AX25-AE350 RISC-V documentationHeinrich Schuchardt
Since commit 04883bf7acca ("doc: update AX25-AE350 RISC-V documentation") `make htmldocs` produces a log of warnings like doc/board/AndesTech/ax25-ae350.rst:373: WARNING: Block quote ends without a blank line; unexpected unindent. doc/board/AndesTech/ax25-ae350.rst:0: WARNING: Undefined substitution referenced: "_ __ ___ _ __ | (___ | |_) |". Reformat the problematic passages. Fixes: 04883bf7acca ("doc: update AX25-AE350 RISC-V documentation") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Rick Chen <rick@andestech.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-10riscv: Add option to print registers on exceptionSean Anderson
When debugging, it can be helpful to see more information about an unhandled exception. This patch adds an option to view the registers at the time of the trap, similar to the linux output on a kernel panic. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-10riscv: Fix breakage caused by linker relaxationSean Anderson
Due to the two-instruction sequence needed to access arbitrary memory locations, the RISC-V linker aggressively optimises memory accesses and jumps at link-time. This is called "linker relaxation," and is discussed in this SiFive article <https://www.sifive.com/blog/all-aboard-part-3-linker-relaxation-in-riscv-toolchain>. One of the optimizations in place is to assume that the __global_pointer symbol is placed in the gp register. To quote the article: "...The magic __global_pointer$ symbol is defined to point 0x800 bytes past the start of the .sdata section. The 0x800 magic number allows signed 12-bit offsets from __global_pointer$ to address symbols at the start of the .sdata section. The linker assumes that if this symbol is defined, then the gp register contains that value, which it can then use to relax accesses to global symbols within that 12-bit range. The compiler treats the gp register as a constant so it doesn't need to be saved or restored, which means it is generally only written by _start, the ELF entry point." However, U-Boot instead keeps the global data pointer in gp. This causes memory accesses and jumps optimized to use the gp pointer to fail. To fix this problem, we undefine the __global_pointer symbol. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
2020-02-09board: ge: bx50v3, imx53ppd: configure CONFIG_SYS_BOOTMAPSZIan Ray
Configure `CONFIG_SYS_BOOTMAPSZ' per guidance on u-boot@lists.denx.de. Signed-off-by: Ian Ray <ian.ray@ge.com>
2020-02-09board: ge: bx50v3, mx53ppd: fix firstboot detectionRobert Beckett
Use `test' command to test for file existence instead of relying on the old functionality of the `ext2load' command (which now reports an error when attempting to load a zero length file). Signed-off-by: Robert Beckett <bob.beckett@collabora.com> Signed-off-by: Ian Ray <ian.ray@ge.com>
2020-02-09board: ge: mx53ppd: use DM for uartIan Ray
Drop PPD_UART_PAD_CTRL since it matches defaults. Enable DM serial and MXC uart. Signed-off-by: Ian Ray <ian.ray@ge.com> Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-02-09board: ge: bx50v3: use DM for uartRobert Beckett
Remove legacy uart pad and iomux code Enable DM serial and mxc uart Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-02-09board: ge: mx53ppd: Use DM for ethernetRobert Beckett
Remove legacy iomux setup for fec. Enable phylib and DM fec. Use Kconfig for enabling fec. Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-02-09board: ge: bx50v3: Enable DM PWM for backlightRobert Beckett
Add backlight and panel devicetree definitions Use UCLASS_PANEL to enable backlight via display enable handler Remove old explicit gpio code for handling backlight Use cls command to initiate display in HW agnostic manner Enable DM regulator and pwm Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-02-09board: ge: bx50v3: override panelIan Ray
Override the panel compatible string for LCD in U-Boot. Include U-Boot device tree overrides in device-specific device trees so that the panel compatible string is used. Fixes: 8c26739859c6 ("board: ge: bx50v3: sync devicetrees from Linux") Signed-off-by: Ian Ray <ian.ray@ge.com>
2020-02-09board: ge: mx53ppd: enable DM_VIDEOIan Ray
Enable DM_VIDEO for mx53ppd. Enable DM_REGULATOR_FIXED and DM_PWM for the backlight. Remove unused MX53PPD_LCD_POWER. Remove old (incorrect) setup_iomux_lcd. Enable backlight via display enable handler. Use cls command to initiate display in HW agnostic manner. Modify `failbootcmd' to use lcdputs. Signed-off-by: Ian Ray <ian.ray@ge.com> Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-02-09board: ge: mx53ppd: add i2c eeprom bootcount storageRobert Beckett
Add bootcount node, linking to i2c eeprom "bootcount" partitions for storage. Enable i2c eeprom bootcount backend storage. Enable bootcount command and use it for failbootcmd. Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-02-09board: ge: bx50v3: add i2c eeprom bootcount storageRobert Beckett
Add bootcount node, linking to i2c eeprom "bootcount" partitions for storage. Enable i2c eeprom bootcount backend storage. Enable bootcount command and use it for failbootcmd. Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-02-09board: ge: bx50v3, imx53ppd: use DM I2CRobert Beckett
Remove old (pre-DM) i2c setup code. Enable DM i2c. Convert common code to use DM rtc. Convert common code to read VPD from eeprom partition. Convert the generic i2c PMIC init code to use the new da9063 driver. mx53ppd only: Correct RTC compatible in device tree. Enable MXC DM i2c driver. Define CONFIG_SYS_MALLOC_F_LEN so that DM is available in pre-reloc. Make GPIO banks available during preloc, since initialisation is done in board_early_init_f(). Add gpio_request() calls to satisfy the DM_GPIO compatibility API. Remove unused power configuration. Signed-off-by: Robert Beckett <bob.beckett@collabora.com> Signed-off-by: Ian Ray <ian.ray@ge.com>
2020-02-09board: ge: bx50v3, imx53ppd: add eeprom partitionsRobert Beckett
Add eeprom partitions to device tree. Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-02-09misc: i2c_eeprom: set offset len and chip addr offset maskRobert Beckett
Set the correct offset length and chip address offset mask for each device to allow correct access to total capacity of the devices. Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-02-09imx: mx6ul_14x14_evk: turn of backlight and LCD before booting OSAnatolij Gustschin
This should help keeping the screen black when booting the kernel. Signed-off-by: Anatolij Gustschin <agust@denx.de> Reported-by: Fabio Estevam <festevam@gmail.com> Tested-by: Fabio Estevam <festevam@gmail.com>
2020-02-09mx6sabresd: Convert PCI to driver modelAlifer Moraes
Convert imx6sabresd PCI to driver model to fix the following warning: ===================== WARNING ====================== This board does not use CONFIG_DM_PCI Please update the board to use CONFIG_DM_PCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/MIGRATION.txt for more info. ==================================================== After the conversion the following commands were used for testing: => pci enum PCI: Failed autoconfig bar 10 PCI: Failed autoconfig bar 10 => pci 1 Scanning PCI devices on bus 1 BusDevFun VendorId DeviceId Device Class Sub-Class Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-02-09mx6sabre_common: Remove FEC related settingsFabio Estevam
In preparation for converting to DM_ETH and moving the FEC symbols to Kconfig we need to move the FEC definitions to mx6sabreauto.h and mx6sabresd.h to avoid build breakage during the conversion. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
2020-02-09imx6: aristainetos: fix NAND detection with latest mainlineHeiko Schocher
commit 88718be30010 ("mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND") moved CONFIG_NAND -> CONFIG_MTD_RAW_NAND. Adapt board code to this change, as last merge did not respect the above commit. Signed-off-by: Heiko Schocher <hs@denx.de>
2020-02-09ARM: imx: novena: Enable DM thermalMarek Vasut
Enable DM thermal driver and iMX thermal driver to get accurate CPU frequency reporting in the boot log. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Vagrant Cascadian <vagrant@debian.org>
2020-02-09ARM: imx: novena: Enable DM ethernetMarek Vasut
Convert to DM ethernet to prevent board removal. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Vagrant Cascadian <vagrant@debian.org>
2020-02-09ARM: imx: novena: Move defconfig bits to arch KconfigMarek Vasut
Just move the defconfig entries which are required into the Novena entry in arch Kconfig, no functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Vagrant Cascadian <vagrant@debian.org>
2020-02-09mx7dsabre: Fix usbtog probe when use dfu or umsJoris Offouga
Before: => ums 0 mmc 0 UMS: LUN 0, dev 0, hwpart 0, sector 0x0, count 0x1dacc00 usb dr_mode not found CTRL+C - Operation aborted => dfu 0 mmc 0 usb dr_mode not found After : => ums 0 mmc 0 UMS: LUN 0, dev 0, hwpart 0, sector 0x0, count 0x1dacc00 => dfu 0 mmc 0 Signed-off-by: Joris Offouga <offougajoris@gmail.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-02-09arm: dts: imx7s-warp7: Move u-boot specific node in u-boot.dtsiJoris Offouga
These nodes are not in upstream kernel, so move these in u-boot.dtsi Signed-off-by: Joris Offouga <offougajoris@gmail.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-02-09warp7: remove unused usb configsJoris Offouga
With commit 6b503f9e6549("warp7: Switch to DM USB"). These configs are not necessary Signed-off-by: Joris Offouga <offougajoris@gmail.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>