Some SoCs are able to detect if they are booted from JTAG. Add the
enum value to be able to represent this as a valid bootsource.

Signed-off-by: Lucas Stach <d...@lynxeye.de>
---
 common/bootsource.c  | 1 +
 include/bootsource.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/common/bootsource.c b/common/bootsource.c
index 4ef8d8ad9585..1f2bf87e99ed 100644
--- a/common/bootsource.c
+++ b/common/bootsource.c
@@ -37,6 +37,7 @@ static const char *bootsource_str[] = {
        [BOOTSOURCE_USB] = "usb",
        [BOOTSOURCE_NET] = "net",
        [BOOTSOURCE_CAN] = "can",
+       [BOOTSOURCE_JTAG] = "jtag",
 };
 
 static enum bootsource bootsource = BOOTSOURCE_UNKNOWN;
diff --git a/include/bootsource.h b/include/bootsource.h
index 29347aaeb042..92f7f27cd4fa 100644
--- a/include/bootsource.h
+++ b/include/bootsource.h
@@ -17,6 +17,7 @@ enum bootsource {
        BOOTSOURCE_USB,
        BOOTSOURCE_NET,
        BOOTSOURCE_CAN,
+       BOOTSOURCE_JTAG,
 };
 
 #define BOOTSOURCE_INSTANCE_UNKNOWN    -1
-- 
2.23.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to