diff options
author | RajithaY <rajithax.yerrumsetty@intel.com> | 2017-04-25 03:31:15 -0700 |
---|---|---|
committer | Rajitha Yerrumchetty <rajithax.yerrumsetty@intel.com> | 2017-05-22 06:48:08 +0000 |
commit | bb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch) | |
tree | ca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/roms/ipxe/src/drivers/net/prism2_plx.c | |
parent | a14b48d18a9ed03ec191cf16b162206998a895ce (diff) |
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to
kvmfornfv repo and make use of the updated latest qemu for the
execution of all testcase
Change-Id: I1280af507a857675c7f81d30c95255635667bdd7
Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/roms/ipxe/src/drivers/net/prism2_plx.c')
-rw-r--r-- | qemu/roms/ipxe/src/drivers/net/prism2_plx.c | 132 |
1 files changed, 0 insertions, 132 deletions
diff --git a/qemu/roms/ipxe/src/drivers/net/prism2_plx.c b/qemu/roms/ipxe/src/drivers/net/prism2_plx.c deleted file mode 100644 index a73b0e087..000000000 --- a/qemu/roms/ipxe/src/drivers/net/prism2_plx.c +++ /dev/null @@ -1,132 +0,0 @@ -/************************************************************************** -Etherboot - BOOTP/TFTP Bootstrap Program -Prism2 NIC driver for Etherboot -Wrapper for prism2_plx - -Written by Michael Brown of Fen Systems Ltd -$Id$ -***************************************************************************/ - -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -FILE_LICENCE ( GPL2_OR_LATER ); - -#include <ipxe/pci.h> -#include <nic.h> - -#define WLAN_HOSTIF WLAN_PLX -#include "prism2.c" - -/* - * Find PLX card. Prints out information strings from PCMCIA CIS as visual - * confirmation of presence of card. - * - * Arguments: - * hw device structure to be filled in - * p PCI device structure - * - * Returns: - * 1 Success - */ -static int prism2_find_plx ( hfa384x_t *hw, struct pci_device *p ) -{ - int found = 0; - uint32_t plx_lcr = 0; /* PLX9052 Local Configuration Register Base (I/O) */ - uint32_t attr_mem = 0; /* Prism2 Attribute Memory Base */ - uint32_t iobase = 0; /* Prism2 I/O Base */ - unsigned char *cis_tpl = NULL; - unsigned char *cis_string; - - /* Obtain all memory and IO base addresses */ - pci_read_config_dword( p, PLX_LOCAL_CONFIG_REGISTER_BASE, &plx_lcr); - plx_lcr &= ~PCI_BASE_ADDRESS_IO_MASK; - pci_read_config_dword( p, PRISM2_PLX_ATTR_MEM_BASE, &attr_mem); - pci_read_config_dword( p, PRISM2_PLX_IO_BASE, &iobase); - iobase &= ~PCI_BASE_ADDRESS_IO_MASK; - - /* Fill out hw structure */ - hw->iobase = iobase; - printf ( "PLX9052 has local config registers at %#x\n", plx_lcr ); - printf ( "Prism2 has attribute memory at %#x and I/O base at %#x\n", attr_mem, iobase ); - - /* Search for CIS strings */ - printf ( "Searching for PCMCIA card...\n" ); - cis_tpl = bus_to_virt(attr_mem); - while ( *cis_tpl != CISTPL_END ) { - if ( *cis_tpl == CISTPL_VERS_1 ) { - /* CISTPL_VERS_1 contains some nice text strings */ - printf ( "...found " ); - found = 1; - cis_string = cis_tpl + CISTPL_VERS_1_STR_OFF; - while ( ! ( ( *cis_string == 0 ) && ( *(cis_string+CIS_STEP) == 0 ) ) ) { - printf ( "%c", *cis_string == 0 ? ' ' : *cis_string ); - cis_string += CIS_STEP; - } - printf ( "\n" ); - } - /* printf ( "CIS tuple type %#hhx, length %#hhx\n", *cis_tpl, *(cis_tpl+CISTPL_LEN_OFF) ); */ - cis_tpl += CISTPL_HEADER_LEN + CIS_STEP * ( *(cis_tpl+CISTPL_LEN_OFF) ); - } - if ( found == 0 ) { - printf ( "...nothing found\n" ); - } - ((unsigned char *)bus_to_virt(attr_mem))[COR_OFFSET] = COR_VALUE; /* Write COR to enable PC card */ - return found; -} - -static int prism2_plx_probe ( struct nic *nic, struct pci_device *pci ) { - hfa384x_t *hw = &hw_global; - - /* Find and intialise PLX Prism2 card */ - if ( ! prism2_find_plx ( hw, pci ) ) return 0; - nic->ioaddr = hw->iobase; - nic->irqno = 0; - return prism2_probe ( nic, hw ); -} - -static void prism2_plx_disable ( struct nic *nic ) { - prism2_disable ( nic ); -} - -static struct pci_device_id prism2_plx_nics[] = { -PCI_ROM(0x1385, 0x4100, "ma301", "Netgear MA301", 0), -PCI_ROM(0x10b7, 0x7770, "3c-airconnect", "3Com AirConnect", 0), -PCI_ROM(0x111a, 0x1023, "ss1023", "Siemens SpeedStream SS1023", 0), -PCI_ROM(0x15e8, 0x0130, "correga", "Correga", 0), -PCI_ROM(0x1638, 0x1100, "smc2602w", "SMC EZConnect SMC2602W", 0), /* or Eumitcom PCI WL11000, Addtron AWA-100 */ -PCI_ROM(0x16ab, 0x1100, "gl24110p", "Global Sun Tech GL24110P", 0), -PCI_ROM(0x16ab, 0x1101, "16ab-1101", "Unknown", 0), -PCI_ROM(0x16ab, 0x1102, "wdt11", "Linksys WDT11", 0), -PCI_ROM(0x16ec, 0x3685, "usr2415", "USR 2415", 0), -PCI_ROM(0xec80, 0xec00, "f5d6000", "Belkin F5D6000", 0), -PCI_ROM(0x126c, 0x8030, "emobility", "Nortel emobility", 0), -}; - -PCI_DRIVER ( prism2_plx_driver, prism2_plx_nics, PCI_NO_CLASS ); - - -DRIVER ( "Prism2/PLX", nic_driver, pci_driver, prism2_plx_driver, - prism2_plx_probe, prism2_plx_disable ); - -/* - * Local variables: - * c-basic-offset: 8 - * c-indent-level: 8 - * tab-width: 8 - * End: - */ |