diff options
author | Roy Zang <tie-fei.zang@freescale.com> | 2009-08-22 03:49:52 +0800 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-09-04 22:03:02 +0200 |
commit | 9ea005fb4428c922536fa75991ce9972304a02fb (patch) | |
tree | 7cec93321d8a755b929377feb3d0b955f404bf30 /drivers/net/e1000.c | |
parent | 5b34a296d47b236dafbcaf1c91ae11b5aeb1ef51 (diff) | |
download | bootable_bootloader_goldelico_gta04-9ea005fb4428c922536fa75991ce9972304a02fb.zip bootable_bootloader_goldelico_gta04-9ea005fb4428c922536fa75991ce9972304a02fb.tar.gz bootable_bootloader_goldelico_gta04-9ea005fb4428c922536fa75991ce9972304a02fb.tar.bz2 |
Use different PBA value for E1000 PCI and PCIe cards
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Acked-by: André Schwarz <andre.schwarz@matrix-vision.de>
Diffstat (limited to 'drivers/net/e1000.c')
-rw-r--r-- | drivers/net/e1000.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index b8dd9f2..7f9f783 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -50,7 +50,8 @@ tested on both gig copper and gig fiber boards #define bus_to_phys(devno, a) pci_mem_to_phys(devno, a) #define mdelay(n) udelay((n)*1000) -#define E1000_DEFAULT_PBA 0x000a0026 +#define E1000_DEFAULT_PCI_PBA 0x00000030 +#define E1000_DEFAULT_PCIE_PBA 0x000a0026 /* NIC specific static variables go here */ @@ -1349,9 +1350,16 @@ e1000_reset_hw(struct e1000_hw *hw) uint32_t ctrl_ext; uint32_t icr; uint32_t manc; + uint32_t pba = 0; DEBUGFUNC(); + /* get the correct pba value for both PCI and PCIe*/ + if (hw->mac_type < e1000_82571) + pba = E1000_DEFAULT_PCI_PBA; + else + pba = E1000_DEFAULT_PCIE_PBA; + /* For 82542 (rev 2.0), disable MWI before issuing a device reset */ if (hw->mac_type == e1000_82542_rev2_0) { DEBUGOUT("Disabling MWI on 82542 rev 2.0\n"); @@ -1419,7 +1427,7 @@ e1000_reset_hw(struct e1000_hw *hw) if (hw->mac_type == e1000_82542_rev2_0) { pci_write_config_word(hw->pdev, PCI_COMMAND, hw->pci_cmd_word); } - E1000_WRITE_REG(hw, PBA, E1000_DEFAULT_PBA); + E1000_WRITE_REG(hw, PBA, pba); } /****************************************************************************** |