You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

prism2_pci.c 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**************************************************************************
  2. Etherboot - BOOTP/TFTP Bootstrap Program
  3. Prism2 NIC driver for Etherboot
  4. Wrapper for prism2_pci
  5. Written by Michael Brown of Fen Systems Ltd
  6. $Id$
  7. ***************************************************************************/
  8. /*
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2, or (at
  12. * your option) any later version.
  13. */
  14. #include <gpxe/pci.h>
  15. #include <nic.h>
  16. #define WLAN_HOSTIF WLAN_PCI
  17. #include "prism2.c"
  18. static int prism2_pci_probe ( struct nic *nic, struct pci_device *pci ) {
  19. hfa384x_t *hw = &hw_global;
  20. uint32_t membase = 0; /* Prism2.5 Memory Base */
  21. pci_read_config_dword( pci, PRISM2_PCI_MEM_BASE, &membase);
  22. membase &= PCI_BASE_ADDRESS_MEM_MASK;
  23. hw->membase = (uint32_t) phys_to_virt(membase);
  24. printf ( "Prism2.5 has registers at %#lx\n", hw->membase );
  25. nic->ioaddr = hw->membase;
  26. nic->irqno = 0;
  27. return prism2_probe ( nic, hw );
  28. }
  29. static void prism2_pci_disable ( struct nic *nic ) {
  30. prism2_disable ( nic );
  31. }
  32. static struct pci_device_id prism2_pci_nics[] = {
  33. PCI_ROM(0x1260, 0x3873, "prism2_pci", "Harris Semiconductor Prism2.5 clone"),
  34. PCI_ROM(0x1260, 0x3873, "hwp01170", "ActionTec HWP01170"),
  35. PCI_ROM(0x1260, 0x3873, "dwl520", "DLink DWL-520"),
  36. };
  37. PCI_DRIVER ( prism2_pci_driver, prism2_pci_nics, PCI_NO_CLASS );
  38. DRIVER ( "Prism2/PCI", nic_driver, pci_driver, prism2_pci_driver,
  39. prism2_pci_probe, prism2_pci_disable );
  40. /*
  41. * Local variables:
  42. * c-basic-offset: 8
  43. * c-indent-level: 8
  44. * tab-width: 8
  45. * End:
  46. */