summaryrefslogtreecommitdiff
path: root/include/linux
AgeCommit message (Collapse)Author
2025-06-18Merge patch series "Print version of the DM firmware"Tom Rini
Moteen Shah <m-shah@ti.com> says: This patch series adds the functionality to print the DM firmware version being used. Before requesting TISCI for the DM version we first check if the DM split mode capability exists, if yes, we proceed onto making the call to TISCI for retrieving the version information. DM split mode capability indicates that the DM is a separate binary altogether and has its own versioning information similar to TIFS. Boot Logs: https://gist.github.com/Jamm02/37864f605445944a0c0caf426e0aba50 Link: https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/general/core.html#tisci-msg-query-fw-caps Link: https://lore.kernel.org/r/20250609081434.1000377-1-m-shah@ti.com
2025-06-18ti_sci_* : Add capability to access DM firmware's metadataMoteen Shah
Introduce response and request structs to receive and request information regarding DM version, etc from TI SCI. Signed-off-by: Moteen Shah <m-shah@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Dhruva Gole <d-gole@ti.com>
2025-06-18ti_sci_*: Add utility to access tisci firmware and SOC capabilityMoteen Shah
Introduce response and request structs for receiving information regarding FW/SOC capability from DM. The received capability can further be used to call certain API's based on the feature supoorted by the DM firmware. Signed-off-by: Moteen Shah <m-shah@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Dhruva Gole <d-gole@ti.com>
2025-06-18Merge patch series "list.h/treewide: get rid of no-op prefetch()"Tom Rini
Rasmus Villemoes <ravi@prevas.dk> says: While looking through list.h, I saw that the regular list_* helpers (and one of the hlist_* ones) still contain the prefetch() that was removed in linux 14 years ago. It doesn't do anything, but makes the macros harder to read, so get rid of it, and the fallback, no-op definition that they relied on. That requires removing a few uses outside list.h as well. checkpatch warns about some whitespace issues in list.h, but as I've copied whole kerneldoc+#define blocks directly from the linux kernel, I think it's better to just accept that so that we don't introduce needless diffs. The "macro argument reuse" arguments should also be ignored, as e.g. the "member" arguments are obviously always just bare identifiers, and the "pos" arguments must be assigned to multiple times. Link: https://lore.kernel.org/r/20250507121246.518691-1-ravi@prevas.dk
2025-06-18linux/list.h: drop fallback definition of prefetch()Rasmus Villemoes
None of the list helpers use prefetch() anymore, and no C code relies on getting this definition from list.h. In any case, such an arch/cpu specific thing does not belong in a header that just consists of cpp helper macros. Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
2025-06-18linux/list.h: drop use of prefetch()Rasmus Villemoes
The use of prefetch() in these list helpers was dropped back in 2011 in linux (e66eed651fd1 ("list: remove prefetching from regular list iterators")). No arch in U-Boot defines any actual prefetch(), and as the referenced commit says, it's usually not a win anyway. Whole-sale sync of list.h is not really feasible, but we can synchronize the macros containing a prefetch() with their linux implementations as of v6.15-rc5, also importing the various helpers needed, e.g. list_is_head() and list_next_entry(). Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
2025-06-14Merge patch series "linux/bitfield.h: sync <linux/bitfield.h> from Linux ↵Tom Rini
6.15 + winbond" Christian Marangi <ansuelsmth@gmail.com> says: This small series sync linux/bitfield.h from Linux 6.15 and fix all the compilation error due to a change in the header include. The sync is needed to make it easier to support the winbond changes. The changes are CI test with [1] [1] https://github.com/u-boot/u-boot/pull/777 Link: https://lore.kernel.org/r/20250607211133.2005-1-ansuelsmth@gmail.com
2025-06-14linux/bitfield.h: sync <linux/bitfield.h> from Linux 6.15Christian Marangi
Sync bitfield.h header with Linux 6.15 version. Mainly is to permit the introduction of FIELD_PREP_CONST. The bug.h header changed to build_bug.h doesn't cause any regression as we also ship split header similar to how it's done with in Linux. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-06-11clk: add CONFIG_CLK_AUTO_IDPatrick Delaunay
Add a new config CONFIG_CLK_AUTO_ID to support a unique clk id for all the clock providers, managed by clk uclass, when the clock reference arg[0] is the same. When the CONFIG is activated, the clock id is limited to the lower CLK_ID_SZ = 24 bits in default clock xlate function and the sequence number + 1 of the clk provider device is added for the 8 higher bits. We use sequence number + 1 to avoid the "dummy" clock id = 0, used for invalid clock when CCF is activated. When this config is activated, the new function clk_get_id() should be used to get back the internal reference to clock for the each clock provider. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Lukasz Majewski <lukma@denx.de> Cc: Sean Anderson <seanga2@gmail.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-06-03linux/sizes.h: sync from kernelEmanuele Ghidoli
The kernel added new size definitions and substituted the boilerplate/reference to the license with a SPDX identifier. Drop a local SZ_8G definition in MediaTek MT7988 SoC board file. Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
2025-04-29mtd: spi-nor: Use CONFIG_IS_ENABLED for CONFIG_SPI_FLASH_BAR definesBernhard Messerklinger
At the moment a mixture of ifdef(CONFIG_IS_ENABLED) and CONFIG_IS_ENABLED(SPI_FLASH_BAR) is used in the spi-nor framework. This leads to misbehaviour in the SPL as there is no Kconfig option CONFIG_SPL_SPI_FLASH_BAR. This commit standardizes the use of CONFIG_SPI_FLASH to get SPLs that load U-Boot proper from the SPI flash to work again. Fixes: 9bb02f7 (mtd: spi-nor: Fix the spi_nor_read() when config SPI_STACKED_PARALLEL is enabled) Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
2025-04-28clk: imx: Pass CCM udevice into clk_register_composite()Marek Vasut
Pass the clock controller udevice into clk_register_composite(), so it can be passed further to any registered composite clocks and used for look up of parent clock referenced in DT "clocks" and "clock-names" properties by phandle and name pair. Use the clock controller udevice in imx8m_clk_mux_set_parent() to perform accurate look up of parent clock referenced in the CCM driver by name. If the clock name that is being looked up matches one of the names listed in the clock controller DT node "clock-names" array property, then the offset of the name is looked up in the "clocks" DT property and the phandle at that offset is resolved to the parent clock udevice. The test to determine whether a particular driver instance registered with clock uclass matches the parent clock is done by comparing the OF nodes of the clock registered with clock uclass and parent clock resolved from the phandle. Example: drivers/clk/imx/clk-imx8mm.c: static const char * const imx8mm_a53_sels[] = {"osc_24m", "arm_pll_out", ... _____________| arch/arm/dts/imx8mm.dtsi: | clk: clock-controller@30380000 { v clock-names = "osc_32k", "osc_24m", ... | v clocks = <&osc_32k>, <&osc_24m>, ... }; _______________________| ... | / { v osc_24m: clock-osc-24m { compatible = "fixed-clock"; ... }; Signed-off-by: Marek Vasut <marex@denx.de> Reported-by: Francesco Dolcini <francesco.dolcini@toradex.com> Tested-by: Fabio Estevam <festevam@gmail.com> Tested-by: Adam Ford <aford173@gmail.com> # imx8mp-beacon
2025-04-23usb: gadget: introduce 'enabled' flag in struct usb_epStephan Gerhold
f_acm calls usb_ep_disable(f_acm->ep_notify) unconditionally in acm_start_ctrl(), even if the USB endpoint was never enabled before. This causes crashes for some UDC drivers (e.g. ci_udc), because they dereference data structures that are assigned only after having called usb_ep_enable(). The f_acm driver in U-Boot is similar to the Linux driver, where this issue does not occur because usb_ep_disable() and usb_ep_enable() internally track the enabled state. In Linux this change was made in commit b0bac2581c19 ("usb: gadget: introduce 'enabled' flag in struct usb_ep") by Robert Baldyga. Fix the crashes for f_acm by making the same change in U-Boot. This makes the API less bug-prone and avoids introducing crashes when adapting new gadget drivers from Linux. Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org> Link: https://lore.kernel.org/r/20250407-acm-fixes-v1-3-e3dcb592d6d6@linaro.org Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-04-22arm: socfpga: soc64: Update reset manager registers for F2S bridgeAlif Zakuan Yuslaimi
Add reset manager registers in preparation for F2S bridge reset support as well as the mask support to enable/disable the bridges. Mask value: BIT0: soc2fpga BIT1: lwhps2fpga BIT2: fpga2soc These bridges are available only in Stratix10: BIT3: f2sdram0 BIT4: f2sdram1 BIT5: f2sdram2 Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-04-16spi: drop unneeded spi.h header include from spinand.hChristian Marangi
Drop unneeded spi.h header include from spinand.h, nothing included by spi.h is actually used in this header and .c should correctly included spi.h if actually needed. Replace spi.h with linux/bitops.h as this is what is actually required for spinand.h Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-14firmware: ti_sci: Scan all device instances when releasing exclusive devicesNishanth Menon
When FIT image with multiple dtbs are involved for R5 boot process, R5 SPL starts off with the first instance of dtb to probe the eeprom, then once we have identified the type of board, invocation of setup_multi_dtb_fit will replace the gd->fdt_blob with the proper board dtb match. However, when we do this, two things happen: a) Prior to the invocation of setup_multi_dtb_fit, as part of the eeprom discovery process, i2c controller device is already probed and marked as exclusive with the match of the very first tisci match (from the original boot dtb). This list is stored in the info->dev_list of the first probe. b) When the second dtb is loaded, tisci is probed again (since this is a new node) and the new info->dev_list is empty. At this stage, the exclusive devices such as i2c instances used to probe the board information is left in the old info->dev_list that is no longer used actively by the system using the replaced dtb. As a result of this, the cleanup we intend to do with ti_sci_cmd_release_exclusive_devices is no longer complete and leaves the instances such as i2c for eeprom marked used as we scan just the new info->dev_list. This creates a problem when Device Manager(DM) firmware starts up later on in the boot process and identifies that this instance of i2c is already marked active, so it assumes this can no longer be controlled by software and is marked internally as reserved and HLOS can no longer control these instances. This defeated the purpose of ti_sci_cmd_release_exclusive_devices. NOTE: This scheme works just fine if the FIT has just a single dtb as the info->dev_list is upto date. To fix this, let us make ti_sci_cmd_release_exclusive_devices scan the all registrations of tisci instances and cleanup all exclusive devices that have ever been registered. As part of this, change the prototype of release_exclusive_devices to drop the handle since that has no further meaning now. Though this issue was identified on AM64-sk, this can be present in other builds which use multi-fit-dtb for R5 SPL startup. Fixes: 9566b777ae0a ("firmware: ti_sci: Add a command for releasing all exclusive devices") Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2025-04-02Merge patch series "fs: exfat: Add exfat port based on exfat-fuse"Tom Rini
Marek Vasut <marex@denx.de> says: Import exfat-fuse libexfat, add U-Boot filesystem layer porting glue code and wire exfat support into generic filesystem support code. This adds exfat support to U-Boot. Fill in generic filesystem interface for mkdir and rm commands. Make filesystem tests test the generic interface as well as exfat, to make sure this code does not fall apart. Link: https://github.com/relan/exfat/commits/0b41c6d3560d ("CI: bump FreeBSD to 13.1.") Link: https://lore.kernel.org/r/20250317031418.223019-1-marex@denx.de
2025-04-02linux: Add generic struct stat {}Marek Vasut
Add generic implementation of struct stat {} imported from Linux 6.13.y commit 27560b371ab8 ("fs: pack struct kstat better"). This can be used by filesystem code imported from elsewhere. Now struct stat {} becomes available on all supported architectures. Signed-off-by: Marek Vasut <marex@denx.de>
2025-03-24clk: clk-fixed-factor: Use struct udevice instead of struct deviceMarek Vasut
Use U-Boot specific struct udevice instead of Linux compatibility struct device in clk-fixed-factor registration. Signed-off-by: Marek Vasut <marex@denx.de>
2025-03-24clk: clk-divider: Use struct udevice instead of struct deviceMarek Vasut
Use U-Boot specific struct udevice instead of Linux compatibility struct device in clk-divider clock registration. Signed-off-by: Marek Vasut <marex@denx.de>
2025-03-24clk: clk-composite: Use struct udevice instead of struct deviceMarek Vasut
Use U-Boot specific struct udevice instead of Linux compatibility struct device in clk-composite registration. Signed-off-by: Marek Vasut <marex@denx.de>
2025-03-24clk: clk-gate: Use struct udevice instead of struct deviceMarek Vasut
Use U-Boot specific struct udevice instead of Linux compatibility struct device in clk-gate registration. Signed-off-by: Marek Vasut <marex@denx.de>
2025-03-24clk: clk-mux: Use struct udevice instead of struct deviceMarek Vasut
Use U-Boot specific struct udevice instead of Linux compatibility struct device in clk-mux registration. Signed-off-by: Marek Vasut <marex@denx.de>
2025-03-15drivers: mtd: nand: base: Add support for Hardware ECC for check bad blockDinesh Maniyam
Leverage linux code to support hardware ECC interface to verify nand bad block. Signed-off-by: Dinesh Maniyam <dinesh.maniyam@intel.com>
2025-03-15drivers: mtd: nand: Add driver for Cadence NandDinesh Maniyam
Enable driver for Cadence NAND for the family device agilex5. This driver is leveraged from the path /drivers/mtd/nand/raw/cadence-nand-controller.c from the stable version 6.11.2. Signed-off-by: Dinesh Maniyam <dinesh.maniyam@intel.com>
2025-02-12lib: implement strnstr()Heinrich Schuchardt
Implement library function strnstr(). Implement strstr() using strnstr(). Sort the includes. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> [jf: replace <stdint.h> by <limits.h>, folded from next patch] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
2024-11-25mtd: Drop superfluous const qualifierAndy Shevchenko
The compiler will ignore it anyway: include/linux/mtd/mtd.h:342:15: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-31mtd: spi-nor: Rename SPI_ADVANCE to SPI_STACKED_PARALLELMarek Vasut
The SPI_ADVANCE description does not explain what the switch does. It does not have anything to do with any advanced functionality, it only gates off support for stacked and parallel SPI NORs. Rename the Kconfig symbol, update description, and move it right next to Xilinx hardware as it seems to be specific to this hardware. Make sure the symbol is also protected by if DM_SPI in Kconfig. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-18mtd: spi-nor: Move SR3 WPS bit definition in the correct locationMarek Vasut
Move the SR3 bit definition in the right place. Fix what is likely a rebase artifact. No functional change. Fixes: 215f1d5794c6 ("mtd: spi-nor: Clear Winbond SR3 WPS bit on boot") Signed-off-by: Marek Vasut <marex@denx.de>
2024-10-15mtd: spi-nor: Allow flashes to specify MTD writesizeTakahiro Kuwano
Some flashes like the Infineon SEMPER NOR flash family use ECC. Under this ECC scheme, multi-pass writes to an ECC block is not allowed. In other words, once data is programmed to an ECC block, it can't be programmed again without erasing it first. Upper layers like file systems need to be given this information so they do not cause error conditions on the flash by attempting multi-pass programming. This can be done by setting 'writesize' in 'struct mtd_info'. Set the default to 1 but allow flashes to modify it in fixup hooks. If more flashes show up with this constraint in the future it might be worth it to add it to 'struct flash_info', but for now increasing its size is not worth it. This patch replicates the following upstream linux commit: afd473e85827 ("mtd: spi-nor: core: Allow flashes to specify MTD writesize") Acked-by: Tudor Ambarus <tudor.ambarus@linaro.org> Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
2024-10-14Merge patch series "Integrate MbedTLS v3.6 LTS with U-Boot"Tom Rini
Raymond Mao <raymond.mao@linaro.org> says: Integrate MbedTLS v3.6 LTS (currently v3.6.0) with U-Boot. Motivations: ------------ 1. MbedTLS is well maintained with LTS versions. 2. LWIP is integrated with MbedTLS and easily to enable HTTPS. 3. MbedTLS recently switched license back to GPLv2. Prerequisite: ------------- This patch series requires mbedtls git repo to be added as a subtree to the main U-Boot repo via: $ git subtree add --prefix lib/mbedtls/external/mbedtls \ https://github.com/Mbed-TLS/mbedtls.git \ v3.6.0 --squash Moreover, due to the Windows-style files from mbedtls git repo, we need to convert the CRLF endings to LF and do a commit manually: $ git add --renormalize . $ git commit New Kconfig options: -------------------- `MBEDTLS_LIB` is for MbedTLS general switch. `MBEDTLS_LIB_CRYPTO` is for replacing original digest and crypto libs with MbedTLS. `MBEDTLS_LIB_CRYPTO_ALT` is for using original U-Boot crypto libs as MbedTLS crypto alternatives. `MBEDTLS_LIB_X509` is for replacing original X509, PKCS7, MSCode, ASN1, and Pubkey parser with MbedTLS. By default `MBEDTLS_LIB_CRYPTO_ALT` and `MBEDTLS_LIB_X509` are selected when `MBEDTLS_LIB` is enabled. `LEGACY_CRYPTO` is introduced as a main switch for legacy crypto library. `LEGACY_CRYPTO_BASIC` is for the basic crypto functionalities and `LEGACY_CRYPTO_CERT` is for the certificate related functionalities. For each of the algorithm, a pair of `<alg>_LEGACY` and `<alg>_MBEDTLS` Kconfig options are introduced. Meanwhile, `SPL_` Kconfig options are introduced. In this patch set, MBEDTLS_LIB, MBEDTLS_LIB_CRYPTO and MBEDTLS_LIB_X509 are by default enabled in qemu_arm64_defconfig and sandbox_defconfig for testing purpose. Patches for external MbedTLS project: ------------------------------------- Since U-Boot uses Microsoft Authentication Code to verify PE/COFFs executables which is not supported by MbedTLS at the moment, addtional patches for MbedTLS are created to adapt with the EFI loader: 1. Decoding of Microsoft Authentication Code. 2. Decoding of PKCS#9 Authenticate Attributes. 3. Extending MbedTLS PKCS#7 lib to support multiple signer's certificates. 4. MbedTLS native test suites for PKCS#7 signer's info. All above 4 patches (tagged with `mbedtls/external`) are submitted to MbedTLS project and being reviewed, eventually they should be part of MbedTLS LTS release. But before that, please merge them into U-Boot, otherwise the building will be broken when MBEDTLS_LIB_X509 is enabled. See below PR link for the reference: https://github.com/Mbed-TLS/mbedtls/pull/9001 Miscellaneous: -------------- Optimized MbedTLS library size by tailoring the config file and disabling all unnecessary features for EFI loader. From v2, original libs (rsa, asn1_decoder, rsa_helper, md5, sha1, sha256, sha512) are completely replaced when MbedTLS is enabled. From v3, the size-growth is slightly reduced by refactoring Hash functions. From v6, smaller implementations for SHA256 and SHA512 are enabled and target size reduce significantly. Target(QEMU arm64) size-growth when enabling MbedTLS: v1: 6.03% v2: 4.66% v3 - v5: 4.55% v6: 2.90% Tests done: ----------- EFI Secure Boot test (EFI variables loading and verifying, EFI signed image verifying and booting) via U-Boot console. EFI Secure Boot and Capsule sandbox test passed. Known issues: ------------- None. Link: https://lore.kernel.org/u-boot/20241003215112.3103601-1-raymond.mao@linaro.org/
2024-10-14mbedtls: add mbedtls into the build systemRaymond Mao
Port mbedtls with adapted libc header files. Add mbedtls default config header file. Optimize mbedtls default config by disabling unused features to reduce the target size. Add mbedtls kbuild makefile. Add Kconfig skeleton and config submenu entry for selecting crypto libraries between mbedtls and legacy ones. Add the mbedtls include directories into the build system. Port u-boot hash functions as MbedTLS crypto alternatives and set it as default. Subsequent patches will separate those Kconfigs into pairs of _LEGACY and _MBEDTLS for controlling the implementations of legacy crypto libraries and MbedTLS ones respectively. The motivation of moving and adapting *INT* macros from kernel.h to limits.h is to fulfill the MbedTLS building requirement. The conditional compilation statements in MbedTLS expects the *INT* macros as constant expressions, thus expressions like `((int)(~0U >> 1))` will not work. Prerequisite ------------ This patch series requires mbedtls git repo to be added as a subtree to the main U-Boot repo via: $ git subtree add --prefix lib/mbedtls/external/mbedtls \ https://github.com/Mbed-TLS/mbedtls.git \ v3.6.0 --squash Moreover, due to the Windows-style files from mbedtls git repo, we need to convert the CRLF endings to LF and do a commit manually: $ git add --renormalize . $ git commit Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
2024-10-11Merge patch series "Tidy up use of 'SPL' and CONFIG_SPL_BUILD"Tom Rini
Simon Glass <sjg@chromium.org> says: When the SPL build-phase was first created it was designed to solve a particular problem (the need to init SDRAM so that U-Boot proper could be loaded). It has since expanded to become an important part of U-Boot, with three phases now present: TPL, VPL and SPL Due to this history, the term 'SPL' is used to mean both a particular phase (the one before U-Boot proper) and all the non-proper phases. This has become confusing. For a similar reason CONFIG_SPL_BUILD is set to 'y' for all 'SPL' phases, not just SPL. So code which can only be compiled for actual SPL, for example, must use something like this: #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) In Makefiles we have similar issues. SPL_ has been used as a variable which expands to either SPL_ or nothing, to chose between options like CONFIG_BLK and CONFIG_SPL_BLK. When TPL appeared, a new SPL_TPL variable was created which expanded to 'SPL_', 'TPL_' or nothing. Later it was updated to support 'VPL_' as well. This series starts a change in terminology and usage to resolve the above issues: - The word 'xPL' is used instead of 'SPL' to mean a non-proper build - A new CONFIG_XPL_BUILD define indicates that the current build is an 'xPL' build - The existing CONFIG_SPL_BUILD is changed to mean SPL; it is not now defined for TPL and VPL phases - The existing SPL_ Makefile variable is renamed to SPL_ - The existing SPL_TPL Makefile variable is renamed to PHASE_ It should be noted that xpl_phase() can generally be used instead of the above CONFIGs without a code-space or run-time penalty. This series does not attempt to convert all of U-Boot to use this new terminology but it makes a start. In particular, renaming spl.h and common/spl seems like a bridge too far at this point. The series is fully bisectable. It has also been checked to ensure there are no code-size changes on any commit.
2024-10-11kconfig: binman: Check for SPL instead of XPLSimon Glass
Now that SPL means SPL (only) and is not defined for other phases, update kconfig rules. This is done in one patch since otherwise many Binman tests fail. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-11include: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILDSimon Glass
Use the new symbol to refer to any 'SPL' build, including TPL and VPL Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-10mtd: spi-nor: Clear Winbond SR3 WPS bit on bootMarek Vasut
Some Winbond SPI NORs have special SR3 register which is used among other things to control whether non-standard "Individual Block/Sector Write Protection" (WPS bit) locking scheme is activated. This non-standard locking scheme is not supported by either U-Boot or Linux SPI NOR stack so make sure it is disabled, otherwise the SPI NOR may appear locked for no obvious reason. This SR3 WPS appears e.g. on W25Q16FW which has the same ID as W25Q16DW, but the W25Q16DW does not implement the SR3 WPS bit. Signed-off-by: Marek Vasut <marex@denx.de>
2024-10-09mtd: spi-nor: Add parallel and stacked memories supportVenkatesh Yadav Abbarapu
In parallel mode, the current implementation assumes that a maximum of two flashes are connected. The QSPI controller splits the data evenly between both the flashes so, both the flashes that are connected in parallel mode should be identical. During each operation SPI-NOR sets 0th bit for CS0 & 1st bit for CS1 in nor->flags. In stacked mode the current implementation assumes that a maximum of two flashes are connected and both the flashes are of same make but can differ in sizes. So, except the sizes all other flash parameters of both the flashes are identical Spi-nor will pass on the appropriate flash select flag to low level driver, and it will select pass all the data to that particular flash. Write operation in parallel mode are performed in page size * 2 chunks as each write operation results in writing both the flashes. For doubling the address space each operation is performed at addr/2 flash offset, where addr is the address specified by the user. Similarly for read and erase operations it will read from both flashes, so size and offset are divided by 2 and send to flash. Adding the config option SPI_ADVANCE for non SPL code. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2024-09-02Merge tag 'u-boot-amlogic-next-20240902' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-amlogic into next - meson_nand: R/W support for pages used by boot ROM
2024-08-28mtd: rawnand: nand_base: support for 'NAND_IS_BOOT_MEDIUM' flagArseniy Krasnov
Based on Linux kernel: commit f922bd798bb9 ("mtd: rawnand: add an option to specify NAND chip as a boot device") Allow to define a NAND chip as a boot device. This can be helpful for the selection of the ECC algorithm and strength in case the boot ROM supports only a subset of controller provided options. Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/r/20240826131710.29746-2-avkrasnov@salutedevices.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-08-20Merge tag 'u-boot-dfu-next-20240820' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu into next u-boot-dfu-next-20240820 - Migrate Atmel usb gadget to DM_USB_GADGET - More small cleanups/improvements on the atmel UDC driver - Change udc uclass name from "usb" -> "usb_gadget"
2024-08-19Merge tag 'v2024.10-rc3' into nextTom Rini
Prepare v2024.10-rc3
2024-08-15compiler: Ensure __builtin_*_overflow() supportRichard Weinberger
Both gcc and clang support this for a long time. Make sure the feature is present. Signed-off-by: Richard Weinberger <richard@nod.at>
2024-08-08drivers: introduce mtdblock abstractionAlexey Romanov
MTD block - abstraction over MTD subsystem, allowing to read and write in blocks using BLK UCLASS. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-06usb: gadget: atmel: Add DM_USB_GADGET supportZixun LI
Add driver model support by using the uclass UCLASS_USB_GADGET_GENERIC. Disable local usb_gadget_register_driver()/usb_gadget_unregister_driver() implementation which is implemented in udc-core.c when DM_USB_GADGET is enabled. Replace dm_usb_gadget_handle_interrupts() with handle_interrupts ops when DM_USB_GADGET is enabled. Disable legacy struct usba_udc controller as controller point is extracted from udevice private data with DM. Disable legacy usba_udc_probe() to avoid conflict with DM when it's enabled. Compared to Linux driver only supported devices' DT bindings are included (sorted as Linux driver) Signed-off-by: Zixun LI <admin@hifiphile.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20240725153204.358925-8-admin@hifiphile.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-07-31linux: list: add a function to count list nodesSughosh Ganu
Add a function to count the nodes of a list. Taken from linux 6.11-rc1 tag commit 8400291e289e. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-07-29Merge patch series "include: asm-generic: Remove duplicate newlines"Tom Rini
Drop all duplicate newlines from the include directory files.
2024-07-29include: linux: Remove duplicate newlinesMarek Vasut
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-26linux/bitmap.h: add bitmap_empty helperCaleb Connolly
Import this function from Linux as of 6.10-rc6 Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-07-11Merge tag 'u-boot-dfu-20240711' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu u-boot-dfu-20240711 Usb gadget: - A welcome cleanup: epautoconf workaround is dropped to use .match_ep() instead - Introduce handle_interrupts() op for USB_GADGET_GENERIC, which allows a per-driver interrupt handling Fastboot: - Fix mssing include when building with TCP only
2024-07-06clk: clk-mux: Make public the clk_fetch_parent_indexMichael Trimarchi
Make public the clk_fetch_parent_index and rename it. This allow us to be reused in driver specialization Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>