diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-11 15:50:04 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-11 15:50:04 +0000 |
commit | a3ca595f1ab85c8b43bca39e29a74038de29958e (patch) | |
tree | 6dfd3c68af9cc73dedc43f0c40caf1ef9da08ee9 /c/src/lib/libbsp/nios2 | |
parent | 2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-a3ca595f1ab85c8b43bca39e29a74038de29958e.tar.bz2 |
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* clock/clock.c, include/bsp.h, startup/bspstart.c: Eliminate copies of
the Configuration Table. Use the RTEMS provided accessor macros to
obtain configuration fields.
Diffstat (limited to 'c/src/lib/libbsp/nios2')
-rw-r--r-- | c/src/lib/libbsp/nios2/nios2_iss/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c | 17 |
4 files changed, 11 insertions, 16 deletions
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog b/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog index f5419d4056..d3604bc696 100644 --- a/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog +++ b/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> + + * clock/clock.c, include/bsp.h, startup/bspstart.c: Eliminate copies of + the Configuration Table. Use the RTEMS provided accessor macros to + obtain configuration fields. + 2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com> * console/console.c, include/bsp.h, startup/bspstart.c: Move diff --git a/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c b/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c index e676b7fa91..b1b999d732 100644 --- a/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c +++ b/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c @@ -39,7 +39,7 @@ void Clock_driver_support_initialize_hardware(void) CLOCK_REGS->control = ALTERA_AVALON_TIMER_CONTROL_STOP_MSK; - period = (CLOCK_FREQ/1000000L)*BSP_Configuration.microseconds_per_tick - 1; + period = (CLOCK_FREQ/1000000L)*rtems_configuration_get_microseconds_per_tick() - 1; CLOCK_REGS->period_hi = period >> 16; CLOCK_REGS->period_lo = period & 0xFFFF; diff --git a/c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h b/c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h index 3680e0815d..2e90f82eac 100644 --- a/c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h +++ b/c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h @@ -132,8 +132,6 @@ altera_avalon_jtag_uart_regs; /* miscellaneous stuff assumed to exist */ -extern rtems_configuration_table BSP_Configuration; - /* * Device Driver Table Entries */ diff --git a/c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c b/c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c index 6f55425f3f..0297a9136c 100644 --- a/c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c +++ b/c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c @@ -23,20 +23,11 @@ #include <rtems/libcsupport.h> /* - * The original table from the application and our copy of it with - * some changes. - */ - -extern rtems_configuration_table Configuration; -rtems_configuration_table BSP_Configuration; - -/* * Use the shared implementations of the following routines */ extern void bsp_postdriver_hook(void); extern void bsp_libc_init( void *, uint32_t, int ); -extern rtems_configuration_table BSP_Configuration; #if 0 extern char _RAMBase[]; @@ -69,8 +60,8 @@ void bsp_pretasking_hook(void) #endif unsigned long ramSpace; - heapStart = (unsigned long)BSP_Configuration.work_space_start - + BSP_Configuration.work_space_size; + heapStart = (unsigned long)Configuration.work_space_start + + rtems_configuration_get_work_space_size(); if (heapStart & (CPU_ALIGNMENT-1)) heapStart = (heapStart + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); @@ -121,9 +112,9 @@ void bsp_start( void ) */ #if 0 - BSP_Configuration.work_space_start = (void *)_WorkspaceBase; + Configuration.work_space_start = (void *)_WorkspaceBase; #else - BSP_Configuration.work_space_start = (void *)__alt_heap_start; + Configuration.work_space_start = (void *)__alt_heap_start; #endif } |