summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorDoug Anderson <dianders@chromium.org>2011-07-12 10:52:15 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:58:52 -0700
commit0474e2c2427cb9791bb0b6d1831ba60cda483dd5 (patch)
tree247785f4f25a3f6ba6a456bf1935d2582797aea9 /board
parentfe1620b1a6c26a325bc6edf326f96c6f89b07776 (diff)
CHROMIUM: ARM: tegra: Fix SPI mux on FDT-boards w/out SPI UART switch.
Testing: 1. Rebuilt with emerge-${BOARD} chromeos-u-boot chromeos-bootimage 2. Wrote with cros_write_firmware --board=${BOARD} /build/${BOARD}/u-boot/legacy_image.bin 3. Saw that the SPI was found and that the checksum matched. BUG=chromium-os:17437 TEST=See above. Change-Id: I96c0f7a2d70277739f78d4bf5810e1f8e728c747 Reviewed-on: http://gerrit.chromium.org/gerrit/3877 Tested-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/nvidia/common/uart-spi-fix.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/board/nvidia/common/uart-spi-fix.c b/board/nvidia/common/uart-spi-fix.c
index 803008ca187..45c189c9649 100644
--- a/board/nvidia/common/uart-spi-fix.c
+++ b/board/nvidia/common/uart-spi-fix.c
@@ -77,11 +77,19 @@ void gpio_early_init_uart(const void *blob)
void gpio_config_uart(const void *blob)
{
get_config(blob, &local);
- switch_pos = SWITCH_BOTH;
if (local.gpio != -1) {
gpio_direction_output(local.gpio, 0);
switch_pos = SWITCH_UART;
}
+ else {
+ /*
+ * If we're here we don't have a SPI switch; go ahead and
+ * enable the SPI now. We didn't in spi_init() so we wouldn't
+ * kill the UART.
+ */
+ pinmux_set_func(PINGRP_GMC, PMUX_FUNC_SFLASH);
+ switch_pos = SWITCH_BOTH;
+ }
}
#ifdef CONFIG_SPI_UART_SWITCH