diff options
author | Mary Ruthven <mruthven@chromium.org> | 2021-11-09 17:34:35 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-18 04:52:28 +0000 |
commit | deb7b9dbaf9c54b5c34dbc6269f178861c8e5992 (patch) | |
tree | 30376ecc91d852e222caafec82693d5cd412ef42 | |
parent | b22109815b95736de6815c6f4be01bbdc26a8277 (diff) | |
download | chrome-ec-deb7b9dbaf9c54b5c34dbc6269f178861c8e5992.tar.gz |
Revert "chip/npcx: Add support for pad-switching UART"
This reverts commit ab9084fd2a70a505e0e43b39e0ad40876e4853fc.
BUG=b:200823466
TEST=make buildall -j
Change-Id: I2bc23607e4658260bd83c8f9c85d24fe1f9131a2
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273444
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
-rw-r--r-- | core/cortex-m/panic.c | 4 | ||||
-rw-r--r-- | include/config.h | 7 | ||||
-rw-r--r-- | include/uart.h | 43 |
3 files changed, 0 insertions, 54 deletions
diff --git a/core/cortex-m/panic.c b/core/cortex-m/panic.c index df58db838b..a309728d12 100644 --- a/core/cortex-m/panic.c +++ b/core/cortex-m/panic.c @@ -13,7 +13,6 @@ #include "system.h" #include "task.h" #include "timer.h" -#include "uart.h" #include "util.h" #include "watchdog.h" @@ -337,9 +336,6 @@ void __keep report_panic(void) pdata->cm.hfsr = CPU_NVIC_HFSR; pdata->cm.dfsr = CPU_NVIC_DFSR; -#ifdef CONFIG_UART_PAD_SWITCH - uart_reset_default_pad_panic(); -#endif panic_data_print(pdata); #ifdef CONFIG_DEBUG_EXCEPTIONS panic_show_process_stack(pdata); diff --git a/include/config.h b/include/config.h index c3ad6cacd3..3623c418c3 100644 --- a/include/config.h +++ b/include/config.h @@ -3392,13 +3392,6 @@ #undef CONFIG_UART_INPUT_FILTER /* - * Allow switching the EC console UART to an alternate pad. This must be - * used for short transactions only, and EC is only able to receive data on - * that alternate pad after it has been explicitly switched. - */ -#undef CONFIG_UART_PAD_SWITCH - -/* * UART receive buffer size in bytes. Must be a power of 2 for macros in * common/uart_buffering.c to work properly. Must be larger than * CONFIG_CONSOLE_INPUT_LINE_SIZE to copy and paste scripts. diff --git a/include/uart.h b/include/uart.h index e907837d14..41da673daf 100644 --- a/include/uart.h +++ b/include/uart.h @@ -249,49 +249,6 @@ int uart_comx_putc_ok(void); */ void uart_comx_putc(int c); -/* - * Functions for pad switching UART, only defined on some chips (npcx), and - * if CONFIG_UART_PAD_SWITCH is enabled. - */ -enum uart_pad { - UART_DEFAULT_PAD = 0, - UART_ALTERNATE_PAD = 1, -}; - -/** - * Reset UART pad to default pad, so that a panic information can be printed - * on the EC console. - */ -void uart_reset_default_pad_panic(void); - -/** - * Specialized function to write then read data on UART alternate pad. - * The transfer may be interrupted at any time if data is received on the main - * pad. - * - * @param tx Data to be sent - * @param tx_len Length of data to be sent - * @param rx Buffer to receive data - * @param rx_len Receive buffer length - * @param timeout_us Timeout in microseconds for the transaction to complete. - * - * @return The number of bytes read back (indicates a timeout if != rx_len). - * - -EC_ERROR_BUSY if the alternate pad cannot be used (e.g. default - * pad is currently being used), or if the transfer was interrupted. - * - -EC_ERROR_TIMEOUT in case tx_len bytes cannot be written in the - * time specified in timeout_us. - */ -int uart_alt_pad_write_read(uint8_t *tx, int tx_len, uint8_t *rx, int rx_len, - int timeout_us); - -/** - * Interrupt handler for default UART RX pin transition when UART is switched - * to alternate pad. - * - * @param signal Signal which triggered the interrupt. - */ -void uart_default_pad_rx_interrupt(enum gpio_signal signal); - /* Return the size of the free room in the UART TX circular buffer. */ size_t uart_buffer_room(void); |