summaryrefslogtreecommitdiffstats
path: root/commands/iomemport.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/iomemport.c')
-rw-r--r--commands/iomemport.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/commands/iomemport.c b/commands/iomemport.c
index 6d97c5711b..f2baa0e293 100644
--- a/commands/iomemport.c
+++ b/commands/iomemport.c
@@ -1,20 +1,8 @@
-/*
- * iomem.c - barebox iomem command
- *
- * Copyright (c) 2011 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
+// SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: © 2011 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
+
+/* iomem.c - barebox iomem command */
+
#include <asm/io.h>
#include <common.h>
#include <command.h>
@@ -28,11 +16,14 @@ static void __print_resources(struct resource *res, int indent)
for (i = 0; i < indent; i++)
printf(" ");
- printf("%pa - %pa (size %pa) %s\n",
- &res->start, &res->end, &size, res->name);
+ printf("%pa - %pa (size %pa) %s%s\n",
+ &res->start, &res->end, &size,
+ res->flags & IORESOURCE_BUSY ? "[R] " : "",
+ res->name);
- list_for_each_entry(r, &res->children, sibling)
+ list_for_each_entry(r, &res->children, sibling) {
__print_resources(r, indent + 1);
+ }
}
static void print_resources(struct resource *res)