2009-08-28 Joel Sherrill <joel.sherrill@OARcorp.com>

* bootcard.c, bsplibc.c, clockdrv_shell.h, console-polled.c: Fix
	formatting.
This commit is contained in:
Joel Sherrill
2009-08-28 18:24:10 +00:00
parent bcec9554ec
commit f1e8903dc0
5 changed files with 52 additions and 75 deletions

View File

@@ -1,3 +1,8 @@
2009-08-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* bootcard.c, bsplibc.c, clockdrv_shell.h, console-polled.c: Fix
formatting.
2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* src/irq-legacy.c: Spacing, tabs, and proper format for license

View File

@@ -88,7 +88,8 @@ static rtems_status_code bootcard_bsp_libc_helper(
* For the default heap size use the free space from the end of the
* work space up to the end of the work area as heap.
*/
heap_size_default = work_area_size - rtems_configuration_get_work_space_size();
heap_size_default = work_area_size -
rtems_configuration_get_work_space_size();
/* Keep it as a multiple of 16 bytes */
heap_size_default &= ~((intptr_t) 0xf);

View File

@@ -30,6 +30,5 @@ void bsp_libc_init(
/*
* Set up for the libc handling.
*/
libc_init();
}

View File

@@ -19,43 +19,32 @@
#error "clockdrv_shell.c: fast idle and N ISRs per tick is not supported"
#endif
/*
* This method is rarely used so default it.
*/
#ifndef Clock_driver_support_find_timer
#define Clock_driver_support_find_timer()
#define Clock_driver_support_find_timer()
#endif
/*
* ISRs until next clock tick
*/
#ifdef CLOCK_DRIVER_ISRS_PER_TICK
volatile uint32_t Clock_driver_isrs;
volatile uint32_t Clock_driver_isrs;
#endif
/*
* Clock ticks since initialization
*/
volatile uint32_t Clock_driver_ticks;
/*
* ISR formerly installed.
*/
rtems_isr_entry Old_ticker;
void Clock_exit( void );
/*
* Major and minor number.
*/
rtems_device_major_number rtems_clock_major = UINT32_MAX;
rtems_device_minor_number rtems_clock_minor;
/*
* Clock_isr
*
@@ -67,9 +56,7 @@ rtems_device_minor_number rtems_clock_minor;
* Output parameters: NONE
*
* Return values: NONE
*
*/
rtems_isr Clock_isr(
rtems_vector_number vector
)
@@ -77,10 +64,9 @@ rtems_isr Clock_isr(
/*
* Accurate count of ISRs
*/
Clock_driver_ticks += 1;
#ifdef CLOCK_DRIVER_USE_FAST_IDLE
#ifdef CLOCK_DRIVER_USE_FAST_IDLE
do {
rtems_clock_tick();
} while ( _Thread_Executing == _Thread_Idle &&
@@ -88,37 +74,31 @@ rtems_isr Clock_isr(
Clock_driver_support_at_tick();
return;
#else
#else
/*
* Do the hardware specific per-tick action.
*
* The counter/timer may or may not be set to automatically reload.
*/
Clock_driver_support_at_tick();
#ifdef CLOCK_DRIVER_ISRS_PER_TICK
#ifdef CLOCK_DRIVER_ISRS_PER_TICK
/*
* The driver is multiple ISRs per clock tick.
*/
if ( !Clock_driver_isrs ) {
rtems_clock_tick();
Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK;
}
Clock_driver_isrs--;
#else
#else
/*
* The driver is one ISR per clock tick.
*/
rtems_clock_tick();
#endif
#endif
#endif
#endif
}
/*
@@ -210,20 +190,12 @@ rtems_device_driver Clock_initialize(
{
Install_clock( Clock_isr );
/*
* make major/minor avail to others such as shared memory driver
*/
rtems_clock_major = major;
rtems_clock_minor = minor;
/*
* If we are counting ISRs per tick, then initialize the counter.
*/
#ifdef CLOCK_DRIVER_ISRS_PER_TICK
#ifdef CLOCK_DRIVER_ISRS_PER_TICK
Clock_driver_isrs = CLOCK_DRIVER_ISRS_PER_TICK;
#endif
#endif
return RTEMS_SUCCESSFUL;
}

View File

@@ -35,7 +35,6 @@ void console_initialize_hardware(void);
* Console Termios Support Entry Points
*
*/
int console_write_support (
int minor,
const char *bufarg,
@@ -65,18 +64,19 @@ rtems_device_driver console_initialize(
{
rtems_status_code status;
/*
* Ensure Termios is initialized
*/
rtems_termios_initialize();
/*
* Make sure the hardware is initialized.
*/
console_initialize_hardware();
/*
* Register Device Names
*/
status = rtems_io_register_name( "/dev/console", major, 0 );
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
@@ -106,7 +106,7 @@ rtems_device_driver console_open(
if ( minor > 1 )
return RTEMS_INVALID_NUMBER;
sc = rtems_termios_open (major, minor, arg, &pollCallbacks );
sc = rtems_termios_open( major, minor, arg, &pollCallbacks );
return RTEMS_SUCCESSFUL;
}
@@ -117,7 +117,7 @@ rtems_device_driver console_close(
void * arg
)
{
return rtems_termios_close (arg);
return rtems_termios_close( arg );
}
rtems_device_driver console_read(
@@ -126,7 +126,7 @@ rtems_device_driver console_read(
void * arg
)
{
return rtems_termios_read (arg);
return rtems_termios_read( arg );
}
rtems_device_driver console_write(
@@ -135,7 +135,7 @@ rtems_device_driver console_write(
void * arg
)
{
return rtems_termios_write (arg);
return rtems_termios_write( arg );
}
rtems_device_driver console_control(
@@ -144,5 +144,5 @@ rtems_device_driver console_control(
void * arg
)
{
return rtems_termios_ioctl (arg);
return rtems_termios_ioctl( arg );
}