summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-03-31 04:39:50 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-03-31 04:39:50 +0000
commita4318d0cccc9f0a3434c48305a9f7291d79575ac (patch)
tree7e7f7799b7a8d35367ffbfa432fb44cfd59082ed
parent2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org> (diff)
downloadrtems-a4318d0cccc9f0a3434c48305a9f7291d79575ac.tar.bz2
2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
* clock/ckinit.c, include/bare.h, include/bsp.h, include/crc.h, startup/bspstart.c, startup/cpuboot.c, startup/crc.c, startup/gdb-hooks.c, startup/m68302scc.c, timer/timer.c: Convert to using c99 fixed size types.
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/ChangeLog7
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/clock/ckinit.c6
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/include/bare.h20
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/include/bsp.h4
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/include/crc.h2
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c2
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c4
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/crc.c12
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c14
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/startup/m68302scc.c10
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/timer/timer.c6
11 files changed, 47 insertions, 40 deletions
diff --git a/c/src/lib/libbsp/m68k/ods68302/ChangeLog b/c/src/lib/libbsp/m68k/ods68302/ChangeLog
index 0796bff3ef..13e23a161e 100644
--- a/c/src/lib/libbsp/m68k/ods68302/ChangeLog
+++ b/c/src/lib/libbsp/m68k/ods68302/ChangeLog
@@ -1,3 +1,10 @@
+2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
+
+ * clock/ckinit.c, include/bare.h, include/bsp.h, include/crc.h,
+ startup/bspstart.c, startup/cpuboot.c, startup/crc.c,
+ startup/gdb-hooks.c, startup/m68302scc.c, timer/timer.c: Convert to
+ using c99 fixed size types.
+
2004-02-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am: Reflect changes to bsp.am.
diff --git a/c/src/lib/libbsp/m68k/ods68302/clock/ckinit.c b/c/src/lib/libbsp/m68k/ods68302/clock/ckinit.c
index 39796f2837..8e3273ea86 100644
--- a/c/src/lib/libbsp/m68k/ods68302/clock/ckinit.c
+++ b/c/src/lib/libbsp/m68k/ods68302/clock/ckinit.c
@@ -38,7 +38,7 @@
* Clock_driver_ticks is a monotonically increasing counter of the
* 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
@@ -47,7 +47,7 @@ volatile rtems_unsigned32 Clock_driver_ticks;
* length of time between the user configured microseconds per tick
* has passed.
*/
-rtems_unsigned32 Clock_isrs;
+uint32_t Clock_isrs;
void Clock_exit( void );
@@ -129,7 +129,7 @@ rtems_device_driver Clock_control(
void *pargp
)
{
- rtems_unsigned32 isrlevel;
+ uint32_t isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
if (args == 0)
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/bare.h b/c/src/lib/libbsp/m68k/ods68302/include/bare.h
index 7632b27ded..3942ce9732 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/bare.h
+++ b/c/src/lib/libbsp/m68k/ods68302/include/bare.h
@@ -156,15 +156,15 @@ extern "C"
/* Write */
#define WRITE_REGISTER_8(address, data) \
- *((rtems_unsigned8 *) (address)) = ((rtems_unsigned8) (data))
+ *((uint8_t*) (address)) = ((uint8_t) (data))
#define WRITE_REGISTER_16(address, data) \
- *((rtems_unsigned16 *) (address)) = ((rtems_unsigned16) (data))
+ *((uint16_t*) (address)) = ((uint16_t) (data))
#define WRITE_REGISTER_32(address, data) \
- *((rtems_unsigned32 *) (address)) = ((rtems_unsigned32) (data))
+ *((uint32_t*) (address)) = ((uint32_t) (data))
/* Read */
-#define READ_REGISTER_8(address, data) data = *((rtems_unsigned8 *) (address))
-#define READ_REGISTER_16(address, data) data = *((rtems_unsigned16 *) (address))
-#define READ_REGISTER_32(address, data) data = *((rtems_unsigned32 *) (address))
+#define READ_REGISTER_8(address, data) data = *((uint8_t*) (address))
+#define READ_REGISTER_16(address, data) data = *((uint16_t*) (address))
+#define READ_REGISTER_32(address, data) data = *((uint32_t*) (address))
/* CS2 : Peripherials */
#define PERIPHERIALS_BASE (CSEL_2_BASE)
@@ -228,10 +228,10 @@ extern "C"
/* update the display, needs a long word */
#define UPDATE_DISPLAY(LongWordPtr) \
- ( WRITE_REGISTER_16(DISPLAY_BASE, *(((rtems_unsigned8 *) LongWordPtr) + 3)), \
- WRITE_REGISTER_16(DISPLAY_BASE + 2, *(((rtems_unsigned8 *) LongWordPtr) + 2)), \
- WRITE_REGISTER_16(DISPLAY_BASE + 4, *(((rtems_unsigned8 *) LongWordPtr) + 1)), \
- WRITE_REGISTER_16(DISPLAY_BASE + 6, *((rtems_unsigned8 *) LongWordPtr)) )
+ ( WRITE_REGISTER_16(DISPLAY_BASE, *(((uint8_t*) LongWordPtr) + 3)), \
+ WRITE_REGISTER_16(DISPLAY_BASE + 2, *(((uint8_t*) LongWordPtr) + 2)), \
+ WRITE_REGISTER_16(DISPLAY_BASE + 4, *(((uint8_t*) LongWordPtr) + 1)), \
+ WRITE_REGISTER_16(DISPLAY_BASE + 6, *((uint8_t*) LongWordPtr)) )
/* make a better test, say switches */
#if defined(GDB_MONITOR_ACTIVE)
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/bsp.h b/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
index bec9b0feea..67f85b32ac 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/ods68302/include/bsp.h
@@ -78,8 +78,8 @@ extern "C" {
*/
#define rtems_bsp_delay( microseconds ) \
- { register rtems_unsigned32 _delay=(microseconds); \
- register rtems_unsigned32 _tmp=123; \
+ { register uint32_t _delay=(microseconds); \
+ register uint32_t _tmp=123; \
asm volatile( "0: \
nbcd %0 ; \
nbcd %0 ; \
diff --git a/c/src/lib/libbsp/m68k/ods68302/include/crc.h b/c/src/lib/libbsp/m68k/ods68302/include/crc.h
index 6d307599f0..c245c39a15 100644
--- a/c/src/lib/libbsp/m68k/ods68302/include/crc.h
+++ b/c/src/lib/libbsp/m68k/ods68302/include/crc.h
@@ -18,7 +18,7 @@ extern "C"
{
#endif
-rtems_unsigned16 calc_crc(void *data, rtems_unsigned32 count);
+uint16_t calc_crc(void *data, uint32_t count);
#if __cplusplus
}
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
index d5c27b2064..eb5bde8e54 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
@@ -38,7 +38,7 @@ char *rtems_progname;
*/
void bsp_postdriver_hook(void);
-void bsp_libc_init( void *, unsigned32, int );
+void bsp_libc_init( void *, uint32_t, int );
void bsp_pretasking_hook(void); /* m68k version */
/*
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c b/c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c
index 0e7130dc8c..d28366d011 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/cpuboot.c
@@ -95,7 +95,7 @@ void boot_phase_1()
void boot_phase_2(void)
{
- rtems_unsigned32 stack;
+ uint32_t stack;
#if defined(LED_CONTROL)
LED_CONTROL(LED_1_RED, LED_2_RED, LED_3_OFF, LED_4_OFF,
@@ -111,7 +111,7 @@ void boot_phase_2(void)
#endif
/* seems to want 2, looked at assember code output */
- *((volatile rtems_unsigned32*) (&stack + 2)) |= ROM_BASE;
+ *((volatile uint32_t*) (&stack + 2)) |= ROM_BASE;
}
/*
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/crc.c b/c/src/lib/libbsp/m68k/ods68302/startup/crc.c
index b589ccd2ba..3e3ff4ab5b 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/crc.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/crc.c
@@ -18,7 +18,7 @@
*/
-static const rtems_unsigned16 factor[] =
+static const uint16_t factor[] =
{
0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,
0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440,
@@ -66,12 +66,12 @@ static const rtems_unsigned16 factor[] =
Calculates the CRC value of a block of memory
*/
-rtems_unsigned16 calc_crc(void* vdata, /* pointer to memory block */
- rtems_unsigned32 count) /* length of block in bytes */
+uint16_t calc_crc(void* vdata, /* pointer to memory block */
+ uint32_t count) /* length of block in bytes */
{
- register rtems_unsigned8 *data = vdata;
- register rtems_unsigned16 crc;
- register rtems_unsigned32 byte;
+ register uint8_t *data = vdata;
+ register uint16_t crc;
+ register uint32_t byte;
/* initialise to either 0x0 or 0xffff depending on the
CRC implementation */
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c b/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c
index 64d220219f..601e037809 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/gdb-hooks.c
@@ -45,10 +45,10 @@ char getDebugChar(void)
void (*exceptionHook)(unsigned int) = 0;
typedef struct {
- rtems_unsigned16 move_a7; /* move #FORMAT_ID,%a7@- */
- rtems_unsigned16 format_id;
- rtems_unsigned16 jmp; /* jmp _ISR_Handlers */
- rtems_unsigned32 isr_handler;
+ uint16_t move_a7; /* move #FORMAT_ID,%a7@- */
+ uint16_t format_id;
+ uint16_t jmp; /* jmp _ISR_Handlers */
+ uint32_t isr_handler;
} GDB_HANDLER_ENTRY;
#if !defined(M68K_MOVE_A7)
@@ -64,13 +64,13 @@ static GDB_HANDLER_ENTRY gdb_jump_table[256];
void exceptionHandler(unsigned int vector, void *handler)
{
- rtems_unsigned32 *interrupt_table = 0;
+ uint32_t *interrupt_table = 0;
gdb_jump_table[vector].move_a7 = M68K_MOVE_A7;
gdb_jump_table[vector].format_id = vector;
gdb_jump_table[vector].jmp = M68K_JMP;
- gdb_jump_table[vector].isr_handler = (rtems_unsigned32) handler;
+ gdb_jump_table[vector].isr_handler = (uint32_t) handler;
- interrupt_table[vector] = (rtems_unsigned32) &gdb_jump_table[vector];
+ interrupt_table[vector] = (uint32_t) &gdb_jump_table[vector];
}
diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/m68302scc.c b/c/src/lib/libbsp/m68k/ods68302/startup/m68302scc.c
index 77d7867a21..5b06c6c2c8 100644
--- a/c/src/lib/libbsp/m68k/ods68302/startup/m68302scc.c
+++ b/c/src/lib/libbsp/m68k/ods68302/startup/m68302scc.c
@@ -18,7 +18,7 @@ static volatile m302_SCC_t *scc[M68302_SCC_COUNT] = { 0, 0, 0 };
static volatile m302_SCC_Registers_t *scc_reg[M68302_SCC_COUNT] = { 0, 0, 0 };
static int scc_translate[M68302_SCC_COUNT] = { 0, 0, 0 };
-static const rtems_unsigned16 baud_clocks[] =
+static const uint16_t baud_clocks[] =
{
(SYSTEM_CLOCK / ( 4800 * 16)),
(SYSTEM_CLOCK / ( 9600 * 16)),
@@ -30,7 +30,7 @@ static const rtems_unsigned16 baud_clocks[] =
void scc_initialise(int channel, int baud, int translate)
{
- rtems_unsigned16 scon;
+ uint16_t scon;
if (channel < M68302_SCC_COUNT)
{
@@ -47,12 +47,12 @@ void scc_initialise(int channel, int baud, int translate)
scc[channel]->bd.tx[0].status = 0x2000;
scc[channel]->bd.tx[0].length = 0;
scc[channel]->bd.tx[0].buffer =
- (rtems_unsigned8*) &(scc[channel]->bd.tx[1].buffer);
+ (uint8_t*) &(scc[channel]->bd.tx[1].buffer);
scc[channel]->bd.rx[0].status = 0x2000;
scc[channel]->bd.rx[0].length = 0;
scc[channel]->bd.rx[0].buffer =
- (rtems_unsigned8*) &(scc[channel]->bd.rx[1].buffer);
+ (uint8_t*) &(scc[channel]->bd.rx[1].buffer);
scc[channel]->parm.rfcr = 0x50;
scc[channel]->parm.tfcr = 0x50;
@@ -78,7 +78,7 @@ void scc_initialise(int channel, int baud, int translate)
unsigned char scc_status(int channel, unsigned char status)
{
- rtems_unsigned16 rx_status;
+ uint16_t rx_status;
m302.reg.wcn = 0;
diff --git a/c/src/lib/libbsp/m68k/ods68302/timer/timer.c b/c/src/lib/libbsp/m68k/ods68302/timer/timer.c
index c4be93e974..605337fa1b 100644
--- a/c/src/lib/libbsp/m68k/ods68302/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/ods68302/timer/timer.c
@@ -40,7 +40,7 @@
* 2000 ticks @ (16MHz/1)/8 = 1-ms count
*/
-rtems_unsigned32 Timer_interrupts;
+uint32_t Timer_interrupts;
rtems_boolean Timer_driver_Find_average_overhead;
@@ -79,8 +79,8 @@ void Timer_initialize( void )
*/
int Read_timer( void )
{
- rtems_unsigned16 clicks;
- rtems_unsigned32 total;
+ uint16_t clicks;
+ uint32_t total;
/*
* Read the timer and see how many clicks it has been since counter