iPXE
prism2_pci.c
Go to the documentation of this file.
1/**************************************************************************
2Etherboot - BOOTP/TFTP Bootstrap Program
3Prism2 NIC driver for Etherboot
4Wrapper for prism2_pci
5
6Written 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
27FILE_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
35static 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
47static void prism2_pci_disable ( struct nic *nic, void *hwdev __unused ) {
49}
50
51static struct pci_device_id prism2_pci_nics[] = {
52PCI_ROM(0x1260, 0x3873, "prism2_pci", "Harris Semiconductor Prism2.5 clone", 0),
53};
54
55PCI_DRIVER ( prism2_pci_driver, prism2_pci_nics, PCI_NO_CLASS );
56
57DRIVER ( "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 */
#define __unused
Declare a variable or data structure as unused.
Definition compiler.h:573
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
void * pci_ioremap(struct pci_device *pci, unsigned long bus_addr, size_t len)
Map PCI bus address as an I/O address.
#define DRIVER(_name_text, _unused2, _unused3, _name, _probe, _disable, _fake_bss)
Definition nic.h:220
#define PCI_DRIVER(_name, _ids, _class)
Definition nic.h:105
struct @002057171240057303273132130141036221271355330106 no_fake_bss
PCI bus.
#define PCI_ROM(_vendor, _device, _name, _description, _data)
Definition pci.h:308
static int prism2_probe(struct nic *nic, hfa384x_t *hw)
Definition prism2.c:769
static hfa384x_t hw_global
Definition prism2.c:143
static void prism2_disable(struct nic *nic __unused)
Definition prism2.c:736
struct hfa384x hfa384x_t
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
static void prism2_pci_disable(struct nic *nic, void *hwdev __unused)
Definition prism2_pci.c:47
Definition hw.c:16
Definition nic.h:49
unsigned char irqno
Definition nic.h:56
unsigned int ioaddr
Definition nic.h:55
A PCI device ID list entry.
Definition pci.h:175
A PCI device.
Definition pci.h:211
unsigned long membase
Memory base.
Definition pci.h:220
A PCI driver.
Definition pci.h:252
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition vsprintf.c:465