From: =?ISO-8859-1?Q?Andr=E9?= Schwarz Date: Mon, 24 Aug 2009 14:27:35 +0200 Subject: [U-Boot] [PATCH] Use different PBA value for E1000 PCI and PCIe cards In-Reply-To: <1250884192.23342.3.camel@rock.ap.freescale.net> References: <1250884192.23342.3.camel@rock.ap.freescale.net> Message-ID: <1251116855.4056.11.camel@swa-m460> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Acked-by: Andr? Schwarz --- Tested on 82541ER @ mvBC-P board. On Sat, 2009-08-22 at 03:49 +0800, Roy Zang wrote: > From: Roy Zang > > Use different PBA value for E1000 PCI and PCIe cards. > > Signed-off-by: Roy Zang > --- > Andre, please help to verify it on your board. > Thanks. > Roy > 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 777783a..57123dd 100644 > --- a/drivers/net/e1000.c > +++ b/drivers/net/e1000.c > @@ -51,7 +51,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 */ > > @@ -1350,9 +1351,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"); > @@ -1420,7 +1428,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); > } > > /****************************************************************************** MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich