iPXE
prism2_pci.c
Go to the documentation of this file.
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 ) {
37 
38  printf ( "Prism2.5 has registers at %#lx\n", pci->membase );
39  hw->membase = pci_ioremap ( pci, 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,
59 
60 /*
61  * Local variables:
62  * c-basic-offset: 8
63  * c-indent-level: 8
64  * tab-width: 8
65  * End:
66  */
unsigned char irqno
Definition: nic.h:56
unsigned long membase
Memory base.
Definition: pci.h:215
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
A PCI driver.
Definition: pci.h:247
static void prism2_pci_disable(struct nic *nic)
Definition: prism2_pci.c:47
static struct pci_device_id prism2_pci_nics[]
Definition: prism2_pci.c:51
static int prism2_pci_probe(struct nic *nic, struct pci_device *pci)
Definition: prism2_pci.c:35
PCI_DRIVER(prism2_pci_driver, prism2_pci_nics, PCI_NO_CLASS)
Definition: hw.c:16
unsigned int ioaddr
Definition: nic.h:55
static hfa384x_t hw_global
Definition: prism2.c:143
static void prism2_disable(struct nic *nic __unused)
Definition: prism2.c:736
PCI bus.
A PCI device.
Definition: pci.h:206
A PCI device ID list entry.
Definition: pci.h:170
Definition: nic.h:49
static int prism2_probe(struct nic *nic, hfa384x_t *hw)
Definition: prism2.c:769
FILE_LICENCE(GPL2_OR_LATER)
void * pci_ioremap(struct pci_device *pci, unsigned long bus_addr, size_t len)
Map PCI bus address as an I/O address.
#define PCI_ROM(_vendor, _device, _name, _description, _data)
Definition: pci.h:303
DRIVER("Prism2/PCI", nic_driver, pci_driver, prism2_pci_driver, prism2_pci_probe, prism2_pci_disable)