]> Git Repo - J-u-boot.git/blobdiff - drivers/net/e1000.c
dm: treewide: Rename 'platdata' variables to just 'plat'
[J-u-boot.git] / drivers / net / e1000.c
index 09460118445e02c551da5420c78c366aaad1cd3d..49e6be31d1d4d81960a71f5218eeec9b46bc642f 100644 (file)
@@ -30,12 +30,18 @@ tested on both gig copper and gig fiber boards
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
+#include <malloc.h>
 #include <memalign.h>
+#include <net.h>
 #include <pci.h>
+#include <linux/delay.h>
 #include "e1000.h"
+#include <asm/cache.h>
 
 #define TOUT_LOOP   100000
 
@@ -1638,6 +1644,11 @@ e1000_reset_hw(struct e1000_hw *hw)
        E1000_WRITE_REG(hw, TCTL, E1000_TCTL_PSP);
        E1000_WRITE_FLUSH(hw);
 
+       if (hw->mac_type == e1000_igb) {
+               E1000_WRITE_REG(hw, RXPBS, I210_RXPBSIZE_DEFAULT);
+               E1000_WRITE_REG(hw, TXPBS, I210_TXPBSIZE_DEFAULT);
+       }
+
        /* The tbi_compatibility_on Flag must be cleared when Rctl is cleared. */
        hw->tbi_compatibility_on = false;
 
@@ -5628,7 +5639,7 @@ e1000_disable(struct eth_device *nic)
 INIT - set up ethernet interface(s)
 ***************************************************************************/
 static int
-e1000_init(struct eth_device *nic, bd_t *bis)
+e1000_init(struct eth_device *nic, struct bd_info *bis)
 {
        struct e1000_hw *hw = nic->priv;
 
@@ -5694,7 +5705,7 @@ PROBE - Look for an adapter, this routine's visible to the outside
 You should omit the last argument struct pci_device * for a non-PCI NIC
 ***************************************************************************/
 int
-e1000_initialize(bd_t * bis)
+e1000_initialize(struct bd_info * bis)
 {
        unsigned int i;
        pci_dev_t devno;
@@ -5758,8 +5769,8 @@ struct e1000_hw *e1000_find_card(unsigned int cardnum)
 #endif /* !CONFIG_DM_ETH */
 
 #ifdef CONFIG_CMD_E1000
-static int do_e1000(cmd_tbl_t *cmdtp, int flag,
-               int argc, char * const argv[])
+static int do_e1000(struct cmd_tbl *cmdtp, int flag, int argc,
+                   char *const argv[])
 {
        unsigned char *mac = NULL;
 #ifdef CONFIG_DM_ETH
@@ -5929,8 +5940,8 @@ U_BOOT_DRIVER(eth_e1000) = {
        .bind   = e1000_eth_bind,
        .probe  = e1000_eth_probe,
        .ops    = &e1000_eth_ops,
-       .priv_auto_alloc_size = sizeof(struct e1000_hw),
-       .platdata_auto_alloc_size = sizeof(struct eth_pdata),
+       .priv_auto      = sizeof(struct e1000_hw),
+       .plat_auto      = sizeof(struct eth_pdata),
 };
 
 U_BOOT_PCI_DEVICE(eth_e1000, e1000_supported);
This page took 0.029151 seconds and 4 git commands to generate.