summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2025-12-19i2c: cdns: Add timeout for RXDV status bit pollingPadmarao Begari
Add a timeout mechanism when waiting for the RXDV (Receive Data Valid) status bit to be set before reading data from the FIFO. This prevents infinite polling loops that could occur if the hardware doesn't respond as expected. The timeout is set to 1000ms (CDNS_I2C_RXDV_TIMEOUT_MS) and uses the wait_for_bit_le32() function to poll the status register. If the timeout expires, an error code is returned. Signed-off-by: Padmarao Begari <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/ba53d57c179f3390b32bc6094f3ffb5f4cde931e.1764169953.git.michal.simek@amd.com
2025-12-19xilinx: versal: Get rid of xlnx-versal-power.h from bindingsMichal Simek
Remove xlnx-versal-power.h dt binding header because they should be moved directly to folder where DTs are. In the Linux kernel this shift already started by moving xlnx-zynqmp-clk.h to arch/arm64/boot/dts/xilinx/ folder. U-Boot is using only one PD_DEV_OSPI constact which is moved to zynqmp_firmware.h header. But handling around it should be fixed anyway because no driver should be calling xilinx_pm_request() directly. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/a0f0154ef89929517c3217efe025e8021a910b90.1764233963.git.michal.simek@amd.com
2025-12-19arm64: versal2: Read and show multiboot valueMichal Simek
SOC can boot from different boot medias and also different offsets that's why by default show multiboot value to be aware which image system is booting out of. It is especially useful for systems with A/B update enabled. Also limit zynqmp_pm_get_pmc_multi_boot_reg() usage only for Versal and Versal Gen 2. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/fd7564ce2f51d965c273e939e98de01beb92e6f5.1764232124.git.michal.simek@amd.com
2025-12-19cadence_qspi: Update the delays for flash resetVenkatesh Yadav Abbarapu
Updating the delays for flash reset in the mini u-boot case. These experimental delay values by looking at different flash device vendors datasheets. Signed-off-by: Venkatesh Yadav Abbarapu <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/3fd0641a164a4d628fdf28a94771829f3bf9cb0c.1764181308.git.michal.simek@amd.com
2025-12-19cadence_qspi: Remove duplicated returnMichal Simek
The commit 6d234a79e9eb ("cadence_qspi: Refactor the flash reset functionality") introduced two returns in cadence_spi_probe() that's why remove it. Fixes: 6d234a79e9eb ("cadence_qspi: Refactor the flash reset functionality") Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/5f6d6db9c301daf10ddb707a9031f1a467d6ebf1.1764180937.git.michal.simek@amd.com
2025-12-19spi: cadence: Remove cdns,is-dma DT propertyMichal Simek
cdns,is-dma is not documented property that's why setup CQSPI_DMA_MODE quirk to enable DMA mode based on compatible string. And also change compatible string for mini configurations also with recording compatible string in the driver (Compatible string is already the part of existing DT binding). Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/f109829793900e57558d98ed22caf80c1a72b232.1762787994.git.michal.simek@amd.com
2025-12-19clk: versal: Enable clock driver for Versal Gen 2Michal Simek
Versal Gen 2 is using enhancement SMC format but in near future SCMI client should be used. This patch is just bridging this gap till SCMI server is fully tested. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/e83c665408d1453a464dd02cd2a25bb0ed267131.1762788250.git.michal.simek@amd.com
2025-12-19firmware: xilinx: Add support for enhancement SMC formatMichal Simek
Versal Gen 2 is using different SMC format that's why firmware and clock drivers needs to be align with it. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/16bdee56fd75113c6d531bae7a8a34900b10280d.1762788250.git.michal.simek@amd.com
2025-12-19clk: versal: Cleanup driverMichal Simek
Remove unneeded debug messages, parenthesis and fix error message. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/5b6fbcff1025415adc97e3e17eeb18863df4383e.1762778011.git.michal.simek@amd.com
2025-12-19clk: versal: Add support for CLK_AUTO_IDMichal Simek
When CLK_AUTO_ID is enabled 8 higher bits of clk->id is unique clock identifier in clk uclass that's why it is necessary to mask lower bits which are clock ID. Also check that ID not bigger then maximum supported clock. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/647f1d2c7d274c1106558a655386ef92e0baf2c8.1762778011.git.michal.simek@amd.com
2025-12-19clk: versal: Use __data macro for moving variable to data sectionMichal Simek
The commit 1b267fe1824e ("firmware: xilinx: Prepare code for new SMC firmware format") introduce new __data macro that's why use it in clock driver too. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/eac8d0ab60a018d6c59aa28c49691839a3eec174.1762511327.git.michal.simek@amd.com
2025-12-18Merge tag 'u-boot-socfpga-next-20251217' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-socfpga into next This pull request brings together a set of fixes and enhancements across the SoCFPGA platform family, with a focus on MMC/SPL robustness, EFI boot enablement, and Agilex5 SD/eMMC support. CI: https://source.denx.de/u-boot/custodians/u-boot-socfpga/-/pipelines/28776 Highlights: * SPL / MMC: o Fix Kconfig handling for SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE o Correct raw sector calculations and respect explicit sector values when loading U-Boot from MMC in SPL o Adjust raw MMC loading logic for SoCFPGA platforms * EFI boot: o Permit EFI booting on SoCFPGA platforms o Disable mkeficapsule tool build for Arria 10 where unsupported * Agilex5: o Upgrade SDHCI controller from SD4HC to SD6HC o Enable MMC and Cadence SDHCI support in defconfig o Add dedicated eMMC device tree and defconfig for Agilex5 SoCDK o Revert incorrect GPIO configuration for SDIO_SEL o Refine U-Boot DT handling for SD and eMMC boot variants * SPI: o Allow disabling the DesignWare SPI driver in SPL via Kconfig * Board / configuration fixes: o Enable random MAC address generation for Cyclone V o Fix DE0-Nano-SoC boot configuration o Remove obsolete or conflicting options from multiple legacy SoCFPGA defconfigs
2025-12-17spi: designware: Allow disabling designware driver in SPLRalph Siemsen
To reduce SPL size, make it possible to exclude designware driver, while keeping it enabled in the main u-boot. Signed-off-by: Ralph Siemsen <[email protected]> Reviewed-by: Sean Anderson <[email protected]>
2025-12-17arm: dts: socfpga: agilex5: Upgrade SDHCI controller from SD4HC to SD6HCTanmay Kathpalia
Upgrade the SDHCI Cadence controller from SD4HC to SD6HC for Agilex5 platform to support the newer controller version with enhanced features. Key changes: - Remove combophy0 node and associated references as SD6HC doesn't require separate PHY configuration node - Upgrade MMC controller compatible from "cdns,sd4hc" to "cdns,sd6hc" - Add Agilex5-specific compatible string "altr,agilex5-sd6hc" for platform-specific optimizations Hardware configuration updates: - Add voltage regulator support: * sd_emmc_power: Fixed 3.3V regulator for card power supply * sd_io_1v8_reg: GPIO-controlled regulator for 1.8V/3.3V I/O switching - Configure proper reset control with named resets including combophy reset - Add GPIO control via portb pin 3 for voltage switching SD card operation: - Configure for SD card specific operation (no-mmc, cap-sd-highspeed) - Set maximum frequency to 200MHz - Configure timing parameters for SD modes: * Default Speed (DS) and UHS-I SDR12 mode timing: * High Speed and UHS-I SDR25 mode timing: - Add PHY timing delays for optimal signal integrity Signed-off-by: Tanmay Kathpalia <[email protected]> Reviewed-by: Tien Fong Chee <[email protected]>
2025-12-16pinctrl: single: Add missing free in single_allocate_functionFrancois Berder
If func->pins could not be allocated, one must also free func variable that was allocated previously. Signed-off-by: Francois Berder <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
2025-12-16clk: mediatek: remove duplicate '@parent' field docDavid Lechner
Remove duplicate '@parent' field documentation in struct mtk_composite. There is no need to say the same thing twice. Also fix spelling mistake in the word "parent" while we're at it. Signed-off-by: David Lechner <[email protected]>
2025-12-14rockchip: i2c: fix illegal I2C START/STOP conditionQuentin Schulz
In the last message sent in rockchip_i2c_xfer, the controller is disabled (see rk_i2c_disable() in rk_i2c_read()/rk_i2c_write()), then the STOP condition is sent (see rk_i2c_send_stop_bit() in rockchip_i2c_xfer()) and the controller is disabled once again (see rk_i2c_disable() right after). The issue is that re-enabling the controller just to send the STOP condition doesn't work. When, the controller is disabled, the SCL and SDA lanes are not driven anymore and thus enter the idle mode where they are kept high by the external HW pull-up. To send a STOP condition, one needs to drive the SDA line so that a rising edge happens while SCL is high. Experimentally (on PX30 and RK3399), when enabling the controller to send a STOP condition after it's been disabled, the controller only drives the SDA line to trigger the rising edge for the STOP condition, leaving SCL undriven (and thus, high). This means, that because SDA is high before this happens and that we need a rising edge, the controller drives the SDA line low and then releases it, meaning we trigger a START condition followed by a STOP condition: SCL _________ _____... __ _____ _____... \/ SDA ^ STOP ^ START This is illegal in I2C protocol[1]: 5. A START condition immediately followed by a STOP condition (void message) is an illegal format. Many devices however are designed to operate properly under this condition. My guess is that the I2C controller IP knows that it makes only sense to send a STOP condition after a START condition, meaning the controller is already driving the SCL line low and neither the device nor controller drive the SDA line after the last ACK/NACK as there's no need to, then it needs to drive SDA, release SCL to make it high and then release the SDA line. However, after it's been disabled, the SCL is already released so the controller only essentially drives SDA and then releases it. It happens that this seems to be breaking the SE050 Secure Element after a few transfers in the middle of a transfer where it starts clock stretching the bus forever. It may be related to Errata 3.2[2] but the description of the setup isn't an exact match to the current situation. It seems to be required to disable the I2C controller between messages as the Linux kernel states that "The HW is actually not capable of REPEATED START. But we can get the intended effect by resetting its internal state and issuing an ordinary START.". Between messages, this logic seems fine as I get an Sr (repeated START condition) before starting the next message in the transfer without a STOP condition. However, we should NOT disable the controller after the last message in the transfer otherwise we do this illegal START condition followed by the STOP condition, hence the added check. [1] https://www.nxp.com/docs/en/user-guide/UM10204.pdf 3.1.10 The target address and R/W bit point 5 [2] https://www.nxp.com/docs/en/errata/SE050_Erratasheet.pdf Fixes: c9fca5ec8849 ("rockchip: i2c: don't sent stop bit after each message") Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-12-14rockchip: i2c: move ACK comment where it appliesQuentin Schulz
The I2C_CON_LASTACK is kind of a misnomer as setting it means sending a NACK as last byte acknowledge when the controller is in receive mode. It should therefore be used only when there's no more data to transfer after this. Move the comment in the proper if block. Sync the comment with the Linux kernel's while at it so it's more explicit. Fixes: 5deaa530280f ("rockchip: i2c: fix >32 byte reads") Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-12-14rockchip: i2c: fix incorrect STOP flag for the interrupt enable registerQuentin Schulz
I2C_CON_STOP is a flag to be used for the con register, where it is bit 4 to send the STOP condition. To enable the interrupt the controller sends to tell it's finished sending the STOP condition, it's the ien register at bit 5. Let's use the proper offset. My hunch is that enabling the interrupt is useless as the interrupt status register is always up-to-date and enabling the interrupt is just so that the interrupt is available via the GIC. However, U-Boot has no interrupt support and the logic was working well before this patch. This is just so people aren't side-tracked when debugging I2C issues on Rockchip by checking all writes are proper. Fixes: 3437469985df ("rockchip: Add I2C driver") Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-12-12Merge patch series "clk: ti: Cleanup common functions and omap-cm"Tom Rini
Markus Schneider-Pargmann (TI.com) <[email protected]> says: This series cleans up the direct dependency of ARCH_OMAP2PLUS to compile ti/clk.c which holds common functions for other clock drivers. It creates its own config symbols for these common functions and for the omap-cm driver as well. The omap-cm driver config symbol is added as default enabled. Link: https://lore.kernel.org/r/20251128-topic-am33-clk-regmap-dep-v2026-01-v2-0-451b4f4e7e85@baylibre.com/
2025-12-12clk: ti: omap4-cm: Add Kconfig symbolMarkus Schneider-Pargmann (TI.com)
Add a Kconfig symbol for this stub driver to avoid clock dependencies on an architecture symbol. Enable it by default. Signed-off-by: Markus Schneider-Pargmann (TI.com) <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2025-12-12clk: ti: Split common omap2plus functions into new symbolMarkus Schneider-Pargmann (TI.com)
Create a new symbol for the common clock functions used by some of the omap2plus clock drivers. These drivers now select this new symbol when they need the functions. Note these common functions are not ARCH_OMAP2PLUS specific. Note that the common functions are using regmap, so select it here. Reviewed-by: Tom Rini <[email protected]> Signed-off-by: Markus Schneider-Pargmann (TI.com) <[email protected]>
2025-12-12power: domain: Add ti-omap-prm stubMarkus Schneider-Pargmann (TI.com)
Upstream DT uses simple-pm-bus instead of simple-bus. simple-pm-bus requires power domain support. On am33xx, PRM manages power domains but all domains are enabled at boot. Add stub driver with custom of_xlate that expects no argumetns to allow simple-pm-bus and dependent devices to probe. Signed-off-by: Markus Schneider-Pargmann (TI.com) <[email protected]>
2025-12-12simple-pm-bus: Make clocks optionalMarkus Schneider-Pargmann (TI.com)
simple-pm-bus binding requires either power-domains or clocks, not both. Allow clk_get_bulk() to return -ENOENT. When no clocks are present, bulk->count is set to 0, which works correctly with clk_enable_bulk() and other clk functions used in this driver. Reviewed-by: Kory Maincent <[email protected]> Signed-off-by: Markus Schneider-Pargmann (TI.com) <[email protected]>
2025-12-12Revert "clk: Return value calculated by ERR_PTR"Tom Rini
While this change was intended to fix a mistake in the code, of calling the ERR_PTR macro but not making use of the result, it seems that functionally platforms depend on the loop not existing here. The TI K3 families of platforms for example were broken by this commit. This reverts commit fe780310cfa8bf5a093894b5cd7fe85c6b02fd91. Reported-by: Nishanth Menon <[email protected]> Reviewed-by: Andrew Goodbody <[email protected]> Reviewed-by: Nishanth Menon <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2025-12-11mmc: meson_gx_mmc: reduce maximum frequencyNick Xie
Reduce the maximum frequency to 40MHz to be compatible with more eMMC. And the Amlogic vendor U-Boot also use the maximum frequency of 40MHz. Signed-off-by: Nick Xie <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-12-11mmc: sdhci-cadence6: Add DLL master control and improve tuning reliabilityTanmay Kathpalia
- Add support for configuring the PHY DLL master control register for all SD/eMMC timing modes (DS, HS, SDR, DDR, HS200, HS400) by extending the PHY configuration arrays and writing the value during PHY adjustment. - Fix tuning reliability by toggling the DLL reset before and after updating the PHY_DLL_SLAVE_CTRL_REG_ADDR register. Signed-off-by: Tanmay Kathpalia <[email protected]> Reviewed-by: Balsundar Ponnusamy <[email protected]> Acked-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-12-11mmc: sdhci-cadence6: socfpga: Fix DT property naming conventionTanmay Kathpalia
1. Replace underscores with hyphens in device tree property names to follow the standard DT naming convention. This affects all "lpbk_ctrl" properties which are now correctly named "lpbk-ctrl". Changes: - cdns,phy-gate-lpbk_ctrl-delay-* → cdns,phy-gate-lpbk-ctrl-delay-* - cdns,ctrl-hrs10-lpbk_ctrl-delay-* → cdns,ctrl-hrs10-lpbk-ctrl-delay-* 2. Fix typo: semmc → emmc in eMMC SDR PHY property name Signed-off-by: Tanmay Kathpalia <[email protected]> Reviewed-by: Balsundar Ponnusamy <[email protected]> Acked-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-12-11mmc: sdhci-cadence: Enable software tuning for both SD and eMMC interfacesTanmay Kathpalia
Remove interface type restrictions in sdhci_cdns_execute_tuning() to enable software tuning for both SD and eMMC devices. The previous assumption that SD timing should be handled by SDHCI core is incorrect based on the actual function assignment logic. The execute_tuning function is assigned based on MMC_SUPPORTS_TUNING config, which is enabled by both MMC_UHS_SUPPORT and MMC_HS200_SUPPORT. Changes: Remove IS_MMC() check that restricted tuning to eMMC only Remove opcode validation limited to MMC_CMD_SEND_TUNING_BLOCK_HS200 Signed-off-by: Tanmay Kathpalia <[email protected]> Reviewed-by: Balsundar Ponnusamy <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-12-11mmc: sdhci-cadence: Use hardware version field for Cadence SDHCI controllerTanmay Kathpalia
Replace device tree compatible string checks with hardware version field detection to determine SDHCI controller capabilities. This approach is more robust and aligns with standard SDHCI specification practices. Controllers with SDHCI version 4.2 and above will automatically use the enhanced PHY adjustment, and tuning v6-specific procedures. Signed-off-by: Tanmay Kathpalia <[email protected]> Reviewed-by: Balsundar Ponnusamy <[email protected]> Acked-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-12-11mmc: sdhci-cadence: Set controller and PHY speed modes for SD and eMMC cardsTanmay Kathpalia
Replace the legacy clock frequency-based timing mode selection with proper MMC timing mode constants. Changes to sdhci-cadence.c: - Add sdhci_cdns_get_hrs06_mode() helper function for mode selection - Replace clock frequency logic with mmc->selected_mode switch statement - Use proper MMC timing constants (MMC_HS, UHS_SDR104, etc.) - Add SD card specific handling with standard SDHCI control register setup Changes to sdhci-cadence6.c: - Add SD high speed PHY and control configuration arrays - Update sdhci_cdns6_phy_adj() to use timing modes instead of HRS06 modes - Support both SD and eMMC timing modes with appropriate PHY settings Signed-off-by: Tanmay Kathpalia <[email protected]> Reviewed-by: Balsundar Ponnusamy <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-12-11mmc: sdhci-cadence: Use max-frequency property from device treeTanmay Kathpalia
When f_max parameter is 0 in sdhci_setup_cfg(), the function defaults to using the maximum frequency from host controller capabilities register instead of the max-frequency property parsed from device tree. The max-frequency property from device tree is parsed by mmc_of_parse() and stored in plat->cfg.f_max, but sdhci_setup_cfg() was being called with f_max=0, causing it to ignore the device tree value and use the host capabilities register value instead. Fix this by passing plat->cfg.f_max to sdhci_setup_cfg() to ensure the device tree specified maximum frequency is respected over the hardware default. Signed-off-by: Tanmay Kathpalia <[email protected]> Reviewed-by: Balsundar Ponnusamy <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-12-11mmc: mmc-uclass: Use max-frequency from device tree with default handlingTanmay Kathpalia
When the max-frequency property is not specified in the device tree, the function now explicitly defaults to 0 instead of leaving cfg->f_max uninitialized. This allows sdhci_setup_cfg() to properly detect the absence of a device tree specified frequency and fall back to using the host controller's maximum base clock frequency from the capabilities register. Signed-off-by: Tanmay Kathpalia <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-12-11mmc: sdhci-cadence: Add reset control supportTanmay Kathpalia
Add reset control functionality to the SDHCI Cadence driver to properly handle hardware reset sequences during probe. This ensures the controller is in a known state before initialization. Signed-off-by: Tanmay Kathpalia <[email protected]> Reviewed-by: Balsundar Ponnusamy <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-12-11serial: serial_meson: add minimal non-DM driverFerass El Hafidi
It is very limited and minimal, only implements putc/puts. This minimal driver is intended to be used in SPL, and other size-constrained situations. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Ferass El Hafidi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-12-11mmc: meson_gx_mmc: add minimal non-DM driverFerass El Hafidi
Add a minimal non-DM MMC driver for use in size-constrained environments. Signed-off-by: Ferass El Hafidi <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-12-08Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv ↵Tom Rini
into next CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/28674 - riscv: Implement private GCC library - mpfs: Add MPFS CPU Implementation - andes: Stop disabling device tree relocation and some minor fixes - sifive: Stop disabling device tree relocation - starfive: Cleanup size types and typos
2025-12-08Merge tag 'v2026.01-rc4' into nextTom Rini
Prepare v2026.01-rc4
2025-12-08ram: starfive: fix typo for unsupported DDR sizeE Shattow
Fix typo for "unsupport" size and improve description to Unknown DDR size. Signed-off-by: E Shattow <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2025-12-08ram: starfive: use SZ_8G for 8GB memory sizeE Shattow
Replace numeric literal with SZ_8G consistent with other uses of types from linux/types.h Signed-off-by: E Shattow <[email protected]> Acked-by: Hal Feng <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2025-12-08ram: starfive: drop references to 16GB memory sizeE Shattow
16GB memory size is not addressable on StarFive JH-7110 SoC because the DRAM uncached alias begins at +8GB offset from start of DRAM. The logic for 16GB memory size is a fall-through to the default for an unknown size. Let's drop this unnecessary 16GB memory size and rely on the case default. Signed-off-by: E Shattow <[email protected]>
2025-12-05Merge patch series "clk: Return value calculated by ERR_PTR"Tom Rini
Andrew Goodbody <[email protected]> says: Smatch reported an error where a value calculated by ERR_PTR was not used. Fixing this to return the generated value led to a test failure which meant updating the sandbox clock code so that it would still cause the tests to pass with the above correction. Debugging this problem led to a SIGSEGV which is addressed in 1/3. Possible memory leaks noticed are addressed in 3/3. Link: https://lore.kernel.org/r/[email protected]
2025-12-05clk: Prevent memory leak on errorAndrew Goodbody
In clk_set_default_rates() memory is allocated to store the clock rates that are read. Direct returns fail to free this memory leading to a memory leak so instead use 'goto fail;' which will then perform the free before exiting the function. Signed-off-by: Andrew Goodbody <[email protected]>
2025-12-05clk: Return value calculated by ERR_PTRAndrew Goodbody
In clk_set_default_get_by_id ret is passed to ERR_PTR but nothing is done with the value that this calculates which is obviously not the intention of the code. This is confirmed by the code around where this function is called. Instead return the value from ERR_PTR. Then fixup the sandbox code so that the test dm_test_clk does not fail as it relied on the broken behaviour. Finally disable part of the test that does not work correctly with CLK_AUTO_ID This issue found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-12-05clk: Prevent SIGSEGV on debugAndrew Goodbody
If LOG_DEBUG is defined and a NULL clk is passed to clk_enable or clk_disable then an attempt is made to dereference NULL in the debug statement. Guard against this. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2025-12-05firmware: ti_sci: Fix memory leaks in devm_ti_sci_get_of_resourceFrancois Berder
- Fix temp memory leak - Free memory during error handling Signed-off-by: Francois Berder <[email protected]>
2025-12-05clk: ti: Tighten some TI clock driver dependenciesTom Rini
Attempting to build with "allyesconfig" means that we try and build all available options for the sandbox platforms. Doing so exposes that the drivers under drivers/clk/ti/ can only be compiled or linked on ARCH_OMAP2PLUS platforms as some drivers require platform specific headers while other drivers depend on these first drivers to link. Express those requirements in Kconfig as well. Reviewed-by: Manorit Chawdhry <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2025-12-05mtd: Tighten some driver dependenciesTom Rini
The ALTERA_QSPI driver conflicts with the regular FLASH_CFI_DRIVER as both implement the same high level functionality and so use the same global namespace. In a similar fashion, all NAND drivers are mutually exclusive due to namespace collisions. For the remaining drivers which did not already have some architecture specific dependency, add them. Signed-off-by: Tom Rini <[email protected]>
2025-12-05led: remove support for red LED in legacy APIQuentin Schulz
To the exception of red_led_on in the arm-specific assembly code, all code interacting with the red status LED was guarded by the CONFIG_LED_STATUS_RED symbol, which is enabled in none of the upstream defconfigs. Since the last board which overrode the weak red_led_on function got migrated to the new LED mechanism, there's also no user of the arm-specific assembly code anymore, therefore it can be removed along the other unreachable code sections. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2025-12-05led: remove support for green status led in legacy APIQuentin Schulz
The last user of it was removed in a previous commit so let's remove its support entirely. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>