mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
rockchip: spl: add documentation for spl_node_to_boot_device()
In the expectation that the spl-boot-order code will eventually gain use outside of mach-rockchip: let's add documentation on the spl_node_to_boot_device() function, which is likely to become a publicly exported function. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
3b4f87735d
commit
dbad01cab5
1 changed files with 19 additions and 0 deletions
|
@ -10,6 +10,25 @@
|
||||||
#include <spl.h>
|
#include <spl.h>
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(OF_CONTROL)
|
#if CONFIG_IS_ENABLED(OF_CONTROL)
|
||||||
|
/**
|
||||||
|
* spl_node_to_boot_device() - maps from a DT-node to a SPL boot device
|
||||||
|
* @node: of_offset of the node
|
||||||
|
*
|
||||||
|
* The SPL framework uses BOOT_DEVICE_... constants to identify its boot
|
||||||
|
* sources. These may take on a device-specific meaning, depending on
|
||||||
|
* what nodes are enabled in a DTS (e.g. BOOT_DEVICE_MMC1 may refer to
|
||||||
|
* different controllers/block-devices, depending on which SD/MMC controllers
|
||||||
|
* are enabled in any given DTS). This function maps from a DT-node back
|
||||||
|
* onto a BOOT_DEVICE_... constant, considering the currently active devices.
|
||||||
|
*
|
||||||
|
* Returns
|
||||||
|
* -ENOENT, if no device matching the node could be found
|
||||||
|
* -ENOSYS, if the device matching the node can not be mapped onto a
|
||||||
|
* SPL boot device (e.g. the third MMC device)
|
||||||
|
* -1, for unspecified failures
|
||||||
|
* a positive integer (from the BOOT_DEVICE_... family) on succes.
|
||||||
|
*/
|
||||||
|
|
||||||
static int spl_node_to_boot_device(int node)
|
static int spl_node_to_boot_device(int node)
|
||||||
{
|
{
|
||||||
struct udevice *parent;
|
struct udevice *parent;
|
||||||
|
|
Loading…
Add table
Reference in a new issue