+2003-01-04 Martin Mares <mj@ucw.cz>
+
+ * lib: Removed partially implemented "syscall" access method which will
+ probably never be needed.
+
2002-12-27 Martin Mares <mj@ucw.cz>
* lib/nbsd-libpci.c: Cleaned up and hopefully made it endian safe.
/*
- * $Id: pci.h,v 1.11 2002/12/26 20:24:32 mj Exp $
+ * $Id: pci.h,v 1.12 2003/01/04 11:04:39 mj Exp $
*
* The PCI Library
*
struct pci_methods;
struct nl_entry;
-#define PCI_ACCESS_AUTO 0 /* Autodetection (params: none) */
-#define PCI_ACCESS_PROC_BUS_PCI 1 /* Linux /proc/bus/pci (params: path) */
-#define PCI_ACCESS_SYSCALLS 2 /* pciconfig_read() syscalls (params: none) */
-#define PCI_ACCESS_I386_TYPE1 3 /* i386 ports, type 1 (params: none) */
-#define PCI_ACCESS_I386_TYPE2 4 /* i386 ports, type 2 (params: none) */
-#define PCI_ACCESS_FBSD_DEVICE 5 /* FreeBSD /dev/pci (params: path) */
-#define PCI_ACCESS_AIX_DEVICE 6 /* /dev/pci0, /dev/bus0, etc. */
-#define PCI_ACCESS_NBSD_LIBPCI 7
-#define PCI_ACCESS_DUMP 8 /* Dump file (params: filename) */
-#define PCI_ACCESS_MAX 9
+enum pci_access_type {
+ /* Known access methods, remember to update access.c as well */
+ PCI_ACCESS_AUTO, /* Autodetection (params: none) */
+ PCI_ACCESS_PROC_BUS_PCI, /* Linux /proc/bus/pci (params: path) */
+ PCI_ACCESS_I386_TYPE1, /* i386 ports, type 1 (params: none) */
+ PCI_ACCESS_I386_TYPE2, /* i386 ports, type 2 (params: none) */
+ PCI_ACCESS_FBSD_DEVICE, /* FreeBSD /dev/pci (params: path) */
+ PCI_ACCESS_AIX_DEVICE, /* /dev/pci0, /dev/bus0, etc. */
+ PCI_ACCESS_NBSD_LIBPCI, /* NetBSD libpci */
+ PCI_ACCESS_DUMP, /* Dump file (params: filename) */
+ PCI_ACCESS_MAX
+};
struct pci_access {
/* Options you can change: */
+++ /dev/null
-/*
- * $Id: syscalls.c,v 1.2 2002/03/30 15:39:25 mj Exp $
- *
- * The PCI Library -- Configuration Access via Syscalls
- *
- * Copyright (c) 1997--1999 Martin Mares <mj@ucw.cz>
- *
- * Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include "internal.h"
-
-static int
-sysc_detect(struct pci_access *a)
-{
- return 0;
-}
-
-static void
-sysc_init(struct pci_access *a)
-{
-}
-
-static void
-sysc_cleanup(struct pci_access *a)
-{
-}
-
-static int
-sysc_read(struct pci_dev *d, int pos, byte *buf, int len)
-{
- return 0;
-}
-
-static int
-sysc_write(struct pci_dev *d, int pos, byte *buf, int len)
-{
- return 0;
-}
-
-struct pci_methods pm_syscalls = {
- "syscalls",
- NULL, /* config */
- sysc_detect,
- sysc_init,
- sysc_cleanup,
- pci_generic_scan,
- pci_generic_fill_info,
- sysc_read,
- sysc_write,
- NULL, /* init_dev */
- NULL /* cleanup_dev */
-};