From 8cbf4e4f17121d732e78764f0ba317c9a1838ea6 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 6 Dec 2009 00:26:19 +0100 Subject: [PATCH 01/12] Fix out-of-tree building of "apollon" board. Signed-off-by: Wolfgang Denk --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index bcb3fe953a3..10abadfffaf 100644 --- a/Makefile +++ b/Makefile @@ -3257,6 +3257,7 @@ zylonite_config : ######################################################################### apollon_config : unconfig + @mkdir -p $(obj)include @echo "#define CONFIG_ONENAND_U_BOOT" > $(obj)include/config.h @$(MKCONFIG) $(@:_config=) arm arm1136 apollon NULL omap24xx @echo "CONFIG_ONENAND_U_BOOT = y" >> $(obj)include/config.mk From a9f99ab44b473fb394169ba365f8b4380f981584 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 6 Dec 2009 00:53:18 +0100 Subject: [PATCH 02/12] zlib.c: avoid build conflicts for cradle board Commit dce3d79710 updated the zlib code to v0.95; this caused conflicts when building for the "cradle" board, because the (pretty generic) preprocessor variable "OFF" was used in multiple files. Make sure to avoid further conflicts by #undef'ing it in zlib.c before redefining it. Signed-off-by: Wolfgang Denk cc: Giuseppe Condorelli cc: Angelo Castello cc: Alessandro Rubini --- lib_generic/zlib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib_generic/zlib.c b/lib_generic/zlib.c index 8fe3bd0dd12..ef1fa22806a 100644 --- a/lib_generic/zlib.c +++ b/lib_generic/zlib.c @@ -28,6 +28,8 @@ #include "u-boot/zlib.h" #include +#undef OFF /* avoid conflicts */ + /* To avoid a build time warning */ #ifdef STDC #include From 4713010adf5beda87410d637ebfc58db0db9a9db Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 6 Dec 2009 01:21:28 +0100 Subject: [PATCH 03/12] trab: fix warning: implicit declaration of function 'disable_vfd' Signed-off-by: Wolfgang Denk --- cpu/arm920t/s3c24x0/timer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpu/arm920t/s3c24x0/timer.c b/cpu/arm920t/s3c24x0/timer.c index 20cedd46396..a27f0e273ce 100644 --- a/cpu/arm920t/s3c24x0/timer.c +++ b/cpu/arm920t/s3c24x0/timer.c @@ -205,6 +205,8 @@ void reset_cpu(ulong ignored) struct s3c24x0_watchdog *watchdog; #ifdef CONFIG_TRAB + extern void disable_vfd(void); + disable_vfd(); #endif From e8fac25e83426fdf461c66aa8a2530ec28ec536e Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 7 Dec 2009 21:06:40 +0100 Subject: [PATCH 04/12] at91sam9261ek.c: fix minor coding style issue. Signed-off-by: Wolfgang Denk --- board/atmel/at91sam9261ek/at91sam9261ek.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c index 2f6b599a6ba..7ead2b8977c 100644 --- a/board/atmel/at91sam9261ek/at91sam9261ek.c +++ b/board/atmel/at91sam9261ek/at91sam9261ek.c @@ -265,11 +265,12 @@ int board_init(void) } #ifdef CONFIG_DRIVER_DM9000 - int board_eth_init(bd_t *bis) - { +int board_eth_init(bd_t *bis) +{ return dm9000_initialize(bis); - } - #endif +} +#endif + int dram_init(void) { gd->bd->bi_dram[0].start = PHYS_SDRAM; From f64ef9bb995687e24e0b61b52316f4eaa97c3bbc Mon Sep 17 00:00:00 2001 From: Ed Swarthout Date: Thu, 19 Nov 2009 02:47:28 -0600 Subject: [PATCH 05/12] fix nfs symlink name corruption An off by one error may cause nfs readlink lookup fail if nfs_path_buff has non-zero data from a previous use. Loading: *** ERROR: File lookup fail Signed-off-by: Ed Swarthout --- net/nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/nfs.c b/net/nfs.c index 27395fbf2e4..c39f616d9ba 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -516,7 +516,7 @@ nfs_readlink_reply (uchar *pkt, unsigned len) strcat (nfs_path, "/"); pathlen = strlen(nfs_path); memcpy (nfs_path+pathlen, (uchar *)&(rpc_pkt.u.reply.data[2]), rlen); - nfs_path[pathlen+rlen+1] = 0; + nfs_path[pathlen + rlen] = 0; } else { memcpy (nfs_path, (uchar *)&(rpc_pkt.u.reply.data[2]), rlen); nfs_path[rlen] = 0; From 45b6b65c6bf06a589ef3123192af94b0381db27b Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Wed, 11 Nov 2009 10:03:09 +0200 Subject: [PATCH 06/12] smc911x: fix typo in smc911x_handle_mac_address name Signed-off-by: Mike Rapoport --- drivers/net/smc911x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index c027abe9f7b..5d51406f6fa 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -37,7 +37,7 @@ void pkt_data_push(struct eth_device *dev, u32 addr, u32 val) \ #define mdelay(n) udelay((n)*1000) -static void smx911x_handle_mac_address(struct eth_device *dev) +static void smc911x_handle_mac_address(struct eth_device *dev) { unsigned long addrh, addrl; uchar *m = dev->enetaddr; @@ -155,7 +155,7 @@ static int smc911x_init(struct eth_device *dev, bd_t * bd) /* Configure the PHY, initialize the link state */ smc911x_phy_configure(dev); - smx911x_handle_mac_address(dev); + smc911x_handle_mac_address(dev); /* Turn on Tx + Rx */ smc911x_enable(dev); From c2fff331a32ceca837d76eb7827d6340da270d52 Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Wed, 11 Nov 2009 10:03:03 +0200 Subject: [PATCH 07/12] smc911x: update SMC911X related configuration description Since commit 736fead8fdbf8a8407048bebc373cd551d01ec98 "Convert SMC911X Ethernet driver to CONFIG_NET_MULTI API" SMC911X configration options are called CONFIG_SMC911X rather than CONFIG_DRIVER_SMC911X. Update README to reflect that change. Signed-off-by: Mike Rapoport --- README | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README b/README index 8047c778887..fe6ca98d82b 100644 --- a/README +++ b/README @@ -846,20 +846,20 @@ The following options need to be configured: Define this to use i/o functions instead of macros (some hardware wont work with macros) - CONFIG_DRIVER_SMC911X + CONFIG_SMC911X Support for SMSC's LAN911x and LAN921x chips - CONFIG_DRIVER_SMC911X_BASE + CONFIG_SMC911X_BASE Define this to hold the physical address of the device (I/O space) - CONFIG_DRIVER_SMC911X_32_BIT + CONFIG_SMC911X_32_BIT Define this if data bus is 32 bits - CONFIG_DRIVER_SMC911X_16_BIT + CONFIG_SMC911X_16_BIT Define this if data bus is 16 bits. If your processor automatically converts one 32 bit word to two 16 bit - words you may also try CONFIG_DRIVER_SMC911X_32_BIT. + words you may also try CONFIG_SMC911X_32_BIT. - USB Support: At the moment only the UHCI host controller is From a93c92cddaedd5f0720e0da15c6664f7a688b582 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Tue, 17 Nov 2009 07:30:23 -0500 Subject: [PATCH 08/12] help: Correct syntax of nandecc help output. "nandecc" help output should not reproduce the command name, nor have a trailing newline. Signed-off-by: Robert P. J. Day --- cpu/arm_cortexa8/omap3/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/arm_cortexa8/omap3/board.c b/cpu/arm_cortexa8/omap3/board.c index dd2c94073b3..2aa69b383b4 100644 --- a/cpu/arm_cortexa8/omap3/board.c +++ b/cpu/arm_cortexa8/omap3/board.c @@ -328,7 +328,7 @@ usage: U_BOOT_CMD( nandecc, 2, 1, do_switch_ecc, - "nandecc - switch OMAP3 NAND ECC calculation algorithm\n", + "switch OMAP3 NAND ECC calculation algorithm", "[hw/sw] - Switch between NAND hardware (hw) or software (sw) ecc algorithm" ); From 224c90d1060bf1a83cbf33ca51d060b9d19e0294 Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Wed, 18 Nov 2009 19:08:59 -0600 Subject: [PATCH 09/12] bootm: Fix help message's sub-command ordering The help message for the 'bootm' command listed the 'cmdline' and 'bdt' sub-commands in the wrong order which resulted in the error below when following the 'help' command's instructions: "Trying to execute a command out of order" Signed-off-by: Peter Tyser --- common/cmd_bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 401bf27d15d..e16552ec3a3 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -453,8 +453,8 @@ cmd_tbl_t cmd_bootm_sub[] = { #ifdef CONFIG_OF_LIBFDT U_BOOT_CMD_MKENT(fdt, 0, 1, (void *)BOOTM_STATE_FDT, "", ""), #endif - U_BOOT_CMD_MKENT(bdt, 0, 1, (void *)BOOTM_STATE_OS_BD_T, "", ""), U_BOOT_CMD_MKENT(cmdline, 0, 1, (void *)BOOTM_STATE_OS_CMDLINE, "", ""), + U_BOOT_CMD_MKENT(bdt, 0, 1, (void *)BOOTM_STATE_OS_BD_T, "", ""), U_BOOT_CMD_MKENT(prep, 0, 1, (void *)BOOTM_STATE_OS_PREP, "", ""), U_BOOT_CMD_MKENT(go, 0, 1, (void *)BOOTM_STATE_OS_GO, "", ""), }; @@ -1000,8 +1000,8 @@ U_BOOT_CMD( #if defined(CONFIG_OF_LIBFDT) "\tfdt - relocate flat device tree\n" #endif - "\tbdt - OS specific bd_t processing\n" "\tcmdline - OS specific command line processing/setup\n" + "\tbdt - OS specific bd_t processing\n" "\tprep - OS specific prep before relocation or go\n" "\tgo - start OS" ); From aabb8cb0818e285aeed0cfaf243635997e07554d Mon Sep 17 00:00:00 2001 From: Evan Samanas Date: Mon, 9 Nov 2009 20:08:36 -0600 Subject: [PATCH 10/12] nfs: NfsTimeout() updates - NfsTimeout() does not correctly update the NFS timeout value which results in NfsTimeout() only being called once in certain situations. This can result in the 'nfs' command hanging indefinetly. For example, the command: nfs 192.168.0.1:/home/user/file will not exit until ctrl-c is pressed if 192.168.0.1 does not have an NFS server running. This issue is resolved by reinitializting the NFS timeout value inside NfsTimeout() when a timeout occurs. - Make the 'nfs' command print the 'T' character when a timeout occurs. Previously there was no indication that timeouts were occuring. - Mimic the 'tftpboot' command and when a download fails print "Retry count exceeded; starting again", and restart the download taking the 'netretry' environment variable into account. Signed-off-by: Evan Samanas Signed-off-by: Peter Tyser Tested on TQM8xxL. Tested by: Wolfgang Denk Tested on MPC8527DS. Tested by: Ed Swarthout --- net/nfs.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/net/nfs.c b/net/nfs.c index c39f616d9ba..4017c3e3539 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -571,13 +571,14 @@ Interfaces of U-BOOT static void NfsTimeout (void) { - if ( NfsTimeoutCount++ < NFS_RETRY_COUNT ) { + if ( ++NfsTimeoutCount > NFS_RETRY_COUNT ) { + puts ("\nRetry count exceeded; starting again\n"); + NetStartAgain (); + } else { + puts("T "); + NetSetTimeout (NFS_TIMEOUT, NfsTimeout); NfsSend (); - return; } - puts ("Timeout\n"); - NetState = NETLOOP_FAIL; - return; } static void From 0ec81db20294efdad2454a753e79f1fe244a43ca Mon Sep 17 00:00:00 2001 From: Daniel Hobi Date: Tue, 1 Dec 2009 14:05:55 +0100 Subject: [PATCH 11/12] Fix computation in nand_util.c:get_len_incl_bad Depending on offset, flash size and the number of bad blocks, get_len_incl_bad may return a too small value which may lead to: 1) If there are no bad blocks, nand_{read,write}_skip_bad chooses the bad block aware read/write code. This may hurt performance, but does not have any adverse effects. 2) If there are bad blocks, the nand_{read,write}_skip_bad may choose the bad block unaware read/write code (if len_incl_bad == *length) which leads to corrupted data. Signed-off-by: Daniel Hobi --- drivers/mtd/nand/nand_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c index bec927706f9..7085d42cc1b 100644 --- a/drivers/mtd/nand/nand_util.c +++ b/drivers/mtd/nand/nand_util.c @@ -452,7 +452,7 @@ static size_t get_len_incl_bad (nand_info_t *nand, loff_t offset, len_incl_bad += block_len; offset += block_len; - if ((offset + len_incl_bad) >= nand->size) + if (offset >= nand->size) break; } From f8450829f921cf10667af98a8d08edfa3d998f04 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Tue, 1 Dec 2009 19:30:47 +0100 Subject: [PATCH 12/12] 52xx, manroland: add fdt_fixup_memory() in ft_board_setup() To update the real memory size in the memory node on the uc101 and mucmc52 boards call fdt_fixup_memory() in ft_board_setup(). Signed-off-by: Heiko Schocher --- board/mucmc52/mucmc52.c | 2 ++ board/uc101/uc101.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/board/mucmc52/mucmc52.c b/board/mucmc52/mucmc52.c index bac49befffe..b4ed7357e44 100644 --- a/board/mucmc52/mucmc52.c +++ b/board/mucmc52/mucmc52.c @@ -31,6 +31,7 @@ */ #include +#include #include #include #include @@ -403,5 +404,6 @@ void pci_init_board (void) void ft_board_setup(void *blob, bd_t *bd) { ft_cpu_setup(blob, bd); + fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); } #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ diff --git a/board/uc101/uc101.c b/board/uc101/uc101.c index 4030b9d0d83..1485c0249b5 100644 --- a/board/uc101/uc101.c +++ b/board/uc101/uc101.c @@ -31,6 +31,7 @@ */ #include +#include #include #include #include @@ -376,5 +377,6 @@ void hw_watchdog_reset(void) void ft_board_setup(void *blob, bd_t *bd) { ft_cpu_setup(blob, bd); + fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); } #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */