summaryrefslogtreecommitdiffstats
path: root/drivers/of/barebox.c
Commit message (Collapse)AuthorAgeFilesLines
* string: Fix (v)asprintf prototypesSascha Hauer2016-04-151-1/+1
| | | | | | | | | | Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: Support env from file in a file-system via device treeTrent Piepho2016-01-081-2/+45
| | | | | | | | | | | | | | | Current barebox,environment node only allows specifying a raw device or partition to load an environment from. Some boards, like OMAP and SoCFPGA, instead want to use a file located in a FAT filesystem. Extend the device tree bindings with a new property 'file-path' that will trigger this behavior. This allows any board using this driver to get the env from a file or from a raw device, instead of each machine type being either raw device only or file only. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of_path: of_find_path(): add possibility to return .bb deviceMarc Kleine-Budde2015-04-231-19/+1
| | | | | | | | | This patch adds a flags argument to the of_find_path() function. The only flag defined for now is OF_FIND_PATH_FLAGS_BB. When used on NAND devices, the function returns the bad block aware device (the ".bb" device). Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: remove unused codeMarc Kleine-Budde2015-04-171-9/+0
| | | | | | | | This patch removes the LIST_HEAD of_partition_list and a struct definition from the code. This was present but unused, since the file was added to barebox. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/of'Sascha Hauer2014-05-051-14/+0
|\
| * of: move of_find_device_by_node_path to drivers/of/of_path.cSascha Hauer2014-04-281-14/+0
| | | | | | | | | | | | | | As it's generic helper function which should not stay in driver specific code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | OF: barebox-env: Use bb device on NANDSascha Hauer2014-04-281-0/+19
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: Use accessor functions for default environment pathSascha Hauer2014-01-271-1/+1
| | | | | | | | | default_environment_path only exists when CONFIG_ENV_HANDLING is enabled. Boards would have to #ifdef this if they wanted to use default_environment_path. Use accessor functions instead which can be ifdeffed on a single place. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add configurability via devicetreeSascha Hauer2013-07-181-0/+99
This adds the possibility to configure the place for the environment from the devicetree and to partition devices from the devicetree. Configuration has the general form of devices with a regular compatible property. This allows to later add additional drivers or drivers with different behaviour (for example to add support for redundant environment). The configuration is all in the /chosen/barebox/ hierarchy of the devicetree. This separates the configuration from the hardware description. Also it makes it possible to store the configuration in a completely separate devicetree (or devicetree overlay). For the same reason all configuration is done using nodepathes rather than phandles. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>