summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* common: import is_zero_ether_addr() and EPROBE_DEFER from bareboxMarc Kleine-Budde2015-09-301-5/+25
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: add double underscore to get, send and info callbacks in ↵Marc Kleine-Budde2015-09-301-21/+23
| | | | | | struct variable_type Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* dtblint: don't accept 0 as config for a pad without configUwe Kleine-König2015-09-291-1/+1
| | | | | The Linux driver fails on pinctrls that specify 0 as config, so consequently flag this as error.
* dtblint: fix test for non-existent config registerUwe Kleine-König2015-09-291-1/+1
| | | | | When off_t is a bigger data type than u32 the check (conf_reg == (uint32_t)-1) never triggers.
* barebox-state: make state alias work againSascha Hauer2015-09-101-5/+15
| | | | | | | | Since commit 14617d (barebox-state: fix default, so that it works without an explicid alias node) aliases no longer work at all. This is because "/state" cannot be interpreted as an alias. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* barebox-state: Add missing breakSascha Hauer2015-09-101-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* barebox-state: Check return value of state_find_typeSascha Hauer2015-09-101-0/+8
| | | | | | | state_find_type can fail in which case it returns NULL. Check the return value before dereferencing the pointer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* barebox-state: Check of_property_count_strings return valueSascha Hauer2015-09-101-2/+6
| | | | | | | When a enum32 state variable node does not have a "names" property bail out gracefully instead of crashing. Signed-off-by: Sascha Hauer <s.hauer@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>
* barebox-state: __state_string_get: fix strings with max lengthMarc Kleine-Budde2015-06-211-2/+6
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-sate: import from bareboxMarc Kleine-Budde2015-06-181-5/+5
| | | | | | improve fixed string support, trailing zero is not needed. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* common: import xstrndup() from busyboxMarc Kleine-Budde2015-06-181-0/+21
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: adopt u8 and string supportMarc Kleine-Budde2015-06-151-0/+49
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: import uint8 and fixed strings supportMarc Kleine-Budde2015-06-151-12/+216
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: add __ prefix to get, set, info function to avoid clash with ↵Marc Kleine-Budde2015-06-151-21/+21
| | | | | | barebox functions Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* common: add dev_add_param_string() no-op to import state.c from bareboxMarc Kleine-Budde2015-06-151-0/+8
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* keystore: correctly return an error for no-op implementationMarc Kleine-Budde2015-06-151-1/+3
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* dtblint: silence unused-but-set-variable warningsMarc Kleine-Budde2015-06-151-0/+2
| | | | | | | | | | | src/dtblint.c: In function ‘parse_function’: src/dtblint.c:1153:12: warning: variable ‘input_val’ set but not used [-Wunused-but-set-variable] uint32_t input_val; ^ src/dtblint.c:1152:12: warning: variable ‘input_reg’ set but not used [-Wunused-but-set-variable] uint32_t input_reg; ^ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* fix compiler warningUwe Kleine-König2015-05-291-1/+2
| | | | | | | | | src/dtblint.c: At top level: ./src/dt/common.h:324:12: warning: ‘of_register_fixup’ defined but not used [-Wunused-function] static int of_register_fixup(int (*fixup)(struct device_node *, void *), void *context) ^ Fixes: f2243552be90 ("barebox-state: import from barebox")
* of_unflatten_dtb: remove wrongly documented parameterUwe Kleine-König2015-05-291-1/+0
|
* dtblint: new tool to check device tree blobsUwe Kleine-König2015-05-291-0/+1258
| | | | | Currently it checks iomux nodes on i.MX25 only, but adding other i.MX SoCs is just a matter of adding the corresponding table
* common.h: remove unused variableUwe Kleine-König2015-05-291-1/+0
| | | | | | | | | This fixes: ./src/dt/common.h: In function ‘read_file’: ./src/dt/common.h:177:6: warning: unused variable ‘ret’ [-Wunused-variable] int ret; ^
* barebox-state: add hmac supportMarc Kleine-Budde2015-05-253-8/+152
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* crypto: import crypto layer from bareboxMarc Kleine-Budde2015-05-2515-14/+1673
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: use state->name when dumping state variables to shellMarc Kleine-Budde2015-05-251-1/+1
| | | | | | ...othweise the shell variable may start with /. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: use node->name for nameMarc Kleine-Budde2015-05-251-1/+1
| | | | | | ...not the user supplied name, which may be an of_path and contain a /. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: import from bareboxMarc Kleine-Budde2015-05-253-88/+213
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: fix default, so that it works without an explicid alias nodeMarc Kleine-Budde2015-05-071-1/+1
| | | | | Reported-by: From: Uwe Kleine-König <u.kleine-koenig@pengutronix.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>
* barebox-state: state_backend_raw_file: factor out get_size() into separate ↵Marc Kleine-Budde2015-04-281-9/+59
| | | | | | function Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: backend_raw: properly align write and erase sizeMarc Kleine-Budde2015-04-281-7/+7
| | | | | | | | On Linux the ease and write size have to be aligned. This patch uses step_size (which is already aligned to erase block size) during erase, aligns full_size to writesize and uses it while writing. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: fix export of shell variables:Marc Kleine-Budde2015-04-281-2/+12
| | | | | | | | - convert "." in variable names to "_" - use supplied state name instead of hardcoded "STATE_" as prefix - let OPT_DUMP_SHELL start after all chars Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: initialzie: adjust code to fit docMarc Kleine-Budde2015-04-281-4/+6
| | | | | | | | This patch changes the -i, --init parameter to initialize the state storage and _not_ load the contents. The original behaviour was to load and not fail on error. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: mtd_get_meminfo: open path read-only instead of RWMarc Kleine-Budde2015-04-281-1/+1
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: state_new_from_node(): use supplied state name, not hardcoded ↵Marc Kleine-Budde2015-04-281-1/+1
| | | | | | "state" Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: update error messageMarc Kleine-Budde2015-04-281-1/+1
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: add short opt "-i" to help textMarc Kleine-Budde2015-04-281-1/+1
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: cleanup header filesMarc Kleine-Budde2015-04-281-12/+12
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: import from bareboxMarc Kleine-Budde2015-04-281-411/+727
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* libdt: prepare to import state from bareboxMarc Kleine-Budde2015-04-282-7/+121
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* libdt: import from barebox-2015.04.0Marc Kleine-Budde2015-04-283-55/+24
| | | | 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: read_file(): use read_full() instead of read() to read a fileMarc Kleine-Budde2015-04-281-1/+27
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* libdt: move read_file() to common.hMarc Kleine-Budde2015-04-282-41/+43
| | | | 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>
* libdt: sort symbols in libdt-utils.sym alphabeticallyMarc Kleine-Budde2015-04-281-54/+54
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* package+lib: rename dt -> dt-utils, state -> barebox-stateMarc Kleine-Budde2015-04-283-0/+0
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* state: always store state when --init is givenv2014.06.0Sascha Hauer2014-06-031-1/+1
| | | | | | | When asked to initialize the state with the --init option actually store the state, even when no variable is modified. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* state: describe backend with phandleSascha Hauer2014-06-034-262/+203
| | | | | | | | | | | 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>