1 /**************************************************************************
2 Etherboot - BOOTP/TFTP Bootstrap Program
3 Prism2 NIC driver for Etherboot
6 Written by Michael Brown of Fen Systems Ltd
8 ***************************************************************************/
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2, or (at
14 * your option) any later version.
17 #define WLAN_HOSTIF WLAN_PCI
20 static struct pci_id prism2_pci_nics[] = {
21 PCI_ROM(0x1260, 0x3873, "prism2_pci", "Harris Semiconductor Prism2.5 clone"),
22 PCI_ROM(0x1260, 0x3873, "hwp01170", "ActionTec HWP01170"),
23 PCI_ROM(0x1260, 0x3873, "dwl520", "DLink DWL-520"),
26 static struct pci_driver prism2_pci_driver =
27 PCI_DRIVER ( "Prism2_PCI", prism2_pci_nics, PCI_NO_CLASS );
29 static int prism2_pci_probe ( struct dev *dev ) {
30 struct nic *nic = nic_device ( dev );
31 struct pci_device *pci = pci_device ( dev );
32 hfa384x_t *hw = &hw_global;
33 uint32_t membase = 0; /* Prism2.5 Memory Base */
35 if ( ! find_pci_device ( pci, &prism2_pci_driver ) )
38 pci_read_config_dword( pci, PRISM2_PCI_MEM_BASE, &membase);
39 membase &= PCI_BASE_ADDRESS_MEM_MASK;
40 hw->membase = (uint32_t) phys_to_virt(membase);
41 printf ( "Prism2.5 has registers at %#x\n", hw->membase );
42 nic->ioaddr = hw->membase;
44 return prism2_probe ( nic, hw );
47 BOOT_DRIVER ( "Prism2_PCI", prism2_pci_probe );