diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-07 09:32:31 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-07 09:32:31 +0100 |
commit | 847fc79da16058bfde4c46f7ab535dbc94f592d3 (patch) | |
tree | 1a70e37a03bd5fc4fb04fb1e568574abbaa8872f /c/src/lib/libbsp | |
parent | bsp/leon3: New BSP variant leon3_qemu (diff) | |
download | rtems-847fc79da16058bfde4c46f7ab535dbc94f592d3.tar.bz2 |
Revert "bsp/leon3: New BSP variant leon3_qemu"
This reverts commit 7579e255127ee0cf04901bbab6c1538559053508.
Improve QEMU to support AMBA plug and play instead.
Diffstat (limited to 'c/src/lib/libbsp')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/Makefile.am | 1 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/amba/amba.c | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/clock/ckinit.c | 25 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/configure.ac | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/console/console.c | 13 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/console/printk_support.c | 26 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/make/custom/leon3_qemu.cfg | 9 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/preinstall.am | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/startup/linkcmds.leon3_qemu | 12 |
9 files changed, 0 insertions, 99 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/Makefile.am b/c/src/lib/libbsp/sparc/leon3/Makefile.am index ac97ecc8fa..1a24cbfd4b 100644 --- a/c/src/lib/libbsp/sparc/leon3/Makefile.am +++ b/c/src/lib/libbsp/sparc/leon3/Makefile.am @@ -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 diff --git a/c/src/lib/libbsp/sparc/leon3/amba/amba.c b/c/src/lib/libbsp/sparc/leon3/amba/amba.c index c766c762d4..eb7b0f2a40 100644 --- a/c/src/lib/libbsp/sparc/leon3/amba/amba.c +++ b/c/src/lib/libbsp/sparc/leon3/amba/amba.c @@ -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 */ } diff --git a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c index 695e78dfbc..e0556ba31a 100644 --- a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c +++ b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c @@ -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; diff --git a/c/src/lib/libbsp/sparc/leon3/configure.ac b/c/src/lib/libbsp/sparc/leon3/configure.ac index e22f69a00e..dbefd3e8f2 100644 --- a/c/src/lib/libbsp/sparc/leon3/configure.ac +++ b/c/src/lib/libbsp/sparc/leon3/configure.ac @@ -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 diff --git a/c/src/lib/libbsp/sparc/leon3/console/console.c b/c/src/lib/libbsp/sparc/leon3/console/console.c index 4174a71462..7e726336b0 100644 --- a/c/src/lib/libbsp/sparc/leon3/console/console.c +++ b/c/src/lib/libbsp/sparc/leon3/console/console.c @@ -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 diff --git a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c index 4c656785a7..286e37dca5 100644 --- a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c +++ b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c @@ -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) { diff --git a/c/src/lib/libbsp/sparc/leon3/make/custom/leon3_qemu.cfg b/c/src/lib/libbsp/sparc/leon3/make/custom/leon3_qemu.cfg deleted file mode 100644 index 62ffebc2e2..0000000000 --- a/c/src/lib/libbsp/sparc/leon3/make/custom/leon3_qemu.cfg +++ /dev/null @@ -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 diff --git a/c/src/lib/libbsp/sparc/leon3/preinstall.am b/c/src/lib/libbsp/sparc/leon3/preinstall.am index c3c81995f2..0005edda03 100644 --- a/c/src/lib/libbsp/sparc/leon3/preinstall.am +++ b/c/src/lib/libbsp/sparc/leon3/preinstall.am @@ -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 diff --git a/c/src/lib/libbsp/sparc/leon3/startup/linkcmds.leon3_qemu b/c/src/lib/libbsp/sparc/leon3/startup/linkcmds.leon3_qemu deleted file mode 100644 index 1a0e3e5afd..0000000000 --- a/c/src/lib/libbsp/sparc/leon3/startup/linkcmds.leon3_qemu +++ /dev/null @@ -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 |