summaryrefslogtreecommitdiffstats
path: root/src/libdt.c
Commit message (Collapse)AuthorAgeFilesLines
* fixup! libdt: add block devicepath extractiontopic/blockdevMarkus Pargmann2016-07-151-4/+6
|
* libdt: add block devicepath extractionBastian Stender2016-07-151-8/+71
| | | | | | | | | | | | This allows barebox state to find the backend node on block devices. This is a reworked version of the patch. The outdated patch did not specify the parent correctly resulting in an incorrect subtree. This lead to the wrong block device being returned. Signed-off-by: Bastian Stender <bst@pengutronix.de>
* Revert "libdt: add block devicepath extraction"Markus Pargmann2016-05-271-65/+4
| | | | | This reverts commit 6e912489417b93528d1e963f47e1f5d4773a3775. It currently breaks barebox-state. /dev/loop0 is always selected.
* libdt: add block devicepath extractionBastian Stender2016-03-151-4/+65
| | | | | | | This allows barebox state to find the backend node on block devices. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* libdt: fix detection of eeprom devicepathJan Remmet2015-06-211-4/+8
| | | | | | | | | If nodepath can directly be translated to a device, the device can also be a eeprom. Set default size to 0. The real size can be got from the path. Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* libdt: add missing newline in error messageMarc Kleine-Budde2015-05-061-1/+1
| | | | | Reported-by: From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* libdt: of_read_devicetree(): try to read fdt from /sys/firmware/fdt firstMarc Kleine-Budde2015-04-281-0/+7
| | | | | | | Which is faster than walking over the filesystem representation of the device tree in /proc or /sys. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* libdt: fix printf related bugsMarc Kleine-Budde2015-04-281-3/+4
| | | | | | | | | | | | | | src/libdt.c:97:11: warning: format string is not a string literal (potentially insecure) [-Wformat-security] printf(data); ^~~~ src/libdt.c:2241:5: warning: data argument not used by format string [-Wformat-extra-args] node->full_name); ^ src/libdt.c:2248:54: warning: more '%' conversions than data arguments [-Wformat] fprintf(stderr, "%s: no 'label' property found in %s\n", partition_node->full_name); ~^ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* state: describe backend with phandleSascha Hauer2014-06-031-246/+188
| | | | | | | | | | | We used to describe the backend with a combination of a nodepath and partname:<name>. This is cumbersome and error prone to parse. Instead, describe the backend with a phandle that directly points to the partition. The resulting code is easier to read and the devicetrees are easier to understand. Tested with both mtd and EEPROM device, both with partitions with an offset != 0. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scan_proc_dir: Add missing phandle initializationSascha Hauer2014-06-031-0/+2
| | | | | | node->phandle was not set when /proc/device-tree was read. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add some commentsSascha Hauer2014-03-181-0/+62
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove dos partition parserSascha Hauer2014-03-181-13/+0
| | | | | | | | Instead of matching DOS partitions with partname:<number> this should be made explicit with a different type parser, like dospartid:<id>. Since this is unused just remove it for now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* document of_parse_partition_from_pathSascha Hauer2014-03-181-0/+10
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* libdt: fix whitespace damageSteffen Trumtrar2014-02-271-4/+4
| | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* libdt: add sysattr for partitionSteffen Trumtrar2014-02-271-3/+17
| | | | | | | | | mmc devices only have a "name" property that reads 00000. The partitions have a property "partition" telling the partition index. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* libdt: refactor partition parsingSteffen Trumtrar2014-02-271-23/+34
| | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* libdt: search for devnode if partition not foundSteffen Trumtrar2014-02-271-0/+20
| | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* libdt: add function to search the devicenode in subdirsSteffen Trumtrar2014-02-271-0/+35
| | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* libdt: fix segfaultSteffen Trumtrar2014-02-271-2/+6
| | | | | | | strdup will segfault, if udev_device_get_devnode does not find the part. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 2nd commitv0.2.0Sascha Hauer2014-01-271-0/+2185
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>