Thread (2 messages) 2 messages, 2 authors, 2016-08-22

[PATCH] scripts: imx-image: DCD check command for v2 only

From: Alexander Kurz <hidden>
Date: 2016-08-21 20:19:22
Subsystem: the rest · Maintainer: Linus Torvalds

DCD check command is currently implemented for imximg v2 only.
This command may also be available for v1 as mentioned in IMX35RM as
DCD-address-type "wait/read", but due to the lack of further details
it will be not supported.

Signed-off-by: Alexander Kurz <redacted>
---
 scripts/imx/imx-image.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index c0bf9c0..d0c4152 100644
--- a/scripts/imx/imx-image.c
+++ b/scripts/imx/imx-image.c
@@ -450,6 +450,11 @@ static int write_dcd(const char *outfile)
 static int check(const struct config_data *data, uint32_t cmd, uint32_t addr,
 		 uint32_t mask)
 {
+	if (data->header_version != 2) {
+		fprintf(stderr, "DCD check command is not available or "
+				"not yet implemented for this SOC\n");
+		return -EINVAL;
+	}
 	if (curdcd > MAX_DCD - 3) {
 		fprintf(stderr, "At maximum %d dcd entried are allowed\n", MAX_DCD);
 		return -ENOMEM;
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help