Revert "bsp/leon3: New BSP variant leon3_qemu"

This reverts commit 7579e25512.

Improve QEMU to support AMBA plug and play instead.
This commit is contained in:
Sebastian Huber
2014-02-07 09:32:31 +01:00
parent 7579e25512
commit 847fc79da1
9 changed files with 0 additions and 99 deletions

View File

@@ -26,7 +26,6 @@ project_lib_DATA = start.$(OBJEXT)
dist_project_lib_DATA += ../shared/startup/linkcmds.base
dist_project_lib_DATA += startup/linkcmds
dist_project_lib_DATA += startup/linkcmds.leon3
dist_project_lib_DATA += startup/linkcmds.leon3_qemu
dist_project_lib_DATA += startup/linkcmds.ngmp
noinst_LIBRARIES += libbsp.a

View File

@@ -39,7 +39,6 @@ volatile struct irqmp_regs *LEON3_IrqCtrl_Regs;
void amba_initialize(void)
{
#ifndef LEON3_QEMU
int icsel;
struct ambapp_dev *adev;
@@ -91,7 +90,4 @@ void amba_initialize(void)
ambapp_freq_init(&ambapp_plb, adev,
(LEON3_Timer_Regs->scaler_reload + 1) * 1000000);
}
#else /* LEON3_QEMU */
LEON3_IrqCtrl_Regs = (volatile struct irqmp_regs *)0x80000200;
#endif /* LEON3_QEMU */
}

View File

@@ -55,7 +55,6 @@ static int clkirq;
#define Adjust_clkirq_for_node() do { clkirq += LEON3_CLOCK_INDEX; } while(0)
#endif
#ifndef LEON3_QEMU
#define Clock_driver_support_find_timer() \
do { \
struct ambapp_dev *adev; \
@@ -72,21 +71,12 @@ static int clkirq;
Adjust_clkirq_for_node(); \
} \
} while (0)
#else /* LEON3_QEMU */
#define Clock_driver_support_find_timer() \
do { \
LEON3_Timer_Regs = (volatile struct gptimer_regs *) \
0x80000300; \
clkirq = 6; \
} while (0)
#endif /* LEON3_QEMU */
#define Clock_driver_support_install_isr( _new, _old ) \
do { \
_old = set_vector( _new, CLOCK_VECTOR, 1 ); \
} while(0)
#ifndef LEON3_QEMU
#define Clock_driver_support_initialize_hardware() \
do { \
LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].reload = \
@@ -96,17 +86,6 @@ static int clkirq;
LEON3_GPTIMER_EN | LEON3_GPTIMER_RL | \
LEON3_GPTIMER_LD | LEON3_GPTIMER_IRQEN; \
} while (0)
#else
#define Clock_driver_support_initialize_hardware() \
do { \
LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].reload = \
40 * (rtems_configuration_get_microseconds_per_tick() - 1); \
\
LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].ctrl = \
LEON3_GPTIMER_EN | LEON3_GPTIMER_RL | \
LEON3_GPTIMER_LD | LEON3_GPTIMER_IRQEN; \
} while (0)
#endif
#define Clock_driver_support_shutdown_hardware() \
do { \
@@ -122,11 +101,7 @@ static uint32_t bsp_clock_nanoseconds_since_last_tick(void)
if ( !LEON3_Timer_Regs )
return 0;
#ifndef LEON3_QEMU
clicks = LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].value;
#else
clicks = LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].value / 40;
#endif
if ( LEON_Is_interrupt_pending( clkirq ) ) {
clicks = LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].value;

View File

