summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2016-08-19 15:20:18 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-09-01 07:39:38 -0700
commite47eaaf2e8d38c25daf73f88249c2d96d554dc3a (patch)
treeda16fab22283ba42a812a6c02de708d0d618206e /chip
parentade0de9881ae843c4fae26180b2c6efbfd080363 (diff)
downloadchrome-ec-e47eaaf2e8d38c25daf73f88249c2d96d554dc3a.tar.gz
cr50: unlock console
UART0 RX only needs to be disabled on reef. This change uses a system property instead of a #define to disable UART0 RX that way it can just be done on Reef not Gru or the dev board. BUG=chrome-os-partner:55510 BRANCH=none TEST=manual rw 0x4060000c shows a value of 1 for reef and 3 for gru gru kevin and reef still boot. Connect DIOA13 to DIOA1 on the dev board and verify the console can be used. Change-Id: I5ee3559c2b35f959c0d67f233d1dfa40743b4064 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/378336 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r--chip/g/system.c4
-rw-r--r--chip/g/uartn.c9
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 */