aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-10-10buildman: Add --allow-missing-binaries flag to build with BINMAN_ALLOW_MISSING=1WIP/no-default-missing-binsTom Rini6-6/+15
Add a new flag to buildman so that we will in turn pass BINMAN_ALLOW_MISSING=1 to 'make'. Make use of this flag in CI. Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-10-10global: Do not default to faking missing binaries for buildmanTom Rini1-2/+2
While it is possible and documented on how to re-run buildman to replace faked required binary files after the fact, this behavior ends up being more confusing than helpful in practice. Switch to requiring BINMAN_ALLOW_MISSING=1 to be passed on the 'make' line to enable this behavior. Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-10-10Merge tag 'u-boot-nand-20221009' of ↵Tom Rini10-48/+335
https://source.denx.de/u-boot/custodians/u-boot-nand-flash - mtd: Update the function name to 'rfree' - Support NAND ONFI EDO mode for imx8mn architecture - dm: clk: add missing stub when CONFIG_CLK is deactivated
2022-10-09mtd: Update the function name to 'rfree'Fabio Estevam1-1/+1
Since commit 8d38a8459b0d ("mtd: Rename free() to rfree()") the function has been renamed to rfree(), so update the description inside the mtd_oob_region structure as well. Fixes: 8d38a8459b0d ("mtd: Rename free() to rfree()") Reported-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Signed-off-by: Fabio Estevam <festevam@denx.de> Acked-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-10-09mtd: mxs_nand: Support EDO mode for imx8mn architectureMichael Trimarchi3-27/+242
Add support for imx8mn architecture in order to run the NAND in fast edo mode. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-10-09mtd: mxs_nand: get the clock with the right nameDario Binacchi1-3/+3
Rename the gpmi_apb_bch clock name to gpmi_bch_apb, as you can find in the device tree. Fixes: commit a59691280daca ("MXS_NAND: Add clock support for iMX8") Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
2022-10-09mtd: mxs_nand: don't get the gpmi_apbh_dma clockDario Binacchi1-13/+0
This clock name is not present in any U-boot and Linux kernel device tree. Fixes: commit a59691280daca ("MXS_NAND: Add clock support for iMX8") Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
2022-10-09imx: gpmi: Add register needed to control nand bus timingMichael Trimarchi1-0/+9
It is used as delay for gpmi write strobe. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-10-09clk: imx: clk-imx8mn add gpmi nand clocksMichael Trimarchi1-0/+14
Add gpmi nand clock. Those clock can be used in mxs nand driver to run nand to EDO mode 5, 4, ... Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-10-09clk: imx: gate2 support shared counter and relative clock functionsMichael Trimarchi2-5/+37
Add shared counter in order to avoid to swich off clock that are already used. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-10-09dm: clk: add missing stub when CONFIG_CLK is deactivatedDario Binacchi1-1/+31
Add missing stub for functions [devm_]clk_...() when CONFIG_CLK is deactivated. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-10-08mtd: nand: Fix SPL build after migration of CONFIG_SYS_NAND_SELF_INIT to KconfigRoger Quadros1-1/+1
This fixes the below build error if nand.c is included in an SPL build. /work/u-boot/drivers/mtd/nand/raw/nand.c: In function ‘nand_init_chip’: /work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: error: ‘nand_chip’ undeclared (first use in this function) 82 | struct nand_chip *nand = &nand_chip[i]; | ^~~~~~~~~ /work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: note: each undeclared identifier is reported only once for each function it appears in /work/u-boot/drivers/mtd/nand/raw/nand.c:84:20: error: ‘base_address’ undeclared (first use in this function); did you mean ‘base_addr’? 84 | ulong base_addr = base_address[i]; | ^~~~~~~~~~~~ | base_addr Fixes: 068c41f1cc77 ("Finish conversion CONFIG_SYS_NAND_SELF_INIT to Kconfig") Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-10-07Merge tag 'efi-2023-01-rc1' of ↵WIP/07Oct2022Tom Rini27-385/+520
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-01-rc1 UEFI: * Provide driver binding protocol to registered events for block devices * Code simplification and refactoring * Fix pylint errors in test_efi_secboot Other: * Improve checks for register ranges
2022-10-07Merge branch '2022-10-07-riscv-toolchain-update'Tom Rini5-5/+25
- Update RISC-V to use 32bit or 64bit toolchains, depending on if we're building for 32bit or 64bit CPUs. This requires updating the Docker container as well to have the 32bit toolchain.
2022-10-07Merge branch '2022-10-06-assorted-platform-and-board-updates'Tom Rini40-72/+1702
- Assorted platform updates for developerbox, armv8 platforms in general, TI K3 and AM65 platforms, nuvoton NPCM845 SoC and then clock driver, ftgpio010 support, and common/board_f cleanups.
2022-10-07riscv: Fix build against binutils 2.38WIP/2022-10-07-riscv-toolchain-updateAlexandre Ghiti1-1/+10
The following description is copied from the equivalent patch for the Linux Kernel proposed by Aurelien Jarno: >From version 2.38, binutils default to ISA spec version 20191213. This means that the csr read/write (csrr*/csrw*) instructions and fence.i instruction has separated from the `I` extension, become two standalone extensions: Zicsr and Zifencei. As the kernel uses those instruction, this causes the following build failure: arch/riscv/cpu/mtrap.S: Assembler messages: arch/riscv/cpu/mtrap.S:65: Error: unrecognized opcode `csrr a0,scause' arch/riscv/cpu/mtrap.S:66: Error: unrecognized opcode `csrr a1,sepc' arch/riscv/cpu/mtrap.S:67: Error: unrecognized opcode `csrr a2,stval' arch/riscv/cpu/mtrap.S:70: Error: unrecognized opcode `csrw sepc,a0' Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Tested-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Christian Stewart <christian@paral.in> Reviewed-by: Rick Chen <rick@andestech.com>
2022-10-07buildman: differentiate between riscv32, riscv64Heinrich Schuchardt1-0/+11
riscv32 needs a different toolchain than riscv64 Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Rick Chen <rick@andestech.com>
2022-10-07docker: install riscv32 toolchainHeinrich Schuchardt3-4/+4
For building riscv32 targets we should use the riscv32 toolchain. Add it to the Docker image. Drop the riscv toolchain-alias as we do not need it in future. While in here, update to the latest "jammy" tag. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Rick Chen <rick@andestech.com> [trini: Update to latest jammy tag] Signed-off-by: Tom Rini <trini@konsulko.com>
2022-10-06clk: nuvoton: Add support for NPCM845Jim Liu2-0/+99
Add clock controller driver for NPCM845 Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Acked-by: Sean Anderson <seanga2@gmail.com>
2022-10-06arm: nuvoton: Add support for Nuvoton NPCM845 BMCJim Liu21-0/+1112
Add basic support for the Nuvoton NPCM845 EVB (Arbel). Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2022-10-06net: ti: am65-cpsw-nuss: Enable MDIO manual modeRavi Gunasekaran1-1/+22
For the TI SoCs affected by errata i2329, enable MDIO manual mode by default Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-10-06net: ti: cpsw-mdio: Add workaround for errata i2329Ravi Gunasekaran5-8/+258
In certain TI SoCs, on the CPSW and ICSS peripherals, there is a possibility that the MDIO interface returns corrupt data on MDIO reads or writes incorrect data on MDIO writes. There is also a possibility for the MDIO interface to become unavailable until the next peripheral reset. The workaround is to configure the MDIO in manual mode and disable the MDIO state machine and emulate the MDIO protocol by reading and writing appropriate fields in MDIO_MANUAL_IF_REG register of the MDIO controller to manipulate the MDIO clock and data pins. More details about the errata i2329 and the workaround is available in: https://www.ti.com/lit/er/sprz487a/sprz487a.pdf Add implementation to disable MDIO state machine, configure MDIO in manual mode and provide software MDIO read and writes via MDIO bitbanging. Allow the MDIO to be initialized based on the need for manual mode. Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-10-06dma: ti: k3-udma: Fix 'SZ_64K’ undeclared errorDhruva Gole1-0/+1
Include linux/sizes.h because it defines SZ_64K which is used in many places inside k3-udma.c This fixes the error: ‘SZ_64K’ undeclared which appears during build time Signed-off-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-10-06armv8: cache_v8: Fix pgtables setup when MMU is already enabledPali Rohár1-0/+4
When MMU is already enabled then dcache_enable() does not call mmu_setup() and so setup_all_pgtables() is also never called. In this situation when some driver calls mmu_set_region_dcache_behaviour() function then U-Boot crashes with error message: Emergency page table not setup. Fix this issue by explicitly calling setup_all_pgtables() in dcache_enable() function near condition for mmu_setup(). This change fixes chainloading U-Boot from U-Boot on Turris Mox board which uses mvneta ethernet driver which calls mmu_set_region_dcache_behaviour(). Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-10-06common/board_f: drop ifdefs around header includesOvidiu Panait1-2/+0
Drop the remaining ifdef around spl.h include. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
2022-10-06common/board_f: introduce arch_setup_dest_addr()Ovidiu Panait3-14/+37
In order to move ppc-specific code out of setup_dest_addr(), provide an arch-specific variant arch_setup_dest_addr(), that can be used by architecture code to fix up the initial reloc address. It is called at the end of setup_dest_addr() initcall and the default implementation is a nop stub. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
2022-10-06common/board_f: move CONFIG_MACH_TYPE logic to arch/arm/lib/bdinfo.cOvidiu Panait2-7/+12
asm/mach_type.h header and CONFIG_MACH_TYPE macro are arm-specific, so move related bdinfo logic to arch_setup_bdinfo() in arch/arm/lib/bdinfo.c. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
2022-10-06common/board_f: remove XTRN_DECLARE_GLOBAL_DATA_PTR dead codeOvidiu Panait3-17/+5
The XTRN_DECLARE_GLOBAL_DATA_PTR declarations in ppc code are permanently commented out, so there are no users for this macro: #if 1 #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2") #else /* We could use plain global data, but the resulting code is bigger */ #define XTRN_DECLARE_GLOBAL_DATA_PTR extern #define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \ gd_t *gd #endif Remove all references to this macro, but add a documentation note regarding the possibility of using plain global data for the GD pointer. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-10-06board: developerbox: move mem_map setup laterJassi Brar1-23/+34
dram_init() can't modify global/static variables, so move the mem_map setup later when bss is available. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2022-10-06board: developerbox: use identity mapping for >4GBJassi Brar1-1/+1
Identity-map the second and later memory banks which are located >4GB. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2022-10-06gpio: ftgpio010: Add support for Faraday Technology FTGPIO010Sergei Antonov3-0/+118
Add Faraday Technology's FTGPIO010 controller driver. Signed-off-by: Sergei Antonov <saproj@gmail.com>
2022-10-06cmd: replace efi_create_handle/add_protocol with InstallMultipleProtocolIlias Apalodimas1-9/+8
In general handles should only be deleted if the last remaining protocol is removed. Instead of explicitly calling efi_create_handle -> efi_add_protocol -> efi_delete_handle which blindly removes all protocols from a handle before removing it, use InstallMultiple/UninstallMultiple which adheres to the EFI spec and only deletes a handle if there are no additional protocols present Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-10-06efi_loader: define internal implementations of install/uninstallmultipleIlias Apalodimas8-106/+218
A following patch is cleaning up the core EFI code trying to remove sequences of efi_create_handle, efi_add_protocol. Although this works fine there's a problem with the latter since it is usually combined with efi_delete_handle() which blindly removes all protocols on a handle and deletes the handle. We should try to adhere to the EFI spec which only deletes a handle if the last instance of a protocol has been removed. Another problem is that efi_delete_handle() never checks for opened protocols, but the EFI spec defines that the caller is responsible for ensuring that there are no references to a protocol interface that is going to be removed. So let's fix this by replacing all callsites of efi_create_handle(), efi_add_protocol() , efi_delete_handle() with Install/UninstallMultipleProtocol. In order to do that redefine functions that can be used by the U-Boot proper internally and add '_ext' variants that will be used from the EFI API Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-10-06MAINTAINERS: get rid of the optee variables entryIlias Apalodimas1-6/+1
Since I am co-maintaining EFI with Heinrich remove the special entry for EFI variable storage via OP-TEE Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06efi_driver: move event registration to driverHeinrich Schuchardt4-29/+23
Move the registration of events for the addition and removal of block devices to the block device driver. Here we can add a reference to the EFI Driver Binding protocol as context. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06efi_selftest: rename event_notifyHeinrich Schuchardt4-46/+55
A function event_notify() exists. We should not use the same name for and EFI event. Rename events in unit tests. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-06efi_driver: add init function to EFI block driverHeinrich Schuchardt4-10/+32
For handling added and removed block devices we need to register events which has to be done when the driver is installed. This patch only creates an empty init function that will be filled with code later on. The function needs to be called before any EFI block devices are used. Move the efi_driver_init() call to early init. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06efi_driver: provide driver binding protocol to bind functionHeinrich Schuchardt3-16/+20
DisconnectController() is based on the open protocol information created when the driver opens a protocol with BY_CHILD_CONTROLLER or BY_DRIVER. To create an open protocol information it is required to supply the handle of the driver as agent handle. This information is available as field DriverBindingHandle in the driver binding protocol. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06efi_driver: reformat efi_block_device.cHeinrich Schuchardt1-10/+10
* use Sphinx documentation style * correct indentation Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06doc: documentation of EFI driver binding protocolHeinrich Schuchardt2-7/+18
* Convert code comments in include/efi_driver.h to Sphinx style. * Add include/efi_driver.h to the HTML documentation. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-06efi_driver: carve out function to create block deviceHeinrich Schuchardt1-7/+25
* Carve out function efi_bl_create_block_device() from efi_bl_bind(). * Add a check for U-Boot devices to efi_bl_bind(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06cmd: simplify command efidebugHeinrich Schuchardt1-87/+15
Currently we have subcommands 'efidebug dh' which shows protocols per handle and 'efidebug devices' which shows the device path. None shows which U-Boot device matches the handle. Change 'efidebug dh' to show the device path and the U-Boot device if any is associated with the handle. Remove 'efidebug devices'. Old output of 'efidebug dh': Handle Protocols ================ ==================== 000000001b22e690 Device Path, Block IO 000000001b22e800 Device Path, Block IO, system, Simple File System New output of 'efidebug dh': 000000001b22e690 (host0) /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/VenHw(bbe4e671-5773-4ea1-9aab-3a7dbf40c482,00) Block IO 000000001b22e800 (host0:1) /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/VenHw(bbe4e671-5773-4ea1-9aab-3a7dbf40c482,00)/HD(1,GPT,7e5c17c5-3f5f-49d0-ae96-511b21d7f273,0x800,0x3f7df) Block IO system Simple File System Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-06efi_driver: simplify efi_uc_stop(), call efi_free_pool()Heinrich Schuchardt1-1/+1
We have exported efi_free_pool(). There is no need to use EFI_CALL(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06efi_driver: fix error handlingHeinrich Schuchardt3-39/+46
If creating the block device fails, * delete all created objects and references * close the protocol interface on the controller Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06efi_loader: function to unlink udevice and handleHeinrich Schuchardt2-0/+20
When deleting a device or a handle we must remove the link between the two to avoid dangling references. Provide function efi_unlink_dev() for this purpose. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06test: fix some pylint errors in test_efi_secbootHeinrich Schuchardt1-9/+3
* Remove unused import * Provide module docstring Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-06efi_loader: efi_dp_part_node check dp_alloc return valueHeinrich Schuchardt2-1/+7
dp_alloc() may return NULL. This needs to be caught. Fixes: 98d48bdf415e ("efi_loader: provide a function to create a partition node") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06cmd: simplify do_efi_boot_add()Heinrich Schuchardt1-5/+1
Use efi_convert_string() to convert a UTF-8 to a UTF-16 string. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06cmd: simplify do_env_set_efi()Heinrich Schuchardt1-8/+3
Use efi_convert_string() to convert a UTF-8 to a UTF-16 string. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-06efi: Add string conversion helperPaul Barker2-1/+26
Signed-off-by: Paul Barker <paul.barker@sancloud.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>