summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2024-07-05sysreset: add Qualcomm PSHOLD reset driverRobert Marko
Number of Qualcomm ARMv7 SoC-s did not use PSCI but rather used PSHOLD (Qualcomm Power Supply Hold Reset) bit to trigger reset or poweroff. Qualcomm IPQ40XX is one of them, so provide a simple sysreset driver based on the upstream Linux one, it is DT compatible as well. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-07-05ehci: msm: bring up iface + core clocksSam Day
This seems to be necessary on my samsung-a5. Without this patch, the first access of EHCI registers causes a bus stall and subsequent reset. I am unsure why this wasn't already necessary for db410c, perhaps those clocks are already enabled on boot. Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by: Sam Day <me@samcday.com> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-07-05clk/qcom: apq8016: add support for USB_HS clocksSam Day
The newer "register map for simple gate clocks" support added for qcom clocks is used. As a result gcc_apq8016 now has a mixture of the old and new styles. I didn't (and still don't!) feel comfortable enough in this area to update the existing code. Signed-off-by: Sam Day <me@samcday.com> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-07-04Merge patch series "xtensa: Enable qemu-xtensa board"Tom Rini
Jiaxun Yang <jiaxun.yang@flygoat.com> says: Hi all, This series enabled qemu-xtensa board. For dc232b CPU it needs to be built with toolchain[1]. This is a side product of me investigating architectures physical address != virtual address in U-Boot. Now we can get it covered under CI and regular tests. VirtIO devices are not working as expected, due to U-Boot's assumption on VA == PA everywhere, I'm going to get this fixed later. My Xtensa knowledge is pretty limited, Xtensa people please feel free to point out if I got anything wrong. Thanks [1]: https://github.com/foss-xtensa/toolchain/releases/download/2020.07/x86_64-2020.07-xtensa-dc232b-elf.tar.gz
2024-07-04drivers: cpu: Add xtensa CPU driverJiaxun Yang
Implement various CPU related functions. I'm actually just using it to get cpu clock frequency. Tested-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
2024-07-04drivers: serial: Add xtensa semihosting driverJiaxun Yang
Add xtensa semihosting driver. It can't use regular semihosting driver as Xtensa's has it's own semihosting ABI. Tested-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
2024-07-04dm: core: Enhance comments on bind_drivers_pass()Simon Glass
This part of driver model is a little subtle, so add some more comments to promote better understanding. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-03Merge patch series "m68k: Implement a default flush_dcache_all"Tom Rini
Tom Rini <trini@konsulko.com> says: Prior to this series we had some de-facto required cache functions that were either unimplemented on some architectures or differently named. This would lead in some cases to having multiple "weak" functions available as well. Rework things so that an architecture must provide these functions and it is up to that architecture if a "weak" default function makes sense, or not.
2024-07-03m68k: Rename icache_invalid to invalidate_icache_allTom Rini
The implementation of icache_invalid appears to be doing what other architectures call invalidate_icache_all so rename to match. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-07-03dm: core: fix typo in SPL_DM_WARN prompt textQuentin Schulz
It should read "in SPL" and not "wuth SPL". Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-03dm: core: migrate debug() messages to use dm_warnQuentin Schulz
Prior to that, seeing the debug() messages required to enable DM_DEBUG which defines DEBUG (and then _DEBUG) which in turn makes failing assert() calls reset U-Boot which isn't necessarily what is desired. Instead, let's migrate to dm_warn which is using log_debug when unset or log_warn when set. While at it, reword the DM_DEBUG symbol in Kconfig to explain what it now actually does. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-03dm: core: fix signedness in debug messagesQuentin Schulz
outp always point to an unsigned type in ofnode_read_u* functions but the format specifier is currently always using signed type. This is an issue since the signed type can only contain half of the unsigned type values above 0. However, this now breaks another usecase. Indeed, ofnode_read_s32_default is actually passing an s32 but it'll be printed as a u32 instead. But since the function is called u32, it makes more sense to have it print an unsigned value. This was discovered because arm,smc-id = <0x82000010>; on RK3588S is above the max signed value and therefore would return a negative signed decimal value instead of its proper unsigned one. Fixes: fa12dfa08a7b ("dm: core: support reading a single indexed u64 value") Fixes: 4bb7075c830c ("dm: core: support reading a single indexed u32 value") Fixes: 7e5196c409f1 ("dm: core: Add ofnode function to read a 64-bit int") Fixes: 9e51204527dc ("dm: core: Add operations on device tree references") Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-03dm: core: fix misleading debug message when matching compatibleQuentin Schulz
A driver can have multiple compatible. When the id->compatible matches for that driver, the first compatible supported by the driver is currently returned, which gives the following confusing message: - found match at 'rk3588_syscon': 'rockchip,rk3588-sys-grf' matches 'rockchip,rk3588-pmugrf' Considering that the compatible passed in argument is necessarily the one that exactly matched to enter this code path, there's no need to do some elaborate logic, just print the driver name and the compatible passed in argument. Fixes: d3e773613b6d ("dm: core: Use U-Boot logging instead of pr_debug()") Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-01Merge branch 'next'Tom Rini
2024-06-28power: regulator: Handle autoset in regulators_enable_boot_on()Simon Glass
With a recent change, regulators_enable_boot_on() returns an error if a regulator is already set. Check for and handle this situation. Fixes: d99fb64a98a power: regulator: Only run autoset once for each regulator Reviewed-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
2024-06-26meson: Correct driver declaration for meson_axg_gpioSimon Glass
This should use the driver macros so that the driver appears in the linker list. Fix this. Fixes: 8587839f19d ("pinctrl: meson: add axg support") Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20240623203033.1566505-8-sjg@chromium.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-06-25usb: dwc3: meson-g12a: drop usb.h and make dwc3_meson_g12a_force_mode staticNeil Armstrong
Drop this useless usb.h and now make dwc3_meson_g12a_force_mode static since only used in the dwc3-meson-g12a.c file. Reviewed-by: Marek Vasut <marex@denx.de> Link: https://lore.kernel.org/r/20240620-u-boot-usb-gxl-phy-set-mode-v2-5-b81c027bc02c@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-06-25usb: dwc3: meson-gxl: drop usb-gx.h and make dwc3_meson_gxl_force_mode staticNeil Armstrong
Drop this useless usb-gx.h and now make dwc3_meson_gxl_force_mode static since only used in the dwc3-meson-gxl.c file. Reviewed-by: Marek Vasut <marex@denx.de> Link: https://lore.kernel.org/r/20240620-u-boot-usb-gxl-phy-set-mode-v2-4-b81c027bc02c@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-06-25phy: meson-gxl-usb2: remove phy_meson_gxl_usb2_set_modeNeil Armstrong
Remove the public phy_meson_gxl_usb2_set_mode and move the implementation in the the set_mode callback. Reviewed-by: Marek Vasut <marex@denx.de> Link: https://lore.kernel.org/r/20240620-u-boot-usb-gxl-phy-set-mode-v2-3-b81c027bc02c@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-06-25usb: dwc3: meson-gxl: switch to generic_phy_set_modeNeil Armstrong
Use the PHY set_mode call instead of calling directly in the PHY shared function. Reviewed-by: Marek Vasut <marex@denx.de> Link: https://lore.kernel.org/r/20240620-u-boot-usb-gxl-phy-set-mode-v2-2-b81c027bc02c@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-06-25phy: meson-gxl-usb2: add set_mode callbackNeil Armstrong
Implement set_mode callback by calling the current public function, use a temporary function name that will be removed when the public phy_meson_gxl_usb2_set_mode is finally removed in a following change. Reviewed-by: Marek Vasut <marex@denx.de> Link: https://lore.kernel.org/r/20240620-u-boot-usb-gxl-phy-set-mode-v2-1-b81c027bc02c@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-06-24Merge tag 'v2024.07-rc5' into nextTom Rini
Prepare v2024.07-rc5
2024-06-19Merge patch series "Add basic U-Boot Support for J722S-EVM"Tom Rini
Jayesh Choudhary <j-choudhary@ti.com> says: Hello there, This series add the U-Boot support for our new platform of K3-SOC family - J722S-EVM which is a superset of AM62P. It shares the same memory map and thus the nodes are being reused from AM62P includes instead of duplicating the definitions. Some highlights of J722S SoC (in addition to AM62P SoC features) are: - Two Cortex-R5F for Functional Safety or general-purpose usage and two C7x floating point vector DSP with Matrix Multiply Accelerator for deep learning. - Vision Processing Accelerator (VPAC) with image signal processor and Depth and Motion Processing Accelerator (DMPAC). - 7xUARTs, 3xSPI, 5xI2C, 2xUSB2, 2xCAN-FD, 3xMMC and SD, GPMC for NAND/FPGA connection, OSPI memory controller, 5xMcASP for audio, 4xCSI-RX for Camera, 1 PCIe Gen3 controller, USB3.0 eCAP/eQEP, ePWM, among other peripherals. TRM: <https://www.ti.com/lit/zip/sprujb3> Schematics: <https://www.ti.com/lit/zip/sprr495> Boot test log: <https://gist.github.com/Jayesh2000/0313e58fde377f877a9a8f1acc2579ef>
2024-06-19firmware: ti_sci_static_data: Add static DMA channelJayesh Choudhary
Include the static DMA channel data for using DMA at SPL stage for J722S SoC family. Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2024-06-19ram: k3-ddrss: Enable the am62ax's DDR controller for J722SJayesh Choudhary
The J722S family of SoCs uses the same DDR controller as found on the AM62A family. Enable this option when building for the J722S family. Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-06-19arm: mach-k3: j722s: introduce clock and device files for wkup splJayesh Choudhary
Include the clock and lpsc tree files needed for the wkup spl to initialize the proper PLLs and power domains to boot the SoC. Reviewed-by: Bryan Brattlof <bb@ti.com> Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2024-06-19power: domain: ti: Fix the order for platform data entriesJayesh Choudhary
Add the power domain platform data entries in alphabetical order. Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-06-19clk: ti: clk-k3: use IS_ENABLED macro and fix the clock-data orderJayesh Choudhary
Use IS_ENABLED macro for the platform clock-data list and add them in alphabetical order. Reviewed-by: Bryan Brattlof <bb@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2024-06-19soc: add info to identify the J722S SoC familyJayesh Choudhary
Include the part number for TI's j722s family of SoC to identify it during boot. Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2024-06-19soc: ti: k3-socinfo: Fix SOC JTAG entry orderJayesh Choudhary
Add JTAG_ID_PARTNO_* in alphabetical order. Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-06-19usb: dwc3: add newlines to dev_vdbg calls in ep0Caleb Connolly
For some reason none of these debug prints have newlines, resulting in a "fun" surprise when attempting to debug this driver. The other parts of the dwc3 driver have newlines, add them here too (and fix some minor nearby indent issues to make checkpatch happy). Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Marek Vasut <marex@denx.de>
2024-06-19usb: informative message if no controllerHeinrich Schuchardt
The message 'No working controllers found' provides no clue that this refers to USB controllers. Provide a message that refers to USB. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Dragan Simic <dsimic@manjaro.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-06-18net: dwc_eth_qos: add support for phy-reset-gpios propertyHeesub Shin
This commit adds support for a property 'phy-reset-gpios' to reset PHY chipset. Signed-off-by: Heesub Shin <heesub@gmail.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2024-06-17Merge tag 'xilinx-for-v2024.10-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next AMD/Xilinx changes for v2024.10-rc1 common: - spl: Introduce SoC specific init function xilinx: - Enable FF-A and NVMEM - Rename spl_board_init() to spl_soc_init() zynqmp: - DT alignments - Enable reset from SPL - Enable USB3 for KD240 - Align multiboot register on Kria for proper reboot - Allow multiboot environment write even in saved environment - Move zynqmp commands from board/ to arch/ - Clean up xilinx_zynqmp.h versal: - Do not prioritize boot device if driver is not enabled versal-net: - Setup location for redundant variables in SPI versal2: - Add support for new SOC mmc: - Fix tap delay for SD on Versal NET spi: - Add SPI_NOR_OCTAL_READ flag for mx66uw2g345gx0 flash part gpio: - Cover MODEPIN firmware dependency
2024-06-17Merge tag 'u-boot-nand-20240617' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-nand-flash Pull request for u-boot-nand-20240617 The first patch is by Arseniy Krasnov and adds support for OTP area access on MX30LFxG18AC chip series. The second patch is by John Watts and adds MTD dependency in Kconfig for UBI. The last patch is by Ravi Minnikanti and fixes bitflip return value on page read.
2024-06-17gpio: Add proper dependency on ZYNQMP_FIRMWAREMichal Simek
ZYNQMP_FIRMWARE can be disabled and driver depends on it that's why record this dependency via Kconfig. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/c3ca38fbb2f4e6948a5ef95b369015de96259709.1717685091.git.michal.simek@amd.com
2024-06-17spi: versal2: Enable spi drivers for Versal Gen 2Michal Simek
Enable and update OSPI/QSPI/GQSPI drivers to support Versal Gen 2 SoCs. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/691782470f56f7d49a3204f6757296f2752d4156.1716994063.git.michal.simek@amd.com
2024-06-17mmc: versal2: Update zynq_sdhci driver to support AMD Versal Gen 2Michal Simek
Enable tap delay programming for new SoC and also enable it via defconfig. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/f07daded9704cbc393657b65a28933c34a8cec25.1716994063.git.michal.simek@amd.com
2024-06-17soc: versal2: Add SoC driver for AMD Versal Gen 2Michal Simek
Communication is happening via firmware interface (SMC) or via direct register reading if firmware driver is not available. Also enable it via defconfig. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/22cf9c765e47ab03dbf2b8363e6626e809113432.1716994063.git.michal.simek@amd.com
2024-06-17arm64: versal2: Add support for AMD Versal Gen 2Michal Simek
Add support for AMD Versal Gen 2. SoC is based on Cortex-a78ae 4 cluster/2 cpu core each. A lot of IPs are shared with previous families. There are couple of new IP blocks where the most interesting from user point of view is UFS. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/bc2b70831ce1031bd0fac32357bff84936e1310f.1716994063.git.michal.simek@amd.com
2024-06-17mtd: spi-nor: Add SPI_NOR_OCTAL_READ flag for mx66uw2g345gx0 flash partPrasad Kummari
Added SPI_NOR_OCTAL_READ flag for Macronix mx66uw2g345gx0 2Gb(256MB) NOR Flash memory. Initial testing was conducted on the Versal NET board using SDR mode, which included basic erase, write, and read-back operations. Signed-off-by: Prasad Kummari <prasad.kummari@amd.com> Link: https://lore.kernel.org/r/20240508052749.214286-1-prasad.kummari@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-06-17sdhci: zynq: Fix tap delay for SD on Versal NETSimek, Michal
I can't see any way how tap delays are setup on Versal NET platform because xlnx,versal-8.9a compatible string is also used there but driver is not letting to setup tap delays. Not sure if versal_iclk_phases[] is also valid for Versal NET but the patch is made to investigate it. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/e535cfc1a59b5146a5c9a3ab389dc770de80440c.1713427490.git.michal.simek@amd.com
2024-06-17mtd: nand: pxa3xx: Incorrect bitflip return on page readRavi Minnikanti
Once a page is read with higher bitflips all subsequent reads are returning the same bitflip value even though they have none. max_bitflip variable is not being reset to 0 across page reads. This is causing problems like incorrectly marking erase blocks bad by UBI and causing read failures. Verified the change with both MTD reads and UBI. This change is inline with other NFC drivers. Sample error log where a block is marked bad incorrectly: ubi0: fixable bit-flip detected at PEB 125 ubi0: run torture test for PEB 125 ubi0: fixable bit-flip detected at PEB 125 ubi0 error: torture_peb: read problems on freshly erased PEB 125, must be bad ubi0 error: erase_worker: failed to erase PEB 125, error -5 ubi0: mark PEB 125 as bad Link: https://lore.kernel.org/all/ea0422cd-a8e6-3c36-f551-a0142893301b@marvell.com Signed-off-by: rminnikanti <rminnikanti@marvell.com> Reviewed-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: rminnikanti <rminnikanti@marvell.com> Acked-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-06-17ubi: Depend on MTDJohn Watts
UBI required MTD to build correctly, add it as a Kconfig dependency. Link: https://lore.kernel.org/all/20240411-mtd-v1-1-fe300f6ab657@jookia.org Signed-off-by: John Watts <contact@jookia.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutins.com> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-06-17mtd: rawnand: macronix: OTP access for MX30LFxG18ACArseniy Krasnov
Support for OTP area access on MX30LFxG18AC chip series. Link: https://lore.kernel.org/all/20231130112405.92196-1-avkrasnov@salutedevices.com Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-06-16Merge branch 'next' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-watchdog into next - misc cyclic infrastructure improvements (Rasmus) - watchdog_reset cleanup (Rasmus) CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=369&view=results
2024-06-16Merge tag 'u-boot-rockchip-next-20240615' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip into next CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/21113 - New board: Theobroma Systems SOM-RK3588-Q7 Tiger, ArmSoM Sige7 Rk3588; - PX30 dts migrate to OF_UPSTREAM; - Some other update on board or config;
2024-06-16serial: ns16550: fix comment to mention schedule instead of watchdog_resetRasmus Villemoes
watchdog_reset() is no more. Make the comments match the code and today's reality. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Stefan Roese <sr@denx.de>
2024-06-16wdt-uclass: watchdog_reset cleanupRasmus Villemoes
watchdog_reset() is no longer called from anywhere, so we do not need to define a dummy no-op function. Remove that definition, and update references to say schedule() instead. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Stefan Roese <sr@denx.de>
2024-06-16cyclic: make clients embed a struct cyclic_info in their own data structureRasmus Villemoes
There are of course not a whole lot of examples in-tree yet, but before they appear, let's make this API change: Instead of separately allocating a 'struct cyclic_info', make the users embed such an instance in their own structure, and make the convention that the callback simply receives the 'struct cyclic_info *', from which the clients can get their own data using the container_of() macro. This has a number of advantages. First, it means cyclic_register() simply cannot fail, simplifying the code. The necessary storage will simply be allocated automatically when the client's own structure is allocated (often via uclass_priv_auto or similar). Second, code for which CONFIG_CYCLIC is just an option can more easily be written without #ifdefs, if we just provide an empty struct cyclic_info {}. For example, the nested CONFIG_IS_ENABLED()s in https://lore.kernel.org/u-boot/20240316201416.211480-1-marek.vasut+renesas@mailbox.org/ are mostly due to the existence of the 'struct cyclic_info *' member being guarded by #ifdef CONFIG_CYCLIC. And we do probably want to avoid the extra memory overhead of that member when !CONFIG_CYCLIC. But that is automatic if, instead of a 'struct cyclic_info *', one simply embeds a 'struct cyclic_info', which will have size 0 when !CONFIG_CYCLIC. Also, the no-op cyclic_register() function can just unconditionally be called, and the compiler will see that (1) the callback is referenced, so not emit a warning for a maybe-unused function and (2) see that it can actually never be reached, so not emit any code for it. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>