aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Dannenberg <dannenberg@ti.com>2019-01-14 13:20:15 -0600
committerAndrew F. Davis <afd@ti.com>2019-01-21 13:39:51 -0600
commit50b2f55b69fd0515095e8cc2377f62fdc207074e (patch)
treec38d9c3fc5e7d36cee685729c5246b47074a9938
parentc40c88f81b7fb7c78e8f491b462f29814337dcf5 (diff)
downloadtrusted-firmware-a-50b2f55b69fd0515095e8cc2377f62fdc207074e.tar.gz
ti: k3: common: Allow customizing UART baud rate using build options
To accommodate scenarios where we want to use a UART baud rate other than the default 115,200 allow the associated compiler definition to be set via the K3_USART_BAUD build option by updating the platform make file. Since the platform make file now also contains the default value (still 115,200), go ahead and remove the redundant definition from the platform header file. Suggested-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
-rw-r--r--plat/ti/k3/common/plat_common.mk4
-rw-r--r--plat/ti/k3/include/platform_def.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/plat/ti/k3/common/plat_common.mk b/plat/ti/k3/common/plat_common.mk
index 9b3e7d84f5..c91a03586f 100644
--- a/plat/ti/k3/common/plat_common.mk
+++ b/plat/ti/k3/common/plat_common.mk
@@ -30,6 +30,10 @@ MULTI_CONSOLE_API := 1
TI_16550_MDR_QUIRK := 1
$(eval $(call add_define,TI_16550_MDR_QUIRK))
+# Allow customizing the UART baud rate
+K3_USART_BAUD := 115200
+$(eval $(call add_define,K3_USART_BAUD))
+
# Libraries
include lib/xlat_tables_v2/xlat_tables.mk
diff --git a/plat/ti/k3/include/platform_def.h b/plat/ti/k3/include/platform_def.h
index 5d563b6f0a..9447f04df3 100644
--- a/plat/ti/k3/include/platform_def.h
+++ b/plat/ti/k3/include/platform_def.h
@@ -136,10 +136,6 @@
#define K3_USART_CLK_SPEED 48000000
#endif
-#ifndef K3_USART_BAUD
-#define K3_USART_BAUD 115200
-#endif
-
/* Crash console defaults */
#define CRASH_CONSOLE_BASE K3_USART_BASE_ADDRESS
#define CRASH_CONSOLE_CLK K3_USART_CLK_SPEED