Changeset 18a3bbe in rtems


Ignore:
Timestamp:
Mar 31, 2007, 1:14:39 AM (13 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
a2bb1de
Parents:
f2a6ee0
Message:

Use stdint.h fixed-size types.

Location:
c/src/lib/libbsp/powerpc/shared
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/shared/bootloader/bootldr.h

    rf2a6ee0 r18a3bbe  
    2020
    2121#ifndef ASM
     22#include <stdint.h>
    2223#include <bsp/residual.h>
    2324#include <bsp/consoleIo.h>
     
    7980extern inline int
    8081pcibios_read_config_byte(u_char bus, u_char dev_fn,
    81                          u_char where, u_char * val) {
     82                         u_char where, uint8_t *val) {
    8283        return bd->pci_functions->read_config_byte(bus, dev_fn, where, val);
    8384}
     
    8586extern inline int
    8687pcibios_read_config_word(u_char bus, u_char dev_fn,
    87                          u_char where, u_short * val) {
     88                         u_char where, uint16_t *val) {
    8889        return bd->pci_functions->read_config_word(bus, dev_fn, where, val);
    8990}
     
    9192extern inline int
    9293pcibios_read_config_dword(u_char bus, u_char dev_fn,
    93                          u_char where, u_int * val) {
     94                         u_char where, uint32_t *val) {
    9495        return bd->pci_functions->read_config_dword(bus, dev_fn, where, val);
    9596}
     
    9798extern inline int
    9899pcibios_write_config_byte(u_char bus, u_char dev_fn,
    99                          u_char where, u_char val) {
     100                         u_char where, uint8_t val) {
    100101        return bd->pci_functions->write_config_byte(bus, dev_fn, where, val);
    101102}
     
    103104extern inline int
    104105pcibios_write_config_word(u_char bus, u_char dev_fn,
    105                          u_char where, u_short val) {
     106                         u_char where, uint16_t val) {
    106107        return bd->pci_functions->write_config_word(bus, dev_fn, where, val);
    107108}
     
    109110extern inline int
    110111pcibios_write_config_dword(u_char bus, u_char dev_fn,
    111                          u_char where, u_int val) {
     112                         u_char where, uint32_t val) {
    112113        return bd->pci_functions->write_config_dword(bus, dev_fn, where, val);
    113114}
    114115
    115116extern inline int
    116 pci_bootloader_read_config_byte(struct pci_dev *dev, u_char where, u_char * val) {
     117pci_bootloader_read_config_byte(struct pci_dev *dev, u_char where, uint8_t *val) {
    117118        return bd->pci_functions->read_config_byte(dev->bus->number,
    118119                                                   dev->devfn,
     
    121122
    122123extern inline int
    123 pci_bootloader_read_config_word(struct pci_dev *dev, u_char where, u_short * val) {
     124pci_bootloader_read_config_word(struct pci_dev *dev, u_char where, uint16_t *val) {
    124125        return bd->pci_functions->read_config_word(dev->bus->number,
    125126                                                   dev->devfn,
     
    128129
    129130extern inline int
    130 pci_bootloader_read_config_dword(struct pci_dev *dev, u_char where, u_int * val) {
     131pci_bootloader_read_config_dword(struct pci_dev *dev, u_char where, uint32_t *val) {
    131132        return bd->pci_functions->read_config_dword(dev->bus->number,
    132133                                                    dev->devfn,
     
    135136
    136137extern inline int
    137 pci_bootloader_write_config_byte(struct pci_dev *dev, u_char where, u_char val) {
     138pci_bootloader_write_config_byte(struct pci_dev *dev, u_char where, uint8_t val) {
    138139        return bd->pci_functions->write_config_byte(dev->bus->number,
    139140                                                    dev->devfn,
     
    142143
    143144extern inline int
    144 pci_bootloader_write_config_word(struct pci_dev *dev, u_char where, u_short val) {
     145pci_bootloader_write_config_word(struct pci_dev *dev, u_char where, uint16_t val) {
    145146        return bd->pci_functions->write_config_word(dev->bus->number,
    146147                                                    dev->devfn,
     
    149150
    150151extern inline int
    151 pci_bootloader_write_config_dword(struct pci_dev *dev, u_char where, u_int val) {
     152pci_bootloader_write_config_dword(struct pci_dev *dev, u_char where, uint32_t val) {
    152153        return bd->pci_functions->write_config_dword(dev->bus->number,
    153154                                                     dev->devfn,
  • c/src/lib/libbsp/powerpc/shared/bootloader/em86.c

    rf2a6ee0 r18a3bbe  
    4646
    4747typedef union _reg_type2 {
    48         unsigned e;
    49         unsigned short x;
     48        uint32_t e;
     49        uint16_t x;
    5050} reg_type2;
    5151
     
    493493        u_char length;
    494494        volatile u_int *src;
    495         u_int *dst, left, saved_rom;
     495        u_int *dst, left;
     496        uint32_t saved_rom;
    496497#if defined(MONITOR_IO) && !defined(__BOOT__)
    497498#define IOMASK 0xff
  • c/src/lib/libbsp/powerpc/shared/bootloader/pci.c

    rf2a6ee0 r18a3bbe  
    543543static int
    544544indirect_pci_read_config_byte(unsigned char bus, unsigned char dev_fn,
    545                               unsigned char offset, unsigned char *val) {
     545                              unsigned char offset, uint8_t *val) {
    546546   out_be32(pci->config_addr,
    547547            0x80|(bus<<8)|(dev_fn<<16)|((offset&~3)<<24));
     
    552552static int
    553553indirect_pci_read_config_word(unsigned char bus, unsigned char dev_fn,
    554                               unsigned char offset, unsigned short *val) {
     554                              unsigned char offset, uint16_t *val) {
    555555   *val = 0xffff;
    556556   if (offset&1) return PCIBIOS_BAD_REGISTER_NUMBER;
     
    563563static int
    564564indirect_pci_read_config_dword(unsigned char bus, unsigned char dev_fn,
    565                                unsigned char offset, unsigned int *val) {
     565                               unsigned char offset, uint32_t *val) {
    566566   *val = 0xffffffff;
    567567   if (offset&3) return PCIBIOS_BAD_REGISTER_NUMBER;
     
    574574static int
    575575indirect_pci_write_config_byte(unsigned char bus, unsigned char dev_fn,
    576                                unsigned char offset, unsigned char val) {
     576                               unsigned char offset, uint8_t val) {
    577577   out_be32(pci->config_addr,
    578578            0x80|(bus<<8)|(dev_fn<<16)|((offset&~3)<<24));
     
    583583static int
    584584indirect_pci_write_config_word(unsigned char bus, unsigned char dev_fn,
    585                                unsigned char offset, unsigned short val) {
     585                               unsigned char offset, uint16_t val) {
    586586   if (offset&1) return PCIBIOS_BAD_REGISTER_NUMBER;
    587587   out_be32(pci->config_addr,
     
    593593static int
    594594indirect_pci_write_config_dword(unsigned char bus, unsigned char dev_fn,
    595                                 unsigned char offset, unsigned int val) {
     595                                unsigned char offset, uint32_t val) {
    596596   if (offset&3) return PCIBIOS_BAD_REGISTER_NUMBER;
    597597   out_be32(pci->config_addr,
     
    612612static int
    613613direct_pci_read_config_byte(unsigned char bus, unsigned char dev_fn,
    614                             unsigned char offset, unsigned char *val) {
     614                            unsigned char offset, uint8_t *val) {
    615615   if (bus != 0 || (1<<PCI_SLOT(dev_fn) & 0xff8007fe)) {
    616616      *val=0xff;
     
    624624static int
    625625direct_pci_read_config_word(unsigned char bus, unsigned char dev_fn,
    626                             unsigned char offset, unsigned short *val) {
     626                            unsigned char offset, uint16_t *val) {
    627627   *val = 0xffff;
    628628   if (offset&1) return PCIBIOS_BAD_REGISTER_NUMBER;
     
    638638static int
    639639direct_pci_read_config_dword(unsigned char bus, unsigned char dev_fn,
    640                              unsigned char offset, unsigned int *val) {
     640                             unsigned char offset, uint32_t *val) {
    641641   *val = 0xffffffff;
    642642   if (offset&3) return PCIBIOS_BAD_REGISTER_NUMBER;
     
    652652static int
    653653direct_pci_write_config_byte(unsigned char bus, unsigned char dev_fn,
    654                              unsigned char offset, unsigned char val) {
     654                             unsigned char offset, uint8_t val) {
    655655   if (bus != 0 || (1<<PCI_SLOT(dev_fn) & 0xff8007fe)) {
    656656      return PCIBIOS_DEVICE_NOT_FOUND;
     
    664664static int
    665665direct_pci_write_config_word(unsigned char bus, unsigned char dev_fn,
    666                              unsigned char offset, unsigned short val) {
     666                             unsigned char offset, uint16_t val) {
    667667   if (offset&1) return PCIBIOS_BAD_REGISTER_NUMBER;
    668668   if (bus != 0 || (1<<PCI_SLOT(dev_fn) & 0xff8007fe)) {
     
    678678static int
    679679direct_pci_write_config_dword(unsigned char bus, unsigned char dev_fn,
    680                               unsigned char offset, unsigned int val) {
     680                              unsigned char offset, uint32_t val) {
    681681   if (offset&3) return PCIBIOS_BAD_REGISTER_NUMBER;
    682682   if (bus != 0 || (1<<PCI_SLOT(dev_fn) & 0xff8007fe)) {
     
    786786u_int pci_scan_bus(struct pci_bus *bus)
    787787{
    788    unsigned int devfn, l, max, class;
     788   unsigned int devfn, max;
     789   uint32_t class;
     790   uint32_t l;
    789791   unsigned char irq, hdr_type, is_multi = 0;
    790792   struct pci_dev *dev, **bus_last;
     
    892894       */
    893895      if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
    894          unsigned int buses;
     896         uint32_t buses;
    895897         unsigned int devfn = dev->devfn;
    896898         unsigned short cr;
     
    13221324   } else {
    13231325      /* Let us try by experimentation at our own risk! */
    1324       u_int id0;
     1326      uint32_t id0;
    13251327      bd->pci_functions = &direct_functions;
    13261328      /* On all direct bridges I know the host bridge itself
  • c/src/lib/libbsp/powerpc/shared/bootloader/pci.h

    rf2a6ee0 r18a3bbe  
    2424struct pci_bootloader_config_access_functions {
    2525        int (*read_config_byte)(unsigned char, unsigned char,
    26                                unsigned char, unsigned char *);
     26                               unsigned char, uint8_t *);
    2727        int (*read_config_word)(unsigned char, unsigned char,
    28                                unsigned char, unsigned short *);
     28                               unsigned char, uint16_t *);
    2929        int (*read_config_dword)(unsigned char, unsigned char,
    30                                unsigned char, unsigned int *);
     30                               unsigned char, uint32_t *);
    3131        int (*write_config_byte)(unsigned char, unsigned char,
    32                                unsigned char, unsigned char);
     32                               unsigned char, uint8_t);
    3333        int (*write_config_word)(unsigned char, unsigned char,
    34                                unsigned char, unsigned short);
     34                               unsigned char, uint16_t);
    3535        int (*write_config_dword)(unsigned char, unsigned char,
    36                                unsigned char, unsigned int);
     36                               unsigned char, uint32_t);
    3737};
    3838
  • c/src/lib/libbsp/powerpc/shared/irq/irq_init.c

    rf2a6ee0 r18a3bbe  
    150150{
    151151  pci_isa_bridge_device pci_dev;
    152   unsigned int temp;
     152  uint32_t temp;
    153153  unsigned char tmp;
    154154  unsigned char maxBus;
  • c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c

    rf2a6ee0 r18a3bbe  
    150150{
    151151  PPC_DEVICE *hostbridge;
    152   unsigned int id0;
    153   unsigned int tmp;
     152  uint32_t id0;
     153  uint32_t tmp;
    154154
    155155  /*
  • c/src/lib/libbsp/powerpc/shared/pci/pci.c

    rf2a6ee0 r18a3bbe  
    8484  unsigned char function,
    8585  unsigned char offset,
    86   unsigned int *val
     86  uint32_t *val
    8787) {
    8888  *val = 0xffffffff;
     
    133133  unsigned char function,
    134134  unsigned char offset,
    135   unsigned int val
     135  uint32_t      val
    136136) {
    137137  if (offset&3)
     
    201201  unsigned char function,
    202202  unsigned char offset,
    203   unsigned int *val
     203  uint32_t    *val
    204204) {
    205205  *val = 0xffffffff;
     
    258258  unsigned char function,
    259259  unsigned char offset,
    260   unsigned int val
     260  uint32_t      val
    261261) {
    262262  if (offset&3)
     
    582582  unsigned char ucHeader;
    583583  unsigned char ucMaxSubordinate;
    584   unsigned int  ulClass, ulDeviceID;
     584  uint32_t ulClass;
     585  uint32_t ulDeviceID;
    585586
    586587  detect_host_bridge();
  • c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c

    rf2a6ee0 r18a3bbe  
    5353#define PCI_MULTI_FUNCTION      0x80
    5454
     55#include <inttypes.h>
    5556#include <bsp/pci.h>
    5657#include <rtems/bspIo.h>
     
    128129   int fun,
    129130   void *uarg
    130 ) {
    131 unsigned short vi,di;
    132 unsigned short cd,st;
    133 unsigned int   b1,b2;
    134 unsigned char  il,ip;
    135 FILE           *f = uarg;
     131)
     132{
     133  uint16_t vi,di;
     134  uint16_t cd,st;
     135  uint32_t b1,b2;
     136  uint8_t  il,ip;
     137  FILE     *f = uarg;
    136138
    137139        pci_read_config_word (bus, dev, fun, PCI_VENDOR_ID,      &vi);
     
    144146        pci_read_config_byte (bus, dev, fun, PCI_INTERRUPT_PIN,  &ip);
    145147
    146         fprintf(f,"%3d:0x%02x:%d    0x%04x-0x%04x:  0x%04x 0x%04x 0x%08x 0x%08x       %d -> %3d (=0x%02x)\n",
     148   /*  fprintf(f,"%3d:0x%02x:%d    0x%04x-0x%04x:  0x%04x 0x%04x 0x%08x 0x%08x       %d -> %3d (=0x%02x)\n", */
     149       fprintf(f,"%3d:0x%02x:%d    0x%04x-0x%04x:  0x%04x 0x%04x 0x%08" PRIx32 " 0x%08" PRIx32 "       %d -> %3d (=0x%02x)\n",
    147150                bus, dev, fun, vi, di, cd, st, b1, b2, ip, il, il);
    148151        return 0;
     
    165168) {
    166169
    167    unsigned int d;
     170   uint32_t d;
    168171   unsigned char bus,dev,fun,hd;
    169172
Note: See TracChangeset for help on using the changeset viewer.