summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlek Du <alek.du@intel.com>2008-10-21 14:21:35 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 20:22:38 -0700
commitc883a5ce980f21beb3069a6aa96ec822e4229055 (patch)
tree7896f5095ab93f8429a30e01ff3d0c2d7a141c22
parentde0e4d223d083d695d62c4d057f40105a2889e76 (diff)
downloadbootstub-c883a5ce980f21beb3069a6aa96ec822e4229055.tar.gz
Adding delay in SPI-UART code to match MSVP and Lanford VV board.
-rw-r--r--spi-uart.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/spi-uart.c b/spi-uart.c
index bbe2d23..43e73db 100644
--- a/spi-uart.c
+++ b/spi-uart.c
@@ -70,13 +70,20 @@ static void max3110_write_config(void)
pspi->dr[0] = config;
}
+static void spi_uart_delay(volatile unsigned int loops)
+{
+ while (loops--);
+}
+
/* transfer char to a eligibal word and send to max3110 */
static void max3110_write_data(char c)
{
u16 data;
+ spi_uart_delay(0x8000);
data = 0x8000 | c;
pspi->dr[0] = data;
+ spi_uart_delay(0x8000);
}
/* slave select should be called in the read/write function */