These changes are the raw update to qemu-2.6.
[kvmfornfv.git] / qemu / roms / ipxe / src / drivers / net / prism2_pci.c
1 /**************************************************************************
2 Etherboot -  BOOTP/TFTP Bootstrap Program
3 Prism2 NIC driver for Etherboot
4 Wrapper for prism2_pci
5
6 Written by Michael Brown of Fen Systems Ltd
7 $Id$
8 ***************************************************************************/
9
10 /*
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 of the
14  * License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24  * 02110-1301, USA.
25  */
26
27 FILE_LICENCE ( GPL2_OR_LATER );
28
29 #include <ipxe/pci.h>
30 #include <nic.h>
31
32 #define WLAN_HOSTIF WLAN_PCI
33 #include "prism2.c"
34
35 static int prism2_pci_probe ( struct nic *nic, struct pci_device *pci ) {
36   hfa384x_t *hw = &hw_global;
37
38   printf ( "Prism2.5 has registers at %#lx\n", pci->membase );
39   hw->membase = ioremap ( pci->membase, 0x100 );
40
41   nic->ioaddr = pci->membase;
42   nic->irqno = 0;
43
44   return prism2_probe ( nic, hw );
45 }
46
47 static void prism2_pci_disable ( struct nic *nic ) {
48   prism2_disable ( nic );
49 }
50
51 static struct pci_device_id prism2_pci_nics[] = {
52 PCI_ROM(0x1260, 0x3873, "prism2_pci",   "Harris Semiconductor Prism2.5 clone", 0),
53 };
54
55 PCI_DRIVER ( prism2_pci_driver, prism2_pci_nics, PCI_NO_CLASS );
56
57 DRIVER ( "Prism2/PCI", nic_driver, pci_driver, prism2_pci_driver,
58          prism2_pci_probe, prism2_pci_disable );
59
60 /*
61  * Local variables:
62  *  c-basic-offset: 8
63  *  c-indent-level: 8
64  *  tab-width: 8
65  * End:
66  */