aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-02sandbox: scmi: test against a single scmi agentEtienne Carriere5-212/+124
As per DT bindings since Linux kernel v5.14, the device tree can define only 1 SCMI agent node that is named scmi [1]. As a consequence, change implementation of the SCMI driver test through sandbox architecture to reflect that. This change updates sandbox test DT and sandbox SCMI driver accordingly since all these are impacted. Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2022-03-02doc: binding: scmi: link to latest Linux kernel bindingEtienne Carriere1-234/+2
Changes SCMI bindings documentation to relate to Linux kernel source tree that recently changed the bindings description to YAML format. Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2022-03-02Merge branch '2022-03-02-armv8-fixes-and-cleanups' into nextTom Rini9-142/+85
To quote the author: I was looking into the arm64 boot code lately and stumbled upon some issues. Also Nishanth brought back memories of a lengthy debug session, which was caused due to U-Boot keeping SErrors masked. As the resulting patches are all somewhat related, I gathered this series here to address those problems. Patches 1 to 3 address exception handling issues, with the SError enablement being the most prominent fix here. Patch 4 cleans up asm/io.h. This was on the list before[1], but was somehow lost when it was intercepted by a shorter version of itself. Patches 5 and 6 clean up some unnecessarily complicated AArch64 assembly code.
2022-03-02armv8: Fix and simplify branch_if_master/branch_if_slaveAndre Przywara6-28/+15
The branch_if_master macro jumps to a label if the CPU is the "master" core, which we define as having all affinity levels set to 0. To check for this condition, we need to mask off some bits from the MPIDR register, then compare the remaining register value against zero. The implementation of this was slighly broken (it preserved the upper RES0 bits), overly complicated and hard to understand, especially since it lacked comments. The same was true for the very similar branch_if_slave macro. Use a much shorter assembly sequence for those checks, use the same masking for both macros (just negate the final branch), and put some comments on them, to make it clear what the code does. This allows to drop the second temporary register for branch_if_master, so we adjust all call sites as well. Also use the opportunity to remove a misleading comment: the macro works fine on SoCs with multiple clusters. Judging by the commit message, the original problem with the Juno SoC stems from the fact that the master CPU *can* be configured to be from cluster 1, so the assumption that the master CPU has all affinity values set to 0 does not hold there. But this is already mentioned above in a comment, so remove the extra comment. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-02armv8: Simplify switch_el macroAndre Przywara1-5/+3
The switch_el macro is a neat contraption to handle cases where we need different code depending on the current exception level, but its implementation was longer than needed. Simplify it by doing just one comparison, then using the different condition codes to branch to the desired target. PState.CurrentEL just holds two bits, and since we don't care about EL0, we can use >, =, < to select EL3, EL2 and EL1, respectively. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-02arm: Clean up asm/io.hAndre Przywara1-96/+2
asm/io.h is the header file containing the central MMIO accessor macros. Judging by the header and the comments, it was apparently once copied from the Linux kernel, but has deviated since then *heavily*. There is absolutely no point in staying close to the original Linux code anymore, so just remove the old cruft, by: - removing pointless Linux history - removing commented code - removing outdated comments - removing unused definitions (for mem_isa) This massively improves the readability of the file. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-02armv8: Force SP_ELx stack pointer usageAndre Przywara1-0/+1
In ARMv8 we have the choice between two stack pointers to use: SP_EL0 or SP_ELx, which is banked per exception level. This choice is stored in the SP field of PState, and can be read and set via the SPSel special register. When the CPU takes an exception, it automatically switches to the SP_ELx stack pointer. Trusted Firmware enters U-Boot typically with SPSel set to 1, so we use SP_ELx all along as our sole stack pointer, both for normal operation and for exceptions. But if we now for some reason enter U-Boot with SPSel cleared, we will setup and use SP_EL0, which is fine, but leaves SP_ELx uninitialised. When we now take an exception, we try to save the GPRs to some undefined location, which will usually end badly. To make sure we always have SP_ELx pointing to some memory, set SPSel to 1 in the early boot code, to ensure safe operation at all times. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-02armv8: Always unmask SErrorsAndre Przywara3-9/+4
The ARMv8 architecture describes the "SError interrupt" as the fourth kind of exception, next to synchronous exceptions, IRQs, and FIQs. Those SErrors signal exceptional conditions from which the system might not easily recover, and are normally generated by the interconnect as a response to some bus error. A typical situation is access to a non-existing memory address or device, but it might be deliberately triggered by a device as well. The SError interrupt replaces the Armv7 asynchronous abort. Trusted Firmware enters U-Boot (BL33) typically with SErrors masked, and we never enable them. However any SError condition still triggers the SError interrupt, and this condition stays pending, it just won't be handled. If now later on the Linux kernel unmasks the "A" bit in PState, it will immediately take the exception, leading to a kernel crash. This leaves many people scratching their head about the reason for this, and leads to long debug sessions, possibly looking at the wrong places (the kernel, but not U-Boot). To avoid the situation, just unmask SErrors early in the ARMv8 boot process, so that the U-Boot exception handlers reports them in a timely manner. As SErrors are typically asynchronous, the register dump does not need to point at the actual culprit, but it should happen very shortly after the condition. For those exceptions to be taken, we also need to route them to EL2, if U-Boot is running in this exception level. This removes the respective code snippet from the Freescale lowlevel routine, as this is now handled in generic ARMv8 code. Reported-by: Nishanth Menon <nm@ti.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-02cmd: exception: arm64: fix undefined, add faultsAndre Przywara1-4/+60
The arm64 version of the exception command was just defining the undefined exception, but actually copied the AArch32 instruction. Replace that with an encoding that is guaranteed to be and stay undefined. Also add instructions to trigger unaligned access faults and a breakpoint. This brings ARM64 on par with ARM(32) for the exception command. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-02Merge branch '2022-03-02-enable-pylint-in-CI' into nextTom Rini40-95/+154
To quote the author: This series adds a new errors-only pylint check and adds it to the CI systems. It also fixes the current errors in the U-Boot Python code, disabling errors where it seems necessary. A small patch to buildman allows it to build sandbox without any changes to the default config file
2022-03-02Azure/GitLab CI: Add the pylint checkerSimon Glass2-0/+38
Add a check that new Python code does not regress the pylint score for any module. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-02buildman: Update default config to build for sandboxSimon Glass1-0/+1
At present the default .buildman file written by buildman does not specify a default toolchain. Add an 'other' line so this works correctly and sandbox builds run as expected. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-02Makefile: Add a way to check for pylint errorsSimon Glass1-2/+8
Add a new 'pylint_err' target which only reports errors, not warnings. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-02test: Correct pylint errorsSimon Glass4-6/+15
Fix pylint errors in all test. This requires adding a get_spawn() method to the ConsoleBase base, so that its subclass is happy. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-02moveconfig: Correct pylint errorsSimon Glass1-4/+1
Fix two pylint errors in this file. Note ACTION_SPL_NOT_EXIST is not defined so the dead code can be removed. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-02binman: Correct pylint errorsSimon Glass13-32/+39
Fix pylint errors that can be fixed and mask those that seem to be incorrect. A complication with binman is that it tries to avoid importing libfdt (or anything that imports it) unless needed, so that things like help still work if it is missing. Note that two tests are duplicated in binman and two others have duplicate names, so both of these issues are fixed also. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-02dtoc: Correct pylint errorsSimon Glass2-6/+6
Fix pylint errors in this directory. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-02buildman: Correct pylint errorsSimon Glass5-12/+7
Fix pylint errors that can be fixed and mask those that seem to be incorrect. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-02patman: Correct pylint errorsSimon Glass11-33/+39
Fix pylint errors that can be fixed and mask those that seem to be incorrect. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-28Prepare v2022.04-rc3v2022.04-rc3Tom Rini1-1/+1
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-02-28Merge branch '2022-02-28-bugfixes'Tom Rini12-63/+429
- Assorted bugfixes
2022-02-28board: stemmy: Detect board variants and patch DTBWIP/2022-02-28-bugfixesLinus Walleij2-0/+317
This patch scans the cmdline from the Samsung SBL (second stage bootloader) and stores the parameters board_id=N and lcdtype=N in order to augment the DTB for different board and LCD types. We then add a custom ft_board_setup() callback that will inspect the DTB and patch it using the stored LCD type. At this point we know which product we are dealing with, so using the passed board_id we can also print the board variant for diagnostics. We patch the Codina, Skomer and Kyle DTBs to use the right LCD type as passed in lcdtype from the SBL. This also creates an infrastructure for handling any other Samsung U8500 board variants that may need a slightly augmented DTB. Cc: Markuss Broks <markuss.broks@gmail.com> Cc: Stephan Gerhold <stephan@gerhold.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2022-02-28arm: apple: Switch to fully dynamic mem layoutJanne Grunau3-6/+35
Support for Apple M1 Pro and Max will allow using a single binary for all M1 SoCs. The M1 Pro/Max have a different memory layout. The RAM start address is 0x100_0000_0000 instead of 0x8_0000_0000. Replace the hardcoded memory layout with dynamic initialized environment variables in board_late_init(). Tested on Mac Mini (2020) and Macbook Pro 14-inch (2021). Signed-off-by: Janne Grunau <j@jannau.net> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2022-02-28arm: pdu001: Setup pinmux for console UART as early as possibleFelix Brack1-0/+30
To make sure we get a working console as soon as possible in the SPL the UART pins require to be configured earlier. This is especially true for the pins of UART3, since the PDU001 board uses this UART for the console by default. Signed-off-by: Felix Brack <fb@ltec.ch>
2022-02-28arm: pdu001: Fix early debugging UARTFelix Brack2-5/+3
The changes from commit 0dba45864b2a ("arm: Init the debug UART") prevent the early debug UART from being initialized correctly. To fix this we not just configure the pin multiplexer but add setting up early clocks. Signed-off-by: Felix Brack <fb@ltec.ch> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-28tools: mkimage/dumpimage: Allow to use -l with -TPali Rohár5-52/+44
Currently -l option for mkimage and dumpimage ignores option -T and always tries to autodetect image type. With this change it is possible to tell mkimage and dumpimage to parse image file as specific type (and not random autodetected type). This allows to use mkimage -l or dumpimage -l as tool for validating image. params.type for -l option is now by default initialized to zero (IH_TYPE_INVALID) instead of IH_TYPE_KERNEL. imagetool_get_type() for IH_TYPE_INVALID returns NULL, which is assigned to tparams. mkimage and dumpimage code is extended to handle tparams with NULL for -l option. And imagetool_verify_print_header() is extended to do validation via tparams if is not NULL. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-26Merge tag 'efi-2022-04-rc3' of ↵WIP/26Feb2022Tom Rini13-85/+243
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-04-rc3 Documentation: * add man-page for fatload * add SMBIOS table page UEFI: * partial fix for UEFI secure boot with intermediate certs * disable watchdog when returning to command line * reset system after capsule update
2022-02-26Merge https://source.denx.de/u-boot/custodians/u-boot-shTom Rini2-4/+32
- rzg2_beacon updates
2022-02-26efi_loader: update the timing of enabling and disabling EFI watchdogMasahisa Kojima2-12/+18
UEFI specification requires that 5 minutes watchdog timer is armed before the firmware's boot manager invokes an EFI boot option. This watchdog timer is updated as follows, according to the UEFI specification. 1) The EFI Image may reset or disable the watchdog timer as needed. 2) If control is returned to the firmware's boot manager, the watchdog timer must be disabled. 3) On successful completion of EFI_BOOT_SERVICES.ExitBootServices() the watchdog timer is disabled. 1) is up to the EFI image, and 3) is already implemented in U-Boot. This patch implements 2), the watchdog is disabled when control is returned to U-Boot. In addition, current implementation arms the EFI watchdog at only the first "bootefi" invocation. The EFI watchdog must be armed in every EFI boot option invocation. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-02-26efi_loader: test/py: Reset system after capsule update on diskMasami Hiramatsu2-16/+39
Add a cold reset soon after processing capsule update on disk. This is required in UEFI specification 2.9 Section 8.5.5 "Delivery of Capsules via file on Mass Storage device" as; In all cases that a capsule is identified for processing the system is restarted after capsule processing is completed. This also reports the result of each capsule update so that the user can notice that the capsule update has been succeeded or not from console log. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-02-26test/py: Handle expected reboot while booting sandboxMasami Hiramatsu2-22/+33
Add expected_reset optional argument to ConsoleBase::ensure_spawned(), ConsoleBase::restart_uboot() and ConsoleSandbox::restart_uboot_with_flags() so that it can handle a reset while the 1st boot process after main boot logo before prompt correctly. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-02-26test/py: Handle expected reset by commandMasami Hiramatsu1-41/+58
Add wait_for_reboot optional argument to ConsoleBase::run_command() so that it can handle an expected reset by command execution. This is useful if a command will reset the sandbox while testing such commands, e.g. run_command("reset", wait_for_reboot = True) Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-02-26efi_loader: use efi_update_capsule_firmware() for capsule on diskMasami Hiramatsu1-1/+1
Since the efi_update_capsule() represents the UpdateCapsule() runtime service, it has to handle the capsule flags and update ESRT. However the capsule-on-disk doesn't need to care about such things. Thus, the capsule-on-disk should use the efi_capsule_update_firmware() directly instead of calling efi_update_capsule(). This means the roles of the efi_update_capsule() and capsule-on-disk are different. We have to keep the efi_update_capsule() for providing runtime service API at boot time. Suggested-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-02-26efi_loader: fix uefi secure boot with intermediate certsIlias Apalodimas1-6/+5
The general rule of accepting or rejecting an image is 1. Is the sha256 of the image in dbx 2. Is the image signed with a certificate that's found in db and not in dbx 3. The image carries a cert which is signed by a cert in db (and not in dbx) and the image can be verified against the former 4. Is the sha256 of the image in db For example SHIM is signed by "CN=Microsoft Windows UEFI Driver Publisher", which is issued by "CN=Microsoft Corporation UEFI CA 2011", which in it's turn is issued by "CN=Microsoft Corporation Third Party Marketplace Root". The latter is a self-signed CA certificate and with our current implementation allows shim to execute if we insert it in db. However it's the CA cert in the middle of the chain which usually ends up in the system's db. pkcs7_verify_one() might or might not return the root certificate for a given chain. But when verifying executables in UEFI, the trust anchor can be in the middle of the chain, as long as that certificate is present in db. Currently we only allow this check on self-signed certificates, so let's remove that check and allow all certs to try a match an entry in db. Open questions: - Does this break any aspect of variable authentication since efi_signature_verify() is used on those as well? Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-02-26tools: mkeficapsule: remove duplicated codeAKASHI Takahiro1-2/+0
That code is mistakenly duplicated due to copy-and-paste error. Just remove it. Fixes: CID 348360 Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-02-26doc: describe fatload commandHeinrich Schuchardt2-0/+81
Man-page for fatload command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-02-26doc: describe generation of SMBIOS tableHeinrich Schuchardt3-1/+24
SMBIOS is not x86 specific. So we should have an architecture independent page describing it. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-02-25arm: rmobile: rzg2_beacon: Enable proper Ethernet PHYAdam Ford1-1/+1
The wrong phy was being enabled, because it worked and the proper PHY did not. After the Renesas maintainer made some adjustments to the device tree, Linux was able to use the proper driver, and when that device tree was ported to Linux, the ethernet stopped working due to the lack of rgmii-rxid support. Now that rgmii-rxid is supported, enable the proper driver to restore ethernet function. Fixes: 1eaf61c84db6 ("arm: dts: beacon-rzg2: Resync device trees with Linux 5.16-rc3") Signed-off-by: Adam Ford <aford173@gmail.com>
2022-02-25net: ravb: Add tx/rx delay flag checks and support for rgmii-rxidAdam Ford1-3/+31
Some boards like the Beacon RZ/G2 SOM use either flags for tx-internal-delay-ps, rx-internal-delay-ps or rgmii-rxid. In Linux the APSR_RDM flag is set when either rx-internal-delay-ps is set or the mode is rgmii-rxid, and the APSR_TDM is set when tx-internal-delay-ps is found or rgmii-txid is set, and both are set if rgmii-id is set. The ravb driver in U-Boot driver was missing rgmii-rxid support, so add that support in a similar fashion to what is done in Linux. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-02-25Merge tag 'clk-2022.04-rc2' of ↵WIP/25Feb2022Tom Rini17-396/+391
https://source.denx.de/u-boot/custodians/u-boot-clk Clock patches for v2022.04-rc2 This has an assortment of cleanups and the occasional bugfix. Also present is the addition of the clock subsystem documentation to HTML docs. CI: https://source.denx.de/u-boot/custodians/u-boot-clk/-/pipelines/11075
2022-02-25scripts: Makefile.lib: generate dsdt_generated.c instead of dsdt.cPhilippe Reynes10-13/+14
There is a conflict between the static file lib/acpi/dsdt.c and the file dsdt.c generated dynamicaly by scripts/Makefile.lib. When a mrproper is done, the static file dsdt.c is removed. If a build with acpi enabled is launched after, the following error is raised: CC lib/acpi/acpi_table.o make[2]: *** No rule to make target 'lib/acpi/dsdt.asl', needed by 'lib/acpi/dsdt.c'. Stop. scripts/Makefile.build:394: recipe for target 'lib/acpi' failed To avoid such error, the generated file is named dsdt_generated.c instead of dstdt.c. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
2022-02-25cmd: clk: fix long help messagePatrick Delaunay1-1/+1
Fix the long help message for "clk setfreq" command Fixes: 7ab418fbe612 ("clk: add support for setting clk rate from cmdline") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20220131172131.4.Ic863c28ffdcc15b3f4616434c2efd88b4e45495c@changeid
2022-02-25cmd: clk: update result of do_clk_setfreqPatrick Delaunay1-1/+1
Update the result of do_clk_setfreq and always returns a CMD_RET_ value (-EINVAL was a possible result). This patch avoid the CLI output "exit not allowed from main input shell." Fixes: 7ab418fbe612 ("clk: add support for setting clk rate from cmdline") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20220131172131.3.Iec2029edb7fc0b29e13bcb86058ad2f614f62779@changeid
2022-02-25cmd: clk: replace clk_lookup by uclass_get_device_by_namePatrick Delaunay1-17/+1
The function clk_lookup can be replaced by a direct call to uclass_get_device_by_name for UCLASS_CLK. This patch removes duplicated codes by the generic DM API and avoids issue in clk_lookup because result of uclass_get_device wasn't tested; when ret < 0, dev = NULL and dev->name is invalid, the next function call strcmp(name, dev->name) causes a crash. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20220131172131.2.I7bc7762eff1e31ab7ff5b34c416ee03b8fe52200@changeid
2022-02-25cmd: clk: test the number of argument in setfreq commandPatrick Delaunay1-0/+3
Test the number of argument in setfreq command to avoid a crash when the command setfreq is called without argument: STM32MP> clk setfreq data abort pc : [<ddba3f18>] lr : [<ddba3f89>] reloc pc : [<c018ff18>] lr : [<c018ff89>] sp : dbaf45b8 ip : ddb1d859 fp : 00000002 r10: dbb3fd80 r9 : dbb11e90 r8 : ddbf38cc r7 : ddb39725 r6 : 00000000 r5 : 00000000 r4 : dbb3fd84 r3 : dbb3fd84 r2 : 0000000a r1 : dbaf45bc r0 : 00000011 Flags: nzCv IRQs off FIQs off Mode SVC_32 (T) Code: 4dd3 1062 85a3 ddbd (7803) 2b30 Resetting CPU ... Fixes: 7ab418fbe612 ("clk: add support for setting clk rate from cmdline") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20220131172131.1.I32a8f213d330dccd922f7aafc60d3d63fcbe8615@changeid
2022-02-25clk: ccf: correct the test on the parent uclass in clk_enable/clk_disablePatrick Delaunay1-2/+2
It is safe to check if the uclass id on the device is UCLASS_CLK before to call the clk_ functions, but today this comparison is not done on the device used in API: clkp->dev->parent but on the device himself: clkp->dev. This patch corrects this behavior and tests if the parent device is a clock device before to call the clock API, clk_enable or clk_disable, on this device. Fixes: 0520be0f67e3 ("clk: prograte clk enable/disable to parent") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-02-25clk: Add clk_get_by_name_optionalSean Anderson3-4/+29
This adds a helper function for clk_get_by_name in cases where the clock is optional. Hopefully this helps point driver writers in the right direction. Also convert some existing users. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20220115205247.566210-2-seanga2@gmail.com
2022-02-25clk: Add driver API to HTML docsSean Anderson2-78/+115
This converts the existing driver API docs (clk-uclass.h) to kernel doc format and adds them to the HTML documentation. Because the kernel doc sphinx converter does not handle functions in structs very well, the individual methods are documented separately. This is primarily inspired by the phylink documentation [1], which uses this trick extensively. [1] https://www.kernel.org/doc/html/latest/networking/kapi.html#c.phylink_mac_ops Signed-off-by: Sean Anderson <seanga2@gmail.com> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20211222171114.3091780-5-seanga2@gmail.com
2022-02-25clk: Add client API to HTML docsSean Anderson3-91/+99
This converts the existing client (aka clk.h) documentation to kernel doc format, and adds it to the HTML docs. I have tried to preserve existing comments as much as possible, refraining from semantic changes. Signed-off-by: Sean Anderson <seanga2@gmail.com> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20211222171114.3091780-4-seanga2@gmail.com [rebased onto u-boot/master and resolved conflicts] Signed-off-by: Sean Anderson <seanga2@gmail.com>
2022-02-24clk: Inline clk_get_*_optionalSean Anderson2-44/+34
The optional varients of clk_get_* functions are just simple wrappers. Reduce code size a bit by inlining them. On platforms where it is not used (most of them), it will not be compiled in any more. On platforms where they are used, the inlined branch should not cause any significant growth. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20211222171114.3091780-3-seanga2@gmail.com