aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)AuthorFilesLines
2011-04-13Merge branch 'sf' of git://git.denx.de/u-boot-blackfinWolfgang Denk1-36/+75
2011-04-13x86: Rename i386 to x86Graeme Russ1-1/+1
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-04-12common/cmd_bdinfo.c: fix do_bdinfo() for AVR32Andreas Bießmann1-1/+1
This patch fixes following warning message: ---8<--- cmd_bdinfo.c:458: warning: initialization from incompatible pointer type --->8--- There was a prototype change in 54841ab50c20d6fa6c9cc3eb826989da3a22d934 for argv[] pointer type to const. This change was not made for AVR32 cause this code came in later by a merge. Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
2011-04-12cmd_nvedit: use explicit typecast for printfAndreas Bießmann1-2/+2
This patch fixes warnings in MAKEALL for avr32: ---8<--- cmd_nvedit.c: In function 'do_env_export': cmd_nvedit.c:663: warning: format '%zX' expects type 'size_t', but argument 3 has type 'ssize_t' --->8--- Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
2011-04-12Fix misc spelling errors found by lintianLoïc Minier2-2/+2
Signed-off-by: Loïc Minier <loic.minier@linaro.org>
2011-04-12cmd_sf: use cmd_usage() in more placesMike Frysinger1-30/+29
Requires a little reworking of the code flow with sub-functions, but not a big deal. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-12cmd_sf: drop device status message when probingMike Frysinger1-3/+0
The common spi flash layer displays useful info when probing, so no need for us to duplicate that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-12cmd_sf: add handler for +len arg for erase commandRichard Retanubun1-4/+47
This patch adds [+]len handler for the erase command that will automatically round up the requested erase length to the flash's sector_size. Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-11bootm: replace blob_start with image_startLei Wen1-1/+1
For uImage always has a 64 bytes header, we couldn't expect to do the xip from the header but should xip from the image start. The latter logic in that section is also move the image from image_start to the load address, so sync this logic to the xip operation. Signed-off-by: Lei Wen <leiwen@marvell.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-04-08Blackfin: ldrinfo: new commandMike Frysinger2-0/+193
Simple command to decode/check an LDR image before we try to boot it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-08Blackfin: bootldr: use common definesMike Frysinger1-13/+8
Now that the common bootrom.h sets up defines for us, switch to them rather than our own local set. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-05Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk2-5/+28
Conflicts: drivers/usb/host/ehci-pci.c Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-04-04env_mmc: Allow board code to override the environment addressMingkai Hu1-4/+27
On some boards the environment may not be located at a fixed address in the MMC/SDHC card. This allows those boards to implement their own means to report what address the environment is located at. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Signed-off-by: Zhao Chenhui <b35336@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-04-04mpc8xxx: DDR2/DDR3: Clean up DIMM-type switch statementsKyle Moffett1-1/+1
The numeric constants in the switch statements are replaced by #defines added to the common ddr_spd.h header. This dramatically improves the readability of the switch statments. In addition, a few of the longer lines were cleaned up, and the DDR2 type for an SO-RDIMM module was added to the DDR2 switch statement. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Cc: Andy Fleming <afleming@gmail.com> Cc: Kim Phillips <kim.phillips@freescale.com> Acked-by: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-04-02Remove unnecessary reset in usb_stor_get_infoErik Hansen1-25/+0
The reset request in usb_stor_get_info is causing issues with some usb sticks. Some of these sticks vendor_id/product_id have been hardcoded to not reset but better is to remove the reset altogether. It is not needed. Signed-off-by: Erik Hansen <erik@makarta.com>
2011-03-21UBI: Fix error code handling in ubi commandsStefan Roese1-72/+65
Some ubi commands returned negative error codes, resulting in the following error message on the prompt: "exit not allowed from main input shell." Negative error codes are not allowed. This patch now changes the UBI code to return positive error codes. Additionally "better" error codes are used, for example "ENOMEM" when no memory is available for the UBI volume creation any more. Also the output of some commands is enhanced: Before: => ubi read 100000 testvol 100000 Volume testvol found at volume id 0 read 1048576 bytes from volume 0 to 100000(buf address) => ubi write 100000 testvol 1000 Volume testvol found at volume id 0 After: => ubi read 100000 testvol 100000 Read 1048576 bytes from volume testvol to 00100000 => ubi write 100000 testvol 1000 4096 bytes written to volume testvol Signed-off-by: Stefan Roese <sr@denx.de> Cc: Wolfgang Denk <wd@denx.de>
2011-02-21serial: Add Tegra2 serial port supportTom Warren1-1/+2
Signed-off-by: Tom Warren <twarren@nvidia.com>
2011-02-19Fix build warnings in cmd_flash.cRemy Bohmer1-4/+4
These variables are only used in case CONFIG_SYS_NO_FLASH is NOT set: struct mtd_device *dev; struct part_info *part; u8 dev_type, dev_num, pnum; Signed-off-by: Remy Bohmer <linux@bohmer.net>
2011-02-19Add USB host ethernet adapter supportSimon Glass2-3/+15
This adds support for using USB Ethernet dongles in host mode. This is just the framework - drivers will come later. A new config option called CONFIG_USB_HOST_ETHER can be defined in board config files to switch this on. The was originally written by NVIDIA and was cleaned up for release by the Chromium authors. Signed-off-by: Simon Glass <sjg@chromium.org>
2011-02-15unzip: return uncompressed size in `filesize', and print it.Wolfgang Denk1-1/+9
The unzip command did not provide a way for the caller to get any information about the uncompressed size. To make it better usable in scripts, we now store the uncompressed size in the `filesize' variable, like we do when for example loading a file over the network or when reading it from a file system. Following that analogy, it is only consequent to also print the size. Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-02-15itest: fix result of string comparesWolfgang Denk1-5/+2
The implementation of the string compare function of the "itest" command was weird, as only the length of the shortest argument was included in the compare, with the result that something like "itest.s abd == abddef" would return TRUE. Fix this. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
2011-02-12Merge branch 'master' of git://git.denx.de/u-boot-mipsWolfgang Denk1-1/+2
2011-02-09cmd_bmp.c: message about compressed formats is debug info only.Wolfgang Denk1-1/+1
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Anatolij Gustschin <agust@denx.de>
2011-02-08NAND: env: remember the flags used in the previous environmentScott Wood1-1/+5
Previously, uninitialized stack space was being referenced. Signed-off-by: Scott Wood <scottwood@freescale.com>
2011-02-05USB: Change the necessary defines to get debug outputAlexander Holler1-3/+4
While debugging some USB stuff, I've first missed that there are actually two defines necessary to get usefull output. The one needed to get debug output for the communication with HUBs was burried somewhere deep inside the code. Change that so that a #define DEBUG is enough while still leaving the possibility to reduce unwanted debug output. Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2011-02-05USB: Fix device stati for removable and powerctrl (typo)Alexander Holler1-1/+1
I currently don't know if the error could have other consequences than a wrong output when turning debug on. Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2011-02-05cmd_ide: Fix an unused CONFIG_AU1X00 symbol to work as intendedShinya Kuribayashi1-1/+2
commit 8bde63eb3f79d68f693201528dafc8ae7aa087de ([MIPS] Rename Alchemy processor configs into CONFIG_SOC_*) forgot to pick up this one. Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>
2011-02-02NAND: Fix saving of redundand environmentAlexander Holler1-1/+1
When redundand environments are used the serial needs to get increased, otherwise the old one will still be used. Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2011-02-02Minor Coding Style Cleanup.Wolfgang Denk1-2/+2
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-02-02Print compiler and linker version with the version commandAlexander Holler1-1/+8
After years of unsuccessful research I've finally shamelessly stolen other peoples intellectual properties to present the all-new and world-changing updated version command: - U-Boot>> version U-Boot 2010.12-00014-g7435056-dirty (Jan 18 2011 - 23:19:38) MyBoard gcc (GCC) 0.42 (Distro foobar) GNU ld (GNU Binutils) 0.314159265 - May the toolchain bugs rest in peace. Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2011-01-27lcd: align fb writing address for horizontal display offsetLiu Ying1-1/+1
CONFIG_SPLASH_SCREEN_ALIGN makes uboot support display offset for splashimage. The framebuffer writing address should be calculated according to different kinds of framebuffer pixel format, i.e., bits per pixel value. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
2011-01-25Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk1-42/+44
2011-01-19powerpc/8xxx: Add hwconfig APIs to address early parsing used by DDR initKumar Gala1-42/+44
There are several users of the hwconfig APIs (8xxx DDR) before we have the environment properly setup. This causes issues because of the numerous ways the environment might be accessed because of the non-volatile memory it might be stored in. Additionally the access might be so early that memory isn't even properly setup for us. Towards resolving these issues we provide versions of all the hwconfig APIs that can be passed in a buffer to parse and leave it to the caller to determine how to allocate and populate the buffer. We use the _f naming convention for these new APIs even though they are perfectly useable after relocation and the environment being ready. We also now warn if the non-f APIs are called before the environment is ready to allow users to address the issues. Finally, we convert the 8xxx DDR code to utilize the new APIs to hopefully address the issue once and for all. We have the 8xxx DDR code create a buffer on the stack and populate it via getenv_f(). Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Wolfgang Denk <wd@denx.de>
2011-01-19Fix defines needed to enable command sha1sumAlexander Holler1-2/+2
Documented is CONFIG_CMD_SHA1, through confusion in the source CONFIG_CMD_SHA1 and CONFIG_CMD_SHA1SUM has to be used to enable sha1sum. Fix both, the documentation and the source, so that only CONFIG_CMD_SHA1SUM is needed to enable the command sha1sum. Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2011-01-19cmd_jffs2: Fix get_part_sector_size_nor() overflow bugPeter Tyser1-1/+1
When a flash partition was positioned at the very top of a 32-bit memory map (eg located at 0xf8000000 with a size of 0x8000000) get_part_sector_size_nor() would incorrectly calculate the partition's ending address to 0x0 due to overflow. When the overflow occurred get_part_sector_size_nor() would falsely return a sector size of 0. A sector size of 0 results in subsequent jffs2 operations failing. To workaround the overflow subtract 1 from calculated address of the partition endpoint. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2011-01-12NAND: add the ability to directly write yaffs imageLei Wen1-1/+14
This patch add addition suffix to nand write to give the uboot the power to directly burn the yaffs image to nand. Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-01-11Revert "boot cmds: convert to getenv_yesno() with autostart"Wolfgang Denk7-8/+9
This reverts commit 5a442c0addc69d0c4b58e98e5aec1cf07576debb. This commit changed the behaviour of getenv_yesno() (both the default behaviour and the documented behaviour for abbreviated arguments) which resulted in problems in several areas. Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-01-09miiphy: convert to linux/mii.hMike Frysinger2-40/+39
The include/miiphy.h header duplicates a lot of things from linux/mii.h. So punt all the things that overlap to keep the API simple and to make merging between U-Boot and Linux simpler. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09cmd editing: mark erase/tab seqs constantMike Frysinger1-2/+2
These strings are only read, so no need to have them be writable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09cmd_mem: localize state variablesMike Frysinger1-3/+3
These "last" variables aren't used outside of this file, so add static. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09load_addr: move to common env codeMike Frysinger2-1/+2
Rather than keep the load_addr definition with the bootm code (which just happens to use this), move it to the common env code. This way we can disable bootm support completely while retaining load_addr usage with many other commands. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09config_cmd_defaults.h: new header for common u-boot command defaultsMike Frysinger1-1/+1
We have config_defaults.h which are random configuration settings that everyone gets by default. We also have config_cmd_default.h which is a recommended list of defaults but boards have to opt into. Now we have config_cmd_defaults.h which is a list of defaults that everyone gets and has to actively opt out of. For now, we populate it with the bootm command which previously was unable to be disabled. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09env: re-add support for auto-completionMike Frysinger2-27/+16
Currently, only basic completion is supported (no globs), but this is what we had previously. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-23cmd_net.c: fix build breakageWolfgang Denk1-0/+1
Commit 722b061 "autocomplete: remove runtime handler install" caused some boards (like NETTA2_V2) to break with errors like these: cmd_net.c:296: error: expected expression before ',' token Fix this. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Mike Frysinger <vapier@gentoo.org>
2010-12-17onenand: add yaffs write commandLei Wen1-5/+36
Yaffs image require to use the oob to store some info, so when we burn the yaffs image, we need to also write the image's oob part into flash. This patch add addition suffix to onenand write to give the uboot the power to directly burn the yaffs image to onenand. Signed-off-by: Lei Wen <leiwen@marvell.com>
2010-12-17hashtable: drop all non-reentrant versionsMike Frysinger10-22/+24
The non-reentrant versions of the hashtable functions operate on a single shared hashtable. So if two different people try using these funcs for two different purposes, they'll cause problems for the other. Avoid this by converting all existing hashtable consumers over to the reentrant versions and then punting the non-reentrant ones. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-16Merge branch 'master' of ../master into nextWolfgang Denk5-16/+79
2010-12-09hwconfig: Fix handling of env_hwconfig, board_hwconfig, and cpu_hwconfigKumar Gala1-6/+9
The handling of env_hwconfig, board_hwconfig, and cpu_hwconfig got broken when we removed the boards defining dummy board_hwconfig & cpu_hwconfig values. We fix this by handling the various strings in priority order. If hwconfig_parse returns NULL for a given string we check the next one in order (env_hwconfig, board_hwconfig, followed by cpu_hwconfig). Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-12-07onenand: fix oob print out issueLei Wen1-1/+3
Seems original implementation forget to set the pointer to point to the oobbuf, so when we want to see oob buf, we see nothing... Fix it by get pointer as the oobbuf set. Signed-off-by: Lei Wen <leiwen@marvell.com>
2010-12-06env_nand: Use nand_read_skip_bad instead of nand_readSteve Sakoman1-1/+1
The nand-read function returns an error code if correctable errors have occurred. This is not desirable, since the errors have been corrected! This patch switches to the nand_read_skip_bad function which does not return an error code if the errors are correctable. Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org> Acked-by: Scott Wood <scottwood@freescale.com>