summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2019-11-09 15:28:36 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-11-11 09:15:56 +0100
commitdb3ea7aae9266e5f9328b25e440ac9cd095f8d17 (patch)
treeaa0ea7ae41ef9adfff522ef874d8e0affcbb9a3e
parent3acac5f7751a5055c023520ff21bb551a2c8ebc3 (diff)
downloadbarebox-db3ea7aae9266e5f9328b25e440ac9cd095f8d17.tar.gz
barebox-db3ea7aae9266e5f9328b25e440ac9cd095f8d17.tar.xz
bootsource: add JTAG bootsource
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 <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/bootsource.c1
-rw-r--r--include/bootsource.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/common/bootsource.c b/common/bootsource.c
index 4ef8d8ad95..1f2bf87e99 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 29347aaeb0..92f7f27cd4 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