forked from Imagelibrary/rtems
2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
* clock/clockdrv.c, console/console.c, startup/bspstart.c, timer/timer.c, timer/timerisr.c: Convert to using c99 fixed size types.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||||
|
|
||||||
|
* clock/clockdrv.c, console/console.c, startup/bspstart.c,
|
||||||
|
timer/timer.c, timer/timerisr.c: Convert to using c99 fixed size
|
||||||
|
types.
|
||||||
|
|
||||||
2004-02-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
2004-02-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* Makefile.am: Reflect changes to bsp.am.
|
* Makefile.am: Reflect changes to bsp.am.
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void Clock_isr( rtems_vector_number vector,unsigned int pc,
|
|||||||
* number of clock ticks since the driver was initialized.
|
* number of clock ticks since the driver was initialized.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
volatile rtems_unsigned32 Clock_driver_ticks;
|
volatile uint32_t Clock_driver_ticks;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clock_isrs is the number of clock ISRs until the next invocation of
|
* Clock_isrs is the number of clock ISRs until the next invocation of
|
||||||
@@ -46,7 +46,7 @@ volatile rtems_unsigned32 Clock_driver_ticks;
|
|||||||
* has passed.
|
* has passed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_unsigned32 Clock_isrs; /* ISRs until next tick */
|
uint32_t Clock_isrs; /* ISRs until next tick */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are set by clock driver during its init
|
* These are set by clock driver during its init
|
||||||
@@ -66,10 +66,10 @@ static const unsigned int TTMR_RESET = 0x60030D40;
|
|||||||
* Isr Handler
|
* Isr Handler
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void Clock_isr(unsigned32 vector,
|
void Clock_isr(uint32_t vector,
|
||||||
unsigned32 pc,
|
uint32_t pc,
|
||||||
unsigned32 ear,
|
uint32_t ear,
|
||||||
unsigned32 sr)
|
uint32_t sr)
|
||||||
{
|
{
|
||||||
register int pending;
|
register int pending;
|
||||||
register int value = 0x60002710;
|
register int value = 0x60002710;
|
||||||
@@ -97,8 +97,8 @@ void Clock_isr(unsigned32 vector,
|
|||||||
|
|
||||||
void Install_clock()
|
void Install_clock()
|
||||||
{
|
{
|
||||||
unsigned32 tmp,sr,ttmr,ttcr;
|
uint32_t tmp,sr,ttmr,ttcr;
|
||||||
extern unsigned32 Or1k_Interrupt_Vectors[16];
|
extern uint32_t Or1k_Interrupt_Vectors[16];
|
||||||
|
|
||||||
ttmr = TTMR_RESET; /* Reset value */
|
ttmr = TTMR_RESET; /* Reset value */
|
||||||
ttcr = 0; /* Start at 0 */
|
ttcr = 0; /* Start at 0 */
|
||||||
@@ -129,7 +129,7 @@ void Install_clock()
|
|||||||
|
|
||||||
old_handler = (void(*)(unsigned int,unsigned int,unsigned int,unsigned int))
|
old_handler = (void(*)(unsigned int,unsigned int,unsigned int,unsigned int))
|
||||||
Or1k_Interrupt_Vectors[8];
|
Or1k_Interrupt_Vectors[8];
|
||||||
Or1k_Interrupt_Vectors[8] = (unsigned32)Clock_isr;
|
Or1k_Interrupt_Vectors[8] = (uint32_t)Clock_isr;
|
||||||
|
|
||||||
asm volatile ("l.mtspr r0,%0,0x11\n\t":: "r" (sr));
|
asm volatile ("l.mtspr r0,%0,0x11\n\t":: "r" (sr));
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ rtems_device_driver Clock_control(
|
|||||||
void *pargp
|
void *pargp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rtems_unsigned32 isrlevel;
|
uint32_t isrlevel;
|
||||||
rtems_libio_ioctl_args_t *args = pargp;
|
rtems_libio_ioctl_args_t *args = pargp;
|
||||||
|
|
||||||
if (args == 0)
|
if (args == 0)
|
||||||
|
|||||||
@@ -78,8 +78,8 @@ rtems_device_driver console_initialize(
|
|||||||
{
|
{
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
int tmp,tmp2;
|
int tmp,tmp2;
|
||||||
unsigned32 sr;
|
uint32_t sr;
|
||||||
extern unsigned32 Or1k_Interrupt_Vectors[16];
|
extern uint32_t Or1k_Interrupt_Vectors[16];
|
||||||
|
|
||||||
/* Make sure the UART (interrupt 2) is enabled and
|
/* Make sure the UART (interrupt 2) is enabled and
|
||||||
reports a low prority interrupt */
|
reports a low prority interrupt */
|
||||||
@@ -100,7 +100,7 @@ rtems_device_driver console_initialize(
|
|||||||
|
|
||||||
old_handler = (void(*)(unsigned int,unsigned int,unsigned int,unsigned int))
|
old_handler = (void(*)(unsigned int,unsigned int,unsigned int,unsigned int))
|
||||||
Or1k_Interrupt_Vectors[5];
|
Or1k_Interrupt_Vectors[5];
|
||||||
Or1k_Interrupt_Vectors[5] = (unsigned32)console_interrupt;
|
Or1k_Interrupt_Vectors[5] = (uint32_t)console_interrupt;
|
||||||
|
|
||||||
asm volatile ("l.mtspr r0,%0,0x11\n\t":: "r" (sr));
|
asm volatile ("l.mtspr r0,%0,0x11\n\t":: "r" (sr));
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ rtems_cpu_table Cpu_table;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void bsp_postdriver_hook(void);
|
void bsp_postdriver_hook(void);
|
||||||
void bsp_libc_init( void *, unsigned32, int );
|
void bsp_libc_init( void *, uint32_t, int );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function: bsp_pretasking_hook
|
* Function: bsp_pretasking_hook
|
||||||
@@ -58,9 +58,9 @@ void bsp_libc_init( void *, unsigned32, int );
|
|||||||
|
|
||||||
void bsp_pretasking_hook(void)
|
void bsp_pretasking_hook(void)
|
||||||
{
|
{
|
||||||
rtems_unsigned32 heap_start;
|
uint32_t heap_start;
|
||||||
|
|
||||||
heap_start = (rtems_unsigned32) _mem_end;
|
heap_start = (uint32_t) _mem_end;
|
||||||
if (heap_start & (CPU_ALIGNMENT-1))
|
if (heap_start & (CPU_ALIGNMENT-1))
|
||||||
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
|
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
|
||||||
rtems_unsigned32 Timer_interrupts;
|
uint32_t Timer_interrupts;
|
||||||
rtems_boolean Timer_driver_Find_average_overhead;
|
rtems_boolean Timer_driver_Find_average_overhead;
|
||||||
|
|
||||||
void Timer_initialize( void )
|
void Timer_initialize( void )
|
||||||
@@ -56,8 +56,8 @@ void Timer_initialize( void )
|
|||||||
|
|
||||||
int Read_timer( void )
|
int Read_timer( void )
|
||||||
{
|
{
|
||||||
rtems_unsigned32 clicks;
|
uint32_t clicks;
|
||||||
rtems_unsigned32 total;
|
uint32_t total;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the timer and see how many clicks it has been since we started.
|
* Read the timer and see how many clicks it has been since we started.
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
|
|
||||||
extern rtems_unsigned32 _Timer_interrupts;
|
extern uint32_t _Timer_interrupts;
|
||||||
|
|
||||||
void timerisr( void )
|
void timerisr( void )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user