summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk2011-04-05-5/+28
|\ | | | | | | | | | | | | Conflicts: drivers/usb/host/ehci-pci.c Signed-off-by: Wolfgang Denk <wd@denx.de>
| * env_mmc: Allow board code to override the environment addressMingkai Hu2011-04-04-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>
| * mpc8xxx: DDR2/DDR3: Clean up DIMM-type switch statementsKyle Moffett2011-04-04-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>
* | Remove unnecessary reset in usb_stor_get_infoErik Hansen2011-04-02-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>
* UBI: Fix error code handling in ubi commandsStefan Roese2011-03-21-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>
* serial: Add Tegra2 serial port supportTom Warren2011-02-21-1/+2
| | | | Signed-off-by: Tom Warren <twarren@nvidia.com>
* Fix build warnings in cmd_flash.cRemy Bohmer2011-02-19-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>
* Add USB host ethernet adapter supportSimon Glass2011-02-19-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>
* unzip: return uncompressed size in `filesize', and print it.Wolfgang Denk2011-02-15-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>
* itest: fix result of string comparesWolfgang Denk2011-02-15-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>
* Merge branch 'master' of git://git.denx.de/u-boot-mipsWolfgang Denk2011-02-12-1/+2
|\
| * cmd_ide: Fix an unused CONFIG_AU1X00 symbol to work as intendedShinya Kuribayashi2011-02-05-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>
* | cmd_bmp.c: message about compressed formats is debug info only.Wolfgang Denk2011-02-09-1/+1
| | | | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Anatolij Gustschin <agust@denx.de>
* | NAND: env: remember the flags used in the previous environmentScott Wood2011-02-08-1/+5
| | | | | | | | | | | | Previously, uninitialized stack space was being referenced. Signed-off-by: Scott Wood <scottwood@freescale.com>
* | USB: Change the necessary defines to get debug outputAlexander Holler2011-02-05-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>
* | USB: Fix device stati for removable and powerctrl (typo)Alexander Holler2011-02-05-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>
* NAND: Fix saving of redundand environmentAlexander Holler2011-02-02-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>
* Minor Coding Style Cleanup.Wolfgang Denk2011-02-02-2/+2
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Print compiler and linker version with the version commandAlexander Holler2011-02-02-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>
* lcd: align fb writing address for horizontal display offsetLiu Ying2011-01-27-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>
* Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk2011-01-25-42/+44
|\
| * powerpc/8xxx: Add hwconfig APIs to address early parsing used by DDR initKumar Gala2011-01-19-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>
* | Fix defines needed to enable command sha1sumAlexander Holler2011-01-19-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>
* | cmd_jffs2: Fix get_part_sector_size_nor() overflow bugPeter Tyser2011-01-19-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>
* NAND: add the ability to directly write yaffs imageLei Wen2011-01-12-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>
* Revert "boot cmds: convert to getenv_yesno() with autostart"Wolfgang Denk2011-01-11-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>
* miiphy: convert to linux/mii.hMike Frysinger2011-01-09-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>
* cmd editing: mark erase/tab seqs constantMike Frysinger2011-01-09-2/+2
| | | | | | These strings are only read, so no need to have them be writable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* cmd_mem: localize state variablesMike Frysinger2011-01-09-3/+3
| | | | | | These "last" variables aren't used outside of this file, so add static. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* load_addr: move to common env codeMike Frysinger2011-01-09-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>
* config_cmd_defaults.h: new header for common u-boot command defaultsMike Frysinger2011-01-09-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>
* env: re-add support for auto-completionMike Frysinger2011-01-09-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>
* cmd_net.c: fix build breakageWolfgang Denk2010-12-23-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>
* onenand: add yaffs write commandLei Wen2010-12-17-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>
* hashtable: drop all non-reentrant versionsMike Frysinger2010-12-17-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>
* Merge branch 'master' of ../master into nextWolfgang Denk2010-12-16-16/+79
|\
| * hwconfig: Fix handling of env_hwconfig, board_hwconfig, and cpu_hwconfigKumar Gala2010-12-09-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>
| * onenand: fix oob print out issueLei Wen2010-12-07-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>
| * env_nand: Use nand_read_skip_bad instead of nand_readSteve Sakoman2010-12-06-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>
| * UBI/UBIFS: Automatically unmount UBIFS volume upon UBI partition changeStefan Roese2010-12-03-6/+35
| | | | | | | | | | | | | | Automatically unmount UBIFS partition when user changes the UBI device. Otherwise the following UBIFS commands will crash. Signed-off-by: Stefan Roese <sr@denx.de>
| * UBIFS: Change "ubifs mount" to "ubifsmount" in ubifsls outputStefan Roese2010-12-03-1/+1
| | | | | | | | Signed-off-by: Stefan Roese <sr@denx.de>
| * UBIFS: Add ubifsumount command to unmount an active volumeStefan Roese2010-12-03-0/+31
| | | | | | | | | | | | | | This new ubifsumount command allows the user to unmount a previously mounted UBIFS volume. Signed-off-by: Stefan Roese <sr@denx.de>
| * hwconfig: Fix dummy initialization of {board, cpu}_hwconfigKumar Gala2010-11-30-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since board_hwconfig & cpu_hwconfig are defined as weak and dont have a default value they will get put into the BSS if they aren't defined elsewhere. This is problematic as we try to utilize hwconfig before we've relocated and thus BSS isn't setup. Instead of giving dummy values in the board files that utilize this feature, we can just initialize the variables to an empty string and thus move them out of the BSS if they aren't defined elsewhere. Also made board_hwconfig & cpu_hwconfig arrays to reduce size associated with string pointers vs arrays. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | stdio: constify "name" arg in public apiMike Frysinger2010-11-28-4/+4
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | boot cmds: convert to getenv_yesno() with autostartMike Frysinger2010-11-28-9/+8
| | | | | | | | | | | | | | Use the new helper func to clean up duplicate logic handling of the autostart env var. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | image: constify lookup tablesMike Frysinger2010-11-28-7/+7
| | | | | | | | | | | | These are pure lookup tables -- no need to be writable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | cmd_itest: constify & localize op tableMike Frysinger2010-11-28-5/+3
| | | | | | | | | | | | | | No one else needs this table. While we're here, use the standard ARRAY_SIZE helper macro. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | cmd_date: constifyMike Frysinger2010-11-28-4/+4
| | | | | | | | | | | | Many strings in this file need not be writable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | autocomplete: remove runtime handler installMike Frysinger2010-11-28-36/+12
| | | | | | | | | | | | | | | | | | | | | | Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | do_reset: unify duplicate prototypesMike Frysinger2010-11-28-10/+1
| | | | | | | | | | | | | | The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>