summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
3 daysbitfield: Add less-checking __FIELD_{GET,PREP}()Geert Uytterhoeven
The BUILD_BUG_ON_MSG() check against "~0ull" works only with "unsigned (long) long" _mask types. For constant masks, that condition is usually met, as GENMASK() yields an UL value. The few places where the constant mask is stored in an intermediate variable were fixed by changing the variable type to u64. However, for non-constant masks, smaller unsigned types should be valid, too, but currently lead to "result of comparison of constant 18446744073709551615 with expression of type ... is always false"-warnings with clang and W=1. Hence refactor the __BF_FIELD_CHECK() helper, and factor out __FIELD_{GET,PREP}(). The later lack the single problematic check, but are otherwise identical to FIELD_{GET,PREP}(), and are intended to be used in the fully non-const variants later. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Yury Norov (NVIDIA) <[email protected]> [Linux commit: 2a6c045640c38a407a39cd40c3c4d8dd2fd89aa8] Signed-off-by: Mikhail Kshevetskiy <[email protected]> Reviewed-by: David Lechner <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Scott Wood <[email protected]> Acked-by: Gerald Van Baren <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
3 daysbitops: import BITS_PER_TYPE() macro from linuxMikhail Kshevetskiy
This macro will be used by include/linux/bitfield.h header. Signed-off-by: Mikhail Kshevetskiy <[email protected]> Reviewed-by: David Lechner <[email protected]> Reviewed-by: Simon Glass <[email protected]>
3 daysboard: renesas: gen5-cm33: #undef field_{get, prep}() before definitionMikhail Kshevetskiy
Prepare for the advent of globally available common field_get() and field_prep() macros by undefining the symbols before defining local variants. This prevents redefinition warnings from the C preprocessor when introducing the common macros later. Signed-off-by: Mikhail Kshevetskiy <[email protected]>
3 daysclk: renesas: #undef field_{get, prep}() before definitionMikhail Kshevetskiy
Prepare for the advent of globally available common field_get() and field_prep() macros by undefining the symbols before defining local variants. This prevents redefinition warnings from the C preprocessor when introducing the common macros later. Signed-off-by: Mikhail Kshevetskiy <[email protected]>
3 daysmtd: nand: raw: sunxi: #undef field_{get, prep}() before definitionMikhail Kshevetskiy
Prepare for the advent of globally available common field_get() and field_prep() macros by undefining the symbols before defining local variants. This prevents redefinition warnings from the C preprocessor when introducing the common macros later. Signed-off-by: Mikhail Kshevetskiy <[email protected]>
3 daysnet: hifemac: #undef field_{get, prep}() before definitionMikhail Kshevetskiy
Prepare for the advent of globally available common field_get() and field_prep() macros by undefining the symbols before defining local variants. This prevents redefinition warnings from the C preprocessor when introducing the common macros later. Signed-off-by: Mikhail Kshevetskiy <[email protected]>
3 dayspower: domain: renesas-r8a78000: #undef field_{get, prep}() before definitionMikhail Kshevetskiy
Prepare for the advent of globally available common field_get() and field_prep() macros by undefining the symbols before defining local variants. This prevents redefinition warnings from the C preprocessor when introducing the common macros later. Signed-off-by: Mikhail Kshevetskiy <[email protected]>
3 dayswatchdog: renesas_wwdt: #undef field_{get, prep}() before definitionMikhail Kshevetskiy
Prepare for the advent of globally available common field_get() and field_prep() macros by undefining the symbols before defining local variants. This prevents redefinition warnings from the C preprocessor when introducing the common macros later. Signed-off-by: Mikhail Kshevetskiy <[email protected]>
3 daysMerge tag 'xilinx-for-v2026.10-rc1-v3' of ↵Tom Rini
https://git.u-boot-project.org/u-boot/custodians/u-boot-amd AMD/Xilinx/FPGA changes for v2026.10-rc1 v3 AMD: - Firmware interface decoupling (part 1) ZynqMP: - DT updates - Add TCG variant detection Versal/Versal2: - Drop DDR MMU mapping and map it dynamically tools: - Add register initialization to mkimage MAINTAINERS: - Clean Zynq/ZynqMP fragments ufs: - Fix driver reregistration fpga: - altera: Simplify driver conditional compilation selection
3 daysenv: ubi: add support to create environment volume if it does not existWeijie Gao
When U-Boot is booting from a fresh device, the environment volume may not exist in the factory UBI image. This is a common case where factory UBI image contains only volumes with valid data. With the current design, even if the volume is created manually, the environment will still be unusable (e.g., saveenv) before a reboot. This patch adds support to automatically create missing volumes before loading environment. This will make environment available at first boot. There are two options: CONFIG_ENV_UBI_VOLUME_CREATE: whether to enable volume creation CONFIG_ENV_UBI_VOLUME_STATIC: create static volume (default is dynamic) Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
3 dayscmd: ubi: allow creating volume with all free spaces in ubi_create_volWeijie Gao
Although the ubi command itself supports creating volume with all free spaces, the api ubi_create_vol() does not. Since negative size is invalid, this patch replaces negative size with all free space size in ubi_create_vol(). Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
3 dayscmd: ubi: export more APIs to publicWeijie Gao
Export the following functions to public: - ubi_detach(): this is paired with ubi_part(). One may call this function to completely clean up the ubi subsystem after using ubi_part(). - ubi_{create,find,remove}_vol: this is a set of functions for volume management. The original ubi_remove_vol is renamed to __ubi_remove_vol to allow the new ubi_remove_vol() being used as a wrapper for __ubi_remove_vol() with volume name. Also, comments are added for all exported functions. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
3 dayscmd: ubi: reorganize command messagesWeijie Gao
This patch moves normal subcommand messages into the main command function. This will allow current and potential api functions being called with clean output on success. A new function ubi_require_volume() is added for finding and printing error message if volume not found. The original ubi_find_volume() will be silent for being an api function. To avoid ubi_require_volume() being called twice for volume read/remove, some changes are required: - The parameter of ubi_remove_vol() is changed to accept 'struct ubi_volume *' directly. - The original ubi_volume_read() is renamed to __ubi_volume_read, with its first parameter changed to accept also 'struct ubi_volume *' directly. - A new ubi_volume_read() is added to wrap __ubi_volume_read() to accept volume name as its first parameter. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
3 dayscmd: ubi: change all positive error return value to negativeWeijie Gao
Change all return value using errno codes to negative. This makes it consistent with the linux ubi layer. Also, to follow the standard definition of U-Boot command, in the do_ubi() command handler, the return value is converted to CMD_RET_FAILURE for error returning, and CMD_RET_USAGE for incorrect usage. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
3 dayscmd: ubi: change the type of parameter dynamic to boolWeijie Gao
This patch changes the type of the 'dynamic' parameter of ubi_create_vol() to bool as it's used as a boolean. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
3 dayscmd: ubifs: mark string parameters with constWeijie Gao
File name and volume name should be const as they will not be modified in these functions. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
3 dayscmd: ubi: use void * for buf parameter in ubi_volume_readWeijie Gao
Use void * to avoid explicit type casting as what ubi_volume_write has done already. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
3 dayscmd: ubi: mark read-only function parameters with constWeijie Gao
Parameters like part/volume name and buffer for writing are not being modified by the callee functions and should be marked const. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
3 daysubi: remove unnecessary extern directive from function prototypesWeijie Gao
The extern directive is unnecessary for function declaration and should be removed. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
3 daysfs: ubifs: fix ubifs_finddir() result checkPatrick Delaunay
ubifs_finddir() can return a negative error code (-ENOMEM or PTR_ERR(dent)) and returns 1 when the name is found in the directory. Fix the result check accordingly. This fixes file existence detection (for "test -e") when U-Boot uses UBIFS through ops ubifs_exists(). Since this function is also called before other file operations, commands such as "load" could be executed on a non-existing file without reporting an error. Fixes: 0cab29ff467e ("fs: ubifs: Fix and rework error handling in ubifs_finddir") Signed-off-by: Patrick Delaunay <[email protected]>
3 daysi2c: designware: fix i2c probe errorCoben Han
Probing i2c slave device just needs its device address. A certain type of chipsets such as RTC S35390A have no offset, which means address length should be 0. But the current designware_i2c_probe_chip function requires offset 0 and its length 1. This causes the designware-i2c to be initialized again and again. Furthermore, after booting into kernel, the designware-i2c kernel driver complains its controller timeout. This patch fixes this misbehaviour in such way that only device address is issued, no reinitialization needs when target device not detected, the designware-i2c kernel driver continues working. Signed-off-by: Coben Han <[email protected]>
3 daysi2c: nx: Add LicensePeng Fan
Add License information for nx_i2c driver. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
3 daysi2c: nx: Use dev_read_addr_ptr()Peng Fan
Use dev_read_addr_ptr() which supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers. No functional changes. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
3 daysarm: dts: zynqmp: Fix space indentation to use tabsMichal Simek
Fix indentation issues where spaces were used instead of tabs in several ZynqMP device tree overlay files. Device tree files should use tabs for indentation to maintain consistency with the kernel coding style. Reviewed-by: Tomas Melin <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/0dc7b65ebd48676719ace15a505ecec2f324822a.1782726386.git.michal.simek@amd.com
3 daysarm64: xilinx: Add missing newline in kr260-revAMichal Simek
Add missing newline available in Linux already. Reviewed-by: Tomas Melin <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/ab6f006ee87efb54ee17f24a12c9f31aafc2f2ae.1782726386.git.michal.simek@amd.com
3 daysarm64: zynqmp: Disable ina226 iio-hwmon nodesMichal Simek
ina226 IIO driver doesn't need to be enabled by default in Linux that's why disable iio-hwmon nodes to avoid warnings about it. Reviewed-by: Tomas Melin <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/deb2e92d5030a31dbb91b36fa77de3ad2de38a71.1782726386.git.michal.simek@amd.com
3 daysarch: arm: dts: Add RTC clock nodes for ZynqMP platformHarini T
Add fixed RTC clock nodes at 32.768 kHz for ZynqMP. The RTC driver uses this clock to calculate the calibration value, replacing the deprecated calibration device tree property. Signed-off-by: Harini T <[email protected]> Reviewed-by: Tomas Melin <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/8838c8c4fcd0dfe151bcee2a6c4da51df81e23cb.1782726386.git.michal.simek@amd.com
3 daysarm64: versal-net: Add mmc_get_env_dev() and deduplicate MMC handlingMichal Simek
The SD and eMMC cases in boot_targets_setup() duplicated the MMC device lookup, and versal-net relied on the weak mmc_get_env_dev() default instead of selecting the device matching the boot mode (unlike versal and zynqmp). Factor the lookup into mmc_get_bootseq(), mirroring spi_get_bootseq(): it maps the boot mode to the MMC node and returns the device sequence, optionally handing back the mode banner so only boot_targets_setup() prints it. mmc_get_env_dev() is now provided as a thin wrapper, and the SD/eMMC cases call the helper instead of open-coding the lookups. The local udevice pointer in boot_targets_setup() is no longer needed. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/7750a79c17146c66adeb83ad6d1bfa78b22ec8fa.1782219202.git.michal.simek@amd.com
3 daysarm64: versal-net: Look up eMMC device in boot_targets_setup()Michal Simek
The EMMC_MODE case set bootseq from dev_seq(dev) without ever assigning dev, so it used an uninitialized pointer and produced a bogus device sequence in boot_targets. eMMC is wired to the SD1 controller (mmc@f1050000, see versal-net-mini-emmc.dts). Look that device up like the SD cases do before using its sequence number. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/bf779dcdd30c900d7614c0fa8382cb3f4cb57c20.1782219202.git.michal.simek@amd.com
3 daysarm64: versal-net: Do not print bootmode from spi_get_env_dev()Michal Simek
spi_get_bootseq() printed the QSPI/OSPI mode banner, which is noise when called from spi_get_env_dev() during environment setup. The banner is only meaningful for the "Bootmode:" announcement in boot_targets_setup(). Make spi_get_bootseq() a pure lookup that returns the banner string through an optional output argument instead of printing it. spi_get_env_dev() passes NULL and stays silent, while boot_targets_setup() prints the returned mode name as before. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/ae257af9d2fe026306b32c647e406450319a3c7a.1782219202.git.michal.simek@amd.com
3 daysarm64: versal-net: Simplify spi_get_bootseq() bootmode switchMichal Simek
The QSPI and OSPI cases only differ in the SPI device name. Pick the name in the switch and perform a single uclass_get_device_by_name() lookup afterwards, instead of repeating the lookup and dev_seq() in every case. No functional change. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/191f0f583e2d02c184ea2a2a2fe0ef473ca9fe61.1782219202.git.michal.simek@amd.com
3 daysarm64: versal-net: Deduplicate SPI bootmode handlingMichal Simek
spi_get_env_dev() and boot_targets_setup() both decoded the QSPI/OSPI boot modes into a SPI device sequence number with identical uclass_get_device_by_name() lookups. Factor that logic into a single spi_get_bootseq() helper that takes the bootmode and returns the device sequence. spi_get_env_dev() becomes a thin wrapper around it, and boot_targets_setup() calls it for the QSPI/OSPI cases instead of open-coding the lookups. Passing the bootmode in avoids reading the bootmode register twice in boot_targets_setup(). No functional change. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/f98037220a20c441f0ea964f94647948bc035997.1782219202.git.michal.simek@amd.com
3 daysarm64: zynqmp: Decouple MMIO accessors from firmwareMichal Simek
zynqmp_mmio_read() and zynqmp_mmio_write() selected between direct MMIO and the firmware (PM_MMIO_READ/WRITE) interface with an in-function IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE) / current_el() check. Generic arch code should not carry firmware-specific ifdefs, and with SCMI the access method changes again. Split the accessors like the multiboot and bootmode hooks: the weak default in arch/arm/mach-zynqmp does the direct MMIO access (used in SPL, at EL3 and when no firmware is present), while firmware-zynqmp.c provides a strong definition that issues the firmware call and falls back to the direct access in SPL/EL3 where the SMC path is unavailable. The raw MMIO primitives zynqmp_mmio_rawread() and zynqmp_mmio_rawwrite() are exported for the shared fallback, and the read-modify-write helper now uses the raw read instead of routing through the firmware-aware accessor. The firmware-vs-MMIO decision is selected at link time, so adding SCMI later only requires a third strong definition with no changes to generic code. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/d532df144d2c8e34be835bad6d0de3b26befdf01.1782219202.git.michal.simek@amd.com
3 daysarm64: versal-net: Move bootmode decoding out of board codeMichal Simek
versal_net_get_bootmode() open-coded the IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE) selection between the firmware call zynqmp_pm_get_bootmode_reg() and a direct readl() in board code. Like the Versal change, move the whole function behind an overridable hook so generic board code stays free of firmware specifics and is ready for SCMI. The weak versal_net_get_bootmode() in arch/arm/mach-versal-net does the plain MMIO read via versal_net_bootmode_reg() and decodes it (used at EL3 and without firmware). When CONFIG_ZYNQMP_FIRMWARE is enabled, firmware-zynqmp.c provides a strong definition that reads the register through the firmware call, falling back to the direct read at EL3 where the SMC path to firmware is unavailable. This preserves the existing firmware-based bootmode behaviour while removing the firmware interface from board code; the now unused zynqmp_firmware.h include is dropped. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/be67e9c6d0bc36840a46594413886d2003967c64.1782219202.git.michal.simek@amd.com
3 daysarm64: versal-net: Move SoC detection out of board codeMichal Simek
soc_detection() and soc_name_decode() read the PMC_TAP version/idcode registers and decode the platform. This is SoC information rather than board policy, and a firmware interface could provide it instead, so it does not belong in board code. Move both functions, together with the shared platform_id and platform_version state, into arch/arm/mach-versal-net where they still override the weak stubs in the Xilinx common board code. The board file drops the now unused linux/bitfield.h include. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/8757111cb254543d61541fb030d51f62c3c555a8.1782219202.git.michal.simek@amd.com
3 daysarm64: versal2: Move SoC detection out of board codeMichal Simek
soc_detection() and soc_name_decode() read the PMC_TAP version/idcode registers and decode the platform. This is SoC information rather than board policy, and a firmware interface could provide it instead, so it does not belong in board code. Move both functions, together with the shared platform_id and platform_version state, into arch/arm/mach-versal2 where they still override the weak stubs in the Xilinx common board code. The board file drops the now unused linux/bitfield.h include. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/c332ab27f66f1c808f32a4bcb453d9e8da543331.1782219202.git.michal.simek@amd.com
3 daysarm64: zynqmp: Move board_early_init_r clock setup to mach codeMichal Simek
board_early_init_r() programmed the system timestamp counter directly with readl()/writel() in board code. This is SoC register setup rather than board policy, and similar code exists across the Xilinx SoCs. Move it into zynqmp_timer_setup() in arch/arm/mach-zynqmp so the board hook only keeps the EL3 guard and calls the helper. The asm/arch/clk.h include (for zynqmp_get_system_timer_freq()) moves to cpu.c along with the code. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/2d8f2419fab314b4ff8fd53b846e1dd6151586d3.1782219202.git.michal.simek@amd.com
3 daysarm64: versal-net: Move board_early_init_r clock setup to mach codeMichal Simek
board_early_init_r() programmed the IOU switch clock and the system timestamp counter directly with readl()/writel() in board code. This is SoC register setup rather than board policy, and the same block is duplicated across the Xilinx SoCs. Move it into versal_net_timer_setup() in arch/arm/mach-versal-net so the board hook only keeps the EL3 guard and calls the helper. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/10dd9f35d03be0402ce13475f20b2cd3761189a6.1782219202.git.michal.simek@amd.com
3 daysarm64: versal2: Move board_early_init_r clock setup to mach codeMichal Simek
board_early_init_r() programmed the IOU switch clock and the system timestamp counter directly with readl()/writel() in board code. This is SoC register setup rather than board policy, and the same block is duplicated across the Xilinx SoCs. Move it into versal2_timer_setup() in arch/arm/mach-versal2 so the board hook only keeps the EL3 guard and calls the helper. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/08e835a183c39de6f666375ac390eee6a8f3f12e.1782219202.git.michal.simek@amd.com
3 daysarm64: versal: Move board_early_init_r clock setup to mach codeMichal Simek
board_early_init_r() programmed the IOU switch clock and the system timestamp counter directly with readl()/writel() in board code. This is SoC register setup rather than board policy, and the same block is duplicated across the Xilinx SoCs. Move it into versal_timer_setup() in arch/arm/mach-versal so the board hook only keeps the EL3 guard and calls the helper. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/2234d746ab5b8240e88b1a629d51f93751ee3b60.1782219202.git.michal.simek@amd.com
3 daysarm64: versal: Move bootmode decoding out of board codeMichal Simek
versal_get_bootmode() lived in board code and open-coded the IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE) selection between the firmware call zynqmp_pm_get_bootmode_reg() and a direct readl(). To keep generic board code free of firmware specifics and SoC register details and ready for SCMI, move the whole function, including the alt-shift and mask decoding, behind an overridable hook. The weak versal_get_bootmode() in arch/arm/mach-versal does the plain MMIO read via versal_bootmode_reg() and decodes it (used at EL3 and without firmware). When CONFIG_ZYNQMP_FIRMWARE is enabled, firmware-zynqmp.c provides a strong definition that reads the register through the firmware call, falling back to the direct read at EL3 where the SMC path to firmware is unavailable. This preserves the existing firmware-based bootmode behaviour while removing the firmware interface from board code; the now unused zynqmp_firmware.h include is dropped. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/d60073feed8da8d3aff9eabee6ab132e0bbd0f8e.1782219202.git.michal.simek@amd.com
3 daysarm64: versal: Decouple multiboot register access from firmwareMichal Simek
versal_multi_boot() in board code selected between the firmware call zynqmp_pm_get_pmc_multi_boot_reg() and a direct readl() based on an IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE) check. Generic board code should not carry firmware-specific ifdefs, and this becomes harder to maintain once SCMI introduces yet another access method. Introduce an overridable accessor versal_pmc_multi_boot(). The weak default lives in arch/arm/mach-versal and performs the plain MMIO read (used at EL3 and when no firmware is present). When CONFIG_ZYNQMP_FIRMWARE is enabled, firmware-zynqmp.c provides a strong definition that issues the firmware call, falling back to the direct read at EL3 where the SMC path to firmware is unavailable. The shared MMIO read is factored into versal_multi_boot_reg() so the firmware override does not duplicate it. versal_multi_boot() keeps the generic JTAG/QEMU workaround and simply calls the accessor, so board code no longer references the firmware interface for the multiboot register. The firmware-vs-MMIO decision is selected at link time, and adding SCMI later only requires a third strong definition with no board-code changes. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/199ef6a1411c54f154fe4a43b5fef166b9927f7a.1782219202.git.michal.simek@amd.com
3 daysarm64: versal2: Move bootmode decoding out of board codeMichal Simek
versal2_get_bootmode() lived in board code and accessed the CRP boot mode register with a direct readl(). To keep generic board code free of SoC register details and ready for firmware/SCMI based access, move the whole function, including the alt-shift and mask decoding, into arch/arm/mach-versal2 as a __weak default. Board code now simply calls versal2_get_bootmode(). When a firmware based implementation is available and tested it can provide a strong definition that overrides the weak one at link time; until then only the weak MMIO version is built. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/f3274ec77218373bc0452f6795a3ad6016be0058.1782219202.git.michal.simek@amd.com
3 daysarm64: versal2: Decouple multiboot register access from firmwareMichal Simek
versal2_multi_boot() in board code selected between the firmware call zynqmp_pm_get_pmc_multi_boot_reg() and a direct readl() based on an IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE) check. Generic board code should not carry firmware-specific ifdefs, and this becomes harder to maintain once SCMI introduces yet another access method. Introduce an overridable accessor versal2_pmc_multi_boot(). The weak default lives in arch/arm/mach-versal2 and performs the plain MMIO read (used at EL3 and when no firmware is present). When CONFIG_ZYNQMP_FIRMWARE is enabled, firmware-zynqmp.c provides a strong definition that issues the firmware call, falling back to the direct read at EL3 where the SMC path to firmware is unavailable. The shared MMIO read is factored into versal2_multi_boot_reg() so the firmware override does not duplicate it. versal2_multi_boot() keeps the generic JTAG/QEMU workaround and simply calls the accessor, so board code no longer references the firmware interface and the now unused zynqmp_firmware.h include is dropped. The firmware-vs-MMIO decision is selected at link time, and adding SCMI later only requires a third strong definition with no board-code changes. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/0033a1fa8efb4ae0c3ac6a6f5c5c1b4e0f22f02c.1782219202.git.michal.simek@amd.com
3 daysarm: xilinx: Guard mach sys_proto.h against multiple inclusionMichal Simek
The Versal and Versal Gen 2 mach sys_proto.h headers lacked an include guard. mach-versal/sys_proto.h additionally defines enum tcm_mode, so including it twice in one translation unit fails to build with a redeclaration error. This is about to happen in firmware-zynqmp.c, which needs the SoC prototypes unconditionally for the upcoming weak/strong multiboot and bootmode accessors. Add the standard _ASM_ARCH_SYS_PROTO_H guard, as already used by mach-zynqmp, so the header can be included more than once. Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/1bf5b1d49abb271c2c5e7135837b740179b95553.1782219202.git.michal.simek@amd.com
3 dayssoc: xilinx: zynqmp: Add TCG variant detection for ZU3TCGPadmarao Begari
The XCZU3TCG device shares IDCODE 0x04718093 with XCZU3TEG but has the GPU disable eFuse bit set (Consumer Grade, no GPU). Previously, the TEG detection branch appended "teg" unconditionally, causing U-Boot to report the device as zu3teg and failing bitstream ID checks for xczu3tcg bitstreams. Check EFUSE_GPU_DIS_MASK in the TEG branch to distinguish the two sub-variants, mirroring the existing EG/CG detection logic: - GPU disabled -> TCG family -> "zu3tcg" - GPU enabled -> TEG family -> "zu3teg" Fixes: fa2f0c97af96 ("soc: zynqmp: Add the IDcode for TEG variant") Signed-off-by: Padmarao Begari <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://patch.msgid.link/[email protected]
3 daysdrivers: fpga: Use FPGA_INTEL_SDM_MAILBOX conditional instead of ↵Danish Ahmad Rosdi
Agilex/Stratix10 Replace the conditional compilation checks for CONFIG_ARCH_SOCFPGA_AGILEX and CONFIG_ARCH_SOCFPGA_STRATIX10 with CONFIG_FPGA_INTEL_SDM_MAILBOX. Signed-off-by: Danish Ahmad Rosdi <[email protected]> Signed-off-by: Chen Huei Lok <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
3 daysufs: amd-versal2: Fix missing .priv_auto in driver registrationPranav Tilak
Add missing .priv_auto field to the driver. Without it, struct ufs_versal2_priv is never properly allocated and dev_get_priv() returns NULL, leading to DDR corruption at low DDR addresses. Fixes: b5ac5f030720 ("ufs: ufs-amd-versal2: Add support for AMD UFS controller") Signed-off-by: Pranav Tilak <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
3 daysMAINTAINERS: Replace Zynq/ZynqMP with N:Marek Vasut
Use N: to match on all zynq/zynqmp files, drop the large list of entries which represent the same set of relevant files and miss a few in the process. Combine Zynq and ZynqMP entries into single entry to further cut down the duplication. Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
3 daysmkimage: allow zynqmpbif to use a register initialization fileErich E. Hoover
The ZynqMP Boot Image Format allows specifying the register initialization file with the "[init]" attribute. Since this feature is already supported by the "zynqmpimage" backend, this commit leverages that existing capability to add support for the "[init]" attribute in the zynqmpbif backend: https://docs.amd.com/r/en-US/ug1283-bootgen-user-guide/init This currently uses the same register initialization file format as zynqmpimage (ASCII text hex values with each line composed of a pair of register address and value), for example: === 0xff003248 0x12345678 === It is not, yet, compatible with the format used by bootgen: https://docs.amd.com/r/en-US/ug1283-bootgen-user-guide/Initialization-Pairs-and-INT-File-Attribute Use this feature, with other zynqmpbif options, like so: === image : { [init] reginit.int [bootloader] fsbl.elf [pmufw_image] pmufw.elf [destination_cpu=a53-0, exception_level=el-3] bl31.elf [destination_cpu=a53-0, exception_level=el-2, load=0x08000000, startup=0x08000000] u-boot.bin } === Signed-off-by: Erich E. Hoover <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected]