diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2007-03-31 01:14:39 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2007-03-31 01:14:39 +0000 |
commit | 18a3bbeb0d65988ba573db007661692a8fc7a774 (patch) | |
tree | cdd010ac37b2db3fdd29c5ef1f885b75c95c0baa /c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c | |
parent | 2007-03-31 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-18a3bbeb0d65988ba573db007661692a8fc7a774.tar.bz2 |
Use stdint.h fixed-size types.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c b/c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c index 1a3aaeca4f..d8d8ef3eb1 100644 --- a/c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c +++ b/c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c @@ -52,6 +52,7 @@ #define PCI_INVALID_VENDORDEVICEID 0xffffffff #define PCI_MULTI_FUNCTION 0x80 +#include <inttypes.h> #include <bsp/pci.h> #include <rtems/bspIo.h> #include <stdio.h> @@ -127,12 +128,13 @@ dump_dev_cb( int dev, int fun, void *uarg -) { -unsigned short vi,di; -unsigned short cd,st; -unsigned int b1,b2; -unsigned char il,ip; -FILE *f = uarg; +) +{ + uint16_t vi,di; + uint16_t cd,st; + uint32_t b1,b2; + uint8_t il,ip; + FILE *f = uarg; pci_read_config_word (bus, dev, fun, PCI_VENDOR_ID, &vi); pci_read_config_word (bus, dev, fun, PCI_DEVICE_ID, &di); @@ -143,7 +145,8 @@ FILE *f = uarg; pci_read_config_byte (bus, dev, fun, PCI_INTERRUPT_LINE, &il); pci_read_config_byte (bus, dev, fun, PCI_INTERRUPT_PIN, &ip); - fprintf(f,"%3d:0x%02x:%d 0x%04x-0x%04x: 0x%04x 0x%04x 0x%08x 0x%08x %d -> %3d (=0x%02x)\n", + /* fprintf(f,"%3d:0x%02x:%d 0x%04x-0x%04x: 0x%04x 0x%04x 0x%08x 0x%08x %d -> %3d (=0x%02x)\n", */ + 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", bus, dev, fun, vi, di, cd, st, b1, b2, ip, il, il); return 0; } @@ -164,7 +167,7 @@ BSP_pciScan( void *uarg ) { - unsigned int d; + uint32_t d; unsigned char bus,dev,fun,hd; bus = PCIB_DEVSIG_BUS( (unsigned long)handle ); |