diff options
author | Dimitris Papastamos <dimitris.papastamos@arm.com> | 2018-05-11 12:04:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-11 12:04:52 +0100 |
commit | da9d1d59d4fd722059f935aa9dec347be7f17d0d (patch) | |
tree | 0f5825d7f5448d479df12127c11ab44bdec92de5 /include/drivers/console.h | |
parent | 885ca54a75e14a63c375b5d12852dc7ef2c0b568 (diff) | |
parent | 2f18aa1fa35305f8feec25867473d30975b242fe (diff) |
Merge pull request #1372 from antonio-nino-diaz-arm/an/arm-multi-console
Arm platforms: Migrate to multi console driver
Diffstat (limited to 'include/drivers/console.h')
-rw-r--r-- | include/drivers/console.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/drivers/console.h b/include/drivers/console.h index f8ec83d2..422492a7 100644 --- a/include/drivers/console.h +++ b/include/drivers/console.h @@ -16,9 +16,9 @@ #define CONSOLE_T_FLUSH (U(4) * REGSZ) #define CONSOLE_T_DRVDATA (U(5) * REGSZ) -#define CONSOLE_FLAG_BOOT BIT(0) -#define CONSOLE_FLAG_RUNTIME BIT(1) -#define CONSOLE_FLAG_CRASH BIT(2) +#define CONSOLE_FLAG_BOOT (U(1) << 0) +#define CONSOLE_FLAG_RUNTIME (U(1) << 1) +#define CONSOLE_FLAG_CRASH (U(1) << 2) /* Bits 3 to 7 reserved for additional scopes in future expansion. */ #define CONSOLE_FLAG_SCOPE_MASK ((U(1) << 8) - 1) /* Bits 8 to 31 reserved for non-scope use in future expansion. */ @@ -50,7 +50,12 @@ typedef struct console { */ /* Remove a single console_t instance from the console list. */ int console_unregister(console_t *console); -/* Set scope mask of a console that determines in what states it is active. */ +/* Returns 1 if this console is already registered, 0 if not */ +int console_is_registered(console_t *console); +/* + * Set scope mask of a console that determines in what states it is active. + * By default they are registered with (CONSOLE_FLAG_BOOT|CONSOLE_FLAG_CRASH). + */ void console_set_scope(console_t *console, unsigned int scope); /* Switch to a new global console state (CONSOLE_FLAG_BOOT/RUNTIME/CRASH). */ |