| b5220bc6 | 24-Oct-2011 |
Simon Glass <sjg@chromium.org> |
fdt: add decode helper library
This library provides useful functions to drivers which want to use the fdt to control their operation. Functions are provided to:
- look up and enumerate a device ty
fdt: add decode helper library
This library provides useful functions to drivers which want to use the fdt to control their operation. Functions are provided to:
- look up and enumerate a device type (for example assigning i2c bus 0, i2c bus 1, etc.) - decode basic types from the fdt, like addresses and integers
While this library is not strictly necessary, it helps to minimise the changes to a driver, in order to make it work under fdt control. Less code is required, and so the barrier to switch drivers over is lower.
Additional functions to read arrays and GPIOs could be made available here also.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 84b5e802 | 29-Jul-2011 |
Wolfgang Denk <wd@denx.de> |
Constify getenv(), setenv() and hash code functions
This is needed to get rid of build warnings like
main.c:311: warning: passing argument 2 of 'setenv' discards qualifiers from pointer target type
Constify getenv(), setenv() and hash code functions
This is needed to get rid of build warnings like
main.c:311: warning: passing argument 2 of 'setenv' discards qualifiers from pointer target type
which result from commit 09c2e90 "unify version_string".
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Andreas Bießmann <andreas.devel@googlemail.com>
show more ...
|
| d1c63148 | 09-Mar-2010 |
David Gibson <david@gibson.dropbear.id.au> |
libfdt: Implement property iteration functions
For ages, we've been talking about adding functions to libfdt to allow iteration through properties. So, finally, here are some.
I got bogged down on
libfdt: Implement property iteration functions
For ages, we've been talking about adding functions to libfdt to allow iteration through properties. So, finally, here are some.
I got bogged down on this for a long time because I didn't want to expose offsets directly to properties to the callers. But without that, attempting to make reasonable iteration functions just became horrible. So eventually, I settled on an interface which does now expose property offsets. fdt_first_property_offset() and fdt_next_property_offset() are used to step through the offsets of the properties starting from a particularly node offset. The details of the property at each offset can then be retrieved with either fdt_get_property_by_offset() or fdt_getprop_by_offset() which have interfaces similar to fdt_get_property() and fdt_getprop() respectively.
No explicit testcases are included, but we do use the new functions to reimplement the existing fdt_get_property() function.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This was extracted from the DTC commit: 73dca9ae0b9abe6924ba640164ecce9f8df69c5a Mon Sep 17 00:00:00 2001
Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
show more ...
|