aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2022-01-19Merge tag 'xilinx-for-v2022.04-rc1' of ↵WIP/19Jan2022Tom Rini2-6/+2
https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2022.04-rc1 gpio: - Add modepin driver net: - Save random mac addresses to eth variable zynqmp gem: - Add support for mdio bus DT description - Add support for reset and SGMII phy configuration - Reduce timeout for MDIO accesses zynqmp clk: - Fix clock handling for gem and usb phy: - Add zynqmp phy/serdes driver serial: - Add one missing compatible string microblaze: - Symbol alignement - SPL fixups - Code cleanups zynqmp: - Various dt changes, DP pre-reloc, gem resets, gem clocks - Switch SOM to shared psu configuration - Move dcache handling to firmware driver - Workaround gmii2rgmii DT description issue - Enable broadcasts again - Change firmware enablement logic - Small adjustement in firmware driver versal: - Support new mmc@ DT nodes - Fix run time variable handling - Add missing I2C_PMC ID for power domain
2022-01-18miiphy.h: Remove CONFIG_DM_xxx guardsWIP/2022-01-18-platform-updatesTom Rini1-8/+0
Function prototypes must not be guarded with ifdef tests. Doing so prevents us from doing: if (CONFIG_IS_ENABLED(FOO)) func(); as that results in a warning when CONFIG_FOO is not enabled. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-18ARM: dts: sync Actions Semi S700 DT from Linux v5.16-rc3Amit Singh Tomar1-0/+19
This Synchronizes the Actions Semi S700 SoC DT changes from commit "g58e1100fdc59" ("Linux v5.16-rc3"). Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
2022-01-18lib: add BLAKE2 hash supportQu Wenruo1-0/+94
The code is cross-ported from BLAKE2 reference implementation (https://github.com/BLAKE2/BLAKE2). With minimal change to remove unused macros/features. Currently there is only one user inside U-boot (btrfs), and since it only utilize BLAKE2B, all other favors are all removed. Signed-off-by: Qu Wenruo <wqu@suse.com> [trini: Rename ROUND to R to avoid clash with <linux/bitops.h> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-18common: board_r: move init_addr_map() to init.hOvidiu Panait1-0/+10
asm/mmu.h include is currently guarded by CONFIG_ADDR_MAP ifdef because the header is only present on arm and powerpc. In order to remove the dependency on this header and the associated ifdef, move init_addr_map() declaration to init.h, since it is only called during the common init sequence. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2022-01-18common: board_r: drop initr_kgdb wrapperOvidiu Panait1-1/+10
Add a return value to kgdb_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Also, move the "KGDB" print message inside kgdb_init(). Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2022-01-18common: remove bedbug debugger supportOvidiu Panait5-1478/+0
Commit 98f705c9cefd ("powerpc: remove 4xx support") removed (in 2017) the last code that made use of bedbug debugger support. Since there aren't any boards left that define either CONFIG_CMD_BEDBUG or a real bedbug_init(), drop this feature from u-boot. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-17Merge branch '2022-01-15-TI-platform-updates'WIP/17Jan2022Tom Rini2-1/+5
- Let am335x_evm use the CPSW or PRUSS ethernet. - Implement timer_get_boot_us in the omap timer driver - gpmc bitflip, QSPI clock calculation on am437x, da8xx_gpio bugfixes - Assorted K3 updates
2022-01-17Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-netTom Rini2-1/+60
- PXE label override support - Fastboot UDP configurable port - new phy driver: TI DP83869HM - and few minor fixes to dsa.
2022-01-16board: ti: am335x: Choose CPSW or PRUSS configuration based on jumper settingAmjad Ouled-Ameur2-1/+5
The am335x-ice-v2 board's Ethernet ports can be configured in 'MII' or 'RMII' mode to be connected to 'PRUSS' or 'CPSW' Ethernet subsystems. This patch sets the environment variable 'ice_mii' to 'mii' or 'rmii' accordingly. Based on that we choose the appropriate board devicetree i.e. 'am335x-ice-v2.dtb' or 'am335x-ice-v2-prueth.dtb'. Since there are 2 Ethernet ports with 2 modes, there can be 4 configurations but for now we consider both ports in different modes to be an invalid configuration and prevent boot in that case. Signed-off-by: Roger Quadros <rogerq@ti.com> [Amjad: use overlay instead of using new am335x-ice-v2-prueth.dtb] Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Make prueth_is_mii be marked __maybe_unused] Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-15net: fsl: Fix busy flag polling registerMarkus Koch1-1/+0
NXP's mEMAC reference manual, Chapter 6.5.5 "MDIO Ethernet Management Interface usage", specifies to poll the BSY (0) bit in the CFG/STAT register to wait until a transaction has finished, not bit 31 in the data register. In the Linux kernel, this has already been fixed in commit 26eee0210ad7 ("net/fsl: fix a bug in xgmac_mdio"). This patch changes the register in the fman_mdio and fsl_ls_mdio drivers. As the MDIO_DATA_BSY define is no longer in use, this patch also removes its definition from the fsl_memac header. Signed-off-by: Markus Koch <markus@notsyncing.net> Reviewed-by: Camelia Groza <camelia.groza@nxp.com>
2022-01-15net: phy: add TI DP83869HM ethernet driverDominic Rath1-0/+60
This driver is based on an older downstream TI kernel, with changes and cleanups to work with mainline device-tree bindings. Signed-off-by: Dominic Rath <rath@ibv-augsburg.net> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-01-15Merge tag 'efi-2022-04-rc1' of ↵WIP/15Jan2022Tom Rini16-532/+623
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-04-rc1 Documentation: * Fix building HTML documentation of readthedocs.io * Add ARM Juno board documentation * Build requirements for Alpine Linux * Include DM headers in API documentation UEFI: * Fix section alignment of EFI binaries * Fix header length of RISC-V EFI binaries allowing to run them on EDK II * Remove kaslr-seed from device tree if the EFI_RNG_PROTOCOL is provided Other: * Let 'part list' show all 128 GPT partitions
2022-01-15efi: Tidy up some comments in efi headerSimon Glass1-8/+9
Document the return value in efi_init(). Fix up @sizep in efi_info_get(). Use Return: instead of @return Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-15efi: Support the efi command in the appSimon Glass1-0/+15
At present the 'efi' command only works in the EFI payload. Update it to work in the app too, so the memory map can be examined. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-15x86: efi: Update efi_get_next_mem_desc() to avoid needing a mapSimon Glass1-2/+2
At present this function requires a pointer to struct efi_entry_memmap but the only field used in there is the desc_size. We want to be able to use it from the app, so update it to use desc_size directly. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-15efi: Move exit_boot_services into a functionSimon Glass1-0/+32
At present this code is inline in the app and stub. But they do the same thing. The difference is that the stub does it immediately and the app doesn't want to do it until the end (when it boots a kernel) or not at all, if returning to UEFI. Move it into a function so it can be called as needed. Add a comment showing how to store the memory map so that it can be accessed within the app if needed, for debugging purposes only. The map can change without notice. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-15efi_loader: Get rid of kaslr-seed if EFI_RNG_PROTOCOL is installedIlias Apalodimas1-0/+2
U-Boot, in some occasions, injects a 'kaslr-seed' property on the /chosen node. That would be problematic in case we want to measure the DTB we install in the configuration table, since it would change across reboots. The Linux kernel EFI-stub completely ignores it and only relies on EFI_RNG_PROTOCOL for it's own randomness needs (i.e the randomization of the physical placement of the kernel). In fact it (blindly) overwrites the existing seed if the protocol is installed. However it still uses it for randomizing it's virtual placement. So let's get rid of it in the presence of the RNG protocol. It's worth noting that TPMs also provide an RNG. So if we tweak our EFI_RNG_PROTOCOL slightly and install the protocol when a TPM device is present the 'kaslr-seed' property will always be removed, allowing us to reliably measure our DTB. Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2022-01-15cmd: part: list all 128 GPT partitionsHeinrich Schuchardt1-1/+1
A GPT partition table typically has 128 entries. If a partition table contains a partition 128 'part list' should be able to list it. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-15doc: add include/dm/fdtaddr.h to the HTML documentationPatrick Delaunay1-13/+12
Correct Sphinx style comments in include/dm/fdtaddr.h and add the devfdt API to the HTML documentation; these functions are NOT compatible with live tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-15doc: add include/dm/of*.h to the HTML documentationPatrick Delaunay5-275/+288
Correct Sphinx style comments in include/dm/ofnode.h and add the device tree node API to the HTML documentation; the ofnode functions are compatible with Live tree or with flat device tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-15doc: add include/dm/read.h to the HTML documentationPatrick Delaunay1-80/+81
Correct Sphinx style comments in include/dm/read.h and add the device read from device tree API to the HTML documentation. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-15doc: add include/dm/devres.h to the HTML documentationPatrick Delaunay1-7/+7
Correct Sphinx style comments in include/dm/devres.h and add the driver model device resource API, devres_*(), to the HTML documentation. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-15doc: add include/dm/device.h to the HTML documentationPatrick Delaunay1-93/+116
Correct Sphinx style comments in include/dm/device.h and add the driver model device API to the HTML documentation. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-15doc: add include/dm/platdata.h to the HTML documentationPatrick Delaunay1-2/+2
Correct Sphinx style comments in include/dm/platdata.h and add the associated API to the HTML documentation. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-15doc: add include/dm/lists.h to the HTML documentationPatrick Delaunay1-3/+5
Correct Sphinx style comments in include/dm/lists.h and add the list API to the HTML documentation. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-15doc: add include/dm/root.h to the HTML documentationPatrick Delaunay1-9/+11
Correct Sphinx style comments in include/dm/devres.h and add the associated driver model API to the HTML documentation. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-15doc: add include/dm/uclass.h to the HTML documentationPatrick Delaunay1-41/+42
Correct Sphinx style comments in include/dm/uclass.h and add the driver model UCLASS API to the HTML documentation. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-14ARM: qemu-arm: Fix build fail with boot devices disabledPiotr Kubik1-4/+28
BOOT_TARGET_DEVICES should only be added if the corresponding u-boot command is enabled otherwise the build will fail. Signed-off-by: Piotr Kubik <piotr_kubik@vp.pl>
2022-01-14lib: export vsscanfSamuel Dionne-Riel1-0/+8
The function was missing from exports, even though it loooks like the intent of the implementation in sscanf.c was to have it exported. Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-14pci: Work around PCIe link training failuresMaciej W. Rozycki1-2/+19
Attempt to handle cases with a downstream port of a PCIe switch where link training never completes and the link continues switching between speeds indefinitely with the data link layer never reaching the active state. It has been observed with a downstream port of the ASMedia ASM2824 Gen 3 switch wired to the upstream port of the Pericom PI7C9X2G304 Gen 2 switch, using a Delock Riser Card PCI Express x1 > 2 x PCIe x1 device, P/N 41433, wired to a SiFive HiFive Unmatched board. In this setup the switches are supposed to negotiate the link speed of preferably 5.0GT/s, falling back to 2.5GT/s. However the link continues oscillating between the two speeds, at the rate of 34-35 times per second, with link training reported repeatedly active ~84% of the time, e.g.: 02:03.0 PCI bridge [0604]: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch [1b21:2824] (rev 01) (prog-if 00 [Normal decode]) [...] Bus: primary=02, secondary=05, subordinate=05, sec-latency=0 [...] Capabilities: [80] Express (v2) Downstream Port (Slot+), MSI 00 [...] LnkSta: Speed 5GT/s (downgraded), Width x1 (ok) TrErr- Train+ SlotClk+ DLActive- BWMgmt+ ABWMgmt- [...] LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis+, Selectable De-emphasis: -3.5dB Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- Compliance De-emphasis: -6dB [...] Forcibly limiting the target link speed to 2.5GT/s with the upstream ASM2824 device makes the two switches communicate correctly however: 02:03.0 PCI bridge [0604]: ASMedia Technology Inc. ASM2824 PCIe Gen3 Packet Switch [1b21:2824] (rev 01) (prog-if 00 [Normal decode]) [...] Bus: primary=02, secondary=05, subordinate=09, sec-latency=0 [...] Capabilities: [80] Express (v2) Downstream Port (Slot+), MSI 00 [...] LnkSta: Speed 2.5GT/s (downgraded), Width x1 (ok) TrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt- [...] LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis+, Selectable De-emphasis: -3.5dB Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- Compliance De-emphasis: -6dB [...] and then: 05:00.0 PCI bridge [0604]: Pericom Semiconductor PI7C9X2G304 EL/SL PCIe2 3-Port/4-Lane Packet Switch [12d8:2304] (rev 05) (prog-if 00 [Normal decode]) [...] Bus: primary=05, secondary=06, subordinate=09, sec-latency=0 [...] Capabilities: [c0] Express (v2) Upstream Port, MSI 00 [...] LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded) TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- [...] LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis- Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- Compliance De-emphasis: -6dB [...] Make use of this observation then and attempt to detect the inability to negotiate the link speed automatically, and then handle it by hand. Use the Data Link Layer Link Active status flag as the primary indicator of successful link speed negotiation, but given that the flag is optional by hardware to implement (the ASM2824 does have it though), resort to checking for the mandatory Link Bandwidth Management Status flag showing that the link speed or width has been changed in an attempt to correct unreliable link operation (the ASM2824 does set it too). If these checks indicate that link may not operate correctly, then poll the Data Link Layer Link Active status flag along with the Link Training flag for the duration of 200ms to see if the link has stabilised, that is either that the Data Link Layer Link Active status flag has been set or that Link Training has been inactive during at least the second half of the interval. If that has indicated failure, restrict the target speed to 2.5GT/s, request a link retrain and check again if the link has stabilised. If that does not work either, then restore the original speed setting and claim defeat, otherwise we are done. NB interestingly enough with the ASM2824 vs PI7C9X2G304 configuration referred above asking the ASM2824 to retrain with a higher target link speed once the 2.5GT/s speed has been negotiated makes the two devices successfully negotiate 5.0GT/s. Lifting the 2.5GT/s speed restriction would however prevent our workaround from working with an OS that issues a reset and that is unaware of the problem. This is because the devices would then try to negotiate a higher link speed from scratch and fail, while the sticky property of the Target Link Speed setting will keep the 2.5GT/s speed restriction across a reset. Keep the 2.5GT/s speed restriction then, conservatively, if functional once applied. Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-14arm: mvebu: Replace hardcoded values 0x0030/0x4030 by proper calculationPali Rohár11-11/+11
These hardcoded values were calculated from CONFIG_SPL_TEXT_BASE macro. Now this macro is configurable via Kconfig, so calculate values 0x0030/0x4030 at compile time via CONFIG_SPL_TEXT_BASE option. Values 0x0030/0x4030 represents offset of CONFIG_SPL_TEXT_BASE from address 0x40000000. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-14arm: mvebu: db-88f6720: Fix CONFIG_SPL_TEXT_BASE and remove wrong memory layoutPali Rohár1-14/+1
Memory layout in the comment is from Armada XP platform which uses load address 0x40004030. DB-88f6720 is Armada 375 platform which uses same load address as Armada 38x which is 0x40000030. Currently SPL support for Armada 375 is unfinished and does not work. There is missing Serdes initialization and DDR3 training code. So nobody noticed that CONFIG_SPL_* options are not correct. Fix at least CONFIG_SPL_TEXT_BASE constant and remove incorrect comments about memory layout. So it is not misleading. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-13bloblist: Relicense to allow BSD-3-ClauseSimon Glass1-1/+1
This implementation is intended to be copied to other projects and modified, to as to foster a standard means of communcating runtime information between firmware projects. The GPL-2 license is too restrictive for some projects, e.g. those intended as reference implementations rather than designed for collaborative open-source development. Update the license to make this easier to share. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-13bloblist: doc: Bring in the API documentationSimon Glass1-34/+45
FIx up various minor errors and add the API documentation to the bloblist docs, since it is quite useful to see it in the same place. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-13bloblist: Add functions to obtain base address and sizeSimon Glass1-0/+14
Add a few convenience functions to obtain useful information about the bloblist. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-13bloblist: Refactor Kconfig to support alloc or fixedSimon Glass1-0/+10
At present we do support allocating the bloblist but the Kconfig is a bit strange, since we still have to specify an address in that case. Partly this is because it is a pain to have CONFIG options that disappears when its dependency is enabled. It means that we must have #ifdefs in the code, either in the C code or header file. Make use of IF_ENABLED_INT() and its friend to solve that problem, so we can separate out the location of bloblist into a choice. Put the address and size into variables so we can log the result. Add the options for SPL as well, so we can use CONFIG_IS_ENABLED(). Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-13bloblist: Use explicit numbering for the tagsSimon Glass1-11/+47
At present if someone adds a tag in the middle of the list it works well enough within a U-Boot build. But if these tags are used in another project, or with an older version of SPL, the numbers make become inconsistent. Use explicit tag numbers that never change, to resolve this problem. Allocate areas for existing U-Boot tags and set up an area for use by projects and vendors, as well as for private use. Keep tags above 0x10000 unallocated for now. Update bloblist_tag_name() and the tests to work with this new setup. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-13bloblist: Drop unused tagsSimon Glass1-2/+0
The EC event log tag is no-longer used. The vboot handoff is now handled by the vboot context instead. Drop these unused tags. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-13bloblist: Rename the SPL tagSimon Glass1-1/+1
Add a U_BOOT prefix to this tag since it is specific to the U-Boot project. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-13bloblist: Put the magic number firstSimon Glass1-2/+23
It seems best to put the magic number right at the start of the bloblist header, so it is easier to check. This is how devicetree works. Make this change now, before other projects make use of bloblist. Other changes may be needed / discussed, but that is TBD. Add a checker function as well. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-13fdt: Drop SPL_BUILD macroSimon Glass1-6/+0
This old macro is not needed anymore since we can use IS_ENABLED() now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-13stddef: Avoid warning with clang with offsetof()Simon Glass1-1/+7
Some bright sparks have decided that a cast on a constant cannot be a constant, so offsetof() produces this warning on clang-10: include/intel_gnvs.h:113:1: error: static_assert expression is not an integral constant expression check_member(acpi_global_nvs, unused2, GNVS_CHROMEOS_ACPI_OFFSET); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:284:2: note: expanded from macro 'check_member' offsetof(struct structure, member) == (offset), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/stddef.h:20:32: note: expanded from macro 'offsetof' ^ include/intel_gnvs.h:113:1: note: cast that performs the conversions of a reinterpret_cast is ot allowed in a constant expression include/linux/stddef.h:20:33: note: expanded from macro 'offsetof' Fix it by using the compiler built-in version, if available. This syncs the function to the same implementation as Linux v5.16 in this header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-13sandbox: compatibility of os_get_filesize()Heinrich Schuchardt1-1/+1
U-Boot define loff_t as long long. But the header /usr/include/linux/types.h may not define it. This has lead to a build error on Alpine Linux. So let's use long long instead of loff_t for the size parameter of function os_get_filesize(). Reported-by: Milan P. Stanić <mps@arvanta.net> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Tested-by: Milan P. Stanić <mps@arvanta.net> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-12pci: msc01: Use PCI_CONF1_ADDRESS() macroPali Rohár1-9/+0
PCI msc01 driver uses standard format of Config Address for PCI Configuration Mechanism #1 but with cleared Enable bit. So use new U-Boot macro PCI_CONF1_ADDRESS() with clearing PCI_CONF1_ENABLE bit and remove old custom driver address macros. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-12pci: gt64120: Use PCI_CONF1_ADDRESS() macroPali Rohár1-12/+0
PCI gt64120 driver uses standard format of Config Address for PCI Configuration Mechanism #1. So use new U-Boot macro PCI_CONF1_ADDRESS() and remove old custom driver address macros. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-12pci: Add standard PCI Config Address macrosPali Rohár1-0/+45
Lot of PCI and PCIe controllers are using standard Config Address for PCI Configuration Mechanism #1 or its extended version. So add PCI_CONF1_ADDRESS() and PCI_CONF1_EXT_ADDRESS() macros into U-Boot's pci.h header file which can be suitable for most PCI and PCIe controller drivers. Drivers do not have to invent their own macros and can use these new U-Boot macros. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-12mmc: unconditionally define mmc_deinit()Heinrich Schuchardt1-5/+0
We want to replace '#ifdef' by 'if (IS_ENABLED(CONFIG_...))' in our code. Therefore functions should be defined unconditionally even if they are not implemented. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-01-12mmc: fsl_esdhc_imx: replace most #ifdefs by IS_ENABLED()Sean Anderson1-2/+0
[ fsl_esdhc commit 52faec31827ec1a1837977e29c067424426634c5 ] Make the code cleaner and drop the old-style #ifdef constructs where it is possible. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2022-01-12mmc: fsl_esdhc_imx: fix voltage validationSean Anderson1-6/+6
[ fsl_esdhc commit 5b05fc0310cd933acf76ee661577c6b07a95e684 ] Voltage validation should be done by CMD8. Current comparison between mmc_cfg voltages and host voltage capabilities is meaningless. So drop current comparison and let voltage validation is through CMD8. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>