mirror of
https://github.com/ipxe/ipxe
synced 2025-12-30 13:11:11 +03:00
[pci] Rewrite unrelicensable portions of pci.h
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -224,7 +224,7 @@ static int atl1e_sw_init(struct atl1e_adapter *adapter)
|
||||
adapter->link_duplex = FULL_DUPLEX;
|
||||
|
||||
/* PCI config space info */
|
||||
pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id);
|
||||
pci_read_config_byte(pdev, PCI_REVISION, &rev_id);
|
||||
|
||||
phy_status_data = AT_READ_REG(hw, REG_PHY_STATUS);
|
||||
/* nic type */
|
||||
|
||||
@@ -462,7 +462,7 @@ static int dmfe_probe ( struct nic *nic, struct pci_device *pci ) {
|
||||
pci->id->name, pci->vendor, pci->device);
|
||||
|
||||
/* Read Chip revision */
|
||||
pci_read_config_dword(pci, PCI_REVISION_ID, &dev_rev);
|
||||
pci_read_config_dword(pci, PCI_REVISION, &dev_rev);
|
||||
dprintf(("Revision %lX\n", dev_rev));
|
||||
|
||||
/* point to private storage */
|
||||
|
||||
@@ -3176,7 +3176,7 @@ falcon_probe_nic_variant ( struct efab_nic *efab, struct pci_device *pci )
|
||||
uint8_t revision;
|
||||
|
||||
/* PCI revision */
|
||||
pci_read_config_byte ( pci, PCI_CLASS_REVISION, &revision );
|
||||
pci_read_config_byte ( pci, PCI_REVISION, &revision );
|
||||
efab->pci_revision = revision;
|
||||
|
||||
/* Asic vs FPGA */
|
||||
|
||||
@@ -1749,10 +1749,8 @@ forcedeth_map_regs ( struct forcedeth_private *priv )
|
||||
for ( reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg += 4 ) {
|
||||
pci_read_config_dword ( priv->pci_dev, reg, &bar );
|
||||
|
||||
if ( ( ( bar & PCI_BASE_ADDRESS_SPACE ) ==
|
||||
PCI_BASE_ADDRESS_SPACE_MEMORY ) &&
|
||||
( pci_bar_size ( priv->pci_dev, reg ) >=
|
||||
register_size ) ) {
|
||||
if ( ( ! ( bar & PCI_BASE_ADDRESS_SPACE_IO ) ) &&
|
||||
( pci_bar_size ( priv->pci_dev, reg ) >= register_size ) ){
|
||||
addr = pci_bar_start ( priv->pci_dev, reg );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ static int __devinit igbvf_sw_init ( struct igbvf_adapter *adapter )
|
||||
hw->vendor_id = pdev->vendor;
|
||||
hw->device_id = pdev->device;
|
||||
|
||||
pci_read_config_byte ( pdev, PCI_REVISION_ID, &hw->revision_id );
|
||||
pci_read_config_byte ( pdev, PCI_REVISION, &hw->revision_id );
|
||||
|
||||
pci_read_config_word ( pdev, PCI_COMMAND, &hw->bus.pci_cmd_word );
|
||||
|
||||
|
||||
@@ -54,10 +54,10 @@ static int prism2_find_plx ( hfa384x_t *hw, struct pci_device *p )
|
||||
|
||||
/* 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;
|
||||
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;
|
||||
iobase &= ~PCI_BASE_ADDRESS_IO_MASK;
|
||||
|
||||
/* Fill out hw structure */
|
||||
hw->iobase = iobase;
|
||||
|
||||
@@ -601,7 +601,7 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
|
||||
sdc->nic_name = pci->id->name;
|
||||
sdc->mtu = mtu;
|
||||
|
||||
pci_read_config_byte(pci, PCI_REVISION_ID, &sdc->pci_rev_id);
|
||||
pci_read_config_byte(pci, PCI_REVISION, &sdc->pci_rev_id);
|
||||
|
||||
DBG ( "Device revision id: %hx\n", sdc->pci_rev_id );
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ vxge_probe(struct pci_device *pdev)
|
||||
vxge_debug(VXGE_INFO, "vxge_probe for device " PCI_FMT "\n",
|
||||
PCI_ARGS(pdev));
|
||||
|
||||
pci_read_config_byte(pdev, PCI_REVISION_ID, &revision);
|
||||
pci_read_config_byte(pdev, PCI_REVISION, &revision);
|
||||
titan1 = is_titan1(pdev->device, revision);
|
||||
|
||||
mmio_start = pci_bar_start(pdev, PCI_BASE_ADDRESS_0);
|
||||
|
||||
Reference in New Issue
Block a user