As a preparation for future patches, use a flag in gd->flags rather
than a separate member in (the singleton) struct cyclic_drv to keep
track of whether we're already inside cyclic_run().
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Tim Harvey <tharvey@gateworks.com> # imx8mm-venice-*
uint64_t now, cpu_time;
/* Prevent recursion */
- if (gd->cyclic->cyclic_running)
+ if (gd->flags & GD_FLG_CYCLIC_RUNNING)
return;
- gd->cyclic->cyclic_running = true;
+ gd->flags |= GD_FLG_CYCLIC_RUNNING;
list_for_each_entry_safe(cyclic, tmp, &gd->cyclic->cyclic_list, list) {
/*
* Check if this cyclic function needs to get called, e.g.
}
}
}
- gd->cyclic->cyclic_running = false;
+ gd->flags &= ~GD_FLG_CYCLIC_RUNNING;
}
void schedule(void)
* @GD_FLG_FDT_CHANGED: Device tree change has been detected by tests
*/
GD_FLG_FDT_CHANGED = 0x100000,
+ /**
+ * GD_FLG_CYCLIC_RUNNING: cyclic_run is in progress
+ */
+ GD_FLG_CYCLIC_RUNNING = 0x200000,
};
#endif /* __ASSEMBLY__ */
*
* @cyclic_list: Cylic list node
* @cyclic_ready: Flag if cyclic infrastructure is ready
- * @cyclic_running: Flag if cyclic infrastructure is running
*/
struct cyclic_drv {
struct list_head cyclic_list;
bool cyclic_ready;
- bool cyclic_running;
};
/**