summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* barebox-state: fix typoBastian Stender2016-12-081-1/+1
| | | | Signed-off-by: Bastian Stender <bst@pengutronix.de>
* libdt: take the parent to search for block devicesMichael Grzeschik2016-09-221-0/+5
| | | | Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* barebox-state: only set state->name by state->state if validMichael Grzeschik2016-09-221-1/+1
| | | | | | This patch fixes commit d4c997a3. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* backend_storage: add fs.h for BLKGETSIZE64Michael Grzeschik2016-09-221-0/+1
| | | | Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
* barebox-state: make sure state->name is validMichael Olbrich2016-09-141-0/+2
| | | | | | | It's used later while setting state variables. Fixes: feb64890a302 ("barebox-state: fall back to /state if there is no alias defined") Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* barebox-state: fall back to /state if there is no alias definedMichael Olbrich2016-09-121-2/+1
| | | | | | | | | | state_get() already supports this if no state name is given. This just removes the default state name to make use of this feature. Without this, an alias named 'state' is needed for barebox-state work without specifying the state node. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* libdt: only enumerate devices we are interested inSascha Hauer2016-08-241-1/+4
| | | | | | | | Only devices of certain subsystems can have device nodes. Limit the enumeration to these subsystems, namely platform, i2c, spi and mtd. pci maybe missing here, but let's see once we are there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* libdt: cache of_find_device_by_node_path resultsSascha Hauer2016-08-241-9/+36
| | | | | | | | Scanning udev for devices with a OF_FULLNAME property can take a long time. Since we may do this multiple times cache the results during first run to speed up subsequent runs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* barebox-state: return non-zero exit code for missing or invalid argEnrico Jorns2016-08-081-0/+6
| | | | | | | | | | This make barebox-state return non-zero exit-code in case of a missing parameter (':') or an invalid/unknown argument ('?'). No extra printing of error messages is performed as this is handled by getopt itself in this configuration. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Tested-by: Bastian Stender <bst@pengutronix.de>
* barebox-state: fix print variable on --getBastian Stender2016-08-041-0/+1
| | | | | | | 676e2a13e90fb8bf37d6777dc3d21d2406916885 accidentally removed the printf call. Signed-off-by: Bastian Stender <bst@pengutronix.de>
* libdt: add block devicepath extractionBastian Stender2016-07-221-8/+73
| | | | | | | | | | | | 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>
* barebox-state: Fix prefix removal of variablesMarkus Pargmann2016-07-131-1/+1
| | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
* barebox-state: Fix default stateMarkus Pargmann2016-07-131-0/+11
| | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
* barebox-state: Add possibility to specify multiple state namesMarkus Pargmann2016-07-111-51/+97
| | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
* dtblint: check for fec reset gpio polarity mismatchUwe Kleine-König2016-07-091-1/+52
|
* dtblint: imx-pinmux: mention bit that is wrongly setUwe Kleine-König2016-07-081-2/+3
|
* dtblint: imx-pinmux: add support for imx6qUwe Kleine-König2016-07-081-1/+1595
|
* dtblint: split out imx-pinmux checksUwe Kleine-König2016-07-083-1224/+1246
|
* dtblint: fix a few swpad reset valuesUwe Kleine-König2016-07-051-4/+4
| | | | The reset values had bits set that were not in the writeable mask.
* Update barebox-stateMarkus Pargmann2016-07-0511-141/+303
| | | | | | Fixed direct bucket Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
* pr_info: In userspace this should be redirected to stderrMarkus Pargmann2016-06-161-1/+1
| | | | | | | barebox-state outputs should be parsable by other applications. Therefore normal info outputs should be redirected to stderr. Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
* barebox-state: write of_property only if backend storage name is setMarkus Pargmann2016-06-021-6/+8
| | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
* barebox-state: Check ECC stats for circular bucketsMarkus Pargmann2016-06-021-3/+47
| | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
* barebox-state: Add locking fileMarkus Pargmann2016-05-301-8/+35
| | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
* barebox-state: Import updated state codeMarkus Pargmann2016-05-2724-1693/+3375
| | | | Signed-off-by: Markus Pargmann <mpa@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>
* keystore-blob: use system independent path to blob_genMarc Kleine-Budde2016-02-241-3/+3
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* keystore: add imx6 caam based keystore implementationMarc Kleine-Budde2015-10-162-21/+104
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: make state_get() state_get_var() non staticMarc Kleine-Budde2015-10-162-2/+10
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* base64: import from bareboxMarc Kleine-Budde2015-10-162-0/+120
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* barebox-state: import from bareboxMarc Kleine-Budde2015-09-301-72/+71
|
* 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>