aboutsummaryrefslogtreecommitdiff
path: root/include/asm-generic
AgeCommit message (Collapse)Author
2024-07-03global_data.h: drop write-only field dm_root_fRasmus Villemoes
The dm_root_f field seems to be entirely write-only and hence redundant, unless 'git grep' fails to find some access generated via preprocessor token concatenation or similar. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-03-29arm: fix __efi_runtime_start/end definitionsIlias Apalodimas
__efi_runtime_start/end are defined as c variables for arm7 only in order to force the compiler emit relative references. However, defining those within a section definition will do the same thing since [0]. On top of that the v8 linker scripts define it as a symbol. So let's remove the special sections from the linker scripts, the variable definitions from sections.c and define them as a symbols within the correct section. [0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object") Suggested-by: Sam Edwards <CFSworks@gmail.com> Reviewed-by: Sam Edwards <CFSworks@gmail.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Sam Edwards <CFSworks@gmail.com> # Binary output identical Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-03-29arm: fix __efi_runtime_rel_start/end definitionsIlias Apalodimas
__efi_runtime_rel_start/end are defined as c variables for arm7 only in order to force the compiler emit relative references. However, defining those within a section definition will do the same thing since [0]. On top of that the v8 linker scripts define it as a symbol. So let's remove the special sections from the linker scripts, the variable definitions from sections.c and define them as a symbols within the correct section. [0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object") Suggested-by: Sam Edwards <CFSworks@gmail.com> Reviewed-by: Sam Edwards <CFSworks@gmail.com> Tested-by: Sam Edwards <CFSworks@gmail.com> # Binary output identical Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-28efi_loader: set IMAGE_DLLCHARACTERISTICS_NX_COMPATHeinrich Schuchardt
The IMAGE_DLLCHARACTERISTICS_NX_COMPAT flag marks an EFI binary where the following conditions are met [1]: * Executable and writable sections are separated. * The application does not run self-modifying code. * The application uses the EFI_MEMORY_ATTRIBUTE_PROTOCOL when loading executable code. * The application does not assume that all memory ranges are usable. * The stack is not expected to be executable. The only EFI binaries U-Boot provides that do not fulfill these requirements are the EFI app and the EFI payload. Once we have implemented separation of writable and executable memory in U-Boot we can use the IMAGE_DLLCHARACTERISTICS_NX_COMPAT flag to decide if we will load an EFI binary. [1] New UEFI CA memory mitigation requirements for signing https://techcommunity.microsoft.com/t5/hardware-dev-center/new-uefi-ca-memory-mitigation-requirements-for-signing/ba-p/3608714 Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-01-07smbios: Correct gd_smbios_start()Simon Glass
This should access arch-specific properties. Fix it and update the existing usage. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-12-28cli: Enables using modern hush parser as command line parserFrancis Laniel
If one defines HUSH_MODERN_PARSER, it is then possible to use modern parser with: => cli get old => cli set modern => cli get modern Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
2023-12-28global_data.h: add GD_FLG_HUSH_OLD_PARSER flagFrancis Laniel
This flag is used to indicate we are using the hush parser. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
2023-11-28asm-generic: Import functions from LinuxIgor Prusov
Currently {read,write}s{b,w,lq}() functions are available only on some architectures, and there are no io{read,write}{8,16,32,64}_rep() functions in u-boot. This patch adds generic versions that may be used without arch-specific implementation. Since some of added functions were already added locally in some files, remove them to avoid redeclaration errors. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-10-06bloblist: Support initing from multiple placesSimon Glass
Typically the bloblist is set up after the devicetree is present. This makes sense because bloblist may use malloc() to allocate the space it needs. However sometimes the devicetree itself may be present in the bloblist. In that case it is at a known location in memory so we can init the bloblist very early, before devicetree. Add a flag to indicate whether the bloblist has been inited. Add a function to init it only if needed. Use that in the init sequence. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-06spl: Avoid an #ifdef when printing gd->malloc_ptrSimon Glass
Use an accessor in the header file to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-06spl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LENSimon Glass
Use the new SPL/TPL/VPL_SYS_MALLOC_F symbols to determine whether the malloc pool exists. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2023-09-22Record the position of the SMBIOS tablesSimon Glass
Remember where these end up so that we can pass this information on to the EFI layer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-09-22dm: core: Allow marking driver model as deadSimon Glass
On x86 devices we use CAR (Cache-As-RAM) to hold the malloc() region in SPL, since SDRAM is not set up yet. This means that driver model stores its tables in this region. When preparing to jump from SPL to U-Boot proper, we must disable CAR, so that the CPU can uses the caches normally. This means that driver model tables become inaccessible. From there until we jump to U-Boot proper, we must avoid using driver model. This is only a problem on boards which operate this way, for example chromebook_link64 Add a flag to indicate that driver model is dead and should not be used. It can be used in SPL to avoid hanging the machine. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-09-22x86: cpu: i386: cpu: only set pci_ram_top if CONFIG_IS_ENABLED(PCI)Troy Kisky
This avoids an error when ifdef CONFIG_PCI is changed to if CONFIG_IS_ENABLED(PCI) Signed-off-by: Troy Kisky <troykiskyboundary@gmail.com> [Rebased on top of u-boot/master] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2023-08-17arm: Use builtins for ffs/flsSean Anderson
Since ARMv5, the clz instruction allows for efficient implementation of ffs/fls with builtins. Until ARMv7 (with Thumb-2), this instruction is only available in ARM mode. LTO makes it difficult to force specific functions to be in ARM mode, as it is effectively a form of very aggressive inlining. To work around this, fls/ffs are implemented in assembly for ARMv5 and ARMv6 when compiling U-Boot in Thumb mode. Overall, this saves around 75 bytes per call. This code is synced with v5.15 of the Linux kernel. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-14gpio: Use separate bitfield array to indicate GPIO is claimedMarek Vasut
The current gpio-uclass design uses name field in struct gpio_dev_priv as an indicator that GPIO is claimed by consumer. This overloads the function of name field and does not work well for named pins not configured as GPIO pins. Introduce separate bitfield array as the claim indicator. This unbreaks dual-purpose AF and GPIO operation on STM32MP since commit 2c38f7c31806 ("pinctrl: pinctrl_stm32: Populate uc_priv->name[] with pinmux node's name") where any pin which has already been configured as AF could no longer be claimed as dual-purpose GPIO. This is important for pins like STM32 MMCI st,cmd-gpios . Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-09treewide: rework linker symbol declarations in sections headerShiji Yang
1. Convert all linker symbols to char[] type so that we can get the corresponding address by calling array name 'var' or its address '&var'. In this way, we can avoid some potential issues[1]. 2. Remove unused symbol '_TEXT_BASE'. It has been abandoned and has not been referenced by any source code. 3. Move '__data_end' to the arch x86's own sections header as it's only used by x86 arch. 4. Remove some duplicate declared linker symbols. Now we use the standard header file to declare them. [1] This patch fixes the boot failure on MIPS target. Error log: SPL: Image overlaps SPL Fixes: 1b8a1be1a1f1 ("spl: spl_legacy: Fix spl_end address") Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-07-17bdinfo: Show the malloc base with the bdinfo commandSimon Glass
It is useful to see the base of the malloc region. This is visible when debugging but not in normal usage. Add it to the global data so that it can be shown. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Nikhil M Jain <n-jain1@ti.com>
2023-06-12Merge tag v2023.07-rc4 into nextTom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-05-31asm-generic: simplify unaligned.hJens Wiklander
The get_unaligned()/put_unaligned() implementations are more complex than necessary. Move everything into one file and use a more compact implementation based on packed struct access and byte swapping macros. This patch is based on the Linux kernel commit 803f4e1eab7a ("asm-generic: simplify asm/unaligned.h") by Arnd Bergmann. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-31include: Remove unused header filesTom Rini
As part of various code clean-ups we have on occasion missed removing unused header files. None of these files are referenced anywhere else at this point. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-05-11x86: coreboot: Collect the address of the ACPI tablesSimon Glass
At present any ACPI tables created by prior-stage firmware are ignored. It is useful to be able to view these in U-Boot. Pick this up from the sysinfo tables and display it with the cbsysinfo command. This allows the 'acpi list' command to work when booting from coreboot. Adjust the global_data condition so that acpi_start is available even if table-generation is disabled. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2023-04-24include: Enable video related global data variable and splash at SPLNikhil M Jain
To include video related global data variables and splash functions at SPL and u-boot proper, use CONFIG_IS_ENABLED. Replace CONFIG_CMD_BMP with CONFIG_BMP to enable splash_display function at u-boot proper and SPL. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-30gpio: allow passing NULL to gpio_request_by_line_name() to search all gpio ↵Rasmus Villemoes
controllers The API is more convenient to use if one doesn't have to know upfront which gpio controller has a line with the name one is searching for, and arrange to look that device up somehow. Or implement this loop oneself. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-14dm: Add support for handling old u-boot,dm- tagsSimon Glass
Add a CONFIG option to deal with this automatically, printing a warning when U-Boot starts up. This can be useful if the device tree comes from another project. We will maintain this through the 2023.07 release, providing 6 months for people to notice. Signed-off-by: Simon Glass <sjg@chromium.org> Version 4: Acked-by: Michal Simek <michal.simek@amd.com>
2023-01-12gpio: Get rid of gpio_hog_probe_all()Marek Vasut
The gpio_hog_probe_all() functionality can be perfectly well replaced by DM_FLAG_PROBE_AFTER_BIND DM flag, which would trigger .probe() callback of each GPIO hog driver instance after .bind() and thus configure the hogged GPIO accordingly. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Samuel Holland <samuel@sholland.org>
2023-01-04efi_loader: defines for PE-COFF section flagsHeinrich Schuchardt
Provide constants for the section flags used by binaries. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-11-22watchdog: Drop GD_FLG_WDT_READY as it's not used any moreStefan Roese
Since commit c2fd0ca1a822 ("watchdog: Integrate watchdog triggering into the cyclic framework") GD_FLG_WDT_READY has become write-only. This patch now removes this flag completely. The vacant spot in gd_flags is filled with the newly introduced GD_FLG_CYCLIC_RUNNING flag. Suggested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Stefan Roese <sr@denx.de>
2022-11-16doc: fix documentation of enum gd_flagsHeinrich Schuchardt
Correct GD_FLG_CYCLIC_RUNNING documentation to match Sphinx style. Fixes: d7de5ef62935 ("cyclic: use a flag in gd->flags for recursion protection") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-11-02cyclic: get rid of cyclic_init()Rasmus Villemoes
Currently, we must call cyclic_init() at some point before cyclic_register() becomes possible. That turns out to be somewhat awkward, especially with SPL, and has resulted in a watchdog callback not being registered, thus causing the board to prematurely reset. We already rely on gd->cyclic reliably being set to NULL by the asm code that clears all of gd. Now that the cyclic list is a hlist, and thus an empty list is represented by a NULL head pointer, and struct cyclic_drv has no other members, we can just as well drop a level of indirection and put the hlist_head directly in struct global_data. This doesn't increase the size of struct global_data, gets rid of an early malloc(), and generates slightly smaller code. But primarily, this avoids having to call cyclic_init() early; the cyclic infrastructure is simply ready to register callbacks as soon as we enter C code. We can still end up with schedule() being called from asm very early, so we still need to check that gd itself has been properly initialized [*], but once it has, gd->cyclic_list is perfectly fine to access, and will just be an empty list. As for cyclic_uninit(), it was never really the opposite of cyclic_init() since it didn't free the struct cyclic_drv nor set gd->cyclic to NULL. Rename it to cyclic_unregister_all() and use that in test/, and also insert a call at the end of the board_init_f sequence so that gd->cyclic_list is a fresh empty list before we enter board_init_r(). A small piece of ugliness is that I had to add a cast in cyclic_get_list() to silence a "discards 'volatile' qualifier" warning, but that is completely equivalent to the existing handling of the uclass_root_s list_head member. [*] I'm not really sure where we guarantee that the register used for gd contains 0 until it gets explicitly initialized, but that must be the case, otherwise testing gd for being NULL would not make much sense. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de> Tested-by: Tim Harvey <tharvey@gateworks.com> # imx8mm-venice-*
2022-11-02cyclic: use a flag in gd->flags for recursion protectionRasmus Villemoes
As a preparation for future patches, use a flag in gd->flags rather than a separate member in (the singleton) struct cyclic_drv to keep track of whether we're already inside cyclic_run(). Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de> Tested-by: Tim Harvey <tharvey@gateworks.com> # imx8mm-venice-*
2022-10-30video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEOSimon Glass
Now that all the old code is gone, rename this option. Driver model migration is now complete. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop remaining references to CONFIG_LCDSimon Glass
These rely on the old LCD implementation which is to be removed. Drop it all. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-29test: Detect a change in the device treeSimon Glass
If the device tree changes during a test and we cannot restore it, mark it as such so that future tests which need the live tree are skipped. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-19Merge branch 'master' into nextTom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-15gpio: sandbox: Add GPIOD_IS_AF for gpio configured in alternate functionPatrice Chotard
This allows to test if a pin's label if displayed using gpio_get_status() when this pin is configured in alternate function. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-13cyclic: Add basic support for cyclic function execution infrastrutureStefan Roese
Add the basic infrastructure to periodically execute code, e.g. all 100ms. Examples for such functions might be LED blinking etc. The functions that are hooked into this cyclic list should be small timewise as otherwise the execution of the other code that relies on a high frequent polling (e.g. UART rx char ready check) might be delayed too much. This patch also adds the Kconfig option CONFIG_CYCLIC_MAX_CPU_TIME_US, which configures the max allowed time for such a cyclic function. If it's execution time exceeds this time, this cyclic function will get removed from the cyclic list. How is this cyclic functionality executed? The following patch integrates the main function responsible for calling all registered cyclic functions cyclic_run() into the common WATCHDOG_RESET macro. This guarantees that cyclic_run() is executed very often, which is necessary for the cyclic functions to get scheduled and executed at their configured periods. This cyclic infrastructure will be used by a board specific function on the NIC23 MIPS Octeon board, which needs to check periodically, if a PCIe FLR has occurred. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-31common/console.c: prevent pre-console buffer contents from being added to itselfRasmus Villemoes
I do not have any non-serial output devices, so a print_pre_console_buffer(PRE_CONSOLE_FLUSHPOINT2_EVERYTHING_BUT_SERIAL) does nothing for me. However, I was manually inspected the pre-console buffer using md.b, and I noticed that the early part of it was repeated. The reason is that the first call of print_pre_console_buffer(), from console_init_f(), ends up invoking puts() with the contents of the buffer at that point, and puts() at that point ends up in the else branch of if (gd->flags & GD_FLG_DEVINIT) { /* Send to the standard output */ fputs(stdout, s); } else { /* Send directly to the handler */ pre_console_puts(s); serial_puts(s); } so indeed the contents is added again. That can be somewhat confusing (both when reading the buffer manually, but also if it did actually come out on some device). So disable all use of the pre-console buffer while print_pre_console_buffer() is emitting it. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-06-06common/board_r.c: drop legacy and unused bi_enetaddrRasmus Villemoes
The bi_enetaddr field in struct bd_info is write-only; nothing ever reads back the value. Moreover, the value we write is more or less random, and certainly not something one can rely on: If the board has a writable environment and the mac address has been stored there, we fetch that value. But if the board doesn't, this code runs before initr_net() -> eth_initialize(), and thus before the code in eth-uclass which fetches MAC addresses from eeprom, fuses or whatnot and populates the (run-time) environment with those values. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-04-10Merge tag 'efi-2022-07-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-07-rc1 Documentation: * Describe how enable DM_SERIAL for a board UEFI * Preparatory patches for better integration of DM and UEFI * Use sysreset after capsule updates instead of do_reset * Allow to disable persisting non-volatile variables
2022-04-09dm: add tag supportAKASHI Takahiro
With dm-tag feature, any U-Boot subsystem is allowed to associate arbitrary number of data with a particular udevice. This can been see as expanding "struct udevice" without modifying the definition. As a first user, UEFI subsystem makes use of tags to associate an efi_disk object with a block device. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-08gpio: Add gpio_request_by_line_name()Andrew Jeffery
Add support for the upstream gpio-line-names property already described in the common GPIO binding document[1]. The ability to search for a line name allows boards to lift the implementation of common GPIO behaviours away from specific line indexes on a GPIO controller. [1] https://github.com/devicetree-org/dt-schema/blob/3c35bfee83c2e38e2ae7af5f83eb89ca94a521e8/dtschema/schemas/gpio/gpio.yaml#L17 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2022-03-28video: Drop references to CONFIG_VIDEO et alSimon Glass
Drop the Kconfigs which are not used and all references to them. In particular, this drops CONFIG_VIDEO to avoid confusion and allow us to eventually rename CONFIG_DM_VIDEO to CONFIG_VIDEO. Also drop the prototype for video_get_info_str() which is no-longer used. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Jason Liu <jason.hui.liu@nxp.com>
2022-03-10event: Add basic support for eventsSimon Glass
Add a way to create and dispatch events without needing to allocate memory. Also add a way to 'spy' on events, thus allowing 'hooks' to be created. Use a linker list for static events, which we can use to replace functions like arch_cpu_init_f(). Allow an EVENT_DEBUG option which makes it easier to see what is going on at runtime, but uses more code space. Dynamic events allow the creation of a spy at runtime. This is not always necessary, but can be enabled with EVENT_DYNAMIC if needed. A 'test' event is the only option for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-03powerpc: Remove unused MPC8540/60ADS codeTom Rini
Remove some code, primarily CPM2 related, that is now unused since the removal of MPC8540/60ADS. Fixes 3913191c8a6b ("powerpc: mpc8540ads: mpc8560ads: Drop support for MPC8540/60ADS") Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-25x86: Move the acpi table to generic global_dataSimon Glass
Allow this to be used on any arch. Also convert to using macros so that we can check the CONFIG option in C code. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-19doc: replace @return by Return:Heinrich Schuchardt
Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-12-23fdt: Record where the devicetree came fromSimon Glass
Keep track of where the devicetree came from, so we can report this later. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23fdt: Drop #ifdefs with MULTI_DTB_FITSimon Glass
Refactor the code to drop the #ifdefs for this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-05gpio: Factor out DT flag translationSamuel Holland
The generic GPIO flags binding is shared across many drivers, some of which need their own xlate function. Factor out the flag translation code from gpio_xlate_offs_flags so it does not need to be duplicated. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Simon Glass <sjg@chromium.org>