summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-03-21 22:45:36 +0100
committerWolfgang Denk <wd@denx.de>2010-03-21 22:45:36 +0100
commitb46b353b901a45ebe860f8bf874ca99f018cd410 (patch)
treee2d42c0f36b9d7b67c1a17fe97f4734552370a6b
parent3c950e2ebfde083084cc926b020e3a22a536bf85 (diff)
parentdaa989b47297c9f73426783599c286ef3a1f3f49 (diff)
downloadu-boot-b46b353b901a45ebe860f8bf874ca99f018cd410.tar.gz
u-boot-b46b353b901a45ebe860f8bf874ca99f018cd410.tar.xz
u-boot-b46b353b901a45ebe860f8bf874ca99f018cd410.zip
Merge remote branch 'origin/master' into next
-rw-r--r--README19
-rw-r--r--[-rwxr-xr-x]board/spear/common/spr_lowlevel_init.S0
-rw-r--r--[-rwxr-xr-x]board/spear/common/spr_misc.c0
-rw-r--r--[-rwxr-xr-x]board/spear/spear300/Makefile0
-rw-r--r--[-rwxr-xr-x]board/spear/spear300/config.mk0
-rw-r--r--[-rwxr-xr-x]board/spear/spear300/spear300.c0
-rw-r--r--[-rwxr-xr-x]board/spear/spear310/Makefile0
-rw-r--r--[-rwxr-xr-x]board/spear/spear310/config.mk0
-rw-r--r--[-rwxr-xr-x]board/spear/spear310/spear310.c0
-rw-r--r--[-rwxr-xr-x]board/spear/spear320/Makefile0
-rw-r--r--[-rwxr-xr-x]board/spear/spear320/config.mk0
-rw-r--r--[-rwxr-xr-x]board/spear/spear320/spear320.c0
-rw-r--r--[-rwxr-xr-x]board/spear/spear600/Makefile0
-rw-r--r--[-rwxr-xr-x]board/spear/spear600/config.mk0
-rw-r--r--[-rwxr-xr-x]board/spear/spear600/spear600.c0
-rw-r--r--common/cmd_mmc.c2
-rw-r--r--common/console.c10
-rw-r--r--[-rwxr-xr-x]cpu/arm926ejs/spear/Makefile0
-rw-r--r--[-rwxr-xr-x]cpu/arm926ejs/spear/reset.c0
-rw-r--r--[-rwxr-xr-x]cpu/arm926ejs/spear/timer.c0
-rw-r--r--[-rwxr-xr-x]cpu/arm926ejs/versatile/timer.c0
-rw-r--r--cpu/mpc512x/diu.c4
-rw-r--r--[-rwxr-xr-x]drivers/i2c/Makefile0
-rw-r--r--[-rwxr-xr-x]drivers/i2c/spr_i2c.c0
-rw-r--r--drivers/mmc/mxcmmc.c36
-rw-r--r--[-rwxr-xr-x]drivers/mtd/Makefile0
-rw-r--r--[-rwxr-xr-x]drivers/mtd/nand/spr_nand.c0
-rw-r--r--[-rwxr-xr-x]drivers/mtd/spr_smi.c0
-rw-r--r--drivers/pci/pci.c2
-rw-r--r--[-rwxr-xr-x]drivers/serial/usbtty.h0
-rw-r--r--[-rwxr-xr-x]drivers/usb/gadget/Makefile0
-rw-r--r--[-rwxr-xr-x]drivers/usb/gadget/spr_udc.c0
-rw-r--r--include/asm-arm/arch-at91/at91_matrix.h2
-rw-r--r--[-rwxr-xr-x]include/asm-arm/arch-spear/spr_gpt.h0
-rw-r--r--[-rwxr-xr-x]include/asm-arm/arch-spear/spr_i2c.h0
-rw-r--r--[-rwxr-xr-x]include/asm-arm/arch-spear/spr_smi.h0
-rw-r--r--[-rwxr-xr-x]include/asm-arm/arch-spear/spr_xloader_table.h0
-rw-r--r--[-rwxr-xr-x]include/configs/spear3xx.h0
-rw-r--r--[-rwxr-xr-x]include/configs/spear6xx.h0
-rw-r--r--[-rwxr-xr-x]include/usb/spr_udc.h0
-rw-r--r--lib_generic/crc32.c2
-rw-r--r--[-rwxr-xr-x]lib_m68k/bootm.c0
-rw-r--r--net/tftp.c23
43 files changed, 65 insertions, 35 deletions
diff --git a/README b/README
index 1158e24de7..940b507942 100644
--- a/README
+++ b/README
@@ -3005,7 +3005,9 @@ environment. As long as you don't save the environment you are
working with an in-memory copy. In case the Flash area containing the
environment is erased by accident, a default environment is provided.
-Some configuration options can be set using Environment Variables:
+Some configuration options can be set using Environment Variables.
+
+List of environment variables (most likely not complete):
baudrate - see CONFIG_BAUDRATE
@@ -3117,7 +3119,7 @@ Some configuration options can be set using Environment Variables:
available network interfaces.
It just stays at the currently selected interface.
- netretry - When set to "no" each network operation will
+ netretry - When set to "no" each network operation will
either succeed or fail without retrying.
When set to "once" the network operation will
fail when all the available network interfaces
@@ -3133,7 +3135,18 @@ Some configuration options can be set using Environment Variables:
tftpdstport - If this is set, the value is used for TFTP's UDP
destination port instead of the Well Know Port 69.
- vlan - When set to a value < 4095 the traffic over
+ tftpblocksize - Block size to use for TFTP transfers; if not set,
+ we use the TFTP server's default block size
+
+ tftptimeout - Retransmission timeout for TFTP packets (in milli-
+ seconds, minimum value is 1000 = 1 second). Defines
+ when a packet is considered to be lost so it has to
+ be retransmitted. The default is 5000 = 5 seconds.
+ Lowering this value may make downloads succeed
+ faster in networks with high packet loss rates or
+ with unreliable TFTP servers.
+
+ vlan - When set to a value < 4095 the traffic over
Ethernet is encapsulated/received over 802.1q
VLAN tagged frames.
diff --git a/board/spear/common/spr_lowlevel_init.S b/board/spear/common/spr_lowlevel_init.S
index 6fbe579a65..6fbe579a65 100755..100644
--- a/board/spear/common/spr_lowlevel_init.S
+++ b/board/spear/common/spr_lowlevel_init.S
diff --git a/board/spear/common/spr_misc.c b/board/spear/common/spr_misc.c
index e35691200d..e35691200d 100755..100644
--- a/board/spear/common/spr_misc.c
+++ b/board/spear/common/spr_misc.c
diff --git a/board/spear/spear300/Makefile b/board/spear/spear300/Makefile
index b5168ffe88..b5168ffe88 100755..100644
--- a/board/spear/spear300/Makefile
+++ b/board/spear/spear300/Makefile
diff --git a/board/spear/spear300/config.mk b/board/spear/spear300/config.mk
index 35646f2193..35646f2193 100755..100644
--- a/board/spear/spear300/config.mk
+++ b/board/spear/spear300/config.mk
diff --git a/board/spear/spear300/spear300.c b/board/spear/spear300/spear300.c
index 60ee54470e..60ee54470e 100755..100644
--- a/board/spear/spear300/spear300.c
+++ b/board/spear/spear300/spear300.c
diff --git a/board/spear/spear310/Makefile b/board/spear/spear310/Makefile
index e67e941cf9..e67e941cf9 100755..100644
--- a/board/spear/spear310/Makefile
+++ b/board/spear/spear310/Makefile
diff --git a/board/spear/spear310/config.mk b/board/spear/spear310/config.mk
index cba843620c..cba843620c 100755..100644
--- a/board/spear/spear310/config.mk
+++ b/board/spear/spear310/config.mk
diff --git a/board/spear/spear310/spear310.c b/board/spear/spear310/spear310.c
index 03dfe16175..03dfe16175 100755..100644
--- a/board/spear/spear310/spear310.c
+++ b/board/spear/spear310/spear310.c
diff --git a/board/spear/spear320/Makefile b/board/spear/spear320/Makefile
index 1b80586ff1..1b80586ff1 100755..100644
--- a/board/spear/spear320/Makefile
+++ b/board/spear/spear320/Makefile
diff --git a/board/spear/spear320/config.mk b/board/spear/spear320/config.mk
index cba843620c..cba843620c 100755..100644
--- a/board/spear/spear320/config.mk
+++ b/board/spear/spear320/config.mk
diff --git a/board/spear/spear320/spear320.c b/board/spear/spear320/spear320.c
index 2ba2dbb566..2ba2dbb566 100755..100644
--- a/board/spear/spear320/spear320.c
+++ b/board/spear/spear320/spear320.c
diff --git a/board/spear/spear600/Makefile b/board/spear/spear600/Makefile
index 1978002fc5..1978002fc5 100755..100644
--- a/board/spear/spear600/Makefile
+++ b/board/spear/spear600/Makefile
diff --git a/board/spear/spear600/config.mk b/board/spear/spear600/config.mk
index 35646f2193..35646f2193 100755..100644
--- a/board/spear/spear600/config.mk
+++ b/board/spear/spear600/config.mk
diff --git a/board/spear/spear600/spear600.c b/board/spear/spear600/spear600.c
index eef9a3771c..eef9a3771c 100755..100644
--- a/board/spear/spear600/spear600.c
+++ b/board/spear/spear600/spear600.c
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 0e3393b5f4..c67c9cf728 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -136,7 +136,7 @@ int do_mmcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
U_BOOT_CMD(mmcinfo, 2, 0, do_mmcinfo,
- "mmcinfo <dev num>-- display MMC info\n",
+ "mmcinfo <dev num>-- display MMC info",
""
);
diff --git a/common/console.c b/common/console.c
index dc0d13b5a5..51c6fb6264 100644
--- a/common/console.c
+++ b/common/console.c
@@ -659,10 +659,14 @@ int console_init_r(void)
#ifdef CONFIG_SPLASH_SCREEN
/*
* suppress all output if splash screen is enabled and we have
- * a bmp to display
+ * a bmp to display. We redirect the output from frame buffer
+ * console to serial console in this case or suppress it if
+ * "silent" mode was requested.
*/
- if (getenv("splashimage") != NULL)
- gd->flags |= GD_FLG_SILENT;
+ if (getenv("splashimage") != NULL) {
+ if (!(gd->flags & GD_FLG_SILENT))
+ outputdev = search_device (DEV_FLAGS_OUTPUT, "serial");
+ }
#endif
/* Scan devices looking for input and output devices */
diff --git a/cpu/arm926ejs/spear/Makefile b/cpu/arm926ejs/spear/Makefile
index bf8dfa8c3c..bf8dfa8c3c 100755..100644
--- a/cpu/arm926ejs/spear/Makefile
+++ b/cpu/arm926ejs/spear/Makefile
diff --git a/cpu/arm926ejs/spear/reset.c b/cpu/arm926ejs/spear/reset.c
index 73ad86da30..73ad86da30 100755..100644
--- a/cpu/arm926ejs/spear/reset.c
+++ b/cpu/arm926ejs/spear/reset.c
diff --git a/cpu/arm926ejs/spear/timer.c b/cpu/arm926ejs/spear/timer.c
index 06858b4a13..06858b4a13 100755..100644
--- a/cpu/arm926ejs/spear/timer.c
+++ b/cpu/arm926ejs/spear/timer.c
diff --git a/cpu/arm926ejs/versatile/timer.c b/cpu/arm926ejs/versatile/timer.c
index 563db36548..563db36548 100755..100644
--- a/cpu/arm926ejs/versatile/timer.c
+++ b/cpu/arm926ejs/versatile/timer.c
diff --git a/cpu/mpc512x/diu.c b/cpu/mpc512x/diu.c
index a24f39510e..ca459a101e 100644
--- a/cpu/mpc512x/diu.c
+++ b/cpu/mpc512x/diu.c
@@ -145,10 +145,10 @@ void *video_hw_init(void)
struct fb_info *info;
if (mpc5121_diu_init() < 0)
- return;
+ return NULL;
/* fill in Graphic device struct */
- sprintf(pGD->modeIdent, "%dx%dx%d %ldkHz %ldHz",
+ sprintf(pGD->modeIdent, "%dx%dx%d %dkHz %dHz",
xres, yres, 32, 64, 60);
pGD->frameAdrs = (unsigned int)fsl_fb_open(&info);
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 29bda85dbd..29bda85dbd 100755..100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
diff --git a/drivers/i2c/spr_i2c.c b/drivers/i2c/spr_i2c.c
index eabfe843f7..eabfe843f7 100755..100644
--- a/drivers/i2c/spr_i2c.c
+++ b/drivers/i2c/spr_i2c.c
diff --git a/drivers/mmc/mxcmmc.c b/drivers/mmc/mxcmmc.c
index d30717661f..59639539f3 100644
--- a/drivers/mmc/mxcmmc.c
+++ b/drivers/mmc/mxcmmc.c
@@ -136,14 +136,14 @@ static void mxcmci_softreset(struct mxcmci_host *host)
int i;
/* reset sequence */
- writew(STR_STP_CLK_RESET, &host->base->str_stp_clk);
- writew(STR_STP_CLK_RESET | STR_STP_CLK_START_CLK,
+ writel(STR_STP_CLK_RESET, &host->base->str_stp_clk);
+ writel(STR_STP_CLK_RESET | STR_STP_CLK_START_CLK,
&host->base->str_stp_clk);
for (i = 0; i < 8; i++)
- writew(STR_STP_CLK_START_CLK, &host->base->str_stp_clk);
+ writel(STR_STP_CLK_START_CLK, &host->base->str_stp_clk);
- writew(0xff, &host->base->res_to);
+ writel(0xff, &host->base->res_to);
}
static void mxcmci_setup_data(struct mxcmci_host *host, struct mmc_data *data)
@@ -154,8 +154,8 @@ static void mxcmci_setup_data(struct mxcmci_host *host, struct mmc_data *data)
host->data = data;
- writew(nob, &host->base->nob);
- writew(blksz, &host->base->blk_len);
+ writel(nob, &host->base->nob);
+ writel(blksz, &host->base->blk_len);
host->datasize = datasize;
}
@@ -185,9 +185,9 @@ static int mxcmci_start_cmd(struct mxcmci_host *host, struct mmc_cmd *cmd,
return -EINVAL;
}
- writew(cmd->cmdidx, &host->base->cmd);
+ writel(cmd->cmdidx, &host->base->cmd);
writel(cmd->cmdarg, &host->base->arg);
- writew(cmdat, &host->base->cmd_dat_cont);
+ writel(cmdat, &host->base->cmd_dat_cont);
return 0;
}
@@ -247,14 +247,14 @@ static int mxcmci_read_response(struct mxcmci_host *host, unsigned int stat)
if (cmd->resp_type & MMC_RSP_PRESENT) {
if (cmd->resp_type & MMC_RSP_136) {
for (i = 0; i < 4; i++) {
- a = readw(&host->base->res_fifo);
- b = readw(&host->base->res_fifo);
+ a = readl(&host->base->res_fifo) & 0xFFFF;
+ b = readl(&host->base->res_fifo) & 0xFFFF;
resp[i] = a << 16 | b;
}
} else {
- a = readw(&host->base->res_fifo);
- b = readw(&host->base->res_fifo);
- c = readw(&host->base->res_fifo);
+ a = readl(&host->base->res_fifo) & 0xFFFF;
+ b = readl(&host->base->res_fifo) & 0xFFFF;
+ c = readl(&host->base->res_fifo) & 0xFFFF;
resp[0] = a << 24 | b << 8 | c >> 8;
}
}
@@ -445,7 +445,7 @@ static void mxcmci_set_clk_rate(struct mxcmci_host *host, unsigned int clk_ios)
prescaler <<= 1;
}
- writew((prescaler << 4) | divider, &host->base->clk_rate);
+ writel((prescaler << 4) | divider, &host->base->clk_rate);
}
static void mxcmci_set_ios(struct mmc *mmc)
@@ -458,9 +458,9 @@ static void mxcmci_set_ios(struct mmc *mmc)
if (mmc->clock) {
mxcmci_set_clk_rate(host, mmc->clock);
- writew(STR_STP_CLK_START_CLK, &host->base->str_stp_clk);
+ writel(STR_STP_CLK_START_CLK, &host->base->str_stp_clk);
} else {
- writew(STR_STP_CLK_STOP_CLK, &host->base->str_stp_clk);
+ writel(STR_STP_CLK_STOP_CLK, &host->base->str_stp_clk);
}
host->clock = mmc->clock;
@@ -472,7 +472,7 @@ static int mxcmci_init(struct mmc *mmc)
mxcmci_softreset(host);
- host->rev_no = readw(&host->base->rev_no);
+ host->rev_no = readl(&host->base->rev_no);
if (host->rev_no != 0x400) {
printf("wrong rev.no. 0x%08x. aborting.\n",
host->rev_no);
@@ -480,7 +480,7 @@ static int mxcmci_init(struct mmc *mmc)
}
/* recommended in data sheet */
- writew(0x2db4, &host->base->read_to);
+ writel(0x2db4, &host->base->read_to);
writel(0, &host->base->int_cntr);
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index cbf6f156b4..cbf6f156b4 100755..100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
diff --git a/drivers/mtd/nand/spr_nand.c b/drivers/mtd/nand/spr_nand.c
index 097d0c60bf..097d0c60bf 100755..100644
--- a/drivers/mtd/nand/spr_nand.c
+++ b/drivers/mtd/nand/spr_nand.c
diff --git a/drivers/mtd/spr_smi.c b/drivers/mtd/spr_smi.c
index 9a70a199c8..9a70a199c8 100755..100644
--- a/drivers/mtd/spr_smi.c
+++ b/drivers/mtd/spr_smi.c
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d6d2d6e4ad..cd64a87fc6 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -388,7 +388,7 @@ int pci_hose_config_device(struct pci_controller *hose,
pci_hose_write_config_dword (hose, dev, PCI_COMMAND, 0);
- for (bar = PCI_BASE_ADDRESS_0; bar < PCI_BASE_ADDRESS_5; bar += 4) {
+ for (bar = PCI_BASE_ADDRESS_0; bar <= PCI_BASE_ADDRESS_5; bar += 4) {
pci_hose_write_config_dword (hose, dev, bar, 0xffffffff);
pci_hose_read_config_dword (hose, dev, bar, &bar_response);
diff --git a/drivers/serial/usbtty.h b/drivers/serial/usbtty.h
index a23169a29d..a23169a29d 100755..100644
--- a/drivers/serial/usbtty.h
+++ b/drivers/serial/usbtty.h
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index 1d7362dc97..1d7362dc97 100755..100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
diff --git a/drivers/usb/gadget/spr_udc.c b/drivers/usb/gadget/spr_udc.c
index f2b06d68e2..f2b06d68e2 100755..100644
--- a/drivers/usb/gadget/spr_udc.c
+++ b/drivers/usb/gadget/spr_udc.c
diff --git a/include/asm-arm/arch-at91/at91_matrix.h b/include/asm-arm/arch-at91/at91_matrix.h
index 9b3c110f52..981ec2029c 100644
--- a/include/asm-arm/arch-at91/at91_matrix.h
+++ b/include/asm-arm/arch-at91/at91_matrix.h
@@ -80,7 +80,7 @@ typedef struct at91_matrix {
u32 mrcr; /* 0x100 Master Remap Control */
u32 reserve4[3];
#if defined(CONFIG_AT91SAM9G45)
- u32 ccr[52] /* 0x110 - 0x1E0 Chip Configuration */
+ u32 ccr[52]; /* 0x110 - 0x1E0 Chip Configuration */
u32 womr; /* 0x1E4 Write Protect Mode */
u32 wpsr; /* 0x1E8 Write Protect Status */
u32 resg45_1[10];
diff --git a/include/asm-arm/arch-spear/spr_gpt.h b/include/asm-arm/arch-spear/spr_gpt.h
index 965b5abb9a..965b5abb9a 100755..100644
--- a/include/asm-arm/arch-spear/spr_gpt.h
+++ b/include/asm-arm/arch-spear/spr_gpt.h
diff --git a/include/asm-arm/arch-spear/spr_i2c.h b/include/asm-arm/arch-spear/spr_i2c.h
index 7521ebc6cf..7521ebc6cf 100755..100644
--- a/include/asm-arm/arch-spear/spr_i2c.h
+++ b/include/asm-arm/arch-spear/spr_i2c.h
diff --git a/include/asm-arm/arch-spear/spr_smi.h b/include/asm-arm/arch-spear/spr_smi.h
index 06df74557f..06df74557f 100755..100644
--- a/include/asm-arm/arch-spear/spr_smi.h
+++ b/include/asm-arm/arch-spear/spr_smi.h
diff --git a/include/asm-arm/arch-spear/spr_xloader_table.h b/include/asm-arm/arch-spear/spr_xloader_table.h
index 7e3da18578..7e3da18578 100755..100644
--- a/include/asm-arm/arch-spear/spr_xloader_table.h
+++ b/include/asm-arm/arch-spear/spr_xloader_table.h
diff --git a/include/configs/spear3xx.h b/include/configs/spear3xx.h
index 0248abadc9..0248abadc9 100755..100644
--- a/include/configs/spear3xx.h
+++ b/include/configs/spear3xx.h
diff --git a/include/configs/spear6xx.h b/include/configs/spear6xx.h
index 2ad5beb82c..2ad5beb82c 100755..100644
--- a/include/configs/spear6xx.h
+++ b/include/configs/spear6xx.h
diff --git a/include/usb/spr_udc.h b/include/usb/spr_udc.h
index 2c332d5999..2c332d5999 100755..100644
--- a/include/usb/spr_udc.h
+++ b/include/usb/spr_udc.h
diff --git a/lib_generic/crc32.c b/lib_generic/crc32.c
index 468b3979ab..27335a3ed9 100644
--- a/lib_generic/crc32.c
+++ b/lib_generic/crc32.c
@@ -163,7 +163,7 @@ const uint32_t * ZEXPORT get_crc_table()
#endif
/* ========================================================================= */
-# ifdef __LITTLE_ENDIAN
+# if __BYTE_ORDER == __LITTLE_ENDIAN
# define DO_CRC(x) crc = tab[(crc ^ (x)) & 255] ^ (crc >> 8)
# else
# define DO_CRC(x) crc = tab[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)
diff --git a/lib_m68k/bootm.c b/lib_m68k/bootm.c
index e5ed6eb7cc..e5ed6eb7cc 100755..100644
--- a/lib_m68k/bootm.c
+++ b/lib_m68k/bootm.c
diff --git a/net/tftp.c b/net/tftp.c
index a02463b003..ed559b71d5 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -211,7 +211,7 @@ TftpSend (void)
pkt += 5 /*strlen("octet")*/ + 1;
strcpy ((char *)pkt, "timeout");
pkt += 7 /*strlen("timeout")*/ + 1;
- sprintf((char *)pkt, "%lu", TIMEOUT / 1000);
+ sprintf((char *)pkt, "%lu", TftpTimeoutMSecs / 1000);
debug("send option \"timeout %s\"\n", (char *)pkt);
pkt += strlen((char *)pkt) + 1;
#ifdef CONFIG_TFTP_TSIZE
@@ -413,7 +413,6 @@ TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len)
}
TftpLastBlock = TftpBlock;
- TftpTimeoutMSecs = TIMEOUT;
TftpTimeoutCountMax = TIMEOUT_COUNT;
NetSetTimeout (TftpTimeoutMSecs, TftpTimeout);
@@ -528,10 +527,25 @@ TftpStart (void)
{
char *ep; /* Environment pointer */
- /* Allow the user to choose tftpblocksize */
+ /*
+ * Allow the user to choose TFTP blocksize and timeout.
+ * TFTP protocol has a minimal timeout of 1 second.
+ */
if ((ep = getenv("tftpblocksize")) != NULL)
TftpBlkSizeOption = simple_strtol(ep, NULL, 10);
- debug("tftp block size is %i\n", TftpBlkSizeOption);
+
+ if ((ep = getenv("tftptimeout")) != NULL)
+ TftpTimeoutMSecs = simple_strtol(ep, NULL, 10);
+
+ if (TftpTimeoutMSecs < 1000) {
+ printf("TFTP timeout (%ld ms) too low, "
+ "set minimum = 1000 ms\n",
+ TftpTimeoutMSecs);
+ TftpTimeoutMSecs = 1000;
+ }
+
+ debug("TFTP blocksize = %i, timeout = %ld ms\n",
+ TftpBlkSizeOption, TftpTimeoutMSecs);
TftpServerIP = NetServerIP;
if (BootFile[0] == '\0') {
@@ -588,7 +602,6 @@ TftpStart (void)
puts ("Loading: *\b");
- TftpTimeoutMSecs = TftpRRQTimeoutMSecs;
TftpTimeoutCountMax = TftpRRQTimeoutCountMax;
NetSetTimeout (TftpTimeoutMSecs, TftpTimeout);