dm: core: Access device flags through functions

At present flags are stored as part of the device. In preparation for
storing them separately, change the access to go through inline functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-12-19 10:40:10 -07:00
parent 2462139fdd
commit 73466df3e2
16 changed files with 74 additions and 59 deletions

View File

@@ -14,7 +14,7 @@ static void show_devices(struct udevice *dev, int depth, int last_flag)
{
int i, is_last;
struct udevice *child;
u32 flags = dev->flags;
u32 flags = dev_get_flags(dev);
/* print the first 20 characters to not break the tree-format. */
printf(IS_ENABLED(CONFIG_SPL_BUILD) ? " %s %d [ %c ] %s " :
@@ -67,7 +67,7 @@ void dm_dump_all(void)
static void dm_display_line(struct udevice *dev, int index)
{
printf("%-3i %c %s @ %08lx", index,
dev->flags & DM_FLAG_ACTIVATED ? '*' : ' ',
dev_get_flags(dev) & DM_FLAG_ACTIVATED ? '*' : ' ',
dev->name, (ulong)map_to_sysmem(dev));
if (dev->seq_ != -1)
printf(", seq %d", dev_seq(dev));