summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/beatnik/marvell/discovery.c
diff options
context:
space:
mode:
authorNick Withers <nick.withers@anu.edu.au>2014-11-27 17:39:36 +1100
committerGedare Bloom <gedare@rtems.org>2014-12-23 22:40:32 -0500
commit2d5c48691453a05ffb3a264f75e71490166f819a (patch)
tree349fff13e895c9c30ca9d0ec5b51270681beba0b /c/src/lib/libbsp/powerpc/beatnik/marvell/discovery.c
parentpc386: scan all functions of multi-function PCI devices (diff)
downloadrtems-2d5c48691453a05ffb3a264f75e71490166f819a.tar.bz2
Use fixed-width C99 types for PowerPC in_be16() and co.
Also use the const qualifier on the address pointer's target in in_*() Closes #2128
Diffstat (limited to 'c/src/lib/libbsp/powerpc/beatnik/marvell/discovery.c')
-rw-r--r--c/src/lib/libbsp/powerpc/beatnik/marvell/discovery.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/powerpc/beatnik/marvell/discovery.c b/c/src/lib/libbsp/powerpc/beatnik/marvell/discovery.c
index 801d2c99d1..c6f647581f 100644
--- a/c/src/lib/libbsp/powerpc/beatnik/marvell/discovery.c
+++ b/c/src/lib/libbsp/powerpc/beatnik/marvell/discovery.c
@@ -57,6 +57,7 @@
#include <bsp.h>
#include <bsp/gtreg.h>
#include <bsp/pci.h>
+#include <stdint.h>
#ifndef PCI_VENDOR_ID_MARVELL
#define PCI_VENDOR_ID_MARVELL 0x11ab
@@ -78,16 +79,16 @@
static unsigned long
pci_early_config_read(int offset, int width)
{
- out_be32((unsigned int*) pci.pci_config_addr,
+ out_be32((uint32_t*) pci.pci_config_addr,
0x80|(0<<8)|(PCI_DEVFN(0,0)<<16)|((offset&~3)<<24));
switch (width) {
default:
case 1:
- return in_8((unsigned char*)pci.pci_config_data + (offset&3));
+ return in_8((uint8_t*)pci.pci_config_data + (offset&3));
case 2:
- return in_le16((unsigned short*)pci.pci_config_data + (offset&3));
+ return in_le16((uint16_t*)pci.pci_config_data + (offset&3));
case 4:
- return in_le32((unsigned long *)pci.pci_config_data + (offset&3));
+ return in_le32((uint32_t *)pci.pci_config_data + (offset&3));
}
}
#endif