diff options
Diffstat (limited to 'chip')
-rw-r--r-- | chip/g/system.c | 4 | ||||
-rw-r--r-- | chip/g/uartn.c | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/chip/g/system.c b/chip/g/system.c index 075068e7ba..323c258ea8 100644 --- a/chip/g/system.c +++ b/chip/g/system.c @@ -81,6 +81,10 @@ void system_pre_init(void) * no effect. */ GREG32(GLOBALSEC, FLASH_REGION0_CTRL_CFG_EN) = 0; + +#ifdef BOARD_CR50 + system_init_board_properties(); +#endif } void system_reset(int flags) diff --git a/chip/g/uartn.c b/chip/g/uartn.c index dc95f1fbf0..c534705eb3 100644 --- a/chip/g/uartn.c +++ b/chip/g/uartn.c @@ -119,13 +119,12 @@ void uartn_enable(int uart) GR_UART_CTRL(uart) = 0x01; /* TODO(crosbug.com/p/56540): Remove this when UART0_RX works everywhere */ -#ifdef GC_UART0_RX_DISABLE - if (!uart) +#if defined(BOARD_CR50) && !defined(SECTION_IS_RO) + if (!uart && (system_get_board_properties() & BOARD_DISABLE_UART0_RX)) return; #endif - /* Enable UART RX if it is connected to an external pad */ - if (DIO_SEL_REG(GC_PINMUX_UART0_RX_SEL_OFFSET + (uart * 16))) - GR_UART_CTRL(uart) |= 0x02; + + GR_UART_CTRL(uart) |= 0x02; } /* Disable TX, RX, HW flow control, and loopback */ |