LEON3: debugputs removed pointless isinit code, invoked only once

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
This commit is contained in:
Daniel Hellstrom
2012-04-19 15:21:24 +02:00
committed by Gedare Bloom
parent 5903484a29
commit 605b4b649d

View File

@@ -21,8 +21,6 @@
#include <assert.h>
#include <stdio.h>
static int isinit = 0;
/* Let user override which on-chip APBUART will be debug UART
* 0 = Default APBUART. On MP system CPU0=APBUART0, CPU1=APBUART1...
* 1 = APBUART[0]
@@ -50,7 +48,6 @@ int bsp_debug_uart_init(void)
struct ambapp_dev *adev;
struct ambapp_apb_info *apb;
if (isinit == 0) {
/* Update debug_uart_index to index used as debug console.
* Let user select Debug console by setting debug_uart_index. If the
* BSP is to provide the default UART (debug_uart_index==0):
@@ -80,14 +77,9 @@ int bsp_debug_uart_init(void)
dbg_uart = (ambapp_apb_uart *)apb->start;
dbg_uart->ctrl |= LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE;
dbg_uart->status = 0;
}
isinit = 1;
}
if (dbg_uart == NULL)
return 0;
else
return 1;
} else
return 0;
}
/*