Changeset bad8092c in rtems


Ignore:
Timestamp:
03/31/04 03:49:17 (20 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
d352678
Parents:
3f71ac1
Message:

2004-03-31 Ralf Corsepius <ralf_corsepius@…>

  • clock/clock.c, console/config.c, console/console.c, console/debugio.c, console/i8042.c, console/ns16550cfg.c, console/ns16550cfg.h, console/vga.c, console/vga_p.h, console/z85c30cfg.c, console/z85c30cfg.h, include/bsp.h, include/nvram.h, include/pci.h, network/amd79c970.c, network/amd79c970.h, nvram/mk48t18.h, nvram/nvram.c, nvram/stk11c68.h, pci/pci.c, startup/bspstart.c, startup/genpvec.c, startup/spurious.c, startup/swap.c, timer/timer.c, tod/cmos.h, tod/tod.c, universe/universe.c: Convert to using c99 fixed size types.
Location:
c/src/lib/libbsp/powerpc/ppcn_60x
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/ppcn_60x/ChangeLog

    r3f71ac1 rbad8092c  
     12004-03-31      Ralf Corsepius <ralf_corsepius@rtems.org>
     2
     3        * clock/clock.c, console/config.c, console/console.c,
     4        console/debugio.c, console/i8042.c, console/ns16550cfg.c,
     5        console/ns16550cfg.h, console/vga.c, console/vga_p.h,
     6        console/z85c30cfg.c, console/z85c30cfg.h, include/bsp.h,
     7        include/nvram.h, include/pci.h, network/amd79c970.c,
     8        network/amd79c970.h, nvram/mk48t18.h, nvram/nvram.c,
     9        nvram/stk11c68.h, pci/pci.c, startup/bspstart.c, startup/genpvec.c,
     10        startup/spurious.c, startup/swap.c, timer/timer.c, tod/cmos.h,
     11        tod/tod.c, universe/universe.c: Convert to using c99 fixed size
     12        types.
     13
    1142004-02-19      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    215
  • c/src/lib/libbsp/powerpc/ppcn_60x/clock/clock.c

    r3f71ac1 rbad8092c  
    3333 */
    3434
    35 volatile rtems_unsigned32 Clock_driver_ticks;
     35volatile uint32_t        Clock_driver_ticks;
    3636
    3737/*
     
    3939 */
    4040
    41 rtems_unsigned32 Clock_Decrementer_value;
     41uint32_t        Clock_Decrementer_value;
    4242
    4343rtems_isr_entry  Old_ticker;
     
    204204)
    205205{
    206     rtems_unsigned32 isrlevel;
     206    uint32_t        isrlevel;
    207207    rtems_libio_ioctl_args_t *args = pargp;
    208208 
  • c/src/lib/libbsp/powerpc/ppcn_60x/console/config.c

    r3f71ac1 rbad8092c  
    280280static boolean config_PMX1553_probe(int minor)
    281281{
    282         unsigned8 ucBusNumber, ucSlotNumber, ucChannel;
    283         unsigned8 ucIntLine;
    284         unsigned32 ulPortBase, ulMemBase, ulDeviceID;
    285         unsigned8 *pucSIO_cir, *pucUart_int_sr, *pucUartDevIntReg;
     282        uint8_t  ucBusNumber, ucSlotNumber, ucChannel;
     283        uint8_t  ucIntLine;
     284        uint32_t  ulPortBase, ulMemBase, ulDeviceID;
     285        uint8_t  *pucSIO_cir, *pucUart_int_sr, *pucUartDevIntReg;
    286286        PSP_WRITE_REGISTERS     pNS16550Write;
    287287
     
    330330                        &ulMemBase);
    331331
    332         pucUartDevIntReg=(unsigned8 *)(PCI_MEM_BASE+ulMemBase);
    333         pucUart_int_sr=(unsigned8 *)(PCI_MEM_BASE+ulMemBase+0x10);
    334         pucSIO_cir=(unsigned8 *)(PCI_MEM_BASE+ulMemBase+0x18);
     332        pucUartDevIntReg=(uint8_t*)(PCI_MEM_BASE+ulMemBase);
     333        pucUart_int_sr=(uint8_t*)(PCI_MEM_BASE+ulMemBase+0x10);
     334        pucSIO_cir=(uint8_t*)(PCI_MEM_BASE+ulMemBase+0x18);
    335335
    336336        /*
     
    441441         * Scale requested baud rate for 16 MHz clock
    442442         */
    443         (unsigned32)Console_Port_Tbl[minor].pDeviceParams*=7373;
    444         (unsigned32)Console_Port_Tbl[minor].pDeviceParams/=16000;
     443        (uint32_t)Console_Port_Tbl[minor].pDeviceParams*=7373;
     444        (uint32_t)Console_Port_Tbl[minor].pDeviceParams/=16000;
    445445#else
    446446        /*
    447447         * Scale requested baud rate for 22.1184 MHz clock
    448448         */
    449         (unsigned32)Console_Port_Tbl[minor].pDeviceParams/=3;
     449        (uint32_t)Console_Port_Tbl[minor].pDeviceParams/=3;
    450450#endif
    451451        /*
     
    453453         * apply a div 4 here rather than in hardware (using MCR bit 7).
    454454         */
    455         (unsigned32)Console_Port_Tbl[minor].pDeviceParams/=4;
     455        (uint32_t)Console_Port_Tbl[minor].pDeviceParams/=4;
    456456
    457457        return(TRUE);
  • c/src/lib/libbsp/powerpc/ppcn_60x/console/console.c

    r3f71ac1 rbad8092c  
    293293{
    294294        char *s;
    295         unsigned32      Irql;
     295        uint32_t        Irql;
    296296
    297297        rtems_interrupt_disable(Irql);
     
    323323void
    324324DEBUG_puth(
    325     unsigned32 ulHexNum
     325    uint32_t  ulHexNum
    326326    )
    327327{
    328328        unsigned long i,d;
    329         unsigned32 Irql;
     329        uint32_t  Irql;
    330330
    331331        rtems_interrupt_disable(Irql);
  • c/src/lib/libbsp/powerpc/ppcn_60x/console/debugio.c

    r3f71ac1 rbad8092c  
    6161{
    6262  char *s;
    63   unsigned32  Irql;
     63  uint32_t    Irql;
    6464
    6565  rtems_interrupt_disable(Irql);
     
    9090
    9191void DEBUG_puth(
    92   unsigned32 ulHexNum
     92  uint32_t  ulHexNum
    9393)
    9494{
    9595  unsigned long  i,d;
    96   unsigned32      Irql;
     96  uint32_t        Irql;
    9797  void          (*poll)(int minor, char cChar);
    9898 
  • c/src/lib/libbsp/powerpc/ppcn_60x/console/i8042.c

    r3f71ac1 rbad8092c  
    8484static void i8042_scan_code(
    8585        int minor,
    86         unsigned8   ucScan
     86        uint8_t     ucScan
    8787);
    8888#endif
     
    108108{
    109109#if CONSOLE_USE_INTERRUPTS
    110         unsigned32      Irql;
    111         unsigned8       ucScan;
     110        uint32_t        Irql;
     111        uint8_t         ucScan;
    112112
    113113        /*
     
    134134i8042_outbyte_raw(
    135135        int minor,
    136         unsigned8 ucData
    137 )
    138 {
    139         unsigned32 i;
    140         unsigned8 Status;
     136        uint8_t  ucData
     137)
     138{
     139        uint32_t  i;
     140        uint8_t  Status;
    141141
    142142#if CONSOLE_USE_INTERRUPTS
    143         unsigned32      Irql;
     143        uint32_t        Irql;
    144144
    145145        if(bInterruptsEnabled)
     
    180180i8042_inbyte_polled(
    181181        int minor,
    182         unsigned8 *pucData
    183 )
    184 {
    185         unsigned8 Status;
     182        uint8_t  *pucData
     183)
     184{
     185        uint8_t  Status;
    186186
    187187        inport_byte(Console_Port_Tbl[minor].ulCtrlPort1, Status);
     
    201201i8042_inbyte_raw(
    202202        int minor,
    203         unsigned8 *pucData
     203        uint8_t  *pucData
    204204)
    205205{
     
    250250i8042_outbyte_cmd_polled(
    251251        int minor,
    252         unsigned8 ucCommand
    253 )
    254 {
    255         unsigned32 i;
    256         unsigned8 Status;
     252        uint8_t  ucCommand
     253)
     254{
     255        uint32_t  i;
     256        uint8_t  Status;
    257257
    258258        /*
     
    294294static void i8042_process_two_code(
    295295        int minor,
    296         unsigned8 ucScan,
     296        uint8_t  ucScan,
    297297        boolean bMakenBreak
    298298)
     
    417417
    418418static boolean i8042_process_qualifiers(
    419         unsigned8 ucScan,
     419        uint8_t  ucScan,
    420420        boolean bMakenBreak
    421421)
     
    469469static boolean i8042_process_top_row(
    470470        int             minor,
    471         unsigned8       ucScan
     471        uint8_t         ucScan
    472472)
    473473{
     
    475475        char    cASCIIFnCode;
    476476#if CONSOLE_USE_INTERRUPTS==0
    477         unsigned8       ucKeyboardAck;
     477        uint8_t         ucKeyboardAck;
    478478#endif
    479479
     
    634634static boolean i8042_process_keypad(
    635635        int     minor,
    636         unsigned8 ucScan
     636        uint8_t  ucScan
    637637)
    638638{
     
    736736static void i8042_scan_code(
    737737        int minor,
    738         unsigned8   ucScan
     738        uint8_t     ucScan
    739739)
    740740{
     
    871871boolean i8042_probe(int minor)
    872872{
    873         unsigned8 ucKeyboardAck;
    874         unsigned8 ucKeyboardID1, ucKeyboardID2;
     873        uint8_t  ucKeyboardAck;
     874        uint8_t  ucKeyboardID1, ucKeyboardID2;
    875875
    876876        if(!vga_probe(minor))
     
    921921void i8042_init(int minor)
    922922{
    923         unsigned8 ucKeyboardAck;
     923        uint8_t  ucKeyboardAck;
    924924
    925925        vga_init(minor);
     
    954954)
    955955{
    956         unsigned8       ucScan;
     956        uint8_t         ucScan;
    957957        char    ucData;
    958958
     
    989989)
    990990{
    991         unsigned8       Status;
    992         unsigned8       ucData;
     991        uint8_t         Status;
     992        uint8_t         ucData;
    993993
    994994        inport_byte(Console_Port_Tbl[minor].ulCtrlPort1, Status);
  • c/src/lib/libbsp/powerpc/ppcn_60x/console/ns16550cfg.c

    r3f71ac1 rbad8092c  
    2929#include <bsp.h>
    3030
    31 unsigned8 Read_ns16550_register(
    32   unsigned32  ulCtrlPort,
    33   unsigned8   ucRegNum
     31uint8_t  Read_ns16550_register(
     32  uint32_t    ulCtrlPort,
     33  uint8_t     ucRegNum
    3434)
    3535{
     
    4242
    4343void  Write_ns16550_register(
    44   unsigned32  ulCtrlPort,
    45   unsigned8   ucRegNum,
    46   unsigned8   ucData
     44  uint32_t    ulCtrlPort,
     45  uint8_t     ucRegNum,
     46  uint8_t     ucData
    4747)
    4848{
  • c/src/lib/libbsp/powerpc/ppcn_60x/console/ns16550cfg.h

    r3f71ac1 rbad8092c  
    3737 */
    3838
    39 unsigned8 Read_ns16550_register(
    40   unsigned32  ulCtrlPort,
    41   unsigned8   ucRegNum
     39uint8_t  Read_ns16550_register(
     40  uint32_t    ulCtrlPort,
     41  uint8_t     ucRegNum
    4242);
    4343
    4444void  Write_ns16550_register(
    45   unsigned32  ulCtrlPort,
    46   unsigned8   ucRegNum,
    47   unsigned8   ucData
     45  uint32_t    ulCtrlPort,
     46  uint8_t     ucRegNum,
     47  uint8_t     ucData
    4848);
    4949
  • c/src/lib/libbsp/powerpc/ppcn_60x/console/vga.c

    r3f71ac1 rbad8092c  
    6565+--------------------------------------------------------------------------*/
    6666/* Physical address of start of video text memory. */
    67 static unsigned16 *videoRam    = (unsigned16 *)VGA_FB;
     67static uint16_t   *videoRam    = (uint16_t*)VGA_FB;
    6868/* Pointer for current output position in display. */
    69 static unsigned16 *videoRamPtr = (unsigned16 *)VGA_FB;
    70 static unsigned8  videoRows = VGA_NUM_ROWS; /* Number of rows in display.    */
    71 static unsigned8  videoCols = VGA_NUM_COLS; /* Number of columns in display. */
    72 static unsigned8  cursRow   = 0;       /* Current cursor row.           */
    73 static unsigned8  cursCol   = 0;       /* Current cursor column.        */
     69static uint16_t   *videoRamPtr = (uint16_t*)VGA_FB;
     70static uint8_t    videoRows = VGA_NUM_ROWS; /* Number of rows in display.    */
     71static uint8_t    videoCols = VGA_NUM_COLS; /* Number of columns in display. */
     72static uint8_t    cursRow   = 0;       /* Current cursor row.           */
     73static uint8_t    cursCol   = 0;       /* Current cursor column.        */
    7474
    7575
     
    8282+--------------------------------------------------------------------------*/
    8383static inline void
    84 setHardwareCursorPos(unsigned16 videoCursor)
     84setHardwareCursorPos(uint16_t  videoCursor)
    8585{
    8686        VGA_WRITE_CRTC(0x0e, (videoCursor >> 8) & 0xff);
     
    112112+--------------------------------------------------------------------------*/
    113113static void
    114 scrollUp(unsigned8 lines)
     114scrollUp(uint8_t  lines)
    115115{
    116116        /* Number of blank display cells on bottom of window. */
    117         unsigned16 blankCount;
     117        uint16_t  blankCount;
    118118
    119119       /* Source and destination pointers for memory copy operations. */
    120         unsigned16 *ptrDst, *ptrSrc;
     120        uint16_t  *ptrDst, *ptrSrc;
    121121
    122122        if(lines<videoRows)  /* Move window's contents up. */
     
    126126                 * of display (total - blank).
    127127                 */
    128                 unsigned16 nonBlankCount;
     128                uint16_t  nonBlankCount;
    129129
    130130                blankCount = lines * videoCols;
     
    337337boolean vga_probe(int minor)
    338338{
    339         unsigned8 ucMiscIn;
     339        uint8_t  ucMiscIn;
    340340
    341341        /*
  • c/src/lib/libbsp/powerpc/ppcn_60x/console/vga_p.h

    r3f71ac1 rbad8092c  
    2222#endif
    2323
    24 #define VGA_FB          ((unsigned32)PCI_MEM_BASE+0xb8000)
     24#define VGA_FB          ((uint32_t)PCI_MEM_BASE+0xb8000)
    2525#define VGA_NUM_ROWS    25
    2626#define VGA_NUM_COLS    80
     
    4040#define VGA_WRITE_ATT(reg, val) \
    4141        { \
    42                 volatile unsigned8 ucDummy; \
     42                volatile uint8_t  ucDummy; \
    4343                inport_byte(0x3da, ucDummy); \
    4444                outport_byte(0x3c0, reg); \
  • c/src/lib/libbsp/powerpc/ppcn_60x/console/z85c30cfg.c

    r3f71ac1 rbad8092c  
    3535 */
    3636
    37 unsigned8 Read_85c30_register(
    38   unsigned32  ulCtrlPort,
    39   unsigned8   ucRegNum
     37uint8_t  Read_85c30_register(
     38  uint32_t    ulCtrlPort,
     39  uint8_t     ucRegNum
    4040)
    4141{
    42   unsigned8 ucData;
     42  uint8_t  ucData;
    4343
    4444  outport_byte(ulCtrlPort, ucRegNum);
     
    5454
    5555void  Write_85c30_register(
    56   unsigned32  ulCtrlPort,
    57   unsigned8   ucRegNum,
    58   unsigned8   ucData
     56  uint32_t    ulCtrlPort,
     57  uint8_t     ucRegNum,
     58  uint8_t     ucData
    5959)
    6060{
     
    7171 */
    7272
    73 unsigned8 Read_85c30_data(
    74   unsigned32  ulDataPort
     73uint8_t  Read_85c30_data(
     74  uint32_t    ulDataPort
    7575)
    7676{
    77   unsigned8 ucData;
     77  uint8_t  ucData;
    7878
    7979  inport_byte(ulDataPort, ucData);
     
    8888
    8989void  Write_85c30_data(
    90   unsigned32  ulDataPort,
    91   unsigned8   ucData
     90  uint32_t    ulDataPort,
     91  uint8_t     ucData
    9292)
    9393{
  • c/src/lib/libbsp/powerpc/ppcn_60x/console/z85c30cfg.h

    r3f71ac1 rbad8092c  
    3737 */
    3838
    39 unsigned8 Read_85c30_register(
    40   unsigned32  ulCtrlPort,
    41   unsigned8   ucRegNum
     39uint8_t  Read_85c30_register(
     40  uint32_t    ulCtrlPort,
     41  uint8_t     ucRegNum
    4242);
    4343
    4444void  Write_85c30_register(
    45   unsigned32  ulCtrlPort,
    46   unsigned8   ucRegNum,
    47   unsigned8   ucData
     45  uint32_t    ulCtrlPort,
     46  uint8_t     ucRegNum,
     47  uint8_t     ucData
    4848);
    4949
    50 unsigned8 Read_85c30_data(
    51   unsigned32  ulDataPort
     50uint8_t  Read_85c30_data(
     51  uint32_t    ulDataPort
    5252);
    5353
    5454void  Write_85c30_data(
    55   unsigned32  ulDataPort,
    56   unsigned8   ucData
     55  uint32_t    ulDataPort,
     56  uint8_t     ucData
    5757);
    5858
  • c/src/lib/libbsp/powerpc/ppcn_60x/include/bsp.h

    r3f71ac1 rbad8092c  
    238238 * bit transfers
    239239 */
    240 extern unsigned16 Swap16(unsigned16 usVal);
    241 extern unsigned32 Swap32(unsigned32 ulVal);
     240extern uint16_t   Swap16(uint16_t  usVal);
     241extern uint32_t   Swap32(uint32_t  ulVal);
    242242
    243243#define outport_byte(port, val)                 \
    244244        EIEIO;                                  \
    245         *(volatile unsigned8 *)(PCI_IO_BASE+    \
     245        *(volatile uint8_t*)(PCI_IO_BASE+       \
    246246                                (unsigned long)(port))=(val)
    247247
    248248#define outport_16(port, val)                   \
    249249        EIEIO;                                  \
    250         *(volatile unsigned16 *)(PCI_IO_BASE+   \
     250        *(volatile uint16_t*)(PCI_IO_BASE+      \
    251251                                 (unsigned long)(port))=Swap16(val)
    252252
    253253#define outport_32(port, val)                   \
    254254        EIEIO;                                  \
    255         *(volatile unsigned32 *)(PCI_IO_BASE+   \
     255        *(volatile uint32_t*)(PCI_IO_BASE+      \
    256256                                 (unsigned long)(port))=Swap32(val)
    257257
    258258#define inport_byte(port, val)                          \
    259259        EIEIO;                                          \
    260         (val)=*(volatile unsigned8 *)(PCI_IO_BASE+      \
     260        (val)=*(volatile uint8_t*)(PCI_IO_BASE+ \
    261261                                      (unsigned long)(port))
    262262
    263263#define inport_16(port, val)                                    \
    264264        EIEIO;                                                  \
    265         (val)=Swap16(*(volatile unsigned16 *)(PCI_IO_BASE+      \
     265        (val)=Swap16(*(volatile uint16_t*)(PCI_IO_BASE+ \
    266266                                              (unsigned long)(port)))
    267267
    268268#define inport_32(port, val)                                    \
    269269        EIEIO;                                                  \
    270         (val)=Swap32(*(volatile unsigned32 *)(PCI_IO_BASE+      \
     270        (val)=Swap32(*(volatile uint32_t*)(PCI_IO_BASE+ \
    271271                                              (unsigned long)(port)))
    272272
     
    275275 */
    276276typedef volatile struct _PLANARREGISTERS{
    277     unsigned8 Reserved0[0x803];     /* Offset 0x000 */
    278     unsigned8 SimmId;               /* Offset 0x803 */
    279     unsigned8 SimmPresent;          /* Offset 0x804 */
    280     unsigned8 Reserved1[3];
    281     unsigned8 HardfileLight;        /* Offset 0x808 */
    282     unsigned8 Reserved2[3];
    283     unsigned8 EquipmentPresent1;    /* Offset 0x80C */
    284     unsigned8 Reserved3;
    285     unsigned8 EquipmentPresent2;    /* Offset 0x80e */
    286     unsigned8 Reserved4;
    287     unsigned8 PasswordProtect1;     /* Offset 0x810 */
    288     unsigned8 Reserved5;
    289     unsigned8 PasswordProtect2;     /* Offset 0x812 */
    290     unsigned8 Reserved6;
    291     unsigned8 L2Flush;              /* Offset 0x814 */
    292     unsigned8 Reserved7[3];
    293     unsigned8 Keylock;              /* Offset 0x818 */
    294     unsigned8 Reserved8[0x3c];
    295     unsigned8 BoardRevision;            /* Offset 0x854 */
    296     unsigned8 Reserved9[0xf];
    297     unsigned8 BoardID;                          /* Offset 0x864 */
    298     unsigned8 Reserved10;
    299     unsigned8 MotherboardMemoryType; /* Offset 0x866 */
    300     unsigned8 Reserved11;
    301     unsigned8 MezzanineMemoryType;  /* Offset 0x868 */
     277    uint8_t  Reserved0[0x803];     /* Offset 0x000 */
     278    uint8_t  SimmId;               /* Offset 0x803 */
     279    uint8_t  SimmPresent;          /* Offset 0x804 */
     280    uint8_t  Reserved1[3];
     281    uint8_t  HardfileLight;        /* Offset 0x808 */
     282    uint8_t  Reserved2[3];
     283    uint8_t  EquipmentPresent1;    /* Offset 0x80C */
     284    uint8_t  Reserved3;
     285    uint8_t  EquipmentPresent2;    /* Offset 0x80e */
     286    uint8_t  Reserved4;
     287    uint8_t  PasswordProtect1;     /* Offset 0x810 */
     288    uint8_t  Reserved5;
     289    uint8_t  PasswordProtect2;     /* Offset 0x812 */
     290    uint8_t  Reserved6;
     291    uint8_t  L2Flush;              /* Offset 0x814 */
     292    uint8_t  Reserved7[3];
     293    uint8_t  Keylock;              /* Offset 0x818 */
     294    uint8_t  Reserved8[0x3c];
     295    uint8_t  BoardRevision;            /* Offset 0x854 */
     296    uint8_t  Reserved9[0xf];
     297    uint8_t  BoardID;                          /* Offset 0x864 */
     298    uint8_t  Reserved10;
     299    uint8_t  MotherboardMemoryType; /* Offset 0x866 */
     300    uint8_t  Reserved11;
     301    uint8_t  MezzanineMemoryType;  /* Offset 0x868 */
    302302} PLANARREGISTERS, *PPLANARREGISTERS;
    303303
     
    379379#define Cause_tm27_intr()  \
    380380  do { \
    381     unsigned32 _clicks = 8; \
     381    uint32_t  _clicks = 8; \
    382382    asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
    383383  } while (0)
     
    386386#define Clear_tm27_intr() \
    387387  do { \
    388     unsigned32 _clicks = 0xffffffff; \
     388    uint32_t  _clicks = 0xffffffff; \
    389389    asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
    390390  } while (0)
     
    392392#define Lower_tm27_intr() \
    393393  do { \
    394     unsigned32 _msr = 0; \
     394    uint32_t  _msr = 0; \
    395395    _ISR_Set_level( 0 ); \
    396396    asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
     
    456456 */
    457457void DEBUG_puts( char *string );
    458 void DEBUG_puth( unsigned32 ulHexNum );
     458void DEBUG_puth( uint32_t  ulHexNum );
    459459
    460460void BSP_fatal_return( void );
     
    464464extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    465465
    466 extern unsigned32          bsp_isr_level;
     466extern uint32_t            bsp_isr_level;
    467467
    468468#endif /* ASM */
  • c/src/lib/libbsp/powerpc/ppcn_60x/include/nvram.h

    r3f71ac1 rbad8092c  
    3434 * These routines access data in the NvRAM's OS area
    3535 */
    36 extern rtems_status_code ReadNvRAM8(unsigned32 ulOffset, unsigned8 *pucData);
    37 extern rtems_status_code WriteNvRAM8(unsigned32 ulOffset, unsigned8 ucValue);
    38 extern rtems_status_code ReadNvRAM16(unsigned32 ulOffset, unsigned16 *pusData);
    39 extern rtems_status_code WriteNvRAM16(unsigned32 ulOffset, unsigned16 usValue);
    40 extern rtems_status_code ReadNvRAM32(unsigned32 ulOffset, unsigned32 *pulData);
    41 extern rtems_status_code WriteNvRAM32(unsigned32 ulOffset, unsigned32 ulValue);
     36extern rtems_status_code ReadNvRAM8(uint32_t   ulOffset, uint8_t  *pucData);
     37extern rtems_status_code WriteNvRAM8(uint32_t   ulOffset, uint8_t  ucValue);
     38extern rtems_status_code ReadNvRAM16(uint32_t   ulOffset, uint16_t  *pusData);
     39extern rtems_status_code WriteNvRAM16(uint32_t   ulOffset, uint16_t  usValue);
     40extern rtems_status_code ReadNvRAM32(uint32_t   ulOffset, uint32_t  *pulData);
     41extern rtems_status_code WriteNvRAM32(uint32_t   ulOffset, uint32_t  ulValue);
    4242rtems_status_code ReadNvRAMBlock(
    43   unsigned32 ulOffset, unsigned8 *pucData, unsigned32 length);
     43  uint32_t   ulOffset, uint8_t   *pucData, uint32_t  length);
    4444rtems_status_code WriteNvRAMBlock(
    45   unsigned32 ulOffset, unsigned8 *ucValue, unsigned32 length);
     45  uint32_t   ulOffset, uint8_t   *ucValue, uint32_t  length);
    4646/*
    4747 * This routine returns the size of the NvRAM
    4848 */
    49 extern unsigned32 SizeNvRAM();
     49extern uint32_t  SizeNvRAM();
    5050
    5151/*
  • c/src/lib/libbsp/powerpc/ppcn_60x/include/pci.h

    r3f71ac1 rbad8092c  
    268268 */
    269269extern rtems_status_code PCIConfigWrite8(
    270     unsigned8 ucBusNumber,
    271     unsigned8 ucSlotNumber,
    272     unsigned8 ucFunctionNumber,
    273     unsigned8 ucOffset,
    274     unsigned8 ucValue
     270    uint8_t  ucBusNumber,
     271    uint8_t  ucSlotNumber,
     272    uint8_t  ucFunctionNumber,
     273    uint8_t  ucOffset,
     274    uint8_t  ucValue
    275275);
    276276
    277277extern rtems_status_code PCIConfigWrite16(
    278     unsigned8 ucBusNumber,
    279     unsigned8 ucSlotNumber,
    280     unsigned8 ucFunctionNumber,
    281     unsigned8 ucOffset,
    282     unsigned16 usValue
     278    uint8_t  ucBusNumber,
     279    uint8_t  ucSlotNumber,
     280    uint8_t  ucFunctionNumber,
     281    uint8_t  ucOffset,
     282    uint16_t  usValue
    283283);
    284284
    285285extern rtems_status_code PCIConfigWrite32(
    286     unsigned8 ucBusNumber,
    287     unsigned8 ucSlotNumber,
    288     unsigned8 ucFunctionNumber,
    289     unsigned8 ucOffset,
    290     unsigned32 ulValue
     286    uint8_t  ucBusNumber,
     287    uint8_t  ucSlotNumber,
     288    uint8_t  ucFunctionNumber,
     289    uint8_t  ucOffset,
     290    uint32_t  ulValue
    291291);
    292292
    293293extern rtems_status_code PCIConfigRead8(
    294     unsigned8 ucBusNumber,
    295     unsigned8 ucSlotNumber,
    296     unsigned8 ucFunctionNumber,
    297     unsigned8 ucOffset,
    298     unsigned8 *pucValue
     294    uint8_t  ucBusNumber,
     295    uint8_t  ucSlotNumber,
     296    uint8_t  ucFunctionNumber,
     297    uint8_t  ucOffset,
     298    uint8_t  *pucValue
    299299);
    300300
    301301extern rtems_status_code PCIConfigRead16(
    302     unsigned8 ucBusNumber,
    303     unsigned8 ucSlotNumber,
    304     unsigned8 ucFunctionNumber,
    305     unsigned8 ucOffset,
    306     unsigned16 *pusValue
     302    uint8_t  ucBusNumber,
     303    uint8_t  ucSlotNumber,
     304    uint8_t  ucFunctionNumber,
     305    uint8_t  ucOffset,
     306    uint16_t  *pusValue
    307307);
    308308
    309309extern rtems_status_code PCIConfigRead32(
    310     unsigned8 ucBusNumber,
    311     unsigned8 ucSlotNumber,
    312     unsigned8 ucFunctionNumber,
    313     unsigned8 ucOffset,
    314     unsigned32 *pulValue
     310    uint8_t  ucBusNumber,
     311    uint8_t  ucSlotNumber,
     312    uint8_t  ucFunctionNumber,
     313    uint8_t  ucOffset,
     314    uint32_t  *pulValue
    315315);
    316316
     
    318318 * Return the number of PCI busses in the system
    319319 */
    320 extern unsigned8 BusCountPCI();
     320extern uint8_t  BusCountPCI();
    321321
    322322#endif /* _PCI_H_ */
  • c/src/lib/libbsp/powerpc/ppcn_60x/network/amd79c970.c

    r3f71ac1 rbad8092c  
    101101        initblk_t               initBlk;
    102102        pc_net_t                *pPCNet;
    103         unsigned32              ulIntVector;
     103        uint32_t                ulIntVector;
    104104        struct mbuf             **rxMbuf;
    105105        struct mbuf             **txMbuf;
     
    143143amd79c970_isr (rtems_vector_number v)
    144144{
    145         unsigned32 ulCSR0, ulCSR4, ulCSR5;
     145        uint32_t  ulCSR0, ulCSR4, ulCSR5;
    146146        amd79c970Context_t *dp;
    147147        int i;
     
    221221        struct mbuf     *bp;
    222222        int             i;
    223         unsigned8       ucPCIBusCount;
    224         unsigned8       ucBusNumber;
    225         unsigned8       ucSlotNumber;
    226         unsigned32      ulDeviceID;
    227         unsigned32      ulBAR0;
    228         unsigned8       ucIntVector;
    229         unsigned32      ulInitClkPCIAddr;
    230         unsigned32      ulAPROM;
    231         unsigned32      ulCSR0;
     223        uint8_t         ucPCIBusCount;
     224        uint8_t         ucBusNumber;
     225        uint8_t         ucSlotNumber;
     226        uint32_t        ulDeviceID;
     227        uint32_t        ulBAR0;
     228        uint8_t         ucIntVector;
     229        uint32_t        ulInitClkPCIAddr;
     230        uint32_t        ulAPROM;
     231        uint32_t        ulCSR0;
    232232
    233233        ucPCIBusCount=BusCountPCI();
     
    335335                bp->data += sizeof (struct iface *);
    336336                dp->rxBdBase[i].rmde_addr=
    337                         Swap32((unsigned32)bp->data+PCI_SYS_MEM_BASE);
     337                        Swap32((uint32_t)bp->data+PCI_SYS_MEM_BASE);
    338338                dp->rxBdBase[i].rmde_bcnt=
    339339                        Swap16(-(bp->size-sizeof (struct iface *)));
     
    370370         * Set the receive descriptor ring address
    371371         */
    372         dp->initBlk.ib_rdra=Swap32((unsigned32)&dp->rxBdBase[0]+
     372        dp->initBlk.ib_rdra=Swap32((uint32_t)&dp->rxBdBase[0]+
    373373                                     PCI_SYS_MEM_BASE);
    374374
     
    380380         * Set the tranmit descriptor ring address
    381381         */
    382         dp->initBlk.ib_tdra=Swap32((unsigned32)&dp->txBdBase[0]+
     382        dp->initBlk.ib_tdra=Swap32((uint32_t)&dp->txBdBase[0]+
    383383                                     PCI_SYS_MEM_BASE);
    384384
     
    404404        WR_CSR32(dp, CSR5, 0);
    405405
    406         ulInitClkPCIAddr=(unsigned32)&dp->initBlk+PCI_SYS_MEM_BASE;
     406        ulInitClkPCIAddr=(uint32_t)&dp->initBlk+PCI_SYS_MEM_BASE;
    407407        /*
    408408         * CSR2 must contain the high order 16 bits of the first word in
     
    462462amd79c970_retire_tx_bd (amd79c970Context_t *dp)
    463463{
    464         unsigned16 status;
    465         unsigned32 error;
     464        uint16_t  status;
     465        uint32_t  error;
    466466        int i;
    467467        int nRetired;
     
    526526        struct mbuf *bp;
    527527        tmde_t *firstTxBd, *txBd;
    528         unsigned16 status;
     528        uint16_t  status;
    529529        int nAdded;
    530530
     
    608608                 * Fill in the buffer descriptor
    609609                 */
    610                 txBd->tmde_addr=Swap32((unsigned32)bp->data+PCI_SYS_MEM_BASE);
     610                txBd->tmde_addr=Swap32((uint32_t)bp->data+PCI_SYS_MEM_BASE);
    611611                txBd->tmde_bcnt=Swap16(-bp->cnt);
    612612                dp->txMbuf[dp->txBdHead] = bp;
     
    677677        amd79c970Context_t *dp=(amd79c970Context_t *)p2;
    678678        struct mbuf *bp;
    679         rtems_unsigned16 status;
     679        uint16_t        status;
    680680        rmde_t *rxBd;
    681681        int rxBdIndex;
     
    771771                        bp->data += sizeof (struct iface *);
    772772                        rxBd->rmde_addr=Swap32(
    773                                 (unsigned32)bp->data+PCI_SYS_MEM_BASE);
     773                                (uint32_t)bp->data+PCI_SYS_MEM_BASE);
    774774                        rxBd->rmde_bcnt=Swap16(
    775775                                -(bp->size-sizeof (struct iface *)));
     
    798798{
    799799        amd79c970Context_t *dp;
    800         unsigned32      ulCSR0;
     800        uint32_t        ulCSR0;
    801801        int             i;
    802802
     
    914914         */
    915915        pAmd79c970Context[i]=(amd79c970Context_t *)
    916                 (((unsigned32)callocw(1,
     916                (((uint32_t)callocw(1,
    917917                                      sizeof(amd79c970Context_t)+16)+16) & ~15);
    918918        dp=pAmd79c970Context[i];
  • c/src/lib/libbsp/powerpc/ppcn_60x/network/amd79c970.h

    r3f71ac1 rbad8092c  
    2626        {
    2727                struct {
    28                         unsigned16      aprom[8];  /* 0x00 */
    29                         unsigned16      rdp;       /* 0x10 */
    30                         unsigned16      rap;       /* 0x14 */
    31                         unsigned16      reset;     /* 0x18 */
    32                         unsigned16      bdp;       /* 0x1C */
     28                        uint16_t        aprom[8];  /* 0x00 */
     29                        uint16_t        rdp;       /* 0x10 */
     30                        uint16_t        rap;       /* 0x14 */
     31                        uint16_t        reset;     /* 0x18 */
     32                        uint16_t        bdp;       /* 0x1C */
    3333                } wio;
    3434                struct {
    35                         unsigned32      aprom[4];  /* 0x00 */
    36                         unsigned32      rdp;       /* 0x10 */
    37                         unsigned32      rap;       /* 0x12 */
    38                         unsigned32      reset;     /* 0x14 */
    39                         unsigned32      bdp;       /* 0x16 */
     35                        uint32_t        aprom[4];  /* 0x00 */
     36                        uint32_t        rdp;       /* 0x10 */
     37                        uint32_t        rap;       /* 0x12 */
     38                        uint32_t        reset;     /* 0x14 */
     39                        uint32_t        bdp;       /* 0x16 */
    4040                } dwio;
    4141        } u;
     
    4949
    5050typedef struct pc_net_eeprom {
    51         unsigned8       EthNumber[6];
    52         unsigned16      Reserved1;      /* Must be 0x0000 */
    53         unsigned16      Reserved2;      /* Must be 0x1000 */
    54         unsigned16      User1;
    55         unsigned16      checksum;
    56         unsigned16      Reserved3;      /* Must be 0x5757 */
    57         unsigned16      bcr16;
    58         unsigned16      bcr17;
    59         unsigned16      bcr18;
    60         unsigned16      bcr2;
    61         unsigned16      bcr21;
    62         unsigned16      Reserved4;      /* Must be 0x0000 */
    63         unsigned16      Reserved5;      /* Must be 0x0000 */
    64         unsigned8       Reserved6;      /* Must be 0x00 */
    65         unsigned8       checksumAdjust;
    66         unsigned16      Reserved7;      /* Must be 0x0000 */
    67         unsigned16      crc;            /* CCITT checksum from Serial[] onwards */
    68         unsigned8       Serial[16];     /* Radstone Serial Number */
     51        uint8_t         EthNumber[6];
     52        uint16_t        Reserved1;      /* Must be 0x0000 */
     53        uint16_t        Reserved2;      /* Must be 0x1000 */
     54        uint16_t        User1;
     55        uint16_t        checksum;
     56        uint16_t        Reserved3;      /* Must be 0x5757 */
     57        uint16_t        bcr16;
     58        uint16_t        bcr17;
     59        uint16_t        bcr18;
     60        uint16_t        bcr2;
     61        uint16_t        bcr21;
     62        uint16_t        Reserved4;      /* Must be 0x0000 */
     63        uint16_t        Reserved5;      /* Must be 0x0000 */
     64        uint8_t         Reserved6;      /* Must be 0x00 */
     65        uint8_t         checksumAdjust;
     66        uint16_t        Reserved7;      /* Must be 0x0000 */
     67        uint16_t        crc;            /* CCITT checksum from Serial[] onwards */
     68        uint8_t         Serial[16];     /* Radstone Serial Number */
    6969} pc_net_eeprom_t;
    7070
     
    220220typedef volatile struct initblk {
    221221        /* mode can be set in csr15 */
    222         unsigned16      ib_mode;        /* Chip's operating parameters */
    223         unsigned8       ib_rlen;        /* rx ring length (power of 2) */
    224         unsigned8       ib_tlen;        /* tx ring length (power of 2) */
     222        uint16_t        ib_mode;        /* Chip's operating parameters */
     223        uint8_t         ib_rlen;        /* rx ring length (power of 2) */
     224        uint8_t         ib_tlen;        /* tx ring length (power of 2) */
    225225/*
    226226 * The bytes must be swapped within the word, so that, for example,
     
    230230 * the bus will swap.
    231231 */
    232         unsigned8       ib_padr[8];     /* physical address */
    233         unsigned16      ib_ladrf[4];    /* logical address filter */
    234         unsigned32      ib_rdra;        /* rcv ring desc addr */
    235         unsigned32      ib_tdra;        /* xmit ring desc addr */
     232        uint8_t         ib_padr[8];     /* physical address */
     233        uint16_t        ib_ladrf[4];    /* logical address filter */
     234        uint32_t        ib_rdra;        /* rcv ring desc addr */
     235        uint32_t        ib_tdra;        /* xmit ring desc addr */
    236236} initblk_t;
    237237
     
    276276
    277277typedef volatile struct rmde {
    278         unsigned32      rmde_addr;      /* buf addr */
    279 
    280         unsigned16      rmde_bcnt;
    281         unsigned16      rmde_flags;
    282 
    283         unsigned16      rmde_mcnt;
    284         unsigned16      rmde_misc;
    285 
    286         unsigned32      align;
     278        uint32_t        rmde_addr;      /* buf addr */
     279
     280        uint16_t        rmde_bcnt;
     281        uint16_t        rmde_flags;
     282
     283        uint16_t        rmde_mcnt;
     284        uint16_t        rmde_misc;
     285
     286        uint32_t        align;
    287287} rmde_t;
    288288
     
    320320 */
    321321typedef volatile struct tmde {
    322         unsigned32      tmde_addr;      /* buf addr */
    323 
    324         unsigned16      tmde_bcnt;
    325         unsigned16      tmde_status;    /* misc error and status bits */
    326 
    327         unsigned32      tmde_error;
    328 
    329         unsigned32      align;
     322        uint32_t        tmde_addr;      /* buf addr */
     323
     324        uint16_t        tmde_bcnt;
     325        uint16_t        tmde_status;    /* misc error and status bits */
     326
     327        uint32_t        tmde_error;
     328
     329        uint32_t        align;
    330330} tmde_t;
    331331
     
    415415 * Bit definitions for BCR19
    416416 */
    417 #define prom_EDI        (unsigned16)0x0001
    418 #define prom_EDO        (unsigned16)0x0001
    419 #define prom_ESK        (unsigned16)0x0002
    420 #define prom_ECS        (unsigned16)0x0004
    421 #define prom_EEN        (unsigned16)0x0010
    422 #define prom_EEDET      (unsigned16)0x2000
    423 #define prom_PVALID     (unsigned16)0x8000
    424 #define prom_PREAD      (unsigned16)0x4000
     417#define prom_EDI        (uint16_t)0x0001
     418#define prom_EDO        (uint16_t)0x0001
     419#define prom_ESK        (uint16_t)0x0002
     420#define prom_ECS        (uint16_t)0x0004
     421#define prom_EEN        (uint16_t)0x0010
     422#define prom_EEDET      (uint16_t)0x2000
     423#define prom_PVALID     (uint16_t)0x8000
     424#define prom_PREAD      (uint16_t)0x4000
    425425
    426426#endif
  • c/src/lib/libbsp/powerpc/ppcn_60x/nvram/mk48t18.h

    r3f71ac1 rbad8092c  
    3434 
    3535typedef struct _MK48T18_CMOS_MAP {
    36     unsigned8 SystemDependentArea2[8];
    37     unsigned8 FeatureByte0[1];
    38     unsigned8 FeatureByte1[1];
    39     unsigned8 Century;       /* century byte in BCD */
    40     unsigned8 FeatureByte3[1];
    41     unsigned8 FeatureByte4[1];
    42     unsigned8 FeatureByte5[1];
    43     unsigned8 FeatureByte6[1];
    44     unsigned8 FeatureByte7[1];
    45     unsigned8 BootPW[14];
    46     rtems_unsigned16 BootCrc; /* CRC on BootPW */
    47     unsigned8 ConfigPW[14];
    48     rtems_unsigned16 ConfigCrc; /* CRC on ConfigPW */
    49     unsigned8 SystemDependentArea1[8];
     36    uint8_t  SystemDependentArea2[8];
     37    uint8_t  FeatureByte0[1];
     38    uint8_t  FeatureByte1[1];
     39    uint8_t  Century;       /* century byte in BCD */
     40    uint8_t  FeatureByte3[1];
     41    uint8_t  FeatureByte4[1];
     42    uint8_t  FeatureByte5[1];
     43    uint8_t  FeatureByte6[1];
     44    uint8_t  FeatureByte7[1];
     45    uint8_t  BootPW[14];
     46    uint16_t        BootCrc; /* CRC on BootPW */
     47    uint8_t  ConfigPW[14];
     48    uint16_t        ConfigCrc; /* CRC on ConfigPW */
     49    uint8_t  SystemDependentArea1[8];
    5050    /*
    5151     * The following are the RTC registers
    5252     */
    53     volatile unsigned8 Control;
    54     volatile unsigned8 Second:7;        /* 0-59 */
    55     volatile unsigned8 Stop:1;
    56     volatile unsigned8 Minute;  /* 0-59 */
    57     volatile unsigned8 Hour;    /* 0-23 */
    58     volatile unsigned8 Day:3;   /* 1-7 */
    59     volatile unsigned8 Resvd1:3;        /* 0 */
    60     volatile unsigned8 FT:1;    /* Frequency test bit - must be 0 */
    61     volatile unsigned8 Resvd2:1;        /* 0 */
    62     volatile unsigned8 Date;    /* 1-31 */
    63     volatile unsigned8 Month;   /* 1-12 */
    64     volatile unsigned8 Year;    /* 0-99 */
     53    volatile uint8_t  Control;
     54    volatile uint8_t  Second:7;        /* 0-59 */
     55    volatile uint8_t  Stop:1;
     56    volatile uint8_t  Minute;  /* 0-59 */
     57    volatile uint8_t  Hour;    /* 0-23 */
     58    volatile uint8_t  Day:3;   /* 1-7 */
     59    volatile uint8_t  Resvd1:3;        /* 0 */
     60    volatile uint8_t  FT:1;    /* Frequency test bit - must be 0 */
     61    volatile uint8_t  Resvd2:1;        /* 0 */
     62    volatile uint8_t  Date;    /* 1-31 */
     63    volatile uint8_t  Month;   /* 1-12 */
     64    volatile uint8_t  Year;    /* 0-99 */
    6565} MK48T18_CMOS_MAP, *PMK48T18_CMOS_MAP;
    6666
     
    7474#define MK48T18_NVSIZE 8192-sizeof(MK48T18_CMOS_MAP)
    7575#define MK48T18_GESIZE (MK48T18_NVSIZE-CONFSIZE-OSAREASIZE-sizeof(HEADER))
    76 #define MK48T18_BASE (PMK48T18_NVRAM_MAP)((unsigned8 *)PCI_MEM_BASE+0x00800000)
     76#define MK48T18_BASE (PMK48T18_NVRAM_MAP)((uint8_t*)PCI_MEM_BASE+0x00800000)
    7777
    7878/* Here is the whole map of the MK48T18 NVRAM */
    7979typedef struct _MK48T18_NVRAM_MAP {
    8080    HEADER      Header;
    81     unsigned8   GEArea[MK48T18_GESIZE];
    82     unsigned8   OSArea[OSAREASIZE];
    83     unsigned8   ConfigArea[CONFSIZE];
     81    uint8_t     GEArea[MK48T18_GESIZE];
     82    uint8_t     OSArea[OSAREASIZE];
     83    uint8_t     ConfigArea[CONFSIZE];
    8484    MK48T18_CMOS_MAP    CMOS;
    8585} MK48T18_NVRAM_MAP, *PMK48T18_NVRAM_MAP;
  • c/src/lib/libbsp/powerpc/ppcn_60x/nvram/nvram.c

    r3f71ac1 rbad8092c  
    2929(*PNVRAMWRITE)
    3030(
    31         unsigned32 ulOffset,
    32         unsigned8 ucByte
     31        uint32_t  ulOffset,
     32        uint8_t  ucByte
    3333);
    3434
    3535typedef
    36 unsigned8
     36uint8_t 
    3737(*PNVRAMREAD)
    3838(
    39         unsigned32 ulOffset
     39        uint32_t  ulOffset
    4040);
    4141
     
    5151        PNVRAMREAD      nvramRead;
    5252        PNVRAMCOMMIT    nvramCommit;
    53         unsigned32      nvramSize;
     53        uint32_t        nvramSize;
    5454} NVRAM_ENTRY_TABLE, *PNVRAM_ENTRY_TABLE;
    5555
     
    6767 * DS1385 specific routines
    6868 */
    69 static void nvramDsWrite(unsigned32 ulOffset, unsigned8 ucByte);
    70 static unsigned8 nvramDsRead(unsigned32 ulOffset);
     69static void nvramDsWrite(uint32_t   ulOffset, uint8_t  ucByte);
     70static uint8_t   nvramDsRead(uint32_t  ulOffset);
    7171
    7272/*
    7373 * MK48T18 specific routines
    7474 */
    75 static void nvramMkWrite(unsigned32 ulOffset, unsigned8 ucByte);
    76 static unsigned8 nvramMkRead(unsigned32 ulOffset);
     75static void nvramMkWrite(uint32_t   ulOffset, uint8_t  ucByte);
     76static uint8_t   nvramMkRead(uint32_t  ulOffset);
    7777
    7878/*
     
    129129static PNVRAM_ENTRY_TABLE pNvRAMFunc;
    130130static boolean          bNvRAMChanged=FALSE;
    131 static unsigned32       ulPRePOSAreaLength;
    132 static unsigned32       ulPRePOSAreaOffset;
     131static uint32_t         ulPRePOSAreaLength;
     132static uint32_t         ulPRePOSAreaOffset;
    133133
    134134/*
     
    140140 * These routines support the ds1385
    141141 */
    142 static unsigned8 nvramDsRead(unsigned32 ulOffset)
    143 {
    144         unsigned8 ucTemp;
     142static uint8_t   nvramDsRead(uint32_t  ulOffset)
     143{
     144        uint8_t  ucTemp;
    145145
    146146        ucTemp = ulOffset & 0xff;
     
    154154}
    155155
    156 static void nvramDsWrite(unsigned32 ulOffset, unsigned8 ucData)
    157 {
    158         unsigned8 ucTemp;
    159 
    160         ucTemp = (unsigned8)(ulOffset & 0xff);
    161         outport_byte(DS1385_PORT_BASE, (unsigned8) ucTemp);
    162 
    163         ucTemp = (unsigned8)((ulOffset >> 8) & 0xf);
    164         outport_byte((DS1385_PORT_BASE + 1) , (unsigned8)ucTemp);
     156static void nvramDsWrite(uint32_t   ulOffset, uint8_t  ucData)
     157{
     158        uint8_t  ucTemp;
     159
     160        ucTemp = (uint8_t)(ulOffset & 0xff);
     161        outport_byte(DS1385_PORT_BASE, (uint8_t) ucTemp);
     162
     163        ucTemp = (uint8_t)((ulOffset >> 8) & 0xf);
     164        outport_byte((DS1385_PORT_BASE + 1) , (uint8_t)ucTemp);
    165165
    166166        outport_byte((DS1385_PORT_BASE+3), ucData);
     
    170170 * These routines support the MK48T18 and STK11C68
    171171 */
    172 static unsigned8 nvramMkRead(unsigned32 ulOffset)
    173 {
    174         unsigned8 *pNvRAM = (unsigned8 *)MK48T18_BASE;
     172static uint8_t   nvramMkRead(uint32_t  ulOffset)
     173{
     174        uint8_t   *pNvRAM = (uint8_t*)MK48T18_BASE;
    175175
    176176        return(pNvRAM[ulOffset]);
    177177}
    178178
    179 static void nvramMkWrite(unsigned32 ulOffset, unsigned8 ucData)
    180 {
    181         unsigned8 *pNvRAM = (unsigned8 *)MK48T18_BASE;
     179static void nvramMkWrite(uint32_t   ulOffset, uint8_t  ucData)
     180{
     181        uint8_t   *pNvRAM = (uint8_t*)MK48T18_BASE;
    182182
    183183        pNvRAM[ulOffset]=ucData;
     
    288288 * This routine returns the size of the NvRAM
    289289 */
    290 unsigned32 SizeNvRAM()
     290uint32_t  SizeNvRAM()
    291291{
    292292        return(ulPRePOSAreaLength);
     
    307307 * This routine reads a byte from the NvRAM
    308308 */
    309 rtems_status_code ReadNvRAM8(unsigned32 ulOffset, unsigned8 *pucData)
     309rtems_status_code ReadNvRAM8(uint32_t   ulOffset, uint8_t  *pucData)
    310310{
    311311        if(ulOffset>ulPRePOSAreaLength)
     
    322322 * This routine writes a byte to the NvRAM
    323323 */
    324 rtems_status_code WriteNvRAM8(unsigned32 ulOffset, unsigned8 ucValue)
     324rtems_status_code WriteNvRAM8(uint32_t   ulOffset, uint8_t  ucValue)
    325325{
    326326        if(ulOffset>ulPRePOSAreaLength)
     
    339339 */
    340340rtems_status_code ReadNvRAMBlock(
    341   unsigned32 ulOffset, unsigned8 *pucData, unsigned32 length)
    342 {
    343         unsigned32 i;
     341  uint32_t   ulOffset, uint8_t   *pucData, uint32_t  length)
     342{
     343        uint32_t  i;
    344344
    345345        if((ulOffset + length) > ulPRePOSAreaLength)
     
    359359 */
    360360rtems_status_code WriteNvRAMBlock(
    361   unsigned32 ulOffset, unsigned8 *ucValue, unsigned32 length)
    362 {
    363         unsigned32 i;
     361  uint32_t   ulOffset, uint8_t   *ucValue, uint32_t  length)
     362{
     363        uint32_t  i;
    364364
    365365        if((ulOffset + length) > ulPRePOSAreaLength)
     
    380380 * The NVRAM holds data in Big-Endian format
    381381 */
    382 rtems_status_code ReadNvRAM16 (unsigned32 ulOffset, unsigned16 *pusData)
    383 {
    384         unsigned32 ulTrueOffset=ulPRePOSAreaOffset+ulOffset;
     382rtems_status_code ReadNvRAM16 (uint32_t   ulOffset, uint16_t  *pusData)
     383{
     384        uint32_t  ulTrueOffset=ulPRePOSAreaOffset+ulOffset;
    385385
    386386        if(ulOffset>ulPRePOSAreaLength)
     
    395395}
    396396
    397 rtems_status_code WriteNvRAM16 (unsigned32 ulOffset, unsigned16 usValue)
    398 {
    399         unsigned32 ulTrueOffset=ulPRePOSAreaOffset+ulOffset;
     397rtems_status_code WriteNvRAM16 (uint32_t   ulOffset, uint16_t  usValue)
     398{
     399        uint32_t  ulTrueOffset=ulPRePOSAreaOffset+ulOffset;
    400400
    401401        if(ulOffset>ulPRePOSAreaLength)
     
    404404        }
    405405        rtems_semaphore_obtain(semNvRAM, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
    406         pNvRAMFunc->nvramWrite(ulTrueOffset, (unsigned8) (usValue >> 8));
    407         pNvRAMFunc->nvramWrite(ulTrueOffset + 1, (unsigned8) usValue);
     406        pNvRAMFunc->nvramWrite(ulTrueOffset, (uint8_t) (usValue >> 8));
     407        pNvRAMFunc->nvramWrite(ulTrueOffset + 1, (uint8_t) usValue);
    408408        bNvRAMChanged=TRUE;
    409409        rtems_semaphore_release(semNvRAM);
     
    411411}
    412412
    413 rtems_status_code ReadNvRAM32 (unsigned32 ulOffset, unsigned32 *pulData)
    414 {
    415         unsigned32 ulTrueOffset=ulPRePOSAreaOffset+ulOffset;
     413rtems_status_code ReadNvRAM32 (uint32_t   ulOffset, uint32_t  *pulData)
     414{
     415        uint32_t  ulTrueOffset=ulPRePOSAreaOffset+ulOffset;
    416416
    417417        if(ulOffset>ulPRePOSAreaLength)
     
    428428}
    429429
    430 rtems_status_code WriteNvRAM32 (unsigned32 ulOffset, unsigned32 ulValue)
    431 {
    432         unsigned32 ulTrueOffset=ulPRePOSAreaOffset+ulOffset;
     430rtems_status_code WriteNvRAM32 (uint32_t   ulOffset, uint32_t  ulValue)
     431{
     432        uint32_t  ulTrueOffset=ulPRePOSAreaOffset+ulOffset;
    433433
    434434        if(ulOffset>ulPRePOSAreaLength)
     
    437437        }
    438438        rtems_semaphore_obtain(semNvRAM, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
    439         pNvRAMFunc->nvramWrite(ulTrueOffset, (unsigned8) (ulValue >> 24));
    440         pNvRAMFunc->nvramWrite(ulTrueOffset + 1, (unsigned8) (ulValue >> 16));
    441         pNvRAMFunc->nvramWrite(ulTrueOffset + 2, (unsigned8) (ulValue >> 8));
    442         pNvRAMFunc->nvramWrite(ulTrueOffset + 3, (unsigned8) ulValue);
     439        pNvRAMFunc->nvramWrite(ulTrueOffset, (uint8_t) (ulValue >> 24));
     440        pNvRAMFunc->nvramWrite(ulTrueOffset + 1, (uint8_t) (ulValue >> 16));
     441        pNvRAMFunc->nvramWrite(ulTrueOffset + 2, (uint8_t) (ulValue >> 8));
     442        pNvRAMFunc->nvramWrite(ulTrueOffset + 3, (uint8_t) ulValue);
    443443        bNvRAMChanged=TRUE;
    444444        rtems_semaphore_release(semNvRAM);
     
    451451        PHEADER pNvHeader = (PHEADER)0;
    452452        rtems_status_code sc;
    453         unsigned32 ulLength, ulOffset;
     453        uint32_t  ulLength, ulOffset;
    454454
    455455        if(ucSystemType==SYS_TYPE_PPC1)
     
    503503         * Access the header at the start of NvRAM
    504504         */
    505         ReadNvRAM32((unsigned32)(&pNvHeader->OSAreaLength), &ulLength);
    506         ReadNvRAM32((unsigned32)(&pNvHeader->OSAreaAddress), &ulOffset);
     505        ReadNvRAM32((uint32_t)(&pNvHeader->OSAreaLength), &ulLength);
     506        ReadNvRAM32((uint32_t)(&pNvHeader->OSAreaAddress), &ulOffset);
    507507
    508508        /*
  • c/src/lib/libbsp/powerpc/ppcn_60x/nvram/stk11c68.h

    r3f71ac1 rbad8092c  
    2929#define STK11C68_NVSIZE 8192
    3030#define STK11C68_GESIZE (STK11C68_NVSIZE-CONFSIZE-OSAREASIZE-sizeof(HEADER))
    31 #define STK11C68_BASE (PSTK11C68_NVRAM_MAP)((unsigned8 *)PCI_MEM_BASE+0x00800000)
     31#define STK11C68_BASE (PSTK11C68_NVRAM_MAP)((uint8_t*)PCI_MEM_BASE+0x00800000)
    3232
    3333/*
     
    3939typedef struct _STK11C68_NVRAM_MAP {
    4040        HEADER          Header;
    41         unsigned8       GEArea[STK11C68_GESIZE];
    42         unsigned8       OSArea[OSAREASIZE];
    43         unsigned8       ConfigArea[CONFSIZE];
     41        uint8_t         GEArea[STK11C68_GESIZE];
     42        uint8_t         OSArea[OSAREASIZE];
     43        uint8_t         ConfigArea[CONFSIZE];
    4444} STK11C68_NVRAM_MAP, *PSTK11C68_NVRAM_MAP;
    4545
  • c/src/lib/libbsp/powerpc/ppcn_60x/pci/pci.c

    r3f71ac1 rbad8092c  
    4949 * Private data
    5050 */
    51 static unsigned8 ucMaxPCIBus;
     51static uint8_t  ucMaxPCIBus;
    5252
    5353/*
     
    5555 */
    5656rtems_status_code PCIConfigWrite8(
    57         unsigned8 ucBusNumber,
    58         unsigned8 ucSlotNumber,
    59         unsigned8 ucFunctionNumber,
    60         unsigned8 ucOffset,
    61         unsigned8 ucValue
     57        uint8_t  ucBusNumber,
     58        uint8_t  ucSlotNumber,
     59        uint8_t  ucFunctionNumber,
     60        uint8_t  ucOffset,
     61        uint8_t  ucValue
    6262)
    6363{
     
    8787
    8888rtems_status_code PCIConfigWrite16(
    89         unsigned8 ucBusNumber,
    90         unsigned8 ucSlotNumber,
    91         unsigned8 ucFunctionNumber,
    92         unsigned8 ucOffset,
    93         unsigned16 usValue
     89        uint8_t  ucBusNumber,
     90        uint8_t  ucSlotNumber,
     91        uint8_t  ucFunctionNumber,
     92        uint8_t  ucOffset,
     93        uint16_t  usValue
    9494)
    9595{
     
    119119
    120120rtems_status_code PCIConfigWrite32(
    121         unsigned8 ucBusNumber,
    122         unsigned8 ucSlotNumber,
    123         unsigned8 ucFunctionNumber,
    124         unsigned8 ucOffset,
    125         unsigned32 ulValue
     121        uint8_t  ucBusNumber,
     122        uint8_t  ucSlotNumber,
     123        uint8_t  ucFunctionNumber,
     124        uint8_t  ucOffset,
     125        uint32_t  ulValue
    126126)
    127127{
     
    151151
    152152rtems_status_code PCIConfigRead8(
    153         unsigned8 ucBusNumber,
    154         unsigned8 ucSlotNumber,
    155         unsigned8 ucFunctionNumber,
    156         unsigned8 ucOffset,
    157         unsigned8 *pucValue
     153        uint8_t  ucBusNumber,
     154        uint8_t  ucSlotNumber,
     155        uint8_t  ucFunctionNumber,
     156        uint8_t  ucOffset,
     157        uint8_t  *pucValue
    158158)
    159159{
     
    183183
    184184rtems_status_code PCIConfigRead16(
    185         unsigned8 ucBusNumber,
    186         unsigned8 ucSlotNumber,
    187         unsigned8 ucFunctionNumber,
    188         unsigned8 ucOffset,
    189         unsigned16 *pusValue
     185        uint8_t  ucBusNumber,
     186        uint8_t  ucSlotNumber,
     187        uint8_t  ucFunctionNumber,
     188        uint8_t  ucOffset,
     189        uint16_t  *pusValue
    190190)
    191191{
     
    215215
    216216rtems_status_code PCIConfigRead32(
    217         unsigned8 ucBusNumber,
    218         unsigned8 ucSlotNumber,
    219         unsigned8 ucFunctionNumber,
    220         unsigned8 ucOffset,
    221         unsigned32 *pulValue
     217        uint8_t  ucBusNumber,
     218        uint8_t  ucSlotNumber,
     219        uint8_t  ucFunctionNumber,
     220        uint8_t  ucOffset,
     221        uint32_t  *pulValue
    222222)
    223223{
     
    251251void InitializePCI()
    252252{
    253         unsigned8 ucSlotNumber, ucFnNumber, ucNumFuncs;
    254         unsigned8 ucHeader;
    255         unsigned8 ucBaseClass, ucSubClass, ucMaxSubordinate;
    256         unsigned32 ulDeviceID;
     253        uint8_t  ucSlotNumber, ucFnNumber, ucNumFuncs;
     254        uint8_t  ucHeader;
     255        uint8_t  ucBaseClass, ucSubClass, ucMaxSubordinate;
     256        uint32_t  ulDeviceID;
    257257
    258258        /*
     
    337337 * Return the number of PCI busses in the system
    338338 */
    339 unsigned8 BusCountPCI()
     339uint8_t  BusCountPCI()
    340340{
    341341        return(ucMaxPCIBus+1);
  • c/src/lib/libbsp/powerpc/ppcn_60x/startup/bspstart.c

    r3f71ac1 rbad8092c  
    6767
    6868rtems_cpu_table   Cpu_table;
    69 rtems_unsigned32  bsp_isr_level;
     69uint32_t          bsp_isr_level;
    7070
    7171static int stdin_fd, stdout_fd, stderr_fd;
     
    8181
    8282void bsp_postdriver_hook(void);
    83 void bsp_libc_init( void *, unsigned32, int );
     83void bsp_libc_init( void *, uint32_t, int );
    8484
    8585/*
     
    9292void bsp_pretasking_hook(void)
    9393{
    94         rtems_unsigned32 heap_start;
    95         rtems_unsigned32 heap_size;
    96 
    97         heap_start = (rtems_unsigned32) &end;
     94        uint32_t        heap_start;
     95        uint32_t        heap_size;
     96
     97        heap_start = (uint32_t) &end;
    9898        if (heap_start & (CPU_ALIGNMENT-1))
    9999          heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
     
    166166        unsigned char *work_space_start;
    167167        unsigned char ucBoardRev, ucMothMemType, ucEquipPres1, ucEquipPres2;
    168         unsigned16      usPVR=0;
    169         unsigned8       ucTempl, ucTemph;
    170         unsigned8       ucBanksPresent;
    171         unsigned8       ucSimmPresent;
    172         unsigned32      ulCurBank, ulTopBank;
     168        uint16_t        usPVR=0;
     169        uint8_t         ucTempl, ucTemph;
     170        uint8_t         ucBanksPresent;
     171        uint8_t         ucSimmPresent;
     172        uint32_t        ulCurBank, ulTopBank;
    173173
    174174        /*
  • c/src/lib/libbsp/powerpc/ppcn_60x/startup/genpvec.c

    r3f71ac1 rbad8092c  
    4747 * Current 8259 masks
    4848 */
    49 unsigned8       ucMaster8259Mask;
    50 unsigned8       ucSlave8259Mask;
     49uint8_t         ucMaster8259Mask;
     50uint8_t         ucSlave8259Mask;
    5151
    5252/*
     
    6666 */
    6767  EE_ISR_Type       ISR_Nodes [NUM_LIRQ_HANDLERS];
    68   rtems_unsigned16  Nodes_Used;
     68  uint16_t          Nodes_Used;
    6969  Chain_Control     ISR_Array  [NUM_LIRQ];
    7070
     
    178178)
    179179{
    180         rtems_unsigned16 vec_idx  = vector - PPCN_60X_8259_IRQ_BASE;
    181         rtems_unsigned32 index;
     180        uint16_t        vec_idx  = vector - PPCN_60X_8259_IRQ_BASE;
     181        uint32_t        index;
    182182
    183183        assert  (Nodes_Used < NUM_LIRQ_HANDLERS);
     
    223223)
    224224{
    225         unsigned16      index;
    226         unsigned8       ucISr;
     225        uint16_t        index;
     226        uint8_t         ucISr;
    227227        EE_ISR_Type     *node;
    228228
    229         index = *((volatile unsigned8 *)IRQ_VECTOR_BASE);
     229        index = *((volatile uint8_t*)IRQ_VECTOR_BASE);
    230230
    231231        /*
  • c/src/lib/libbsp/powerpc/ppcn_60x/startup/spurious.c

    r3f71ac1 rbad8092c  
    176176void bsp_spurious_initialize()
    177177{
    178   rtems_unsigned32 trap;
     178  uint32_t        trap;
    179179
    180180  for ( trap=0 ; trap < PPC_IRQ_LAST ; trap++ ) {
  • c/src/lib/libbsp/powerpc/ppcn_60x/startup/swap.c

    r3f71ac1 rbad8092c  
    2828
    2929inline unsigned int Swap32(
    30         unsigned32 ulValue
     30        uint32_t  ulValue
    3131)
    3232{
    33         unsigned32 ulSwapped;
     33        uint32_t  ulSwapped;
    3434
    3535        asm volatile(
     
    4747
    4848inline unsigned int Swap16(
    49         unsigned16 usValue
     49        uint16_t  usValue
    5050)
    5151{
    52         unsigned16 usSwapped;
     52        uint16_t  usSwapped;
    5353
    5454        asm volatile(
  • c/src/lib/libbsp/powerpc/ppcn_60x/timer/timer.c

    r3f71ac1 rbad8092c  
    2222#include <bsp.h>
    2323
    24 rtems_unsigned64 Timer_driver_Start_time;
     24uint64_t        Timer_driver_Start_time;
    2525
    2626rtems_boolean Timer_driver_Find_average_overhead;
     
    4444int Read_timer()
    4545{
    46   rtems_unsigned64  clicks;
    47   rtems_unsigned64  total64;
    48   rtems_unsigned32  total;
     46  uint64_t          clicks;
     47  uint64_t          total64;
     48  uint32_t          total;
    4949
    5050  /* approximately CLOCK_SPEED clicks per microsecond */
     
    5656  total64 = clicks - Timer_driver_Start_time;
    5757
    58   assert( total64 <= 0xffffffff );  /* fits into a unsigned32 */
     58  assert( total64 <= 0xffffffff );  /* fits into a uint32_t  */
    5959
    60   total = (rtems_unsigned32) total64;
     60  total = (uint32_t) total64;
    6161
    6262  if ( Timer_driver_Find_average_overhead == 1 )
  • c/src/lib/libbsp/powerpc/ppcn_60x/tod/cmos.h

    r3f71ac1 rbad8092c  
    6868 
    6969typedef struct _CMOS_MAP {
    70     volatile rtems_unsigned8 DateAndTime[14];
     70    volatile uint8_t        DateAndTime[14];
    7171
    72     rtems_unsigned8 SystemDependentArea1[2];
    73     rtems_unsigned8 SystemDependentArea2[8];
    74     rtems_unsigned8 FeatureByte0[1];
    75     rtems_unsigned8 FeatureByte1[1]; /* 19 = PW Flag;
     72    uint8_t        SystemDependentArea1[2];
     73    uint8_t        SystemDependentArea2[8];
     74    uint8_t        FeatureByte0[1];
     75    uint8_t        FeatureByte1[1]; /* 19 = PW Flag;
    7676    attribute = write protect */
    77     rtems_unsigned8 Century[1]; /* century byte in BCD, e.g. 0x19 currently */
    78     rtems_unsigned8 FeatureByte3[1];
    79     rtems_unsigned8 FeatureByte4[1];
    80     rtems_unsigned8 FeatureByte5[1];
    81     rtems_unsigned8 FeatureByte6[1];
    82     rtems_unsigned8 FeatureByte7[1]; /* 1F = Alternate PW Flag;
     77    uint8_t        Century[1]; /* century byte in BCD, e.g. 0x19 currently */
     78    uint8_t        FeatureByte3[1];
     79    uint8_t        FeatureByte4[1];
     80    uint8_t        FeatureByte5[1];
     81    uint8_t        FeatureByte6[1];
     82    uint8_t        FeatureByte7[1]; /* 1F = Alternate PW Flag;
    8383    attribute = write protect */
    84     rtems_unsigned8 BootPW[14]; /* Power-on password needed to boot system;
     84    uint8_t        BootPW[14]; /* Power-on password needed to boot system;
    8585    reset value = 0x00000000000000005a5a5a5a5a5a);
    8686    attribute = lock */
    87     rtems_unsigned8 BootCrc[2]; /* CRC on BootPW */
    88     rtems_unsigned8 ConfigPW[14]; /* Configuration Password needed to
     87    uint8_t        BootCrc[2]; /* CRC on BootPW */
     88    uint8_t        ConfigPW[14]; /* Configuration Password needed to
    8989    change configuration of system;
    9090    reset value = 0x00000000000000005a5a5a5a5a5a);
    9191    attribute = lock */
    92     rtems_unsigned8 ConfigCrc[2]; /* CRC on ConfigPW */
     92    uint8_t        ConfigCrc[2]; /* CRC on ConfigPW */
    9393} CMOS_MAP, *PCMOS_MAP;
    9494 
  • c/src/lib/libbsp/powerpc/ppcn_60x/tod/tod.c

    r3f71ac1 rbad8092c  
    8989 * This only works for the Gregorian calendar - i.e. after 1752 (in the UK)
    9090 */
    91 rtems_unsigned8
     91uint8_t       
    9292GregorianDay(rtems_time_of_day *pTOD)
    9393{
     
    127127                   pTOD->day;
    128128
    129         return((rtems_unsigned8)(day%7));
     129        return((uint8_t)(day%7));
    130130}
    131131
    132132void
    133133DsWriteRawClockRegister (
    134         rtems_unsigned8 Register,
    135         rtems_unsigned8 Value
     134        uint8_t        Register,
     135        uint8_t        Value
    136136)
    137137
     
    157157
    158158{
    159         outport_byte((rtems_unsigned8 *)RTC_PORT, Register & 0x7f);
     159        outport_byte((uint8_t*)RTC_PORT, Register & 0x7f);
    160160
    161161        /* Read the realtime clock register value. */
    162162
    163         outport_byte((rtems_unsigned8 *)(RTC_PORT + 1), Value);
     163        outport_byte((uint8_t*)(RTC_PORT + 1), Value);
    164164        return;
    165165}
    166166
    167 rtems_unsigned8
     167uint8_t       
    168168DsReadRawClockRegister (
    169         rtems_unsigned8 Register
     169        uint8_t        Register
    170170)
    171171
     
    191191
    192192{
    193         rtems_unsigned8 ucDataByte;
    194 
    195         outport_byte((rtems_unsigned8 *)RTC_PORT, Register & 0x7f);
     193        uint8_t        ucDataByte;
     194
     195        outport_byte((uint8_t*)RTC_PORT, Register & 0x7f);
    196196
    197197        /* Read the realtime clock register value. */
    198198
    199         inport_byte((rtems_unsigned8 *)(RTC_PORT + 1), ucDataByte);
     199        inport_byte((uint8_t*)(RTC_PORT + 1), ucDataByte);
    200200        return ucDataByte;
    201201}
     
    203203void
    204204DsWriteClockRegister (
    205         rtems_unsigned8 Register,
    206         rtems_unsigned8 Value
     205        uint8_t        Register,
     206        uint8_t        Value
    207207)
    208208
     
    227227
    228228{
    229         rtems_unsigned8 BcdValue;
     229        uint8_t        BcdValue;
    230230
    231231        BcdValue = Bin2BCD(Value);
     
    234234}
    235235
    236 rtems_unsigned8
     236uint8_t       
    237237DsReadClockRegister (
    238         rtems_unsigned8 Register
     238        uint8_t        Register
    239239)
    240240
     
    256256
    257257{
    258         rtems_unsigned8 BcdValue;
     258        uint8_t        BcdValue;
    259259
    260260        BcdValue =  DsReadRawClockRegister(Register);
     
    290290
    291291{
    292         rtems_unsigned8 ucDataByte;
     292        uint8_t        ucDataByte;
    293293        PCMOS_MAP pCMOS = (PCMOS_MAP)0;
    294294
     
    308308
    309309                DsWriteClockRegister(RTC_YEAR,
    310                                      (rtems_unsigned8)(pTOD->year%100));
     310                                     (uint8_t)(pTOD->year%100));
    311311                if(pTOD->year>=100)
    312312                {
    313                         DsWriteClockRegister((rtems_unsigned8)
     313                        DsWriteClockRegister((uint8_t)
    314314                                             ((unsigned long)&pCMOS->Century),
    315315                                             pTOD->year/100);
    316316                }
    317317                DsWriteClockRegister(RTC_MONTH,
    318                                      (rtems_unsigned8)pTOD->month);
     318                                     (uint8_t)pTOD->month);
    319319                DsWriteClockRegister(RTC_DAY_OF_MONTH,
    320                                      (rtems_unsigned8)pTOD->day);
     320                                     (uint8_t)pTOD->day);
    321321                DsWriteClockRegister(RTC_DAY_OF_WEEK,
    322                                      (rtems_unsigned8)
     322                                     (uint8_t)
    323323                                     (GregorianDay(pTOD) + 1));
    324324                DsWriteClockRegister(RTC_HOUR,
    325                                      (rtems_unsigned8)pTOD->hour);
     325                                     (uint8_t)pTOD->hour);
    326326                DsWriteClockRegister(RTC_MINUTE,
    327                                      (rtems_unsigned8)pTOD->minute);
     327                                     (uint8_t)pTOD->minute);
    328328                DsWriteClockRegister(RTC_SECOND,
    329                                      (rtems_unsigned8)pTOD->second);
     329                                     (uint8_t)pTOD->second);
    330330
    331331                /* Set the realtime clock control to update the time. */
     
    367367
    368368{
    369         rtems_unsigned8 ucDataByte;
     369        uint8_t        ucDataByte;
    370370        PCMOS_MAP pCMOS = (PCMOS_MAP)0;
    371371
     
    386386                /* Read the realtime clock values. */
    387387
    388                 pTOD->year=(rtems_unsigned16)
     388                pTOD->year=(uint16_t)
    389389                                  (DsReadClockRegister(
    390                                    (rtems_unsigned8)
     390                                   (uint8_t)
    391391                                   (unsigned long)&pCMOS->Century)
    392392                                  *100 + DsReadClockRegister(RTC_YEAR));
     
    444444         */
    445445
    446         pNvRAM->CMOS.Year = (rtems_unsigned8)Bin2BCD(pTOD->year%100);
     446        pNvRAM->CMOS.Year = (uint8_t)Bin2BCD(pTOD->year%100);
    447447        if(pTOD->year>=100)
    448448        {
    449             pNvRAM->CMOS.Century=(rtems_unsigned8)
     449            pNvRAM->CMOS.Century=(uint8_t)
    450450                                 Bin2BCD(pTOD->year/100);
    451451        }
    452         pNvRAM->CMOS.Month  = (rtems_unsigned8)Bin2BCD(pTOD->month);
    453         pNvRAM->CMOS.Date   = (rtems_unsigned8)Bin2BCD(pTOD->day);
    454         pNvRAM->CMOS.Day    = (rtems_unsigned8)(GregorianDay(pTOD) + 1);
    455         pNvRAM->CMOS.Hour   = (rtems_unsigned8)Bin2BCD(pTOD->hour);
    456         pNvRAM->CMOS.Minute = (rtems_unsigned8)Bin2BCD(pTOD->minute);
    457         pNvRAM->CMOS.Second = (rtems_unsigned8)Bin2BCD(pTOD->second);
     452        pNvRAM->CMOS.Month  = (uint8_t)Bin2BCD(pTOD->month);
     453        pNvRAM->CMOS.Date   = (uint8_t)Bin2BCD(pTOD->day);
     454        pNvRAM->CMOS.Day    = (uint8_t)(GregorianDay(pTOD) + 1);
     455        pNvRAM->CMOS.Hour   = (uint8_t)Bin2BCD(pTOD->hour);
     456        pNvRAM->CMOS.Minute = (uint8_t)Bin2BCD(pTOD->minute);
     457        pNvRAM->CMOS.Second = (uint8_t)Bin2BCD(pTOD->second);
    458458
    459459        /*
     
    505505         */
    506506
    507         pTOD->year = (rtems_unsigned16)(100*BCD2Bin(pNvRAM->CMOS.Century)+
     507        pTOD->year = (uint16_t)(100*BCD2Bin(pNvRAM->CMOS.Century)+
    508508                                              BCD2Bin(pNvRAM->CMOS.Year));
    509         pTOD->month = (rtems_unsigned8)BCD2Bin(pNvRAM->CMOS.Month);
    510         pTOD->day = (rtems_unsigned8)BCD2Bin(pNvRAM->CMOS.Date);
    511         pTOD->hour = (rtems_unsigned8)BCD2Bin(pNvRAM->CMOS.Hour);
    512         pTOD->minute = (rtems_unsigned8)BCD2Bin(pNvRAM->CMOS.Minute);
    513         pTOD->second = (rtems_unsigned8)BCD2Bin(pNvRAM->CMOS.Second);
     509        pTOD->month = (uint8_t)BCD2Bin(pNvRAM->CMOS.Month);
     510        pTOD->day = (uint8_t)BCD2Bin(pNvRAM->CMOS.Date);
     511        pTOD->hour = (uint8_t)BCD2Bin(pNvRAM->CMOS.Hour);
     512        pTOD->minute = (uint8_t)BCD2Bin(pNvRAM->CMOS.Minute);
     513        pTOD->second = (uint8_t)BCD2Bin(pNvRAM->CMOS.Second);
    514514
    515515        /*
  • c/src/lib/libbsp/powerpc/ppcn_60x/universe/universe.c

    r3f71ac1 rbad8092c  
    3535
    3636typedef struct {
    37   rtems_unsigned32 PCI_ID;                 /* Offset 0x0000 */
    38   rtems_unsigned32 PCI_CSR;                /* Offset 0x0004 */
    39   rtems_unsigned32 PCI_CLASS;              /* Offset 0x0008 */
    40   rtems_unsigned32 PCI_MISC0;              /* Offset 0x000C */
    41   rtems_unsigned32 PCI_BS;                 /* Offset 0x0010 */
    42   rtems_unsigned32 Buf_Offset_0x0014[ 0x0A ]; /* Offset 0x0014 */
    43   rtems_unsigned32 PCI_MISC1;              /* Offset 0x003C */
    44   rtems_unsigned32 Buf_Offset_0x0040[ 0x30 ]; /* Offset 0x0040 */
    45   rtems_unsigned32 LSI0_CTL;               /* Offset 0x0100 */
    46   rtems_unsigned32 LSI0_BS;                /* Offset 0x0104 */
    47   rtems_unsigned32 LSI0_BD;                /* Offset 0x0108 */
    48   rtems_unsigned32 LSI0_TO;                /* Offset 0x010C */
    49   rtems_unsigned32 Buf_Offset_0x0110;         /* Offset 0x0110 */
    50   rtems_unsigned32 LSI1_CTL;               /* Offset 0x0114 */
    51   rtems_unsigned32 LSI1_BS;                /* Offset 0x0118 */
    52   rtems_unsigned32 LSI1_BD;                /* Offset 0x011C */
    53   rtems_unsigned32 LSI1_TO;                /* Offset 0x0120 */
    54   rtems_unsigned32 Buf_Offset_0x0124;         /* Offset 0x0124 */
    55   rtems_unsigned32 LSI2_CTL;               /* Offset 0x0128 */
    56   rtems_unsigned32 LSI2_BS;                /* Offset 0x012C */
    57   rtems_unsigned32 LSI2_BD;                /* Offset 0x0130 */
    58   rtems_unsigned32 LSI2_TO;                /* Offset 0x0134 */
    59   rtems_unsigned32 Buf_Offset_0x0138;         /* Offset 0x0138 */
    60   rtems_unsigned32 LSI3_CTL;               /* Offset 0x013C */
    61   rtems_unsigned32 LSI3_BS;                /* Offset 0x0140 */
    62   rtems_unsigned32 LSI3_BD;                /* Offset 0x0144 */
    63   rtems_unsigned32 LSI3_TO;                /* Offset 0x0148 */
    64   rtems_unsigned32 Buf_Offset_0x014C[ 0x09 ]; /* Offset 0x014C */
    65   rtems_unsigned32 SCYC_CTL;               /* Offset 0x0170 */
    66   rtems_unsigned32 SCYC_ADDR;              /* Offset 0x0174 */
    67   rtems_unsigned32 SCYC_EN;                /* Offset 0x0178 */
    68   rtems_unsigned32 SCYC_CMP;               /* Offset 0x017C */
    69   rtems_unsigned32 SCYC_SWP;               /* Offset 0x0180 */
    70   rtems_unsigned32 LMISC;                  /* Offset 0x0184 */
    71   rtems_unsigned32 SLSI;                   /* Offset 0x0188 */
    72   rtems_unsigned32 L_CMDERR;               /* Offset 0x018C */
    73   rtems_unsigned32 LAERR;                  /* Offset 0x0190 */
    74   rtems_unsigned32 Buf_Offset_0x0194[ 0x1B ]; /* Offset 0x0194 */
    75   rtems_unsigned32 DCTL;                   /* Offset 0x0200 */
    76   rtems_unsigned32 DTBC;                   /* Offset 0x0204 */
    77   rtems_unsigned32 DLA;                    /* Offset 0x0208 */
    78   rtems_unsigned32 Buf_Offset_0x020C;         /* Offset 0x020C */
    79   rtems_unsigned32 DVA;                    /* Offset 0x0210 */
    80   rtems_unsigned32 Buf_Offset_0x0214;         /* Offset 0x0214 */
    81   rtems_unsigned32 DCPP;                   /* Offset 0x0218 */
    82   rtems_unsigned32 Buf_Offset_0x021C;         /* Offset 0x021C */
    83   rtems_unsigned32 DGCS;                   /* Offset 0x0220 */
    84   rtems_unsigned32 D_LLUE;                 /* Offset 0x0224 */
    85   rtems_unsigned32 Buf_Offset_0x0228[ 0x36 ]; /* Offset 0x0228 */
    86   rtems_unsigned32 LINT_EN;                /* Offset 0x0300 */
    87   rtems_unsigned32 LINT_STAT;              /* Offset 0x0304 */
    88   rtems_unsigned32 LINT_MAP0;              /* Offset 0x0308 */
    89   rtems_unsigned32 LINT_MAP1;              /* Offset 0x030C */
    90   rtems_unsigned32 VINT_EN;                /* Offset 0x0310 */
    91   rtems_unsigned32 VINT_STAT;              /* Offset 0x0314 */
    92   rtems_unsigned32 VINT_MAP0;              /* Offset 0x0318 */
    93   rtems_unsigned32 VINT_MAP1;              /* Offset 0x031C */
    94   rtems_unsigned32 STATID;                 /* Offset 0x0320 */
    95   rtems_unsigned32 V1_STATID;              /* Offset 0x0324 */
    96   rtems_unsigned32 V2_STATID;              /* Offset 0x0328 */
    97   rtems_unsigned32 V3_STATID;              /* Offset 0x032C */
    98   rtems_unsigned32 V4_STATID;              /* Offset 0x0330 */
    99   rtems_unsigned32 V5_STATID;              /* Offset 0x0334 */
    100   rtems_unsigned32 V6_STATID;              /* Offset 0x0338 */
    101   rtems_unsigned32 V7_STATID;              /* Offset 0x033C */
    102   rtems_unsigned32 Buf_Offset_0x0340[ 0x30 ]; /* Offset 0x0340 */
    103   rtems_unsigned32 MAST_CTL;               /* Offset 0x0400 */
    104   rtems_unsigned32 MISC_CTL;               /* Offset 0x0404 */
    105   rtems_unsigned32 MISC_STAT;              /* Offset 0x0408 */
    106   rtems_unsigned32 USER_AM;                /* Offset 0x040C */
    107   rtems_unsigned32 Buf_Offset_0x0410[ 0x2bc ];/* Offset 0x0410 */
    108   rtems_unsigned32 VSI0_CTL;               /* Offset 0x0F00 */
    109   rtems_unsigned32 VSI0_BS;                /* Offset 0x0F04 */
    110   rtems_unsigned32 VSI0_BD;                /* Offset 0x0F08 */
    111   rtems_unsigned32 VSI0_TO;                /* Offset 0x0F0C */
    112   rtems_unsigned32 Buf_Offset_0x0f10;         /* Offset 0x0F10 */
    113   rtems_unsigned32 VSI1_CTL;               /* Offset 0x0F14 */
    114   rtems_unsigned32 VSI1_BS;                /* Offset 0x0F18 */
    115   rtems_unsigned32 VSI1_BD;                /* Offset 0x0F1C */
    116   rtems_unsigned32 VSI1_TO;                /* Offset 0x0F20 */
    117   rtems_unsigned32 Buf_Offset_0x0F24;         /* Offset 0x0F24 */
    118   rtems_unsigned32 VSI2_CTL;               /* Offset 0x0F28 */
    119   rtems_unsigned32 VSI2_BS;                /* Offset 0x0F2C */
    120   rtems_unsigned32 VSI2_BD;                /* Offset 0x0F30 */
    121   rtems_unsigned32 VSI2_TO;                /* Offset 0x0F34 */
    122   rtems_unsigned32 Buf_Offset_0x0F38;         /* Offset 0x0F38 */
    123   rtems_unsigned32 VSI3_CTL;               /* Offset 0x0F3C */
    124   rtems_unsigned32 VSI3_BS;                /* Offset 0x0F40 */
    125   rtems_unsigned32 VSI3_BD;                /* Offset 0x0F44 */
    126   rtems_unsigned32 VSI3_TO;                /* Offset 0x0F48 */
    127   rtems_unsigned32 Buf_Offset_0x0F4C[ 0x9 ];  /* Offset 0x0F4C */
    128   rtems_unsigned32 VRAI_CTL;               /* Offset 0x0F70 */
    129   rtems_unsigned32 VRAI_BS;                /* Offset 0x0F74 */
    130   rtems_unsigned32 Buf_Offset_0x0F78[ 0x2 ];  /* Offset 0x0F78 */
    131   rtems_unsigned32 VCSR_CTL;               /* Offset 0x0F80 */
    132   rtems_unsigned32 VCSR_TO;                /* Offset 0x0F84 */
    133   rtems_unsigned32 V_AMERR;                /* Offset 0x0F88 */
    134   rtems_unsigned32 VAERR;                  /* Offset 0x0F8C */
    135   rtems_unsigned32 Buf_Offset_0x0F90[ 0x19 ]; /* Offset 0x0F90 */
    136   rtems_unsigned32 VCSR_CLR;               /* Offset 0x0FF4 */
    137   rtems_unsigned32 VCSR_SET;               /* Offset 0x0FF8 */
    138   rtems_unsigned32 VCSR_BS;                /* Offset 0x0FFC */
     37  uint32_t        PCI_ID;                 /* Offset 0x0000 */
     38  uint32_t        PCI_CSR;                /* Offset 0x0004 */
     39  uint32_t        PCI_CLASS;              /* Offset 0x0008 */
     40  uint32_t        PCI_MISC0;              /* Offset 0x000C */
     41  uint32_t        PCI_BS;                 /* Offset 0x0010 */
     42  uint32_t        Buf_Offset_0x0014[ 0x0A ]; /* Offset 0x0014 */
     43  uint32_t        PCI_MISC1;              /* Offset 0x003C */
     44  uint32_t        Buf_Offset_0x0040[ 0x30 ]; /* Offset 0x0040 */
     45  uint32_t        LSI0_CTL;               /* Offset 0x0100 */
     46  uint32_t        LSI0_BS;                /* Offset 0x0104 */
     47  uint32_t        LSI0_BD;                /* Offset 0x0108 */
     48  uint32_t        LSI0_TO;                /* Offset 0x010C */
     49  uint32_t        Buf_Offset_0x0110;         /* Offset 0x0110 */
     50  uint32_t        LSI1_CTL;               /* Offset 0x0114 */
     51  uint32_t        LSI1_BS;                /* Offset 0x0118 */
     52  uint32_t        LSI1_BD;                /* Offset 0x011C */
     53  uint32_t        LSI1_TO;                /* Offset 0x0120 */
     54  uint32_t        Buf_Offset_0x0124;         /* Offset 0x0124 */
     55  uint32_t        LSI2_CTL;               /* Offset 0x0128 */
     56  uint32_t        LSI2_BS;                /* Offset 0x012C */
     57  uint32_t        LSI2_BD;                /* Offset 0x0130 */
     58  uint32_t        LSI2_TO;                /* Offset 0x0134 */
     59  uint32_t        Buf_Offset_0x0138;         /* Offset 0x0138 */
     60  uint32_t        LSI3_CTL;               /* Offset 0x013C */
     61  uint32_t        LSI3_BS;                /* Offset 0x0140 */
     62  uint32_t        LSI3_BD;                /* Offset 0x0144 */
     63  uint32_t        LSI3_TO;                /* Offset 0x0148 */
     64  uint32_t        Buf_Offset_0x014C[ 0x09 ]; /* Offset 0x014C */
     65  uint32_t        SCYC_CTL;               /* Offset 0x0170 */
     66  uint32_t        SCYC_ADDR;              /* Offset 0x0174 */
     67  uint32_t        SCYC_EN;                /* Offset 0x0178 */
     68  uint32_t        SCYC_CMP;               /* Offset 0x017C */
     69  uint32_t        SCYC_SWP;               /* Offset 0x0180 */
     70  uint32_t        LMISC;                  /* Offset 0x0184 */
     71  uint32_t        SLSI;                   /* Offset 0x0188 */
     72  uint32_t        L_CMDERR;               /* Offset 0x018C */
     73  uint32_t        LAERR;                  /* Offset 0x0190 */
     74  uint32_t        Buf_Offset_0x0194[ 0x1B ]; /* Offset 0x0194 */
     75  uint32_t        DCTL;                   /* Offset 0x0200 */
     76  uint32_t        DTBC;                   /* Offset 0x0204 */
     77  uint32_t        DLA;                    /* Offset 0x0208 */
     78  uint32_t        Buf_Offset_0x020C;         /* Offset 0x020C */
     79  uint32_t        DVA;                    /* Offset 0x0210 */
     80  uint32_t        Buf_Offset_0x0214;         /* Offset 0x0214 */
     81  uint32_t        DCPP;                   /* Offset 0x0218 */
     82  uint32_t        Buf_Offset_0x021C;         /* Offset 0x021C */
     83  uint32_t        DGCS;                   /* Offset 0x0220 */
     84  uint32_t        D_LLUE;                 /* Offset 0x0224 */
     85  uint32_t        Buf_Offset_0x0228[ 0x36 ]; /* Offset 0x0228 */
     86  uint32_t        LINT_EN;                /* Offset 0x0300 */
     87  uint32_t        LINT_STAT;              /* Offset 0x0304 */
     88  uint32_t        LINT_MAP0;              /* Offset 0x0308 */
     89  uint32_t        LINT_MAP1;              /* Offset 0x030C */
     90  uint32_t        VINT_EN;                /* Offset 0x0310 */
     91  uint32_t        VINT_STAT;              /* Offset 0x0314 */
     92  uint32_t        VINT_MAP0;              /* Offset 0x0318 */
     93  uint32_t        VINT_MAP1;              /* Offset 0x031C */
     94  uint32_t        STATID;                 /* Offset 0x0320 */
     95  uint32_t        V1_STATID;              /* Offset 0x0324 */
     96  uint32_t        V2_STATID;              /* Offset 0x0328 */
     97  uint32_t        V3_STATID;              /* Offset 0x032C */
     98  uint32_t        V4_STATID;              /* Offset 0x0330 */
     99  uint32_t        V5_STATID;              /* Offset 0x0334 */
     100  uint32_t        V6_STATID;              /* Offset 0x0338 */
     101  uint32_t        V7_STATID;              /* Offset 0x033C */
     102  uint32_t        Buf_Offset_0x0340[ 0x30 ]; /* Offset 0x0340 */
     103  uint32_t        MAST_CTL;               /* Offset 0x0400 */
     104  uint32_t        MISC_CTL;               /* Offset 0x0404 */
     105  uint32_t        MISC_STAT;              /* Offset 0x0408 */
     106  uint32_t        USER_AM;                /* Offset 0x040C */
     107  uint32_t        Buf_Offset_0x0410[ 0x2bc ];/* Offset 0x0410 */
     108  uint32_t        VSI0_CTL;               /* Offset 0x0F00 */
     109  uint32_t        VSI0_BS;                /* Offset 0x0F04 */
     110  uint32_t        VSI0_BD;                /* Offset 0x0F08 */
     111  uint32_t        VSI0_TO;                /* Offset 0x0F0C */
     112  uint32_t        Buf_Offset_0x0f10;         /* Offset 0x0F10 */
     113  uint32_t        VSI1_CTL;               /* Offset 0x0F14 */
     114  uint32_t        VSI1_BS;                /* Offset 0x0F18 */
     115  uint32_t        VSI1_BD;                /* Offset 0x0F1C */
     116  uint32_t        VSI1_TO;                /* Offset 0x0F20 */
     117  uint32_t        Buf_Offset_0x0F24;         /* Offset 0x0F24 */
     118  uint32_t        VSI2_CTL;               /* Offset 0x0F28 */
     119  uint32_t        VSI2_BS;                /* Offset 0x0F2C */
     120  uint32_t        VSI2_BD;                /* Offset 0x0F30 */
     121  uint32_t        VSI2_TO;                /* Offset 0x0F34 */
     122  uint32_t        Buf_Offset_0x0F38;         /* Offset 0x0F38 */
     123  uint32_t        VSI3_CTL;               /* Offset 0x0F3C */
     124  uint32_t        VSI3_BS;                /* Offset 0x0F40 */
     125  uint32_t        VSI3_BD;                /* Offset 0x0F44 */
     126  uint32_t        VSI3_TO;                /* Offset 0x0F48 */
     127  uint32_t        Buf_Offset_0x0F4C[ 0x9 ];  /* Offset 0x0F4C */
     128  uint32_t        VRAI_CTL;               /* Offset 0x0F70 */
     129  uint32_t        VRAI_BS;                /* Offset 0x0F74 */
     130  uint32_t        Buf_Offset_0x0F78[ 0x2 ];  /* Offset 0x0F78 */
     131  uint32_t        VCSR_CTL;               /* Offset 0x0F80 */
     132  uint32_t        VCSR_TO;                /* Offset 0x0F84 */
     133  uint32_t        V_AMERR;                /* Offset 0x0F88 */
     134  uint32_t        VAERR;                  /* Offset 0x0F8C */
     135  uint32_t        Buf_Offset_0x0F90[ 0x19 ]; /* Offset 0x0F90 */
     136  uint32_t        VCSR_CLR;               /* Offset 0x0FF4 */
     137  uint32_t        VCSR_SET;               /* Offset 0x0FF8 */
     138  uint32_t        VCSR_BS;                /* Offset 0x0FFC */
    139139} Universe_Memory;
    140140
     
    145145 */
    146146void PCI_bus_write(
    147   volatile rtems_unsigned32 * _addr,                  /* IN */
    148   rtems_unsigned32 _data                              /* IN */
     147  volatile uint32_t        * _addr,                  /* IN */
     148  uint32_t        _data                              /* IN */
    149149)
    150150{
     
    152152}
    153153
    154 rtems_unsigned32 PCI_bus_read(
    155   volatile rtems_unsigned32 *  _addr                  /* IN */
     154uint32_t        PCI_bus_read(
     155  volatile uint32_t        *  _addr                  /* IN */
    156156)
    157157{
    158   rtems_unsigned32 data;
     158  uint32_t        data;
    159159 
    160160  inport_32(_addr, data);
     
    178178void InitializeUniverse()
    179179{
    180   rtems_unsigned32 pci_id;
    181   rtems_unsigned32 universe_temp_value;
     180  uint32_t        pci_id;
     181  uint32_t        universe_temp_value;
    182182 
    183183  /*
     
    310310 */
    311311void set_vme_base_address (
    312   rtems_unsigned32 base_address
     312  uint32_t        base_address
    313313)
    314314
    315   volatile rtems_unsigned32 temp;
     315  volatile uint32_t        temp;
    316316
    317317  /*
     
    342342 * Gets the VME base address
    343343 */
    344 rtems_unsigned32 get_vme_base_address ()
     344uint32_t        get_vme_base_address ()
    345345
    346   volatile rtems_unsigned32 temp;
     346  volatile uint32_t        temp;
    347347
    348348  temp = PCI_bus_read( &UNIVERSE->VSI0_BS );
     
    351351}
    352352
    353 rtems_unsigned32 get_vme_slave_size()
     353uint32_t        get_vme_slave_size()
    354354{
    355   volatile rtems_unsigned32 temp;
     355  volatile uint32_t        temp;
    356356  temp  =  PCI_bus_read( &UNIVERSE->VSI0_BD);
    357357  temp &= 0xFFFFF000;
     
    364364 * Note: The maximum size is up to 24 M bytes. (00000000 - 017FFFFF)
    365365 */
    366 void set_vme_slave_size (rtems_unsigned32 size)
     366void set_vme_slave_size (uint32_t        size)
    367367
    368   volatile rtems_unsigned32 temp;
     368  volatile uint32_t        temp;
    369369
    370370  if (size<0)
     
    392392 * pointer to VME D16 space
    393393 */
    394 rtems_unsigned16 get_vme(
    395   rtems_unsigned16 *vme_ptr
     394uint16_t        get_vme(
     395  uint16_t        *vme_ptr
    396396)
    397397{
    398   rtems_unsigned16 result;
    399 
    400   if (vme_ptr > (rtems_unsigned16 *)0x3EFFFFFF)
     398  uint16_t        result;
     399
     400  if (vme_ptr > (uint16_t*)0x3EFFFFFF)
    401401  {
    402402    /*
     
    406406         PCI_bus_write( &UNIVERSE->LSI0_TO, 0x3EFFF000 );
    407407
    408     result = (*(rtems_unsigned16 *)(
    409                ((rtems_unsigned32)vme_ptr - 0x3EFFF000)+
     408    result = (*(uint16_t*)(
     409               ((uint32_t)vme_ptr - 0x3EFFF000)+
    410410                PPCN_60X_PCI_MEM_BASE) );
    411411   }
    412412   else
    413      result = (*(rtems_unsigned16 *)
    414                 ((rtems_unsigned32)vme_ptr+PPCN_60X_PCI_MEM_BASE));
     413     result = (*(uint16_t*)
     414                ((uint32_t)vme_ptr+PPCN_60X_PCI_MEM_BASE));
    415415
    416416   return result;
     
    422422 */
    423423void put_vme(
    424   rtems_unsigned16 *vme_ptr,
    425   rtems_unsigned16 value
     424  uint16_t        *vme_ptr,
     425  uint16_t        value
    426426)
    427427{
    428428
    429   if (vme_ptr > (rtems_unsigned16 *)0x3EFFFFFF) {
     429  if (vme_ptr > (uint16_t*)0x3EFFFFFF) {
    430430    /*
    431431     * LSI0_TO register to 0x3EFFF000 if it had not been updated already
     
    434434       PCI_bus_write( &UNIVERSE->LSI0_TO, 0x3EFFF000 );
    435435   
    436     *(rtems_unsigned16 *) (((rtems_unsigned32)vme_ptr - 0x3EFFF000) +
     436    *(uint16_t*) (((uint32_t)vme_ptr - 0x3EFFF000) +
    437437                            PPCN_60X_PCI_MEM_BASE) = value;
    438438   }
    439439   else
    440       *(rtems_unsigned16 *)((rtems_unsigned32)vme_ptr +
     440      *(uint16_t*)((uint32_t)vme_ptr +
    441441                             PPCN_60X_PCI_MEM_BASE) = value;
    442442}
Note: See TracChangeset for help on using the changeset viewer.