return dm_priv_to_rw(dev->priv_);
}
-void *dev_get_uclass_priv(const struct udevice *dev)
+/* notrace is needed as this is called by timer_get_rate() */
+notrace void *dev_get_uclass_priv(const struct udevice *dev)
{
if (!dev) {
dm_warn("%s: null device\n", __func__);
return ((u64)gd->timebase_h << 32) | gd->timebase_l;
}
-int notrace dm_timer_init(void)
+int dm_timer_init(void)
{
struct udevice *dev = NULL;
__maybe_unused ofnode node;
#define timer_get_ops(dev) ((struct timer_ops *)(dev)->driver->ops)
/**
- * dm_timer_init() - initialize a timer for time keeping. On success
- * initializes gd->timer so that lib/timer can use it for future
- * referrence.
+ * dm_timer_init() - set up a timer for time keeping
*
- * Return: 0 on success or error number
+ * Sets up gd->timer if the device is not already bound, making sure it is
+ * probed and ready for use
+ *
+ * On success, inits gd->timer so that lib/timer can use it for future reference
+ *
+ * Returns: 0 on success, -EAGAIN if driver model is not ready yet, -ENODEV if
+ * no timer could be found, other error if the timer could not be bound or
+ * probed
*/
int dm_timer_init(void);