Skip to content

Commit

Permalink
[nrf fromlist] platform: Add platform default UART control definition
Browse files Browse the repository at this point in the history
Add platform default UART control definition.
For platforms that wishes to use a UART configuration different from
the default CMSIS control value the default valuse need to be supplied
in the call to set control.

This makes it possible for a platform to set for example Hardware
Flow Contol configuration.
Having support for Hardware Flow Control is useful for running the TF-M
regression tests reliably.

Upstream PR:
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20374

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
  • Loading branch information
joerchan authored and tejlmand committed Apr 18, 2023
1 parent 4b5eb25 commit f16b472
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion platform/ext/common/uart_stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void stdio_init(void)
ret = STDIO_DRIVER.PowerControl(ARM_POWER_FULL);
ASSERT_HIGH(ret);

ret = STDIO_DRIVER.Control(ARM_USART_MODE_ASYNCHRONOUS,
ret = STDIO_DRIVER.Control(DEFAULT_UART_CONTROL | ARM_USART_MODE_ASYNCHRONOUS,
DEFAULT_UART_BAUDRATE);
ASSERT_HIGH(ret);
(void)ret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
/*ARM UART Controller PL011*/
#define UART0_PL011

#define DEFAULT_UART_CONTROL 0
/* Default UART baud rate */
#define DEFAULT_UART_BAUDRATE 115200

Expand Down
1 change: 1 addition & 0 deletions platform/ext/target/arm/mps2/an519/device_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#define APB_PPCEXP2_S

/* ARM UART */
#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200
#define ARM_UART0_S
#define ARM_UART0_NS
Expand Down
1 change: 1 addition & 0 deletions platform/ext/target/arm/mps2/an521/device_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#define APB_PPCEXP2_S

/* ARM UART */
#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200
#define ARM_UART0_S
#define ARM_UART0_NS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#define APB_PPCEXP2_S

/* ARM UART CMSDK */
#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200
#define UART0_CMSDK_S
#define UART0_CMSDK_NS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#define PPC_SSE300_PERIPH_EXP3_S

/* ARM UART CMSDK */
#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200
#define UART0_CMSDK_NS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#define PPC_SSE300_PERIPH_EXP3_S

/* ARM UART CMSDK */
#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200
#define UART0_CMSDK_NS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* platform's device definition
*/

#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
#define SE_MHU_RECEIVER_DEV SE_MHU_RECEIVER_DEV_S
#endif

#define DEFAULT_UART_CONTROL 0
/* Default UART baud rate */
#define DEFAULT_UART_BAUDRATE 115200

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
/* Cache */
#define SSE_200_CACHE_S

#define DEFAULT_UART_CONTROL 0
/* Default UART baud rate */
#define DEFAULT_UART_BAUDRATE 115200

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#define ATU_S

/* ARM UART PL011 */
#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200
#define UART0_PL011_S
#define UART0_PL011_NS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define CY_TCPWM0_TIMER0_S
#define CY_TCPWM0_TIMER1_NS

#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200

#endif /* __ARM_LTD_DEVICE_CFG_H__ */
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* address.
*/

#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200

#endif /* __ARM_LTD_DEVICE_CFG_H__ */
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* address.
*/

#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200

#endif /* __ARM_LTD_DEVICE_CFG_H__ */
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* address.
*/

#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200

#endif /* __ARM_LTD_DEVICE_CFG_H__ */
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "NuMicro.h"

/* ARM UART CMSDK */
#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200
#define UART0_CMSDK_S
#define UART0_CMSDK_NS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "NuMicro.h"

/* ARM UART CMSDK */
#define DEFAULT_UART_CONTROL 0
#define DEFAULT_UART_BAUDRATE 115200
#define UART0_CMSDK_S
#define UART0_CMSDK_NS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
/*ARM UART Controller */
//TBD

#define DEFAULT_UART_CONTROL 0
/* Default UART baud rate */
#define DEFAULT_UART_BAUDRATE 115200

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*/


#define DEFAULT_UART_CONTROL 0
/* Default UART baud rate */
#define DEFAULT_UART_BAUDRATE 115200

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*/


#define DEFAULT_UART_CONTROL 0
/* Default UART baud rate */
#define DEFAULT_UART_BAUDRATE 115200

Expand Down
1 change: 1 addition & 0 deletions platform/ext/target/stm/stm32l562e_dk/include/device_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*/


#define DEFAULT_UART_CONTROL 0
/* Default UART baud rate */
#define DEFAULT_UART_BAUDRATE 115200

Expand Down

0 comments on commit f16b472

Please sign in to comment.