您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

prism2_pci.c 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #define WLAN_HOSTIF WLAN_PCI
  15. #include "prism2.c"
  16. static struct pci_id prism2_pci_nics[] = {
  17. PCI_ROM(0x1260, 0x3873, "prism2_pci", "Harris Semiconductor Prism2.5 clone"),
  18. PCI_ROM(0x1260, 0x3873, "hwp01170", "ActionTec HWP01170"),
  19. PCI_ROM(0x1260, 0x3873, "dwl520", "DLink DWL-520"),
  20. };
  21. static struct pci_driver prism2_pci_driver =
  22. PCI_DRIVER ( "Prism2_PCI", prism2_pci_nics, PCI_NO_CLASS );
  23. static int prism2_pci_probe ( struct dev *dev ) {
  24. struct nic *nic = nic_device ( dev );
  25. struct pci_device *pci = pci_device ( dev );
  26. hfa384x_t *hw = &hw_global;
  27. uint32_t membase = 0; /* Prism2.5 Memory Base */
  28. if ( ! find_pci_device ( pci, &prism2_pci_driver ) )
  29. return 0;
  30. pci_read_config_dword( pci, PRISM2_PCI_MEM_BASE, &membase);
  31. membase &= PCI_BASE_ADDRESS_MEM_MASK;
  32. hw->membase = (uint32_t) phys_to_virt(membase);
  33. printf ( "Prism2.5 has registers at %#x\n", hw->membase );
  34. nic->ioaddr = hw->membase;
  35. return prism2_probe ( nic, hw );
  36. }
  37. BOOT_DRIVER ( "Prism2_PCI", prism2_pci_probe );