summaryrefslogtreecommitdiffstats
path: root/drivers/of/fdt.c
Commit message (Collapse)AuthorAgeFilesLines
* of: unflatten: access property properlySascha Hauer2018-10-301-1/+1
| | | | | | | | Properties have to be accessed with of_property_get_value() rather than accessing them directly from the devicenode. The accessor does the right thing when of_new_property_const() is used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Make locally used function staticSascha Hauer2018-03-051-1/+1
| | | | | | | __of_unflatten_dtb is only locally used and has no prototype in include/. Make it static. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: fdt: add of_unflatten_dtb_constSascha Hauer2018-01-311-2/+34
| | | | | | | | This adds a variant of of_unflatten_dtb() which uses the property data directly from the input tree rather than copying it. This is mainly useful for a single user: FIT images. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: fix typosAntony Pavlov2016-10-181-1/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: preserve /memreserve/ entriesSascha Hauer2016-04-251-6/+100
| | | | | | | | | | | | | | Some dts files for the Kernel specify a reserved memory area using the /memreserve/ dtc directive. These entries get lost during unflattening/flattening the device tree and are never passed to the Kernel. This patch fixes this behaviour. This is done by copying the entries into a /memreserve node in the unflattened tree and moving them back during flattening the tree. The entries added by barebox dynamically are appended to the static entries from the original dtb. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fdt: of_unflatten_dtb(): remove left over "root" argument from inline docMarc Kleine-Budde2015-05-151-1/+0
| | | | | | | | | | | | | In commit d384b5639fc1 of: Drop devicetree merge support the signature of of_unflatten_dtb() was changed, but the inline documentation was forgotten to adjust. This patch removes the left over "root" argument from the doc. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-081-1/+1
| | | | | | | | | | | | | | This file originates in Linux. Linux has it under include/linux/ directory since commit dccd2304cc90. Let's move it to the same place as well in barebox. This commit was generated by the following commands: find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:' git mv include/sizes.h include/linux/ Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fdt: don't strip const qualifierLucas Stach2014-12-111-1/+1
| | | | | | | | Fixes: warning: assignment discards 'const' qualifier from pointer target type Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fdt: of_unflatten_dtb can work on const dataJan Luebbe2014-12-041-2/+2
| | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dt: factor out common codeJan Luebbe2014-11-201-22/+11
| | | | | | | | Currently, dt_struct is always checked with the same code after dt_struct_advance(). Move the check after the switch statement. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: fdt: fix typo in headerRaphaël Poggi2014-09-251-1/+1
| | | | | Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Drop devicetree merge supportSascha Hauer2014-05-221-32/+12
| | | | | | | | | | | | I assume I am the only person knowing that barebox is able to merge devicetrees. This feature seems broken for a while now since trying to merge devicetress results in: unflatten: too many end nodes Remove this feature to save the complexity. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: fdt: reorder fdt_header initializationSascha Hauer2013-11-081-2/+2
| | | | | | | | No functional change, just reorder the initialization of the different offset/size members of fdt_header in increasing order to make it easier to read. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: fdt: Fix fdt size_dt_structSascha Hauer2013-11-081-2/+1
| | | | | | size_dt_struct was calculated too big, we have to substract ofs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: parse phandles during unflattenSascha Hauer2013-08-141-1/+3
| | | | | | | With this node->phandle becomes valid after unflattening a tree and not during of_probe later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: fix merge mode in of_unflatten_dtbSascha Hauer2013-08-141-0/+1
| | | | | | | In merge mode a property may be overwritte with new values. When this happens the length has to be adjusted. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* OF: base: rename of_free to of_delete_nodeSebastian Hesselbarth2013-07-051-1/+1
| | | | | | | | | of_free is misleading about the actual purpose of the function. There is already a of_create_node counterpart, so rename of_free to of_create_node and update all users accordingly. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* OF: base: remove of_find_child_by_nameSebastian Hesselbarth2013-06-201-4/+5
| | | | | | | With of_get_child_by_name from Linux API, we can now convert and remove of_find_child_by_name. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
* OF: base: sync of_find_property with linux OF APISebastian Hesselbarth2013-06-201-1/+4
| | | | | | | | To start synchronizing OF API of barebox with linux OF API, this adds a length pointer to of_find_property. Also all current users of that function are updated to reflect the API change. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
* fdt: Fix dt memreserve entrySascha Hauer2013-05-211-2/+1
| | | | | | | | The fdt reserve map needs address/size values, not address/end values like accidently done for generating the reserve entry for the dt. Reported-by: Jürgen Beisert <j.beisert@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: remove unused libfdtSascha Hauer2013-03-061-1/+0
| | | | | | | Now that we are completely independent of libfdt remove the unused code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Add reservemap handlingSascha Hauer2013-03-061-0/+65
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: move flat devicetree functions to separate fileSascha Hauer2013-03-061-0/+434
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>