summaryrefslogtreecommitdiffstats
path: root/bsps/riscv/riscv/console/console-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/riscv/riscv/console/console-config.c')
-rw-r--r--bsps/riscv/riscv/console/console-config.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/bsps/riscv/riscv/console/console-config.c b/bsps/riscv/riscv/console/console-config.c
index 7908c2f325..fe339c2353 100644
--- a/bsps/riscv/riscv/console/console-config.c
+++ b/bsps/riscv/riscv/console/console-config.c
@@ -60,9 +60,7 @@
static fe310_uart_context fe310_uart_instance;
#endif
-#if RISCV_ENABLE_HTIF_SUPPORT != 0
static htif_console_context htif_console_instance;
-#endif
#if RISCV_CONSOLE_MAX_NS16550_DEVICES > 0
static ns16550_context ns16550_instances[RISCV_CONSOLE_MAX_NS16550_DEVICES];
@@ -165,7 +163,7 @@ static void riscv_console_probe(void)
compat_len = 0;
}
-#if RISCV_ENABLE_HTIF_SUPPORT != 0
+ /* Search for HTIF (eg. on Spike) and use it if found */
if (fdt_stringlist_contains(compat, compat_len, "ucb,htif0")) {
htif_console_context_init(&htif_console_instance.base, node);
@@ -173,7 +171,6 @@ static void riscv_console_probe(void)
riscv_console.putchar = htif_console_putchar;
riscv_console.getchar = htif_console_getchar;
};
-#endif
#if RISCV_CONSOLE_MAX_NS16550_DEVICES > 0
if (
@@ -280,10 +277,9 @@ rtems_status_code console_initialize(
void *arg
)
{
-#if RISCV_ENABLE_HTIF_SUPPORT != 0
rtems_termios_device_context *base;
char htif_path[] = "/dev/ttyShtif";
-#endif
+
#if RISCV_CONSOLE_MAX_NS16550_DEVICES > 0
char path[] = "/dev/ttyS?";
size_t i;
@@ -296,14 +292,12 @@ rtems_status_code console_initialize(
rtems_termios_initialize();
-#if RISCV_ENABLE_HTIF_SUPPORT != 0
base = &htif_console_instance.base;
rtems_termios_device_install(htif_path, &htif_console_handler, NULL, base);
if (base == riscv_console.context) {
link(htif_path, CONSOLE_DEVICE_NAME);
}
-#endif
#if RISCV_CONSOLE_MAX_NS16550_DEVICES > 0
for (i = 0; i < RISCV_CONSOLE_MAX_NS16550_DEVICES; ++i) {