mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 11:01:33 +00:00
Merge branch 'master' of git://git.denx.de/u-boot-net
This commit is contained in:
commit
095728803e
13 changed files with 35 additions and 17 deletions
3
README
3
README
|
@ -2975,9 +2975,6 @@ Configuration Settings:
|
||||||
non page size aligned address and this could cause major
|
non page size aligned address and this could cause major
|
||||||
problems.
|
problems.
|
||||||
|
|
||||||
- CONFIG_SYS_TFTP_LOADADDR:
|
|
||||||
Default load address for network file downloads
|
|
||||||
|
|
||||||
- CONFIG_SYS_LOADS_BAUD_CHANGE:
|
- CONFIG_SYS_LOADS_BAUD_CHANGE:
|
||||||
Enable temporary baudrate change while serial download
|
Enable temporary baudrate change while serial download
|
||||||
|
|
||||||
|
|
|
@ -1688,6 +1688,16 @@ e1000_init_hw(struct eth_device *nic)
|
||||||
E1000_WRITE_REG(hw, TXDCTL, ctrl);
|
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) {
|
switch (hw->mac_type) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1551,6 +1551,7 @@ struct e1000_hw {
|
||||||
#define E1000_RXDCTL_HTHRESH 0x00003F00 /* RXDCTL Host Threshold */
|
#define E1000_RXDCTL_HTHRESH 0x00003F00 /* RXDCTL Host Threshold */
|
||||||
#define E1000_RXDCTL_WTHRESH 0x003F0000 /* RXDCTL Writeback Threshold */
|
#define E1000_RXDCTL_WTHRESH 0x003F0000 /* RXDCTL Writeback Threshold */
|
||||||
#define E1000_RXDCTL_GRAN 0x01000000 /* RXDCTL Granularity */
|
#define E1000_RXDCTL_GRAN 0x01000000 /* RXDCTL Granularity */
|
||||||
|
#define E1000_RXDCTL_FULL_RX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */
|
||||||
|
|
||||||
/* Transmit Descriptor Control */
|
/* Transmit Descriptor Control */
|
||||||
#define E1000_TXDCTL_PTHRESH 0x0000003F /* TXDCTL Prefetch Threshold */
|
#define E1000_TXDCTL_PTHRESH 0x0000003F /* TXDCTL Prefetch Threshold */
|
||||||
|
|
|
@ -425,6 +425,16 @@ static struct phy_driver M88E1118_driver = {
|
||||||
.shutdown = &genphy_shutdown,
|
.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 = {
|
static struct phy_driver M88E1121R_driver = {
|
||||||
.name = "Marvell 88E1121R",
|
.name = "Marvell 88E1121R",
|
||||||
.uid = 0x1410cb0,
|
.uid = 0x1410cb0,
|
||||||
|
@ -461,6 +471,7 @@ int phy_marvell_init(void)
|
||||||
phy_register(&M88E1145_driver);
|
phy_register(&M88E1145_driver);
|
||||||
phy_register(&M88E1121R_driver);
|
phy_register(&M88E1121R_driver);
|
||||||
phy_register(&M88E1118_driver);
|
phy_register(&M88E1118_driver);
|
||||||
|
phy_register(&M88E1118R_driver);
|
||||||
phy_register(&M88E1111S_driver);
|
phy_register(&M88E1111S_driver);
|
||||||
phy_register(&M88E1011S_driver);
|
phy_register(&M88E1011S_driver);
|
||||||
|
|
||||||
|
|
|
@ -417,7 +417,7 @@ static int sh_eth_config(struct sh_eth_dev *eth, bd_t *bd)
|
||||||
printf(SHETHER_NAME ": 100Base/");
|
printf(SHETHER_NAME ": 100Base/");
|
||||||
#if defined(SH_ETH_TYPE_GETHER)
|
#if defined(SH_ETH_TYPE_GETHER)
|
||||||
sh_eth_write(eth, GECMR_100B, GECMR);
|
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);
|
sh_eth_write(eth, 1, RTRATE);
|
||||||
#elif defined(CONFIG_CPU_SH7724)
|
#elif defined(CONFIG_CPU_SH7724)
|
||||||
val = ECMR_RTM;
|
val = ECMR_RTM;
|
||||||
|
@ -426,7 +426,7 @@ static int sh_eth_config(struct sh_eth_dev *eth, bd_t *bd)
|
||||||
printf(SHETHER_NAME ": 10Base/");
|
printf(SHETHER_NAME ": 10Base/");
|
||||||
#if defined(SH_ETH_TYPE_GETHER)
|
#if defined(SH_ETH_TYPE_GETHER)
|
||||||
sh_eth_write(eth, GECMR_10B, GECMR);
|
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);
|
sh_eth_write(eth, 0, RTRATE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
#if defined(CONFIG_CPU_SH7763) || defined(CONFIG_CPU_SH7734)
|
||||||
#define SH_ETH_TYPE_GETHER
|
#define SH_ETH_TYPE_GETHER
|
||||||
#define BASE_IO_ADDR 0xfee00000
|
#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)
|
#if defined(CONFIG_SH_ETHER_USE_GETHER)
|
||||||
#define SH_ETH_TYPE_GETHER
|
#define SH_ETH_TYPE_GETHER
|
||||||
#define BASE_IO_ADDR 0xfee00000
|
#define BASE_IO_ADDR 0xfee00000
|
||||||
|
@ -346,7 +346,7 @@ enum DMAC_T_BIT {
|
||||||
|
|
||||||
/* GECMR */
|
/* GECMR */
|
||||||
enum GECMR_BIT {
|
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,
|
GECMR_1000B = 0x20, GECMR_100B = 0x01, GECMR_10B = 0x00,
|
||||||
#else
|
#else
|
||||||
GECMR_1000B = 0x01, GECMR_100B = 0x04, GECMR_10B = 0x00,
|
GECMR_1000B = 0x01, GECMR_100B = 0x04, GECMR_10B = 0x00,
|
||||||
|
|
|
@ -153,7 +153,6 @@
|
||||||
|
|
||||||
|
|
||||||
#define CONFIG_SYS_LOAD_ADDR 0x100000 /* where to load what we get from TFTP */
|
#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_EXTBDINFO 1 /* To use extended board_into (bd_t) */
|
||||||
#define CONFIG_SYS_DRAM_TEST 1
|
#define CONFIG_SYS_DRAM_TEST 1
|
||||||
|
|
||||||
|
|
|
@ -95,11 +95,6 @@
|
||||||
#undef CONFIG_LOADS_ECHO
|
#undef CONFIG_LOADS_ECHO
|
||||||
#define CONFIG_SYS_LOADS_BAUD_CHANGE
|
#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
|
* Turn off the watchdog timer
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -416,7 +416,6 @@
|
||||||
#define CONFIG_IPADDR 10.0.4.111
|
#define CONFIG_IPADDR 10.0.4.111
|
||||||
|
|
||||||
#define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */
|
#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
|
* For booting Linux, the board info and command line data
|
||||||
|
|
|
@ -371,7 +371,6 @@
|
||||||
#define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */
|
#define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */
|
||||||
|
|
||||||
#define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */
|
#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 */
|
#define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,6 @@
|
||||||
#define CONFIG_BOOTARGS "root=/dev/ram console=ttyS0,57600" /* RAMdisk */
|
#define CONFIG_BOOTARGS "root=/dev/ram console=ttyS0,57600" /* RAMdisk */
|
||||||
#define CONFIG_ETHADDR 00:AA:00:14:00:05 /* UTX5 */
|
#define CONFIG_ETHADDR 00:AA:00:14:00:05 /* UTX5 */
|
||||||
#define CONFIG_SERVERIP 10.8.17.105 /* Spree */
|
#define CONFIG_SERVERIP 10.8.17.105 /* Spree */
|
||||||
#define CONFIG_SYS_TFTP_LOADADDR 10000
|
|
||||||
|
|
||||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
"kernel_addr=FFA00000\0" \
|
"kernel_addr=FFA00000\0" \
|
||||||
|
|
|
@ -103,7 +103,7 @@ static void configure_wait(void)
|
||||||
void link_local_start(void)
|
void link_local_start(void)
|
||||||
{
|
{
|
||||||
ip = getenv_IPaddr("llipaddr");
|
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");
|
puts("invalid link address");
|
||||||
net_set_state(NETLOOP_FAIL);
|
net_set_state(NETLOOP_FAIL);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
static ulong TftpTimeoutMSecs = TIMEOUT;
|
static ulong TftpTimeoutMSecs = TIMEOUT;
|
||||||
static int TftpTimeoutCountMax = TIMEOUT_COUNT;
|
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
|
* These globals govern the timeout behavior when attempting a connection to a
|
||||||
|
@ -299,6 +300,12 @@ static void tftp_complete(void)
|
||||||
TftpNumchars++;
|
TftpNumchars++;
|
||||||
}
|
}
|
||||||
#endif
|
#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");
|
puts("\ndone\n");
|
||||||
net_set_state(NETLOOP_SUCCESS);
|
net_set_state(NETLOOP_SUCCESS);
|
||||||
}
|
}
|
||||||
|
@ -775,6 +782,7 @@ void TftpStart(enum proto_t protocol)
|
||||||
TftpState = STATE_SEND_RRQ;
|
TftpState = STATE_SEND_RRQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time_start = get_timer(0);
|
||||||
TftpTimeoutCountMax = TftpRRQTimeoutCountMax;
|
TftpTimeoutCountMax = TftpRRQTimeoutCountMax;
|
||||||
|
|
||||||
NetSetTimeout(TftpTimeoutMSecs, TftpTimeout);
|
NetSetTimeout(TftpTimeoutMSecs, TftpTimeout);
|
||||||
|
|
Loading…
Add table
Reference in a new issue