From 776e66e8f1df7f092e6a543d47391a85509c1a2b Mon Sep 17 00:00:00 2001 From: Ruchika Gupta Date: Thu, 19 Apr 2012 02:27:11 +0000 Subject: e1000e : Correct Rx Threshold granularity In e1000e driver, Rx descriptor queue is used such that hardware can add only one descriptor at a time. So the WTHRESH granularity in RXDCTL should be set to single descriptor. This would ensure that every time controller fills a Rx descriptor, it is flushed to host memory. Earlier this granularity was in cache line units i.e 2 descriptors. This leads to controller always waiting for 2 descriptors before flushing them out. But since not more than one Rx BD is actually available , the accumulation condition never gets hit. Signed-off-by: Ruchika Gupta Signed-off-by: Vakul Garg Acked-by: Roy Zang diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 2d4da4b..8ba98b2 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -1688,6 +1688,16 @@ e1000_init_hw(struct eth_device *nic) E1000_WRITE_REG(hw, TXDCTL, ctrl); } + /* Set the receive descriptor write back policy */ + + if (hw->mac_type >= e1000_82571) { + ctrl = E1000_READ_REG(hw, RXDCTL); + ctrl = + (ctrl & ~E1000_RXDCTL_WTHRESH) | + E1000_RXDCTL_FULL_RX_DESC_WB; + E1000_WRITE_REG(hw, RXDCTL, ctrl); + } + switch (hw->mac_type) { default: break; diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h index fd1d8f8..1bbae50 100644 --- a/drivers/net/e1000.h +++ b/drivers/net/e1000.h @@ -1551,6 +1551,7 @@ struct e1000_hw { #define E1000_RXDCTL_HTHRESH 0x00003F00 /* RXDCTL Host Threshold */ #define E1000_RXDCTL_WTHRESH 0x003F0000 /* RXDCTL Writeback Threshold */ #define E1000_RXDCTL_GRAN 0x01000000 /* RXDCTL Granularity */ +#define E1000_RXDCTL_FULL_RX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */ /* Transmit Descriptor Control */ #define E1000_TXDCTL_PTHRESH 0x0000003F /* TXDCTL Prefetch Threshold */ -- cgit v0.10.2 From b4b81e83f599711b52e24ed8147f20c12630face Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Tue, 7 Aug 2012 02:23:07 +0000 Subject: phy: Add support for Marvell 88E1118R Marvell 88E1118R has different uid then 88E1118. Signed-off-by: Michal Simek CC: Andy Fleming CC: Zang Roy-R61911 CC: Kumar Gala diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index e51e799..4b27198 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -425,6 +425,16 @@ static struct phy_driver M88E1118_driver = { .shutdown = &genphy_shutdown, }; +static struct phy_driver M88E1118R_driver = { + .name = "Marvell 88E1118R", + .uid = 0x1410e40, + .mask = 0xffffff0, + .features = PHY_GBIT_FEATURES, + .config = &m88e1118_config, + .startup = &m88e1118_startup, + .shutdown = &genphy_shutdown, +}; + static struct phy_driver M88E1121R_driver = { .name = "Marvell 88E1121R", .uid = 0x1410cb0, @@ -461,6 +471,7 @@ int phy_marvell_init(void) phy_register(&M88E1145_driver); phy_register(&M88E1121R_driver); phy_register(&M88E1118_driver); + phy_register(&M88E1118R_driver); phy_register(&M88E1111S_driver); phy_register(&M88E1011S_driver); -- cgit v0.10.2 From d8fb710fdd0d85e0129385d683c6ae42db411ea1 Mon Sep 17 00:00:00 2001 From: trem Date: Sat, 6 Oct 2012 04:25:56 +0000 Subject: powerpc: remove not used CONFIG_SYS_TFTP_LOADADDR CONFIG_SYS_TFTP_LOADADDR is defined on severals boards, but it's never used. So we can safely removed it. Signed-off-by: Philippe Reynes diff --git a/README b/README index b5c1c03..f386041 100644 --- a/README +++ b/README @@ -2975,9 +2975,6 @@ Configuration Settings: non page size aligned address and this could cause major problems. -- CONFIG_SYS_TFTP_LOADADDR: - Default load address for network file downloads - - CONFIG_SYS_LOADS_BAUD_CHANGE: Enable temporary baudrate change while serial download diff --git a/include/configs/CRAYL1.h b/include/configs/CRAYL1.h index 1daec69..6bceccb 100644 --- a/include/configs/CRAYL1.h +++ b/include/configs/CRAYL1.h @@ -153,7 +153,6 @@ #define CONFIG_SYS_LOAD_ADDR 0x100000 /* where to load what we get from TFTP */ -#define CONFIG_SYS_TFTP_LOADADDR CONFIG_SYS_LOAD_ADDR #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */ #define CONFIG_SYS_DRAM_TEST 1 diff --git a/include/configs/GEN860T.h b/include/configs/GEN860T.h index b98cacc..9a649ca 100644 --- a/include/configs/GEN860T.h +++ b/include/configs/GEN860T.h @@ -96,11 +96,6 @@ #define CONFIG_SYS_LOADS_BAUD_CHANGE /* - * Set default load address for tftp network downloads - */ -#define CONFIG_SYS_TFTP_LOADADDR 0x01000000 - -/* * Turn off the watchdog timer */ #undef CONFIG_WATCHDOG diff --git a/include/configs/TOP860.h b/include/configs/TOP860.h index 36921ca..4849f94 100644 --- a/include/configs/TOP860.h +++ b/include/configs/TOP860.h @@ -416,7 +416,6 @@ #define CONFIG_IPADDR 10.0.4.111 #define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */ -#define CONFIG_SYS_TFTP_LOADADDR 0x00100000 /* * For booting Linux, the board info and command line data diff --git a/include/configs/ep8260.h b/include/configs/ep8260.h index ccfe032..5a87cc5 100644 --- a/include/configs/ep8260.h +++ b/include/configs/ep8260.h @@ -371,7 +371,6 @@ #define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */ #define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */ -#define CONFIG_SYS_TFTP_LOADADDR 0x00100000 /* default load address for network file downloads */ #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ diff --git a/include/configs/utx8245.h b/include/configs/utx8245.h index d203bb4..66568c8 100644 --- a/include/configs/utx8245.h +++ b/include/configs/utx8245.h @@ -65,7 +65,6 @@ #define CONFIG_BOOTARGS "root=/dev/ram console=ttyS0,57600" /* RAMdisk */ #define CONFIG_ETHADDR 00:AA:00:14:00:05 /* UTX5 */ #define CONFIG_SERVERIP 10.8.17.105 /* Spree */ -#define CONFIG_SYS_TFTP_LOADADDR 10000 #define CONFIG_EXTRA_ENV_SETTINGS \ "kernel_addr=FFA00000\0" \ -- cgit v0.10.2 From 85b1980273084c844c911c14f70cc11f27fd25ab Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 11 Oct 2012 13:57:36 +0000 Subject: net: Add tftp speed indication This prints a tftp speed indication after the download completes. This is the 3.6 MiB/s indicator below. Tegra2 (SeaBoard) # tftp ... Using asx0 device TFTP from server 172.22.72.144; our IP address is 172.22.73.81 Filename '/tftpboot/uImage-user-seaboard-1'. Load address: 0x408000 Loading: ################################################# 3.6 MiB/s done Signed-off-by: Simon Glass Acked-by: Igor Grinberg diff --git a/net/tftp.c b/net/tftp.c index 59a8ebb..09790eb 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -40,6 +40,7 @@ static ulong TftpTimeoutMSecs = TIMEOUT; static int TftpTimeoutCountMax = TIMEOUT_COUNT; +static ulong time_start; /* Record time we started tftp */ /* * These globals govern the timeout behavior when attempting a connection to a @@ -299,6 +300,12 @@ static void tftp_complete(void) TftpNumchars++; } #endif + time_start = get_timer(time_start); + if (time_start > 0) { + puts("\n\t "); /* Line up with "Loading: " */ + print_size(NetBootFileXferSize / + time_start * 1000, "/s"); + } puts("\ndone\n"); net_set_state(NETLOOP_SUCCESS); } @@ -775,6 +782,7 @@ void TftpStart(enum proto_t protocol) TftpState = STATE_SEND_RRQ; } + time_start = get_timer(0); TftpTimeoutCountMax = TftpRRQTimeoutCountMax; NetSetTimeout(TftpTimeoutMSecs, TftpTimeout); -- cgit v0.10.2 From 65b0db831e7b179879968d860fd5caa907cf6565 Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Mon, 5 Nov 2012 06:13:45 +0000 Subject: net: Fix endianness bug in link-local The ip is stored in network order, so we can't test it in host order. Signed-off-by: Joe Hershberger Reviewed-by: Kim Phillips diff --git a/net/link_local.c b/net/link_local.c index d52f13a..1ba796e 100644 --- a/net/link_local.c +++ b/net/link_local.c @@ -103,7 +103,7 @@ static void configure_wait(void) void link_local_start(void) { ip = getenv_IPaddr("llipaddr"); - if (ip != 0 && (ip & IN_CLASSB_NET) != LINKLOCAL_ADDR) { + if (ip != 0 && (ntohl(ip) & IN_CLASSB_NET) != LINKLOCAL_ADDR) { puts("invalid link address"); net_set_state(NETLOOP_FAIL); return; -- cgit v0.10.2 From e3bb3254f8c055767edd1f02e642bec386540f4c Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Sun, 4 Nov 2012 15:54:30 +0000 Subject: net: sh_eth: add support for SH7752 SH7752 has two fast ethernet controllers and two gigabit ethernet controllers. It is similar to SH7757. Signed-off-by: Yoshihiro Shimoda Acked-by: Nobuhiro Iwamatsu diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 2d9cc32..e6fc8c8 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -417,7 +417,7 @@ static int sh_eth_config(struct sh_eth_dev *eth, bd_t *bd) printf(SHETHER_NAME ": 100Base/"); #if defined(SH_ETH_TYPE_GETHER) sh_eth_write(eth, GECMR_100B, GECMR); -#elif defined(CONFIG_CPU_SH7757) +#elif defined(CONFIG_CPU_SH7757) || defined(CONFIG_CPU_SH7752) sh_eth_write(eth, 1, RTRATE); #elif defined(CONFIG_CPU_SH7724) val = ECMR_RTM; @@ -426,7 +426,7 @@ static int sh_eth_config(struct sh_eth_dev *eth, bd_t *bd) printf(SHETHER_NAME ": 10Base/"); #if defined(SH_ETH_TYPE_GETHER) sh_eth_write(eth, GECMR_10B, GECMR); -#elif defined(CONFIG_CPU_SH7757) +#elif defined(CONFIG_CPU_SH7757) || defined(CONFIG_CPU_SH7752) sh_eth_write(eth, 0, RTRATE); #endif } diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h index 61d2df9..568fafe 100644 --- a/drivers/net/sh_eth.h +++ b/drivers/net/sh_eth.h @@ -288,7 +288,7 @@ static const u16 sh_eth_offset_fast_sh4[SH_ETH_MAX_REGISTER_OFFSET] = { #if defined(CONFIG_CPU_SH7763) || defined(CONFIG_CPU_SH7734) #define SH_ETH_TYPE_GETHER #define BASE_IO_ADDR 0xfee00000 -#elif defined(CONFIG_CPU_SH7757) +#elif defined(CONFIG_CPU_SH7757) || defined(CONFIG_CPU_SH7752) #if defined(CONFIG_SH_ETHER_USE_GETHER) #define SH_ETH_TYPE_GETHER #define BASE_IO_ADDR 0xfee00000 @@ -346,7 +346,7 @@ enum DMAC_T_BIT { /* GECMR */ enum GECMR_BIT { -#if defined(CONFIG_CPU_SH7757) +#if defined(CONFIG_CPU_SH7757) || defined(CONFIG_CPU_SH7752) GECMR_1000B = 0x20, GECMR_100B = 0x01, GECMR_10B = 0x00, #else GECMR_1000B = 0x01, GECMR_100B = 0x04, GECMR_10B = 0x00, -- cgit v0.10.2