2008-12-18 Michael Hamel <nigel@adi.co.nz>

PR 1349/bsps
	* startup/bspstart.c: Add missing volatile on UART access pointer.
This commit is contained in:
Joel Sherrill
2008-12-18 18:51:28 +00:00
parent 534c893634
commit ec11156e23
2 changed files with 7 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
2008-12-18 Michael Hamel <nigel@adi.co.nz>
PR 1349/bsps
* startup/bspstart.c: Add missing volatile on UART access pointer.
2008-10-02 Joel Sherrill <joel.sherrill@OARcorp.com> 2008-10-02 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, preinstall.am: Use shared tm27.h stub. * Makefile.am, preinstall.am: Use shared tm27.h stub.

View File

@@ -88,7 +88,7 @@ uint32_t bsp_timer_average_overhead;
static void static void
EarlyUARTInit(int baudRate) EarlyUARTInit(int baudRate)
{ {
uint8_t* up = (uint8_t*)(BSP_UART_IOBASE_COM1); volatile uint8_t* up = (uint8_t*)(BSP_UART_IOBASE_COM1);
int divider = BSP_UART_BAUD_BASE / baudRate; int divider = BSP_UART_BAUD_BASE / baudRate;
up[LCR] = DLAB; /* Access DLM/DLL */ up[LCR] = DLAB; /* Access DLM/DLL */
up[DLL] = divider & 0x0FF; up[DLL] = divider & 0x0FF;
@@ -151,7 +151,7 @@ void Init_FPGA(void)
static void static void
DirectUARTWrite(const char c) DirectUARTWrite(const char c)
{ {
uint8_t* up = (uint8_t*)(BSP_UART_IOBASE_COM1); volatile uint8_t* up = (uint8_t*)(BSP_UART_IOBASE_COM1);
while ((up[LSR] & THRE) == 0) { ; } while ((up[LSR] & THRE) == 0) { ; }
up[THR] = c; up[THR] = c;
if (c=='\n') if (c=='\n')