Merge git://git.denx.de/u-boot-dm

This commit is contained in:
Tom Rini
2018-09-30 18:16:51 -04:00
97 changed files with 3211 additions and 199 deletions

View File

@@ -600,6 +600,22 @@ bool device_is_compatible(struct udevice *dev, const char *compat);
*/
bool of_machine_is_compatible(const char *compat);
/**
* dev_disable_by_path() - Disable a device given its device tree path
*
* @path: The device tree path identifying the device to be disabled
* @return 0 on success, -ve on error
*/
int dev_disable_by_path(const char *path);
/**
* dev_enable_by_path() - Enable a device given its device tree path
*
* @path: The device tree path identifying the device to be enabled
* @return 0 on success, -ve on error
*/
int dev_enable_by_path(const char *path);
/**
* device_is_on_pci_bus - Test if a device is on a PCI bus
*

View File

@@ -764,4 +764,50 @@ u64 ofnode_translate_address(ofnode node, const fdt32_t *in_addr);
* @return true if OK, false if the compatible is not found
*/
int ofnode_device_is_compatible(ofnode node, const char *compat);
/**
* ofnode_write_prop() - Set a property of a ofnode
*
* Note that the value passed to the function is *not* allocated by the
* function itself, but must be allocated by the caller if necessary.
*
* @node: The node for whose property should be set
* @propname: The name of the property to set
* @len: The length of the new value of the property
* @value: The new value of the property (must be valid prior to calling
* the function)
* @return 0 if successful, -ve on error
*/
int ofnode_write_prop(ofnode node, const char *propname, int len,
const void *value);
/**
* ofnode_write_string() - Set a string property of a ofnode
*
* Note that the value passed to the function is *not* allocated by the
* function itself, but must be allocated by the caller if necessary.
*
* @node: The node for whose string property should be set
* @propname: The name of the string property to set
* @value: The new value of the string property (must be valid prior to
* calling the function)
* @return 0 if successful, -ve on error
*/
int ofnode_write_string(ofnode node, const char *propname, const char *value);
/**
* ofnode_set_enabled() - Enable or disable a device tree node given by its
* ofnode
*
* This function effectively sets the node's "status" property to either "okay"
* or "disable", hence making it available for driver model initialization or
* not.
*
* @node: The node to enable
* @value: Flag that tells the function to either disable or enable the
* node
* @return 0 if successful, -ve on error
*/
int ofnode_set_enabled(ofnode node, bool value);
#endif

View File

@@ -30,6 +30,7 @@ enum uclass_id {
UCLASS_ADC, /* Analog-to-digital converter */
UCLASS_AHCI, /* SATA disk controller */
UCLASS_BLK, /* Block device */
UCLASS_BOARD, /* Device information from hardware */
UCLASS_CLK, /* Clock source, e.g. used by peripherals */
UCLASS_CPU, /* CPU, typically part of an SoC */
UCLASS_CROS_EC, /* Chrome OS EC */