Now uses delete_area() instead of vm_delete_region().

Temporarily #if'd out scan_pci() and removed the compiler calming hack for it.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4324 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2003-08-19 17:47:20 +00:00
parent cbc1309c68
commit c4aff5f858
+14 -28
View File
@@ -61,24 +61,19 @@ enum {
PCI_CARDBUS PCI_CARDBUS
}; };
// forward declarations // forward declarations
static char *decode_class(uint8 base, uint8 sub_class); static char *decode_class(uint8 base, uint8 sub_class);
static void pci_scan_bus(uint8 bus); static void pci_scan_bus(uint8 bus);
static void scan_pci(void); //static void scan_pci(void);
static void pci_bridge(uint8 bus, uint8 dev, uint8 func); static void pci_bridge(uint8 bus, uint8 dev, uint8 func);
static void fill_basic_pci_structure(pci_info *pciInfo); static void fill_basic_pci_structure(pci_info *pciInfo);
static uint32 read_pci_config(uchar, uchar, uchar, uchar, uchar); static uint32 read_pci_config(uchar, uchar, uchar, uchar, uchar);
static void write_pci_config (uchar, uchar, uchar, uchar, uchar, uint32); static void write_pci_config (uchar, uchar, uchar, uchar, uchar, uint32);
/** globals **/ /** globals **/
static pci_device *gPCI_Devices = NULL; static pci_device *gPCI_Devices = NULL;
static pci_bus *gPCI_Busses = NULL; static pci_bus *gPCI_Busses = NULL;
static spinlock gConfigLock = 0; /* lock for config space access */ static spinlock gConfigLock = 0; /* lock for config space access */
static int gConfigMechanism = 1; /* The pci config mechanism we're using. static int gConfigMechanism = 1; /* The pci config mechanism we're using.
@@ -96,8 +91,6 @@ static region_id gPCI_Region; /* pci_bios region we map */
static addr gPCI_BIOS_Address = 0; /* virtual address of memory we map */ static addr gPCI_BIOS_Address = 0; /* virtual address of memory we map */
/* ToDo: move these to a header file */ /* ToDo: move these to a header file */
#define PCI_VENDOR_INTEL 0x8086 #define PCI_VENDOR_INTEL 0x8086
@@ -129,7 +122,6 @@ static addr gPCI_BIOS_Address = 0; /* virtual address of memory we map */
} }
/* decode_class /* decode_class
* DEBUG DEBUG DEBUG * DEBUG DEBUG DEBUG
* Provide a string that describes the class and sub-class. * Provide a string that describes the class and sub-class.
@@ -562,10 +554,10 @@ pci_set_power_state(uint8 bus, uint8 dev, uint8 func, int state)
} }
/* This used to be fixup_host_bridges, but some PCI-PCI bridges need /** This used to be fixup_host_bridges, but some PCI-PCI bridges need
* to be adjusted as well so I'll make it more general. * to be adjusted as well so I'll make it more general.
* *
* Partially borrowed from NetBSD. * Partially borrowed from NetBSD.
*/ */
static void static void
@@ -1133,6 +1125,7 @@ pci_scan_bus(uint8 bus)
} }
#if 0
static void static void
scan_pci(void) scan_pci(void)
{ {
@@ -1207,6 +1200,7 @@ scan_pci(void)
} }
} }
} }
#endif
static void static void
@@ -1350,18 +1344,10 @@ pci_write_io_32(int mapped_io_addr, uint32 value)
static void static void
pci_module_init(void) pci_module_init(void)
{ {
struct pir_table *pirTable = NULL; struct pir_table *pirTable = NULL;
TRACE(("pci_module_init()\n")); TRACE(("pci_module_init()\n"));
// ToDo: remove this dummy if statement -- it's only here to
// shut up the compiler which complains about 'scan_pci'
// being defined but not used...
if (0)
scan_pci();
if (!set_pci_mechanism()) if (!set_pci_mechanism())
return; return;
@@ -1394,7 +1380,7 @@ pci_module_init(void)
static void static void
pci_module_uninit(void) pci_module_uninit(void)
{ {
vm_delete_region(vm_get_kernel_aspace_id(), gPCI_Region); delete_area(gPCI_Region);
} }