1 /* best viewed with tabsize 4 */
3 #include <minix/drivers.h>
10 #include "pci_helper.h"
14 /*===========================================================================*
15 * helper functions for I/O *
16 *===========================================================================*/
17 u32_t
pci_inb(u16_t port
) {
20 if ((s
=sys_inb(port
, &value
)) !=OK
)
21 printf("%s: warning, sys_inb failed: %d\n", DRIVER_NAME
, s
);
26 u32_t
pci_inw(u16_t port
) {
29 if ((s
=sys_inw(port
, &value
)) !=OK
)
30 printf("%s: warning, sys_inw failed: %d\n", DRIVER_NAME
, s
);
35 u32_t
pci_inl(u16_t port
) {
38 if ((s
=sys_inl(port
, &value
)) !=OK
)
39 printf("%s: warning, sys_inl failed: %d\n", DRIVER_NAME
, s
);
44 void pci_outb(u16_t port
, u8_t value
) {
46 if ((s
=sys_outb(port
, value
)) !=OK
)
47 printf("%s: warning, sys_outb failed: %d\n", DRIVER_NAME
, s
);
51 void pci_outw(u16_t port
, u16_t value
) {
53 if ((s
=sys_outw(port
, value
)) !=OK
)
54 printf("%s: warning, sys_outw failed: %d\n", DRIVER_NAME
, s
);
58 void pci_outl(u16_t port
, u32_t value
) {
60 if ((s
=sys_outl(port
, value
)) !=OK
)
61 printf("%s: warning, sys_outl failed: %d\n", DRIVER_NAME
, s
);