From 2a0adceb5029c8ee633d17c82dbb11e48d30349d Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 30 Sep 2013 05:08:23 -0700 Subject: [PATCH] tegra124: Re-enable waiting for the transmitter to empty in the test function. The compiler was emitting code compatible with armv7-a, but the bootblock was running on a core which uses armv4t. By coincidence, it was emitting an instruction which is unavailable on armv4t when checking the value of the UART's LSR register. Now that the bootblock is compiled with more appropriate flags, this code can be re-introduced. BUG=None TEST=Built into the bootblock on nyan and, with the test function enabled, saw a stream of "!"s on the console. BRANCH=None Change-Id: I7ecada4138b0889b963d1a8b19a4bab8e0bb1add Signed-off-by: Gabe Black Reviewed-on: https://chromium-review.googlesource.com/170997 Reviewed-by: Gabe Black Tested-by: Gabe Black Commit-Queue: Gabe Black --- src/soc/nvidia/tegra124/bootblock.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/soc/nvidia/tegra124/bootblock.c b/src/soc/nvidia/tegra124/bootblock.c index 46997b96f0..fb5ddea3c4 100644 --- a/src/soc/nvidia/tegra124/bootblock.c +++ b/src/soc/nvidia/tegra124/bootblock.c @@ -83,10 +83,7 @@ static int test_func(void) // De-assert reset to UART. clrbits_le32((void *)(0x60006000 + 4 + 0), 1 << 6); - // This is supposed to wait for the transmitter to be empty, but it - // never completes for some reason. - if (0) - while (!(readr(5) & 0x40)); + while (!(readr(5) & 0x40)); writer(1, 0); writer(3, 0x80 | 0x3);