@@ -26,7 +26,6 @@ RTEMS_BSPOPTS_HELP([CONSOLE_USE_INTERRUPTS],
Under the simulator (especially when FAST_UART is defined), polled seems to operate
better.])
RTEMS_BSPOPTS_SET([SIMSPARC_FAST_IDLE],[*qemu],[1])
RTEMS_BSPOPTS_SET([SIMSPARC_FAST_IDLE],[*],[])
RTEMS_BSPOPTS_HELP([SIMSPARC_FAST_IDLE],
[If defined, speed up the clock ticks while the idle task is running so
@@ -38,10 +37,6 @@ RTEMS_BSPOPTS_HELP([BSP_LEON3_SMP],
[Always defined when on a LEON3 to enable the LEON3 support for
determining the CPU core number in an SMP configuration.])
RTEMS_BSPOPTS_SET([LEON3_QEMU],[*qemu],[1])
RTEMS_BSPOPTS_HELP([LEON3_QEMU],
[If defined, then use settings for QEMU simulator.])
RTEMS_BSP_CLEANUP_OPTIONS(0, 1)
RTEMS_BSP_LINKCMDS

View File

@@ -217,7 +217,6 @@ static int leon3_console_set_attributes(int minor, const struct termios *t)
return 0;
}
#ifndef LEON3_QEMU
/* AMBA PP find routine. Extract AMBA PnP information into data structure. */
static int find_matching_apbuart(struct ambapp_dev *dev, int index, void *arg)
{
@@ -249,18 +248,6 @@ static void leon3_console_scan_uarts(void)
ambapp_for_each(&ambapp_plb, (OPTIONS_ALL|OPTIONS_APB_SLVS), VENDOR_GAISLER,
GAISLER_APBUART, find_matching_apbuart, NULL);
}
#else /* LEON3_QEMU */
static void leon3_console_scan_uarts(void)
{
uarts = 1;
apbuarts[0].regs = (struct apbuart_regs *)0x80000100;
#if CONSOLE_USE_INTERRUPTS
apbuarts[0].irq = 3;
#endif
apbuarts[0].freq_hz = 40000000;
}
#endif /* LEON3_QEMU */
/*
* Console Device Driver Entry Points

View File

@@ -25,7 +25,6 @@
int debug_uart_index __attribute__((weak)) = 0;
static struct apbuart_regs *dbg_uart = NULL;
#ifndef LEON3_QEMU
/* Before UART driver has registered (or when no UART is available), calls to
* printk that gets to bsp_out_char() will be filling data into the
* pre_printk_dbgbuf[] buffer, hopefully the buffer can help debugging the
@@ -74,25 +73,6 @@ void bsp_debug_uart_init(void)
dbg_uart->status = 0;
}
}
#else
static void bsp_out_char(char c);
static void leon3_qemu_debug_uart_init(char c)
{
bsp_debug_uart_init();
BSP_output_char = bsp_out_char;
bsp_out_char(c);
}
void bsp_debug_uart_init(void)
{
dbg_uart = (struct apbuart_regs *)0x80000100;
dbg_uart->ctrl |= LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE;
dbg_uart->status = 0;
}
#endif
/*
* apbuart_outbyte_polled
@@ -148,14 +128,12 @@ int apbuart_inbyte_nonblocking(struct apbuart_regs *regs)
/* putchar/getchar for printk */
static void bsp_out_char(char c)
{
#ifndef LEON3_QEMU
if (dbg_uart == NULL) {
/* Local debug buffer when UART driver has not registered */
pre_printk_dbgbuf[pre_printk_pos++] = c;
pre_printk_pos = pre_printk_pos & (sizeof(pre_printk_dbgbuf)-1);
return;
}
#endif
apbuart_outbyte_polled(dbg_uart, c, 1, 1);
}
@@ -166,11 +144,7 @@ static void bsp_out_char(char c)
#include <rtems/bspIo.h>
#ifndef LEON3_QEMU
BSP_output_char_function_type BSP_output_char = bsp_out_char;
#else
BSP_output_char_function_type BSP_output_char = leon3_qemu_debug_uart_init;
#endif
static int bsp_in_char(void)
{

View File

@@ -1,9 +0,0 @@
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=sparc
RTEMS_CPU_MODEL=leon3
CPU_CFLAGS = -mcpu=leon3 -msoft-float
CFLAGS_OPTIMIZE_V = -O0 -g

View File

@@ -81,10 +81,6 @@ $(PROJECT_LIB)/linkcmds.leon3: startup/linkcmds.leon3 $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.leon3
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.leon3
$(PROJECT_LIB)/linkcmds.leon3_qemu: startup/linkcmds.leon3_qemu $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.leon3_qemu
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.leon3_qemu
$(PROJECT_LIB)/linkcmds.ngmp: startup/linkcmds.ngmp $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.ngmp
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.ngmp

View File

@@ -1,12 +0,0 @@
MEMORY {
rom : ORIGIN = 0x00000000, LENGTH = 8M
ram : ORIGIN = 0x40000000, LENGTH = 64M
}
_PROM_START = ORIGIN (rom);
_PROM_SIZE = LENGTH (rom);
_RAM_START = ORIGIN (ram);
_RAM_SIZE = LENGTH (ram);
INCLUDE linkcmds.base