summaryrefslogtreecommitdiff
path: root/drivers/of
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/misc'Sascha Hauer2023-04-191-0/+16
|\
| * of: implement of_copy_propertyAhmad Fatoum2023-04-171-0/+16
| | | | | | | | | | | | | | | | | | For use in fixups, it can be useful to copy a property verbatim from the barebox DT to the kernel DT. Add a helper that does just that. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230414183545.2039170-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | clk: of: drop arguments from of_clk_init()Sascha Hauer2023-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | of_clk_init() should be used to register clock drivers declared with CLK_OF_DECLARE and nothing else, so there shouldn't be a need to call it with a non NULL "matches" argument. Also there is no point in calling this function with another device tree than the barebox live tree. Drop both arguments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Revert "of: support of_ensure_probed for top-level machine device"Sascha Hauer2023-03-222-8/+4
|/ | | | This reverts commit 2b46c9df976cb8f7ef1b383a1cad3cc134547256.
* Merge branch 'for-next/of-overlay' into nextSascha Hauer2023-03-161-7/+5
|\
| * driver: Add rescan hook to struct deviceSascha Hauer2023-03-101-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | When devices are enabled with a device tree overlay the newly enabled devices can be probed by doing a of_probe(). This works fine for the regular platform devices, but doesn't work for devices which are not probed by the core, but by the subsystem. Prominent examples are I2C or SPI devices. This patch adds a struct device::rescan hook that subsystems can implement to trigger rescanning the device nodes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/arm' into nextSascha Hauer2023-03-162-9/+20
|\ \
| * | of: support of_ensure_probed for top-level machine deviceAhmad Fatoum2023-03-102-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creation of a machine device for the top-level node has special casing in of_probe(). Export of_platform_device_create_root(), so it's possible to ensure probe of the machine device. This is required when doing of_devices_ensure_probed_by_dev_id with the machine compatible. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230210165353.3601175-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: base: factor out of_merge_nodes from of_copy_nodeAhmad Fatoum2023-03-101-5/+12
| |/ | | | | | | | | | | | | | | | | Later commit will need to merge two DTs from the root up. Refactor that part out of of_copy_node to make it usable on its own. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230210165353.3601175-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | of: partition: skip NVMEM partition setup partition parsing failsAhmad Fatoum2023-03-141-2/+3
|/ | | | | | | | | nvmem_partition_register should not be called with a NULL pointer argument, yet this is what happened when a partition with a nvmem-cells compatible conflicts with a partition parsed from an on-disk partition table. Fix this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
* of: Fix of_get_stdoutpath() when property does not contain a colonSascha Hauer2023-02-231-3/+2
| | | | | | | | | | | | | | | | | | | | | With 90f70dbe29 'buf' only gets initialized when the stdout-path property contains a colon. It changes p = strchrnul(value, ':'); buf = xstrndup(value, p - value); to p = strchrnul(value, ':'); if (*p) buf = xstrndup(value, p - value); With the latter we end up calling of_find_node_by_path_or_alias() with a NULL pointer, so no node can be found. Fix this by restoring the original behaviour. Fixes: 90f70dbe29 ("of: split part of of_get_stdoutpath into of_find_node_by_chosen") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: split part of of_get_stdoutpath into of_find_node_by_chosenAhmad Fatoum2023-02-211-15/+37
| | | | | | | | | Follow-up commit will also lookup the value of a chosen property by full path or alias, so factor this out into a helper function. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20230221070735.1130600-1-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: describe third arg of of_property_write_bool in kerneldocAhmad Fatoum2023-02-171-0/+1
| | | | | | | | | of_property_write_bool takes a third argument describing whether to unset (delete) the property or to set it. Describe it in the kerneldoc. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230216105722.2865178-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/struct-rename'Sascha Hauer2023-01-201-0/+15
|\
| * of: implement of_device_enable_by_aliasAhmad Fatoum2023-01-161-0/+15
| | | | | | | | | | | | | | | | | | | | For symmetry with of_device_disable, which already has direct, path and by alias variants, implement the missing of_device_enable_by alias as well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230116133500.1998550-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc-struct-rename'Sascha Hauer2023-01-201-0/+7
|\ \
| * | of: platform: call struct device::detect in of_device_create_on_demandAhmad Fatoum2023-01-201-0/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most devices featuring a detect callback use it to probe an underlying bus. However, of_device_create_on_demand so far created devices on the platform bus, ignoring that it might be e.g. an I2C device that's supposed to be crated by the parent controller. Fix this by calling the parent's detect callback if available. Busses that probe via device tree, but register their devices on a different bus will need to register a detect callback to benefit from this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230116133639.1999170-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2023-01-201-2/+4
|\ \ | |/ |/|
| * of: partition: moan if adding a partition failedUlrich Ölmann2023-01-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | Do not silently continue if e.g. the label of a partition defined in the devicetree collides with the name of a partition defined in a GPT on the device. While already at it, fix a double semicolon a few lines downward. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Link: https://lore.barebox.org/20230109061401.1817658-1-u.oelmann@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Rename struct driver_d to driverSascha Hauer2023-01-103-3/+3
| | | | | | | | | | | | | | | | | | | | | | The '_d' suffix was originally meant to distinguish barebox struct names from Linux struct names. struct driver doesn't exist in Linux, so we can rename it and remove the meaningless suffix. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Rename struct device_d to deviceSascha Hauer2023-01-106-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Rename device_d::device_node to device_d::of_nodeSascha Hauer2023-01-105-13/+14
|/ | | | | | | | | | | | | | | | | | | | Linux struct device has the member of_node for the device_node pointer. Rename this in barebox accordingly to minimize the necessary changes when porting Linux code. This was done with the semantic patch: @@ struct device_d E; @@ - E.device_node + E.of_node @@ struct device_d *E; @@ - E->device_node + E->of_node Plus some manual adjustments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: platform: port Linux of_dma_is_coherentAhmad Fatoum2022-12-072-0/+45
| | | | | | | | | | In order to correctly handle cache-coherent systems on ARM, we need to be able to determine whether a device instantiated from DT is DMA coherent. Port the Linux helper that does this check. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221205133227.3010785-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: have of_property_match_string accept pointer to const device_nodeAhmad Fatoum2022-12-071-1/+1
| | | | | | | | | | This function need not have mutable access to the device node, so make the parameter const to allow calling it from more places without sacrificing cost safety. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221205133227.3010785-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove unused struct partitionSascha Hauer2022-11-231-1/+0
| | | | | | | | struct partition from include/partition.h is entirely unused. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20221117120604.3840211-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: of_node_name_eq: correct alignmentMarco Felsch2022-10-201-1/+1
| | | | | | | | Just a cleanup nothing special. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221014163534.3812272-2-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: overlay: fix overly strict check for symbolsMichael Riesch2022-09-301-2/+2
| | | | | | | | | | | | | | The recent patch "of: overlay: improve error handling in of_overlay_apply_tree" introduced overly strict checks for symbols in the root device tree and the overlay. However, it is legal for both to have no symbols. Fix the checks in order to implement the status quo. Fixes: bc475fd88810 ("of: overlay: improve error handling in of_overlay_apply_tree") Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220926100610.1457821-1-michael.riesch@wolfvision.net Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2022-09-144-12/+104
|\
| * of: of_probe: create board's machine device at the earliestAhmad Fatoum2022-09-131-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently create devices for matching reserved memory entries and firmware before creating the machine device. In a deep probe system, the machine driver would be probed directly at registration and as such needs to be probed before other devices are created, so it can disable other devices if needed. Move the machine device registration to the top, so board drivers can disabled reserved memory entries and firmware if they need to. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220905070208.538012-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: implement of_prepend_propertyAhmad Fatoum2022-09-131-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | Like of_append_property for adding at the end of properties, implement of_prepend_property for placing data into the front. This is especially useful to fixup most-specific compatibles into existing nodes. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220912155436.1565755-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: overlay: avoid potential null pointer exceptionMichael Riesch2022-09-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | The function of_overlay_fix_path returns NULL in certain error cases but of_overlay_apply_symbols (which is the only caller) does not check the return value. For broken overlays this may result in a null pointer exception. Fix this by checking the return value and inform the user what exactly went wrong. Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> Link: https://lore.barebox.org/20220905100717.150557-3-michael.riesch@wolfvision.net Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: overlay: improve error handling in of_overlay_apply_treeMichael Riesch2022-09-131-5/+9
| | | | | | | | | | | | | | | | | | Propagate any error from of_overlay_apply_symbols and let the user know if the provided overlay is not applicable. Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> Link: https://lore.barebox.org/20220905100717.150557-2-michael.riesch@wolfvision.net Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: platform: optimize of_find_device_by_node when deep probingAhmad Fatoum2022-09-131-0/+3
| | | | | | | | | | | | | | | | | | | | With deep probe enabled, we are guaranteed that struct device_node::dev is populated whenever a device had been created for a node, so in that case, skip the iteration over the linked list of registered devices. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220905103546.1476277-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: implement of_rename_property()Ahmad Fatoum2022-09-121-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's often desirable to have the same barebox binary for multiple variants. DT-level differences between the variants are often handled by having extra device tree nodes that are disabled by default and patched as appropriate by board code. It can be useful to have a finer granularity for patching though, that covers only a select property, e.g.: usbotg1 { vbus-supply = <&reg_vbus_common>; vendor,specialvariant-vbus-supply = <&reg_vbus_specialvariant>; }; The new of_rename_property allows board code to easily activate the alternative vbus supply on the specialvariant: of_rename_property(np, "vendor,specialvariant-vbus-supply", "vbus-supply"); Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220905103639.1750714-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: platform: propagate of_devices_ensure_probed_by(name|property) errorsAhmad Fatoum2022-09-121-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The of_devices_ensure_probed_by functions are expected to return an error code after iterating over all matching devices should any device have failed its of_device_ensure_probed. Doing this unearths one common failure: a matching node has status = "disabled". These will have of_device_ensure_probed return -ENODEV, which makes sense for users wanting to ensure a specific device is probed, but doesn't when iterating over multiple nodes. We already have of_devices_ensure_probed_by_dev_id, which does an early of_device_is_available check, so do likewise for the other to ensure_probed_by_* functions. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220905115944.1911301-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * driver: featctrl: fixup kernel device treeAhmad Fatoum2022-09-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | barebox not proving feature gated devices is one aspect of the feature controller framework. The more important one is that Linux doesn't probe them as these tend to be units like VPUs and GPUs or extra CPU cores, which barebox usually has no use for anyway. Add a fixup that runs for every DT and evaluates barebox,feature-gates properties in the barebox device tree and fixes up the result into the kernel device tree using reproducible names to match nodes between the two. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220818051955.2088238-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: move of_get_node_by_reproducible_name() into common codeAhmad Fatoum2022-08-171-0/+13
| | | | | | | | | | | | | | | | | | | | | | The function already has a good generic name and can be useful for board code or for other drivers seeking to fix up the kernel device tree according to information within the barebox DT. Thus move it to a central location. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220815160708.2430433-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/clang-analyze'Sascha Hauer2022-09-143-7/+1
|\ \
| * | of: partition: drop unused variableAhmad Fatoum2022-09-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | The name variable is unused anywhere, so just drop it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220905095557.596891-25-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: overlay: drop unused variable of_overlay_apply_dir()Ahmad Fatoum2022-09-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This seems to be a copy-paste left-over from of_overlay_filter_filename, which has some actual use for both p and path. We don't though and just end up leaking the buffer, so drop these variables. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220905095557.596891-24-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: fdt: gracefully handle out-of-place propertiesAhmad Fatoum2022-09-121-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | node is initialized by FDT_BEGIN_NODE. In case where a FDT_PROP is encountered before the first FDT_BEGIN_NODE, we would end up dereferencing a NULL pointer. Handle such malformed device trees gracefully by returning with an -ESPIPE error instead. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220905095557.596891-23-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | of: reserved-mem: reserve regions prior to mmu_initcall()Ahmad Fatoum2022-08-181-11/+23
|/ | | | | | | | | | | | Now that we both have a way to mark SDRAM regions requested as reserved and an postmem_initcall() to do this add, change device tree memory reservation parsing code to use them instead of requesting them as normal memory at coredevice_initcall() level. This allows us to reuse this information for MMU setup in the follow-up commit. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220817114244.1810531-6-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: implement of_append_propertyAhmad Fatoum2022-08-111-0/+33
| | | | | | | | | | barebox TLVs can be fixed up into a device tree for OS consumption. In case of repeated TLVs, we will want barebox to append onto an existing property. Add a helper that facilitates this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220809100814.1455984-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* FIT: add first support for compressed imagesAhmad Fatoum2022-08-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FIT image contents are often compressed, but we got by so far, because a compressed initramfs is usually meant to be decompressed by the kernel (and so has compression = "none") and arm32 kernels had their own decompresser embedded. On ARM64, bootloader is responsible for uncompressing kernel, so we should properly process the compression property we so far ignored. The decompression isn't as efficient as one would hope for, because the FIT format only describes length of the compressed data. We thus have two options: - define an output size up-front, e.g. by guessing the uncompressed buffer size for decompression or hardcoding it (e.g. U-Boot's CONFIG_SYS_BOOTM_LEN). - Uncompress to a file descriptor We choose the second one to play it safe, but it comes with worse performance because of extra memory copies. Intention is to go with first option for the kernel image: We know how much size we can spare for the kernel image and can have bootm_load_os uncompress there directly without intermittent memory copies. This would involve slight change to the barebox decompresser API to align it with the kernel's, which allows to have it accept and observe an output buffer size. So far, we had the kernel PREBOOT API, which lacks such a parameter, but that's an optimization for another day. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220809091946.3906847-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gpiolib: Add of_xlate supportJules Maselbas2022-08-081-2/+3
| | | | | | | | | | | | | | | | | | The of_xlate callback is used to tanslate a device-tree GPIO specifier into a chip relative GPIO number and flags. This callback needs to be implemented by GPIO controller driver which doesn't uses the "classic" device-tree description, which is: gpio = <&gpio-phandle gpio_num gpio_flags>; But uses something else, like this (but not limited to): gpio = <&gpio-phandle gpio_bank gpio_num gpio_flags>; Currently no GPIO driver require this of_xlate callback, but this will be used for sunxi's GPIO support. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Link: https://lore.barebox.org/20220805135928.32725-1-jmaselbas@kalray.eu Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: of_dump: support limiting size of printed propertiesAhmad Fatoum2022-08-081-17/+20
| | | | | | | | | | FIT images can have properties with very long values. Make it possible to use of_dump to inspect them by adding a -P option that restricts how much of the value is printed. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220808065639.453483-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: base: factor out duplication for property formattingAhmad Fatoum2022-08-081-14/+19
| | | | | | | | | | | | We have the same chunk of code with minuscule difference in both __of_print_nodes and __of_print_property. Factor it out to simplify the follow-up commit. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220808065639.453483-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Use appropriate header for of_clk_init()Alexander Shiyan2022-06-291-1/+1
| | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220627102500.18427-4-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: request reserved memory regions so other code can'tAhmad Fatoum2022-06-152-0/+72
| | | | | | | | | | | Add a new of_reserved_mem_walk that can be used to request reserved memory regions. This avoids e.g. bootm trying to place the kernel into a reserved region. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220609111810.2454588-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: remove unused and misleading #cells in /memreserveAhmad Fatoum2022-06-101-11/+0
| | | | | | | | | | | | | | | | | | barebox creates a /memreserve node to hold FDT reservation entries inside its reg property for unflattened device trees that are copied back into the FDT reservation table on flattening. These reservation entries are pairs of big-endian 64-bit start+size pairs. To properly describe these in DT, we would need the (#address|#size)-cells properties at the root node, not in the same node having the reg property. As we don't read back these properties anyway, just drop them. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220609111810.2454588-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>