summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/shared/pci
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2007-03-31 01:14:39 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2007-03-31 01:14:39 +0000
commit18a3bbeb0d65988ba573db007661692a8fc7a774 (patch)
treecdd010ac37b2db3fdd29c5ef1f885b75c95c0baa /c/src/lib/libbsp/powerpc/shared/pci
parent2007-03-31 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-18a3bbeb0d65988ba573db007661692a8fc7a774.tar.bz2
Use stdint.h fixed-size types.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/pci')
-rw-r--r--c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/pci/pci.c11
-rw-r--r--c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c19
3 files changed, 19 insertions, 15 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c b/c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c
index 2decf4e33a..96020518bc 100644
--- a/c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c
+++ b/c/src/lib/libbsp/powerpc/shared/pci/detect_raven_bridge.c
@@ -149,8 +149,8 @@ unsigned merst;
void detect_host_bridge()
{
PPC_DEVICE *hostbridge;
- unsigned int id0;
- unsigned int tmp;
+ uint32_t id0;
+ uint32_t tmp;
/*
* This code assumes that the host bridge is located at
diff --git a/c/src/lib/libbsp/powerpc/shared/pci/pci.c b/c/src/lib/libbsp/powerpc/shared/pci/pci.c
index 399558e5a7..ff2d792439 100644
--- a/c/src/lib/libbsp/powerpc/shared/pci/pci.c
+++ b/c/src/lib/libbsp/powerpc/shared/pci/pci.c
@@ -83,7 +83,7 @@ indirect_pci_read_config_dword(
unsigned char slot,
unsigned char function,
unsigned char offset,
- unsigned int *val
+ uint32_t *val
) {
*val = 0xffffffff;
if (offset&3)
@@ -132,7 +132,7 @@ indirect_pci_write_config_dword(
unsigned char slot,
unsigned char function,
unsigned char offset,
- unsigned int val
+ uint32_t val
) {
if (offset&3)
return PCIBIOS_BAD_REGISTER_NUMBER;
@@ -200,7 +200,7 @@ direct_pci_read_config_dword(
unsigned char slot,
unsigned char function,
unsigned char offset,
- unsigned int *val
+ uint32_t *val
) {
*val = 0xffffffff;
if (offset&3)
@@ -257,7 +257,7 @@ direct_pci_write_config_dword(
unsigned char slot,
unsigned char function,
unsigned char offset,
- unsigned int val
+ uint32_t val
) {
if (offset&3)
return PCIBIOS_BAD_REGISTER_NUMBER;
@@ -581,7 +581,8 @@ int pci_initialize()
unsigned char ucSlotNumber, ucFnNumber, ucNumFuncs;
unsigned char ucHeader;
unsigned char ucMaxSubordinate;
- unsigned int ulClass, ulDeviceID;
+ uint32_t ulClass;
+ uint32_t ulDeviceID;
detect_host_bridge();
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 );