annotate vidix/sysdep/pci_powerpc.c @ 23319:32116ccf8c41

Clean up VIDIX test.
author diego
date Thu, 17 May 2007 23:20:58 +0000
parents a9e111b88c4a
children 0f1b5b68af32
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4164
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
1 /*
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
2 This file is based on:
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
3 $XFree86: xc/programs/Xserver/hw/xfree86/etc/scanpci.c,v 3.34.2.17 1998/11/10 11:55:40 dawes Exp $
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
4 Modified for readability by Nick Kurshev
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
5 */
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
6
8503
9dbb9c710480 svgalib kernelhelper support (based on patch by Matan Ziv-Av <matan@svgalib.org>) and some reordering/cleanup (part #1 ;)
alex
parents: 8460
diff changeset
7 #if defined(Lynx) || defined(__OpenBSD__)
4164
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
8 static int pci_config_type( void ) { return 1; }
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
9
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
10 static int pci_get_vendor(
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
11 unsigned char bus,
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
12 unsigned char dev,
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
13 int func)
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
14 {
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
15 int retval;
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
16 pciconfig_read(bus, dev<<3, PCI_ID_REG, 4, &retval);
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
17 return retval;
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
18 }
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
19
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
20 static long pci_config_read_long(
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
21 unsigned char bus,
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
22 unsigned char dev,
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
23 int func,
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
24 unsigned cmd)
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
25 {
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
26 long retval;
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
27 pciconfig_read(bus, dev<<3, cmd, 4, &retval);
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
28 return retval;
2e3262002acb Improved readability and new stuffs
nick
parents:
diff changeset
29 }
7837
6d544beb655e libdha on linux powerpc support by Colin Leroy <colin@colino.net>
alex
parents: 4164
diff changeset
30 #endif /*Lynx/OpenBSD*/