diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-03-31 03:52:40 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-03-31 03:52:40 +0000 |
commit | bde7f2688f6ea661cfa4dfbacd0967315e84144c (patch) | |
tree | fcc8d653360161e1a74a2e7f40d550b76d8a30a0 /c/src/lib | |
parent | 2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org> (diff) | |
download | rtems-bde7f2688f6ea661cfa4dfbacd0967315e84144c.tar.bz2 |
2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
* bootloader/misc.c, bootloader/pci.c, console/inch.c,
include/bsp.h, pci/pci.c, startup/bspstart.c, startup/sbrk.c:
Convert to using c99 fixed size types.
Diffstat (limited to 'c/src/lib')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/bootloader/misc.c | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/bootloader/pci.c | 30 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/console/inch.c | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/include/bsp.h | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/pci/pci.c | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/startup/bspstart.c | 18 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/startup/sbrk.c | 10 |
8 files changed, 46 insertions, 40 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/ChangeLog b/c/src/lib/libbsp/powerpc/shared/ChangeLog index d599b8a3d1..2a1197275e 100644 --- a/c/src/lib/libbsp/powerpc/shared/ChangeLog +++ b/c/src/lib/libbsp/powerpc/shared/ChangeLog @@ -1,3 +1,9 @@ +2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org> + + * bootloader/misc.c, bootloader/pci.c, console/inch.c, + include/bsp.h, pci/pci.c, startup/bspstart.c, startup/sbrk.c: + Convert to using c99 fixed size types. + 2004-03-05 Joel Sherrill <joel@OARcorp.com> * bootloader/pci.c: Remove warnings by adding include <string.h>. diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c b/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c index ececd58d47..1ae0cf7a10 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c @@ -237,9 +237,9 @@ static int ticks_per_ms=0; /* this is from rtems_bsp_delay from libcpu */ void -boot_udelay(unsigned32 _microseconds) +boot_udelay(uint32_t _microseconds) { - unsigned32 start, ticks, now; + uint32_t start, ticks, now; ticks = _microseconds * ticks_per_ms / 1000; CPU_Get_timebase_low( start ); diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c b/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c index b23e12d7c9..6bd25a86c9 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c @@ -1115,9 +1115,9 @@ static void print_pci_info() static struct _addr_start { - unsigned32 start_pcimem; - unsigned32 start_pciio; - unsigned32 start_prefetch; + uint32_t start_pcimem; + uint32_t start_pciio; + uint32_t start_prefetch; } astart; @@ -1180,8 +1180,8 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus ) { struct _addr_start addrhold; - unsigned8 base8, limit8; - unsigned16 base16, limit16, ubase16, ulimit16; + uint8_t base8, limit8; + uint16_t base16, limit16, ubase16, ulimit16; /* save the base address values */ memcpy( &addrhold, &astart, sizeof(struct _addr_start)); @@ -1212,10 +1212,10 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus ) } else { - base8 = (unsigned8) ((addrhold.start_pciio >> 8) & 0xf0); - ubase16 = (unsigned16)(addrhold.start_pciio >> 16); - limit8 = (unsigned8) ((astart.start_pciio >> 8 ) & 0xf0); - ulimit16 = (unsigned16)(astart.start_pciio >> 16); + base8 = (uint8_t) ((addrhold.start_pciio >> 8) & 0xf0); + ubase16 = (uint16_t)(addrhold.start_pciio >> 16); + limit8 = (uint8_t) ((astart.start_pciio >> 8 ) & 0xf0); + ulimit16 = (uint16_t)(astart.start_pciio >> 16); astart.start_pciio += 0x1000; } @@ -1240,8 +1240,8 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus ) } else { - limit16= (unsigned16)((astart.start_pcimem >> 16) & 0xfff0); - base16 = (unsigned16)((addrhold.start_pcimem >> 16) & 0xfff0); + limit16= (uint16_t)((astart.start_pcimem >> 16) & 0xfff0); + base16 = (uint16_t)((addrhold.start_pcimem >> 16) & 0xfff0); astart.start_pcimem += 0x100000; } #ifdef PCI_DEBUG @@ -1261,8 +1261,8 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus ) } else { - limit16= (unsigned16)((addrhold.start_prefetch >> 16) & 0xfff0); - base16 = (unsigned16)((astart.start_prefetch >> 16) & 0xfff0); + limit16= (uint16_t)((addrhold.start_prefetch >> 16) & 0xfff0); + base16 = (uint16_t)((astart.start_prefetch >> 16) & 0xfff0); astart.start_prefetch -= 0x100000; } #ifdef PCI_DEBUG @@ -1277,10 +1277,10 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus ) #endif #ifdef WRITE_BRIDGE_ENABLE - pcibios_write_config_word(pdev->bus->number, pdev->devfn, PCI_BRIDGE_CONTROL, (unsigned16)( PCI_BRIDGE_CTL_PARITY | + pcibios_write_config_word(pdev->bus->number, pdev->devfn, PCI_BRIDGE_CONTROL, (uint16_t)( PCI_BRIDGE_CTL_PARITY | PCI_BRIDGE_CTL_SERR )); - pcibios_write_config_word(pdev->bus->number, pdev->devfn, PCI_COMMAND, (unsigned16)( PCI_COMMAND_IO | + pcibios_write_config_word(pdev->bus->number, pdev->devfn, PCI_COMMAND, (uint16_t)( PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_PARITY | diff --git a/c/src/lib/libbsp/powerpc/shared/console/inch.c b/c/src/lib/libbsp/powerpc/shared/console/inch.c index 0075e720fd..c4ab942097 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/inch.c +++ b/c/src/lib/libbsp/powerpc/shared/console/inch.c @@ -59,9 +59,9 @@ static char shift_map[] = }; /* Keyboard scancode -> character map with SHIFT key modifier. */ static char kbd_buffer[KBD_BUF_SIZE]; -static rtems_unsigned16 kbd_first = 0; -static rtems_unsigned16 kbd_last = 0; -static rtems_unsigned16 kbd_end = KBD_BUF_SIZE - 1; +static uint16_t kbd_first = 0; +static uint16_t kbd_last = 0; +static uint16_t kbd_end = KBD_BUF_SIZE - 1; /*-------------------------------------------------------------------------+ | Function: _IBMPC_scankey diff --git a/c/src/lib/libbsp/powerpc/shared/include/bsp.h b/c/src/lib/libbsp/powerpc/shared/include/bsp.h index 2b3ec7853c..e243bb7c62 100644 --- a/c/src/lib/libbsp/powerpc/shared/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/shared/include/bsp.h @@ -133,20 +133,20 @@ void Install_tm27_vector(void (*_handler)()) #define Cause_tm27_intr() \ do { \ - unsigned32 _clicks = 8; \ + uint32_t _clicks = 8; \ asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \ } while (0) #define Clear_tm27_intr() \ do { \ - unsigned32 _clicks = 0xffffffff; \ + uint32_t _clicks = 0xffffffff; \ asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \ } while (0) #define Lower_tm27_intr() \ do { \ - unsigned32 _msr = 0; \ + uint32_t _msr = 0; \ _ISR_Set_level( 0 ); \ asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \ _msr |= 0x8002; \ diff --git a/c/src/lib/libbsp/powerpc/shared/pci/pci.c b/c/src/lib/libbsp/powerpc/shared/pci/pci.c index ff81df8d65..506221c8e2 100644 --- a/c/src/lib/libbsp/powerpc/shared/pci/pci.c +++ b/c/src/lib/libbsp/powerpc/shared/pci/pci.c @@ -282,8 +282,8 @@ struct pcibridge static int FindPCIbridge( int mybus, struct pcibridge *pb ) { int pbus, pslot; - unsigned8 bussec, buspri; - unsigned16 devid, vendorid, dclass; + uint8_t bussec, buspri; + uint16_t devid, vendorid, dclass; for(pbus=0; pbus< BusCountPCI(); pbus++) { @@ -337,7 +337,7 @@ static int FindPCIbridge( int mybus, struct pcibridge *pb ) void FixupPCI( const struct _int_map *bspmap, int (*swizzler)(int,int) ) { unsigned char cvalue; - unsigned16 devid; + uint16_t devid; int ismatch, i, j, pbus, pslot, int_pin, int_name; /* diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c index 79d2786d06..2565b9a251 100644 --- a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c @@ -112,7 +112,7 @@ char *rtems_progname; */ void bsp_postdriver_hook(void); -void bsp_libc_init( void *, unsigned32, int ); +void bsp_libc_init( void *, uint32_t, int ); /* * Function: bsp_pretasking_hook @@ -130,12 +130,12 @@ void bsp_libc_init( void *, unsigned32, int ); void bsp_pretasking_hook(void) { - rtems_unsigned32 heap_start; - rtems_unsigned32 heap_size; - rtems_unsigned32 heap_sbrk_spared; - extern rtems_unsigned32 _bsp_sbrk_init(rtems_unsigned32, rtems_unsigned32*); + uint32_t heap_start; + uint32_t heap_size; + uint32_t heap_sbrk_spared; + extern uint32_t _bsp_sbrk_init(uint32_t, uint32_t*); - heap_start = ((rtems_unsigned32) __rtems_end) +INIT_STACK_SIZE + INTR_STACK_SIZE; + heap_start = ((uint32_t) __rtems_end) +INIT_STACK_SIZE + INTR_STACK_SIZE; if (heap_start & (CPU_ALIGNMENT-1)) heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); @@ -220,7 +220,7 @@ void bsp_start( void ) stack = ((unsigned char*) __rtems_end) + INIT_STACK_SIZE - CPU_MINIMUM_STACK_FRAME_SIZE; /* tag the bottom (T. Straumann 6/36/2001 <strauman@slac.stanford.edu>) */ - *((unsigned32 *)stack) = 0; + *((uint32_t*)stack) = 0; /* * Initialize the interrupt related settings @@ -232,10 +232,10 @@ void bsp_start( void ) intrStack = ((unsigned char*) __rtems_end) + INIT_STACK_SIZE + INTR_STACK_SIZE - CPU_MINIMUM_STACK_FRAME_SIZE; /* make sure it's properly aligned */ - (unsigned32)intrStack &= ~(CPU_STACK_ALIGNMENT-1); + (uint32_t)intrStack &= ~(CPU_STACK_ALIGNMENT-1); /* tag the bottom (T. Straumann 6/36/2001 <strauman@slac.stanford.edu>) */ - *((unsigned32 *)intrStack) = 0; + *((uint32_t*)intrStack) = 0; _write_SPRG1((unsigned int)intrStack); diff --git a/c/src/lib/libbsp/powerpc/shared/startup/sbrk.c b/c/src/lib/libbsp/powerpc/shared/startup/sbrk.c index 276433a5da..be2840b5bb 100644 --- a/c/src/lib/libbsp/powerpc/shared/startup/sbrk.c +++ b/c/src/lib/libbsp/powerpc/shared/startup/sbrk.c @@ -27,15 +27,15 @@ #include <sys/types.h> #include <unistd.h> -static rtems_unsigned32 remaining_start=0; -static rtems_unsigned32 remaining_size=0; +static uint32_t remaining_start=0; +static uint32_t remaining_size=0; #define LIMIT_32M 0x02000000 -rtems_unsigned32 -_bsp_sbrk_init(rtems_unsigned32 heap_start, rtems_unsigned32 *heap_size_p) +uint32_t +_bsp_sbrk_init(uint32_t heap_start, uint32_t *heap_size_p) { - rtems_unsigned32 rval=0; + uint32_t rval=0; remaining_start = heap_start; remaining_size =* heap_size_p; |