Changeset 9539be6 in mainline for uspace/lib/pci/types.h
- Timestamp:
- 2010-06-22T14:13:55Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 851f33a
- Parents:
- 402eda5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pci/types.h
r402eda5 r9539be6 18 18 19 19 #ifdef PCI_HAVE_64BIT_ADDRESS 20 #include <limits.h> 20 21 #include <stdint.h> 22 21 23 #if ULONG_MAX > 0xffffffff 24 22 25 typedef unsigned long u64; 23 26 #define PCI_U64_FMT "l" 24 #else 27 28 #else /* ULONG_MAX > 0xffffffff */ 29 25 30 typedef unsigned long long u64; 26 31 #define PCI_U64_FMT "ll" 27 #endif28 #endif29 32 30 #endif /* PCI_HAVE_Uxx_TYPES */ 33 #endif /* ULONG_MAX > 0xffffffff */ 34 #endif /* PCI_HAVE_64BIT_ADDRESS */ 35 #endif /* PCI_HAVE_Uxx_TYPES */ 31 36 32 37 #ifdef PCI_HAVE_64BIT_ADDRESS 38 33 39 typedef u64 pciaddr_t; 34 40 #define PCIADDR_T_FMT "%08" PCI_U64_FMT "x" 35 41 #define PCIADDR_PORT_FMT "%04" PCI_U64_FMT "x" 36 #else 42 43 #else /* PCI_HAVE_64BIT_ADDRESS */ 44 37 45 typedef u32 pciaddr_t; 38 46 #define PCIADDR_T_FMT "%08x" 39 47 #define PCIADDR_PORT_FMT "%04x" 40 #endif 48 49 #endif /* PCI_HAVE_64BIT_ADDRESS */ 41 50 42 51 #ifdef PCI_ARCH_SPARC64 52 43 53 /* On sparc64 Linux the kernel reports remapped port addresses and IRQ numbers */ 44 54 #undef PCIADDR_PORT_FMT 45 55 #define PCIADDR_PORT_FMT PCIADDR_T_FMT 46 56 #define PCIIRQ_FMT "%08x" 47 #else 57 58 #else /* PCI_ARCH_SPARC64 */ 59 48 60 #define PCIIRQ_FMT "%d" 49 #endif 61 62 #endif /* PCI_ARCH_SPARC64 */
Note:
See TracChangeset
for help on using the changeset viewer.