iPXE
prism2_pci.c
Go to the documentation of this file.
00001 /**************************************************************************
00002 Etherboot -  BOOTP/TFTP Bootstrap Program
00003 Prism2 NIC driver for Etherboot
00004 Wrapper for prism2_pci
00005 
00006 Written by Michael Brown of Fen Systems Ltd
00007 $Id$
00008 ***************************************************************************/
00009 
00010 /*
00011  * This program is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU General Public License as
00013  * published by the Free Software Foundation; either version 2 of the
00014  * License, or (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful, but
00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00024  * 02110-1301, USA.
00025  */
00026 
00027 FILE_LICENCE ( GPL2_OR_LATER );
00028 
00029 #include <ipxe/pci.h>
00030 #include <nic.h>
00031 
00032 #define WLAN_HOSTIF WLAN_PCI
00033 #include "prism2.c"
00034 
00035 static int prism2_pci_probe ( struct nic *nic, struct pci_device *pci ) {
00036   hfa384x_t *hw = &hw_global;
00037 
00038   printf ( "Prism2.5 has registers at %#lx\n", pci->membase );
00039   hw->membase = ioremap ( pci->membase, 0x100 );
00040 
00041   nic->ioaddr = pci->membase;
00042   nic->irqno = 0;
00043 
00044   return prism2_probe ( nic, hw );
00045 }
00046 
00047 static void prism2_pci_disable ( struct nic *nic ) {
00048   prism2_disable ( nic );
00049 }
00050 
00051 static struct pci_device_id prism2_pci_nics[] = {
00052 PCI_ROM(0x1260, 0x3873, "prism2_pci",   "Harris Semiconductor Prism2.5 clone", 0),
00053 };
00054 
00055 PCI_DRIVER ( prism2_pci_driver, prism2_pci_nics, PCI_NO_CLASS );
00056 
00057 DRIVER ( "Prism2/PCI", nic_driver, pci_driver, prism2_pci_driver,
00058          prism2_pci_probe, prism2_pci_disable );
00059 
00060 /*
00061  * Local variables:
00062  *  c-basic-offset: 8
00063  *  c-indent-level: 8
00064  *  tab-width: 8
00065  * End:
00066  */