123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
-
-
-
-
- #include <gpxe/pci.h>
- #include <nic.h>
-
- #define WLAN_HOSTIF WLAN_PLX
- #include "prism2.c"
-
-
- static int prism2_find_plx ( hfa384x_t *hw, struct pci_device *p )
- {
- int found = 0;
- uint32_t plx_lcr = 0;
- uint32_t attr_mem = 0;
- uint32_t iobase = 0;
- unsigned char *cis_tpl = NULL;
- unsigned char *cis_string;
-
-
- 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;
-
-
- hw->membase = attr_mem;
- 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 );
-
-
- printf ( "Searching for PCMCIA card...\n" );
- cis_tpl = bus_to_virt(attr_mem);
- while ( *cis_tpl != CISTPL_END ) {
- if ( *cis_tpl == CISTPL_VERS_1 ) {
-
- 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" );
- }
-
- 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;
- return found;
- }
-
- static int prism2_plx_probe ( struct nic *nic, struct pci_device *pci ) {
- hfa384x_t *hw = &hw_global;
-
-
- 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"),
- PCI_ROM(0x10b7, 0x7770, "3c-airconnect", "3Com AirConnect"),
- PCI_ROM(0x111a, 0x1023, "ss1023", "Siemens SpeedStream SS1023"),
- PCI_ROM(0x15e8, 0x0130, "correga", "Correga"),
- PCI_ROM(0x1638, 0x1100, "smc2602w", "SMC EZConnect SMC2602W"),
- PCI_ROM(0x16ab, 0x1100, "gl24110p", "Global Sun Tech GL24110P"),
- PCI_ROM(0x16ab, 0x1101, "16ab-1101", "Unknown"),
- PCI_ROM(0x16ab, 0x1102, "wdt11", "Linksys WDT11"),
- PCI_ROM(0x16ec, 0x3685, "usr2415", "USR 2415"),
- PCI_ROM(0xec80, 0xec00, "f5d6000", "Belkin F5D6000"),
- PCI_ROM(0x126c, 0x8030, "emobility", "Nortel emobility"),
- };
-
- 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 );
-
|