summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2025-10-30power: regulator: s2mps11: declaratively define LDOs and BUCKsKaustabh Chakraborty
In the Linux kernel driver, all information related to LDO and BUCK regulators are stored in descriptive arrays. This also allows multiple variants to be supported by the same driver. Define a struct sec_regulator_desc which holds all values required by a regulator. Create an array of said struct containing all regulators. The descriptors are designed to follow a style similar to what's seen in the Linux driver, so comparing one with the other is simple. In functions such as s2mps11_{buck,ldo}_{val,mode} these values are to be used, make necessary modifications to pull them from the descriptors. Since multiple variants have varying descriptors, select them from within a switch-case block. Functions s2mps11_{buck,ldo}_{volt2hex,hex2volt} and arrays s2mps11_buck_{ctrl,out} are phased out as the calculations are now hardcoded in descriptors, thusly, it reduces clutter and enhances readability. Two macros in s2mps11.h, S2MPS11_LDO_NUM and S2MPS11_BUCK_NUM are removed as they are no longer being used. Signed-off-by: Kaustabh Chakraborty <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-10-30power: pmic: s2mps11: add support for allowing multiple device variantsKaustabh Chakraborty
There are multiple PMICs by Samsung which are similar in architecture (register layout, interface, etc.) and is possible to be driven by a single driver. Variant specific code and data should be managed properly in the driver. And an enum which describes all supported variants. Pass the enum as the device driver data. Introduce a switch-case block on the enum for any variant specific code. Signed-off-by: Kaustabh Chakraborty <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-10-30mmc: dw_mmc: add voltage switch command flagKaustabh Chakraborty
During a voltage switch command (CMD11, opcode: SD_CMD_SWITCH_UHS18V), certain hosts tend to stop responding to subsequent commands. This is addressed by introducing an additional command flag, DWMCI_CMD_VOLT_SWITCH. The associated interrupt bit is defined as DWMCI_INTMSK_VOLTSW. This is set high when a voltage switch is issued, this needs to be waited for and set to low. Implement the same in the timeout loop. Do note that since DWMCI_INTMSK_VOLTSW shares the same bit as DWMCI_INTMSK_HTO (bit 10), the interrupt bit needs to be polled for only if the volt switch command is issued. DWMCI_CMD_VOLT_SWITCH also needs to be set for subsequent clken commands after the volt switch. To ensure this, add a boolean member in the host private struct (herein named volt_switching), which informs if the last command issued was for volt switching or not. Signed-off-by: Kaustabh Chakraborty <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-10-30mmc: dw_mmc: export dwmci_send_cmd() and dwmci_set_ios()Kaustabh Chakraborty
These commands are required by struct dm_mmc_ops. Any platform specific driver may use some or all of the functions in their own ops. Make them accessible by moving the prototype to the dwmmc.h header. Signed-off-by: Kaustabh Chakraborty <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-10-28x86: Rename arch/x86/include/asm/pnp_def.h to include/pnp_def.hTom Rini
There is nothing x86-centric in this include file, and moving it will allow for some drivers to be compile-tested on sandbox. Signed-off-by: Tom Rini <[email protected]>
2025-10-28mtd: Add function prototype for mtd_read_oob_bf(...)Tom Rini
The function mtd_read_oob_bf is called by cmd/nand.c but does not have a prototype in any header. Add this to include/linux/mtd/mtd.h as that is the most logical place currently. Fixes: 1fac57720719 ("nand: Add a watch command") Signed-off-by: Tom Rini <[email protected]>
2025-10-28clk: Add missing <dm/device.h> to include/clk.hTom Rini
In this header we make direct references to some dm/device.h functions while not including the header directly. Add the missing include. Signed-off-by: Tom Rini <[email protected]>
2025-10-26bootm: Fix typo in bootm.hWolfgang Wallner
Fix a typo in include/bootm.h. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Wolfgang Wallner <[email protected]>
2025-10-26image: Fix typos in image.hWolfgang Wallner
Fix some typos in include/image.h. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Wolfgang Wallner <[email protected]>
2025-10-24firmware: scmi: Add i.MX95 SCMI CPU ProtocolPeng Fan
This protocol allows an agent to start, stop a CPU or set reset vector. It is used to manage auxiliary CPUs in an LM (e.g. additional cores in an AP cluster). Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2025-10-24firmware: scmi: Add i.MX95 SCMI LMM protocol driverPeng Fan
Add Logical Machine Management(LMM) protocol which is intended for boot, shutdown, and reset of other logical machines (LM). It is usually used to allow one LM to manager another used as an offload or accelerator engine. Following Linux Kernel, created a separate folder for holding vendor protocol drivers. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2025-10-24firmware: scmi: Support probe vendor ID 0x80 and 0x82Peng Fan
Preparing to add i.MX LMM and CPU protocol driver, support probe SCMI vendor ID 0x80(i.MX SCMI LMM ID) and 0x82(i.MX SCMI CPU ID). And use Kconfig option to support conditional compilation. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2025-10-24firmware: scmi: Cleanup the SCMI MISC IDPeng Fan
SCMI_IMX_PROTOCOL_ID_MISC was never used, so drop it. And move SCMI_PROTOCOL_ID_IMX_MISC out of enum scmi_std_protocol to scmi_nxp_protocols.h, because it is i.MX specific and following Linux Kernel style, use macro definition. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2025-10-24firmware: scmi: Conditionally compile protocol supportPeng Fan
Add conditional compilation for SCMI protocol support in scmi_get_protocol() and scmi_add_protocol() based on corresponding Kconfig options. This ensures that only the enabled protocols are compiled and accessed, and reducing binary size. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2025-10-24bootstd: make it possible to use tftp for netboot with standardbootBenjamin Hahn
Add the option to load the bootscript with the tftp command (static IP) instead of the dhcp command (dynamic IP). For this a new function tftpb_run similar to dhcp_run, is needed. The selection of which command to use can be done with the ip_dyn environment variable, which can be set to yes or no. The ip_dyn variable was chosen as it is already in use on the imx platforms. Also edit the bootstd doc. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Benjamin Hahn <[email protected]>
2025-10-22boot: Implement a priority for global bootmethsSimon Glass
Allow bootmeths to select when they want to run, using the bootdev priority. Provide a new bootmeth_glob_allowed() function which checks if a bootmeth is ready to use. Fix a comment in bootflow_system() which is a test for global bootmeths. Signed-off-by: Simon Glass <[email protected]>
2025-10-22boot: Support rescanning the global bootmethsSimon Glass
Add the logic to scan through the global bootmeths for every new bootdev, in preparation for allowing global bootmeths to select where in the hunter ordering they go. Use a new bootmeth_glob_allowed() function to check if a bootmeth is allowed, ensuring that each can run at most once. For now this has no actual effect, since the global bootmeths are unconditionally processed at the start, with iter->methods_done being updated to include all of them. Therefore when scanning again, no unprocessed global bootmeths will be found. Signed-off-by: Simon Glass <[email protected]>
2025-10-22boot: Keep track of which bootmeths have been usedSimon Glass
Add a bitfield which tracks when bootmeths have been used. This will be needed when global bootmeths can be used later in the iteration. Fix a missing bootflow_free() while here. Signed-off-by: Simon Glass <[email protected]>
2025-10-22boot: Add a flag for whether there are global bootmethsSimon Glass
The current 'doing_global' refers to being in the state of processing global bootmeths. Since global bootmeths are currently used once at the start, it becomes false once the last global bootmeth has been used. In preparation for allowing bootmeths to run at other points in the bootstd interation, add a new 'have_global' flag which tracks whether there are any global bootmeths in the method_order[] list. It is set up when iteration starts. Unlike doing_global which resets back to false after the global bootmeths have been handled, once have_global is set to true, it remains true for the entire iteration process. This provides a quick check as to whether global-bootmeth processing is needed. Signed-off-by: Simon Glass <[email protected]>
2025-10-22spl: split spl_board_fixups to arch/board specificAnshul Dalal
The current spl_board_fixups API allows for modification of spl_image before the SPL jumps to it. This can be used to modify the DT for the next boot stage, however the current API only allows either the machine arch or the board to use it. This limits the utility of the API as there might be certain fixups that should be applied to all boards sharing the same machine architecture with others being board specific. For TI's K3 specifically, this prevents us from performing architecture level fixups since a lot of TI boards are already making use of the spl_board_fixups API. Therefore this patch splits the API into two to allow both board and the architecture specific fixups. The order is kept as arch then board to give board specific fixups the precedence. Reviewed-by: Dhruva Gole <[email protected]> Signed-off-by: Anshul Dalal <[email protected]> Tested-by: Wadim Egorov <[email protected]>
2025-10-22Merge tag 'net-20251022' of https://source.denx.de/u-boot/custodians/u-boot-netTom Rini
Pull request net-20251022 net: - airoha: improvements - Tighten a few more driver dependencies - designware: fix bitbang init error - phy: Make driver overloading get_phy_id depend on !COMPILE_TEST - phy: add paged PHY register accessors - make dhcp_run() common for NET and NET_LWIP - dwc_eth_ops: Correct check for FDT_64BIT - mediatek: mt7988: various fixup + MDIO detach - phy: aquantia: switch to use phy_get_ofnode(), fix bindings typo net-legacy: - bootp: Prevent buffer overflow to avoid leaking the RAM content - tftp: make TFTP ports unconditionally configurable misc: - uthreads: Make use of CONFIG_IS_ENABLED consistently
2025-10-22Merge tag 'u-boot-at91-2026.01-a' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-at91 First set of u-boot-at91 features for the 2026.01 cycle: This small fixes set includes a change on clocks register value and a fix for the sam9x60ek default timer.
2025-10-22net: phy: add paged PHY register accessorsLucien.Jheng
Synchronize paged PHY helpers with Linux v6.17. Add support for PHY devices that use paged register access by implementing the following functions: - phy_save_page(): Save current page number - phy_select_page(): Switch to a specific page and return previous page - phy_restore_page(): Restore previously saved page Also adds read_page and write_page callbacks to the phy_driver structure to enable driver-specific page handling. These helpers allow safe access to paged PHY registers by ensuring proper page selection and restoration, even in error conditions, which will be used by the Airoha PHY driver. Signed-off-by: Lucien.Jheng <[email protected]>
2025-10-22net: make dhcp_run() common for NET and NET_LWIPJerome Forissier
There are currently two implementations of dhcp_run(): one in cmd/net.c for NET and one in net/lwip/dhcp.c for NET_LWIP. There is no justification for that. Therefore, move the NET version into net/net-common.c to be used by both stacks, and drop the NET_LWIP version which by the way does not look totally correct. Signed-off-by: Jerome Forissier <[email protected]> Suggested-by: Tom Rini <[email protected]> Acked-by: Benjamin Hahn <[email protected]>
2025-10-22uthreads: Make use of CONFIG_IS_ENABLED consistentlyTom Rini
We do not yet support UTHREADS in xPL phases. However, we have the need to dummy out certain functions so that xPL can build when full U-Boot has UTHREADS enabled. Update the few places that need to use CONFIG_IS_ENABLED so that we have the correct dummy in xPL. Signed-off-by: Tom Rini <[email protected]> Acked-by: Jerome Forissier <[email protected]>
2025-10-20spl: make args file optional in falcon modeAnshul Dalal
Falcon mode loads a kernel file and an args file which is the device-tree. However in the case of kernel file being a FIT that contains the device-tree within it, loading the args file is not required. Therefore, this patch introduces a new SPL_OS_BOOT_ARGS config options that allows us to enable or disable loading of the args file in falcon mode. Signed-off-by: Anshul Dalal <[email protected]>
2025-10-17clk: at91: remove default values for PMC_PLL_ACRManikandan Muralidharan
Remove default values for PMC PLL Analog Control Register(ACR) as the values are specific for each SoC and PLL, so load them from PLL characteristics structure Signed-off-by: Manikandan Muralidharan <[email protected]> Signed-off-by: Varshini Rajendran <[email protected]>
2025-10-15arm/airoha: an7581 ignores CFG_MAX_MEM_MAPPED valueMikhail Kshevetskiy
This partly fix commit 726404a66c773 ("airoha: rework RAM size handling to support multiple RAM size") The function get_effective_memsize() do not see non-global defines of CFG_MAX_MEM_MAPPED, so the effective memory size will not be changed. Fix the issue by putting definition of CFG_MAX_MEM_MAPPED to the proper place. Fixes: 726404a66c773 ("airoha: rework RAM size handling to support multiple RAM size") Signed-off-by: Mikhail Kshevetskiy <[email protected]>
2025-10-14boot: Improve comments related to global bootmethsSimon Glass
Add a few comments about global bootmeths and first_glob_method Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Sam Protsenko <[email protected]>
2025-10-14Merge tag 'xilinx-for-v2026.01-rc1-v2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze AMD/Xilinx/FPGA changes for v2026.01-rc1 v2 zynqmp: - DT updates - Enable new commands mbv: - Simplify defconfigs clk: - Separate legacy handler and use SMC handler misc: - Tighten TTC Kconfig dependency net: - Add 10GBE support to Gem pwm: - cadence-ttc: Fix array sizes fwu: - Add platform hook support spi: - Remove undocumented cdns,is-dma property video: - Fix DPSUB RGB handling
2025-10-14Merge tag 'mix-next-14102025' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-tpm TPM changes: Make all drive names defined with U_BOOT_DRIVER unique TEE changes: Rework things such that sandbox will also traverse the optee directory when SANDBOX_TEE is enabled, but only build one of the optee-specific files when OPTEE is enabled. EFI changes: Up to now we were relying on the file extension to accept and load an image over HTTP. We expected images to be either .iso or .img. By wiring up internal existing functions we can try to mount any file extension and reject it only if mounting fails. part_driver_lookup_type
2025-10-14part: Export part_driver_lookup_type for external useJavier Tia
Make part_driver_lookup_type non-static so it can be used outside part.c. This allows external callers to determine the appropriate partition driver for a block device, enabling more flexible handling of partition types. Add a prototype and kernel-doc comment in part.h to document the function contract. Provide a stub inline implementation returning NULL when partition support is disabled, ensuring build consistency across configurations. Signed-off-by: Javier Tia <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>
2025-10-13spl: FIT: Make SPL_LOAD_FIT_FULL depend on SPL_LOAD_FITTom Rini
Today, only a few platforms enable SPL_LOAD_FIT_FULL, and all enable SPL_LOAD_FIT. As can be seen in usage, the FULL symbol is a superset of the first symbol, not an alternative. Update Kconfig entries based on this and simplify the only code which checks for either being set. Signed-off-by: Tom Rini <[email protected]>
2025-10-10Merge patch series "am65-cpsw-nuss phy_interface_t fixup for fixed TX delay"Tom Rini
Matthias Schiffer <[email protected]> says: Following a discussion on the LKML [1], there has been a clarification of the correct use of the rgmii(/-rxid/-txid/-it) phy-modes [2] - namely, that they don't describe the interface at the MAC or PHY boundary, but whether the PCB traces add delays or not (where it is implementation-defined whether the delays are added on the MAC or PHY side in the latter case). Accordingly, a fixup has been implemented in the am65-cpsw-nuss driver to make it follow the clarified rules [3]; apply the same change to U-Boot. Backwards compatibility is preserved: using an old DTB with the wrong phy-mode only results in a warning message, but keeps the Ethernet working. With a new DTB from Linux 6.17+ that sets the mode to rgmii-id, these changes are necessary to avoid using an unsupported/ reserved configuration. See the commit message of patch 2/2 for some additional detail. [1] https://lore.kernel.org/lkml/[email protected]/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c360eb0c3ccb95306704fd221442283ee82f1f58 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca13b249f291f4920466638d1adbfb3f9c8db6e9 Link: https://lore.kernel.org/r/[email protected]
2025-10-10net: mdio-uclass: introduce dm_eth_phy_connect_interface()Matthias Schiffer
dm_eth_phy_connect_interface() is a variant of dm_eth_phy_connect() that allows to set the used PHY mode, in case the MAC driver needs to fix it up. The previously static dm_eth_connect_phy_handle() is renamed and extended for this purpose. Signed-off-by: Matthias Schiffer <[email protected]>
2025-10-10include: completion.h: Convert the rest of the dummy functions to macrosTom Rini
While we declare some of our dummy functions as "inline" we do not also declare them as "static" and so it is possible for the compiler to decide to make these as global functions instead. This can lead to link time failures in some cases, such as "allyesconfig". As these are just dummy functions, convert them to a macro instead. Signed-off-by: Tom Rini <[email protected]>
2025-10-10Merge branch 'uboot-05102025' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-nand-flash This series adds significant and valuable work by Mikhail Kshevetskiy to align spi-mem with Linux 6.16. It also includes contributions to the mtd performance patches, a work started by Miquel Raynal and improved by Mikhail Kshevetskiy. Additionally, two patches tighten dependencies on the Atmel driver. The patches pass the pipeline CI: https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/27873
2025-10-09Merge patch series "firmware: scmi: various update"Tom Rini
Peng Fan (OSS) <[email protected]> says: Misc update on firmware scmi: - Typo fix - Use io helpers - Use PAGE_SIZE for arm64 - Add IN_USE error code - Add more error info - Support scmi max rx timeout in mailbox - Add myself as scmi maintainer, AKASHI contributed most code, but seems he is not invovled in the developement anymore, I volunteer to help here. Some items on list that I am thinking to add: - align with linux kernel to use cpu_to_le32 and le32_to_cpu, but have not find a good way to use the helpers. - Add SCMI version negotiation as Linux Kernel Link: https://lore.kernel.org/r/[email protected]
2025-10-09firmware: scmi: Add error code IN_USEPeng Fan
In SCMI spec 3.2, there is an update: Add IN_USE error code for usage with Pin control protocol So add the error decoding for IN_USE. Signed-off-by: Peng Fan <[email protected]>
2025-10-09fw_loader: Split from fs_loader into separate library fileMarek Vasut
The script based firmware loader does not use anything from the fs_loader implementation. Separate it into its own library source file and convert the mediatek PHY to use this separate code. This should reduce the amount of code that is pulled in alongside the firmware loader, as the FS loader is no longer included. Signed-off-by: Marek Vasut <[email protected]>
2025-10-09Merge tag 'u-boot-imx-master-20251009' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/27872 - Several improvements for kontron-sl-mx8mm. - Add rauc to bootmeths to phycore_imx8mp. - Fix imx93_frdm USB vendor ID.
2025-10-09FWU: Add platform hook support for fwu metataPadmarao Begari
FWU metadata information is unavailable for platform-specific operations since FWU initialization has not yet occurred. The initialization function is invoked as part of the main loop event. To address this, the FWU platform hook function is introduced during FWU initialization, allowing metadata processing with platform-specific operations. Signed-off-by: Padmarao Begari <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2025-10-09drivers: firmware: update xilinx_pm_request to support max payloadNaman Trivedi
Currently xilinx_pm_request API supports four u32 payloads. However the legacy SMC format supports five u32 request payloads and extended SMC format supports six u32 request payloads. Add support for the same in xilinx_pm_request API. Also add two dummy arguments to all the callers of xilinx_pm_request. The TF-A always fills seven u32 return payload so add support for the same in xilinx_pm_request API. Signed-off-by: Naman Trivedi <[email protected]> Signed-off-by: Venkatesh Yadav Abbarapu <[email protected]> Acked-by: Senthil Nathan Thangaraj <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/5ae6b560741f3ca8b89059c4ebb87acf75b4718e.1756388537.git.michal.simek@amd.com
2025-10-08arm: baltos: remove obsolete GPMC_NAND_ECC_LP_x8_LAYOUT macroYegor Yefremov
This define is obsolete, and bus width is now handled via CONFIG_SYS_NAND_BUSWIDTH_16BIT option. Signed-off-by: Yegor Yefremov <[email protected]>
2025-10-08thermal: Convert .get_temp() return value to millicelsiusMarek Vasut
Linux kernel .get_temp() callback reports values in millicelsius, U-Boot currently reports them in celsius. Align the two and report in millicelsius. Update drivers accordingly. Update callsites that use thermal_get_temp() as well. The 'temperature' command now reports temperature in millicelsius as well, with additional accuracy. This changes command line ABI slightly. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: David Zang <[email protected]> [trini: Update test/cmd/temperature.c] Signed-off-by: Tom Rini <[email protected]>
2025-10-07misc: fs_loader: Use buffer pointer in request_firmware_into_buf_via_script()Marek Vasut
Use plain buffer pointer in request_firmware_into_buf_via_script() instead of a pointer to pointer. The later is not necessary as the request_firmware_into_buf_via_script() does not modify the buffer pointer. Update the mediatek driver to match. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Weijie Gao <[email protected]>
2025-10-07imx: kontron-sl-mx8mm: Enable standard boot and disable legacy distro bootFrieder Schrempf
The bootstd framework is the new way to support various bootflows and media. Use it instead of legacy distro boot. Signed-off-by: Frieder Schrempf <[email protected]>
2025-10-05mtd: spinand: Sync core code and device support with Linux 6.17-rc1Mikhail Kshevetskiy
This makes the U-Boot SPI NAND driver almost the same as in Linux 6.17-rc1. The only major differences are: * support of ECC engines. The Linux driver supports different ECC engines while U-Boot uses on-die ECC only. * per operation maximum SPI bus frequency Signed-off-by: Mikhail Kshevetskiy <[email protected]> Reviewed-by: Frieder Schrempf <[email protected]> Signed-off-by: Michael Trimarchi <[email protected]>
2025-10-05mtd: spinand: Add a ->configure_chip() hookMiquel Raynal
There is already a manufacturer hook, which is manufacturer specific but not chip specific. We no longer have access to the actual NAND identity at this stage so let's add a per-chip configuration hook to align the chip configuration (if any) with the core's setting. This is a port of linux commit da55809ebb45 ("mtd: spinand: Add a ->configure_chip() hook") Signed-off-by: Miquel Raynal <[email protected]> Signed-off-by: Mikhail Kshevetskiy <[email protected]> # U-Boot port Reviewed-by: Frieder Schrempf <[email protected]> Signed-off-by: Michael Trimarchi <[email protected]>
2025-10-05mtd: spinand: Enhance the logic when picking a variantMikhail Kshevetskiy
Currently the best variant picked in the first one in the list provided in the manufacturer driver. This worked well while all operations where performed at the same speed, but with the introduction of DTR transfers this no longer works correctly. Let's continue iterating over all the alternatives, even if we find a match, keeping a reference over the theoretically fastest operation. Only at the end we can tell which variant is the best. This logic happening only once at boot. The patch is based on linux commit 666c299be696 (mtd: spinand: Enhance the logic when picking a variant) created by Miquel Raynal <[email protected]> The code was a bit restricted in the functionality since not all required functionality is supported in the u-boot. Signed-off-by: Mikhail Kshevetskiy <[email protected]> Reviewed-by: Frieder Schrempf <[email protected]> Signed-off-by: Michael Trimarchi <[email protected]>