path: root/include/drivers
diff options
authorAndre Przywara <andre.przywara@arm.com>2020-01-25 00:54:38 +0000
committerAndre Przywara <andre.przywara@arm.com>2020-02-25 09:34:38 +0000
commitac71344e9eca1f7d1e0ce4a67aca776470639b1c (patch)
tree32d1a232d6f27eafb622f68529a6597d8ad9c0e1 /include/drivers
parent2f39c55c085ae92b6eead06172096410e5aab81c (diff)
console: Integrate UART base address in generic console_t
*All* UART drivers in TF-A are storing their base address as a uintptr_t pointer in the first location of the UART specific driver data. Since the base address is a pretty natural and generic data item, we should integrate this into the generic console_t structure. That will not only allow to remove a lot of seemingly UART specific data structures, but also enables to simplify runtime choices between different UARTs, since they can share the same pointer. This patch just adds the new member, the existing data structures will be handled on a per-UART base in follow-up patches. Change-Id: I59ce49471ccc8f3b870f2cfd8a72ebfd0cb14d12 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'include/drivers')
1 files changed, 3 insertions, 1 deletions
diff --git a/include/drivers/console.h b/include/drivers/console.h
index a4859d80f0..761816ac74 100644
--- a/include/drivers/console.h
+++ b/include/drivers/console.h
@@ -14,7 +14,8 @@
#define CONSOLE_T_PUTC (U(2) * REGSZ)
#define CONSOLE_T_GETC (U(3) * REGSZ)
#define CONSOLE_T_FLUSH (U(4) * REGSZ)
+#define CONSOLE_T_BASE (U(5) * REGSZ)
#define CONSOLE_FLAG_BOOT (U(1) << 0)
#define CONSOLE_FLAG_RUNTIME (U(1) << 1)
@@ -43,6 +44,7 @@ typedef struct console {
int (*const putc)(int character, struct console *console);
int (*const getc)(struct console *console);
int (*const flush)(struct console *console);
+ uintptr_t base;
/* Additional private driver data may follow here. */
} console_t;