Merge git://git.denx.de/u-boot-dm
This commit is contained in:
@@ -315,12 +315,12 @@ int blk_next_device(struct udevice **devp);
|
||||
* @devnum: Device number, specific to the interface type, or -1 to
|
||||
* allocate the next available number
|
||||
* @blksz: Block size of the device in bytes (typically 512)
|
||||
* @size: Total size of the device in bytes
|
||||
* @lba: Total number of blocks of the device
|
||||
* @devp: the new device (which has not been probed)
|
||||
*/
|
||||
int blk_create_device(struct udevice *parent, const char *drv_name,
|
||||
const char *name, int if_type, int devnum, int blksz,
|
||||
lbaint_t size, struct udevice **devp);
|
||||
lbaint_t lba, struct udevice **devp);
|
||||
|
||||
/**
|
||||
* blk_create_devicef() - Create a new named block device
|
||||
@@ -332,12 +332,12 @@ int blk_create_device(struct udevice *parent, const char *drv_name,
|
||||
* @devnum: Device number, specific to the interface type, or -1 to
|
||||
* allocate the next available number
|
||||
* @blksz: Block size of the device in bytes (typically 512)
|
||||
* @size: Total size of the device in bytes
|
||||
* @lba: Total number of blocks of the device
|
||||
* @devp: the new device (which has not been probed)
|
||||
*/
|
||||
int blk_create_devicef(struct udevice *parent, const char *drv_name,
|
||||
const char *name, int if_type, int devnum, int blksz,
|
||||
lbaint_t size, struct udevice **devp);
|
||||
lbaint_t lba, struct udevice **devp);
|
||||
|
||||
/**
|
||||
* blk_prepare_device() - Prepare a block device for use
|
||||
|
||||
@@ -628,4 +628,28 @@ int ofnode_read_resource(ofnode node, uint index, struct resource *res);
|
||||
int ofnode_read_resource_byname(ofnode node, const char *name,
|
||||
struct resource *res);
|
||||
|
||||
/**
|
||||
* ofnode_for_each_subnode() - iterate over all subnodes of a parent
|
||||
*
|
||||
* @node: child node (ofnode, lvalue)
|
||||
* @parent: parent node (ofnode)
|
||||
*
|
||||
* This is a wrapper around a for loop and is used like so:
|
||||
*
|
||||
* ofnode node;
|
||||
*
|
||||
* ofnode_for_each_subnode(node, parent) {
|
||||
* Use node
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* Note that this is implemented as a macro and @node is used as
|
||||
* iterator in the loop. The parent variable can be a constant or even a
|
||||
* literal.
|
||||
*/
|
||||
#define ofnode_for_each_subnode(node, parent) \
|
||||
for (node = ofnode_first_subnode(parent); \
|
||||
ofnode_valid(node); \
|
||||
node = ofnode_next_subnode(node))
|
||||
|
||||
#endif
|
||||
|
||||
@@ -55,6 +55,20 @@ int dm_scan_platdata(bool pre_reloc_only);
|
||||
*/
|
||||
int dm_scan_fdt(const void *blob, bool pre_reloc_only);
|
||||
|
||||
/**
|
||||
* dm_extended_scan_fdt() - Scan the device tree and bind drivers
|
||||
*
|
||||
* This calls dm_scna_dft() which scans the device tree and creates a driver
|
||||
* for each node. the top-level subnodes are examined and also all sub-nodes
|
||||
* of "clocks" node.
|
||||
*
|
||||
* @blob: Pointer to device tree blob
|
||||
* @pre_reloc_only: If true, bind only drivers with the DM_FLAG_PRE_RELOC
|
||||
* flag. If false bind all drivers.
|
||||
* @return 0 if OK, -ve on error
|
||||
*/
|
||||
int dm_extended_scan_fdt(const void *blob, bool pre_reloc_only);
|
||||
|
||||
/**
|
||||
* dm_scan_other() - Scan for other devices
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user