Changeset 7579e25 in rtems
- Timestamp:
- 11/25/13 07:46:19 (10 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 847fc79
- Parents:
- 224b888
- git-author:
- Sebastian Huber <sebastian.huber@…> (11/25/13 07:46:19)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (02/06/14 07:47:03)
- Location:
- c/src/lib/libbsp/sparc/leon3
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/sparc/leon3/Makefile.am
r224b888 r7579e25 27 27 dist_project_lib_DATA += startup/linkcmds 28 28 dist_project_lib_DATA += startup/linkcmds.leon3 29 dist_project_lib_DATA += startup/linkcmds.leon3_qemu 29 30 dist_project_lib_DATA += startup/linkcmds.ngmp 30 31 -
c/src/lib/libbsp/sparc/leon3/amba/amba.c
r224b888 r7579e25 40 40 void amba_initialize(void) 41 41 { 42 #ifndef LEON3_QEMU 42 43 int icsel; 43 44 struct ambapp_dev *adev; … … 91 92 (LEON3_Timer_Regs->scaler_reload + 1) * 1000000); 92 93 } 94 #else /* LEON3_QEMU */ 95 LEON3_IrqCtrl_Regs = (volatile struct irqmp_regs *)0x80000200; 96 #endif /* LEON3_QEMU */ 93 97 } -
c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
r224b888 r7579e25 56 56 #endif 57 57 58 #ifndef LEON3_QEMU 58 59 #define Clock_driver_support_find_timer() \ 59 60 do { \ … … 72 73 } \ 73 74 } while (0) 75 #else /* LEON3_QEMU */ 76 #define Clock_driver_support_find_timer() \ 77 do { \ 78 LEON3_Timer_Regs = (volatile struct gptimer_regs *) \ 79 0x80000300; \ 80 clkirq = 6; \ 81 } while (0) 82 #endif /* LEON3_QEMU */ 74 83 75 84 #define Clock_driver_support_install_isr( _new, _old ) \ … … 78 87 } while(0) 79 88 89 #ifndef LEON3_QEMU 80 90 #define Clock_driver_support_initialize_hardware() \ 81 91 do { \ … … 87 97 LEON3_GPTIMER_LD | LEON3_GPTIMER_IRQEN; \ 88 98 } while (0) 99 #else 100 #define Clock_driver_support_initialize_hardware() \ 101 do { \ 102 LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].reload = \ 103 40 * (rtems_configuration_get_microseconds_per_tick() - 1); \ 104 \ 105 LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].ctrl = \ 106 LEON3_GPTIMER_EN | LEON3_GPTIMER_RL | \ 107 LEON3_GPTIMER_LD | LEON3_GPTIMER_IRQEN; \ 108 } while (0) 109 #endif 89 110 90 111 #define Clock_driver_support_shutdown_hardware() \ … … 102 123 return 0; 103 124 125 #ifndef LEON3_QEMU 104 126 clicks = LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].value; 127 #else 128 clicks = LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].value / 40; 129 #endif 105 130 106 131 if ( LEON_Is_interrupt_pending( clkirq ) ) { -
c/src/lib/libbsp/sparc/leon3/configure.ac
r224b888 r7579e25 27 27 better.]) 28 28 29 RTEMS_BSPOPTS_SET([SIMSPARC_FAST_IDLE],[*qemu],[1]) 29 30 RTEMS_BSPOPTS_SET([SIMSPARC_FAST_IDLE],[*],[]) 30 31 RTEMS_BSPOPTS_HELP([SIMSPARC_FAST_IDLE], … … 38 39 determining the CPU core number in an SMP configuration.]) 39 40 41 RTEMS_BSPOPTS_SET([LEON3_QEMU],[*qemu],[1]) 42 RTEMS_BSPOPTS_HELP([LEON3_QEMU], 43 [If defined, then use settings for QEMU simulator.]) 44 40 45 RTEMS_BSP_CLEANUP_OPTIONS(0, 1) 41 46 RTEMS_BSP_LINKCMDS -
c/src/lib/libbsp/sparc/leon3/console/console.c
r224b888 r7579e25 218 218 } 219 219 220 #ifndef LEON3_QEMU 220 221 /* AMBA PP find routine. Extract AMBA PnP information into data structure. */ 221 222 static int find_matching_apbuart(struct ambapp_dev *dev, int index, void *arg) … … 249 250 GAISLER_APBUART, find_matching_apbuart, NULL); 250 251 } 252 #else /* LEON3_QEMU */ 253 static void leon3_console_scan_uarts(void) 254 { 255 uarts = 1; 256 257 apbuarts[0].regs = (struct apbuart_regs *)0x80000100; 258 #if CONSOLE_USE_INTERRUPTS 259 apbuarts[0].irq = 3; 260 #endif 261 apbuarts[0].freq_hz = 40000000; 262 } 263 #endif /* LEON3_QEMU */ 251 264 252 265 /* -
c/src/lib/libbsp/sparc/leon3/console/printk_support.c
r224b888 r7579e25 26 26 static struct apbuart_regs *dbg_uart = NULL; 27 27 28 #ifndef LEON3_QEMU 28 29 /* Before UART driver has registered (or when no UART is available), calls to 29 30 * printk that gets to bsp_out_char() will be filling data into the … … 74 75 } 75 76 } 77 #else 78 static void bsp_out_char(char c); 79 80 static void leon3_qemu_debug_uart_init(char c) 81 { 82 bsp_debug_uart_init(); 83 84 BSP_output_char = bsp_out_char; 85 86 bsp_out_char(c); 87 } 88 89 void bsp_debug_uart_init(void) 90 { 91 dbg_uart = (struct apbuart_regs *)0x80000100; 92 dbg_uart->ctrl |= LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE; 93 dbg_uart->status = 0; 94 } 95 #endif 76 96 77 97 /* … … 129 149 static void bsp_out_char(char c) 130 150 { 151 #ifndef LEON3_QEMU 131 152 if (dbg_uart == NULL) { 132 153 /* Local debug buffer when UART driver has not registered */ … … 135 156 return; 136 157 } 158 #endif 137 159 138 160 apbuart_outbyte_polled(dbg_uart, c, 1, 1); … … 145 167 #include <rtems/bspIo.h> 146 168 169 #ifndef LEON3_QEMU 147 170 BSP_output_char_function_type BSP_output_char = bsp_out_char; 171 #else 172 BSP_output_char_function_type BSP_output_char = leon3_qemu_debug_uart_init; 173 #endif 148 174 149 175 static int bsp_in_char(void) -
c/src/lib/libbsp/sparc/leon3/preinstall.am
r224b888 r7579e25 82 82 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.leon3 83 83 84 $(PROJECT_LIB)/linkcmds.leon3_qemu: startup/linkcmds.leon3_qemu $(PROJECT_LIB)/$(dirstamp) 85 $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.leon3_qemu 86 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.leon3_qemu 87 84 88 $(PROJECT_LIB)/linkcmds.ngmp: startup/linkcmds.ngmp $(PROJECT_LIB)/$(dirstamp) 85 89 $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.ngmp
Note: See TracChangeset
for help on using the changeset viewer.