]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - include/regmap.h
usb: dwc3: add dis_u2_freeclk_exists_quirk
[thirdparty/u-boot.git] / include / regmap.h
index 8359c511d25f77e6cacd99b2da066f9d485b40d7..30183c5e71110be80fa97d077dba26dc2782409c 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef __REGMAP_H
 #define __REGMAP_H
 
+#include <linux/delay.h>
+
 /**
  * DOC: Overview
  *
@@ -274,7 +276,7 @@ int regmap_raw_read_range(struct regmap *map, uint range_num, uint offset,
                if (cond) \
                        break; \
                if (IS_ENABLED(CONFIG_SANDBOX) && test_add_time) \
-                       sandbox_timer_add_offset(test_add_time); \
+                       timer_test_add_offset(test_add_time); \
                if ((timeout_ms) && get_timer(__start) > (timeout_ms)) { \
                        __ret = regmap_read((map), (addr), &(val)); \
                        break; \
@@ -295,7 +297,8 @@ int regmap_raw_read_range(struct regmap *map, uint range_num, uint offset,
  * @map:       The map returned by regmap_init_mem*()
  * @offset:    Offset of the memory
  * @mask:      Mask to apply to the read value
- * @val:       Value to apply to the value to write
+ * @val:       Value to OR with the read value after masking. Note that any
+ *     bits set in @val which are not set in @mask are ignored
  * Return: 0 if OK, -ve on error
  */
 int regmap_update_bits(struct regmap *map, uint offset, uint mask, uint val);
@@ -330,6 +333,8 @@ int regmap_init_mem(ofnode node, struct regmap **mapp);
 int regmap_init_mem_platdata(struct udevice *dev, fdt_val_t *reg, int count,
                             struct regmap **mapp);
 
+int regmap_init_mem_index(ofnode node, struct regmap **mapp, int index);
+
 /**
  * regmap_get_range() - Obtain the base memory address of a regmap range
  *