summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Add 'true' and 'false' commandsPeter Tyser2009-11-231-0/+22
| | | | | | | | | | | | | | These commands are only enabled when the hush shell is enabled and can be useful in scripts such as: while true do echo "Booting OS..."; run $bootcmd; echo "Booting OS failed"; sleep 10; done Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* cmd_help: General cleanupPeter Tyser2009-11-231-14/+7
| | | | | | | Shorten the overly-verbose help message of 'help' and clean up some redundant ifdefery while we're at it. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* command.c: Break commands out to appropriate cmd_*.c filesPeter Tyser2009-11-237-233/+353
| | | | | | | command.c should contain common code related to commands, not miscellaneous command implementations. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* ENV Variable support for Flex-OneNANDAmul Kumar Saha2009-11-131-0/+10
| | | | | | | | Define and use CONFIG_ENV_ADDR_FLEX and CONFIG_ENV_SIZE_FLEX for storing environment variables. Signed-off-by: Rohit Hagargundgi <h.rohit@samsung.com> Signed-off-by: Amul Kumar Saha <amul.saha@samsung.com>
* cmd_nand: Move conditional compilation to MakefilePeter Tyser2009-11-132-5/+1
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* cmd_nand: Remove duplicate includePeter Tyser2009-11-131-8/+0
| | | | | | Also remove vague, unnecessary comment Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Add 'editenv' commandPeter Tyser2009-10-271-0/+40
| | | | | | | | | The editenv command can be used to edit an environment variable. Editing an environment variable is useful when one wants to tweak an existing variable, for example fix a typo or change the baudrate in the 'bootargs' environment variable. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* setenv(): Delete 0-length environment variablesPeter Tyser2009-10-271-1/+1
| | | | | | | | | | | | Previously setenv() would only delete an environment variable if it was passed a NULL string pointer as a value. It should also delete an environment variable when it encounters a valid string pointer of 0-length. This change/fix is generally useful and is necessary for the upcoming "editenv" command. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* readline(): Add ability to modify a string bufferPeter Tyser2009-10-271-0/+10
| | | | | | | | | | | | If the 'buf' parameter is a non-0-length string, its contents will be edited. Previously, the initial contents of 'buf' were ignored and the user entered its contents from scratch. This change is necessary to support the upcoming "editenv" command but could also be used for future commands which require a user to modify an existing string. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* cread_line(): Remove unused variablesPeter Tyser2009-10-271-4/+1
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Check for NULL prompt in readline_into_buffer()Peter Tyser2009-10-271-1/+2
| | | | | | | | | | | | | Previously, passing readline() or readline_into_buffer() a NULL 'prompt' parameter would result in puts() printing garbage when CONFIG_CMDLINE_EDITING was enabled. Note that no board currently triggers this bug. Enabling CONFIG_CMDLINE_EDITING on some boards (eg bab7xx) would result in the bug appearing. This change is only intended to prevent someone from running into this issue in the future. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk2009-10-271-1/+21
|\
| * fdt_support: Add multi-serial support for stdout fixupAnton Vorontsov2009-10-261-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | Currently fdt_fixup_stdout() is using hard-coded CONFIG_CONS_INDEX constant. With multi-serial support, the CONS_INDEX may no longer represent actual console, so we should try to extract port number from the current stdio device name instead of always hard-coding the constant value. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Gerald Van Baren <vanbaren@cideas.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | Revert "env: only build env_embedded and envcrc when needed"Wolfgang Denk2009-10-272-0/+10
|/ | | | | | Breaks building on many boards, and no really clean fix available yet. This reverts commit 6dab6add2d8ee80905234b326abc3de11be1d178.
* sf: add GPL-2 license infoMike Frysinger2009-10-241-0/+2
| | | | | | | Some of the new spi flash files were missing explicit license lines. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* fdt: Fix fdt padding issue for initrd mem_rsvKumar Gala2009-10-241-2/+3
| | | | | | | | | | | | | Its possible that we end up with a device tree that happens to be a particular size that after we call fdt_resize() we don't have any space left for the initrd mem_rsv. Fix this be adding a second mem_rsv into the size calculation. We had one to cover the fdt itself and we have the potential of adding a second for the initrd. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* Merge branch 'master-sync' of git://git.denx.de/u-boot-armWolfgang Denk2009-10-241-0/+18
|\
| * s5pc1xx: support serial driverMinkyu Kang2009-10-131-0/+18
| | | | | | | | | | | | | | | | This patch includes the serial driver for s5pc1xx. s5pc1xx uart driver needs own register setting and clock configuration. So, need to special driver. Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | fdt: Add fdt_fixup_nor_flash_size() to fixup NOR FLASH size in dtbStefan Roese2009-10-231-0/+44
| | | | | | | | | | | | | | | | | | | | This function can be used to update the size in the "reg" property of the NOR FLASH device nodes. This is necessary for boards with non-fixed NOR FLASH sizes. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Gerald Van Baren <vanbaren@cideas.com> Acked-by: Wolfgang Denk <wd@denx.de>
* | lcd: remove '#if 0' 32-bit scroll, now memcpy does itAlessandro Rubini2009-10-181-21/+0
| | | | | | | | | | Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
* | setenv: do console redirection even if previously unsetAlessandro Rubini2009-10-181-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If "stdout" is not previously set, doing "setenv stdout lcd" had no effect, since console redirection only worked if the environment variable was already set; the second time you run setenv it worked. Most default environments lack stdin/out/err definitions, so I'm sure I'm not alone with this problem. This patch simply moves a block of code out of a conditional, to do the same work even if the variable was previously unset. Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
* | mem_mtest: fix error reporting, allow escape with ^CPaul Gortmaker2009-10-181-14/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The basic memtest function tries to watch for ^C after each pattern pass as an escape mechanism, but if things are horribly wrong, we'll be stuck in an inner loop flooding the console with error messages and never check for ^C. To make matters worse, if the user waits for all the error messages to complete, we then incorrectly report the test passed without errors. Adding a check for ^C after any error is printed will give the end user an escape mechanism from a console flood without slowing down the overall test speed on a slow processor. Also, the more extensive memtest quit after just a single error, which is inconsistent with the normal memtest, and not useful if if you are doing dynamic environmental impact testing, such as heating/cooling etc. Both tests now track the error count and report it properly at test completion. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | env: only build env_embedded and envcrc when neededMike Frysinger2009-10-182-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The env code is protected by the ENV_IS_EMBEDDED define, so attempting to compile the code when this isn't defined is pointless. Now that the env headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build system to only build the env objects when this is enabled. And now that the env code is conditionally compiled, we can drop the source code checks. For people who want to extract the environment manually, add a new option CONFIG_BUILD_ENVCRC that only enables the envcrc utility. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Cleanup: use constantNiklaus Giger2009-10-181-1/+1
|/ | | | Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
* Merge branch 'reloc'Wolfgang Denk2009-10-098-4/+27
|\
| * arm/microblaze/nios/nios2/sh: Remove relocation fixupsPeter Tyser2009-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These architectures don't need relocation fixups, so reduce their codesize a bit by defining CONFIG_RELOC_FIXUP_WORKS. Also remove the reloc_off field from their global data structures as it is no longer needed. Note that the location of the standalone application jump table pointer in the global data structure is affected by this change, breaking execution of standalone applications compiled for previous versions of U-Boot. We will therefore increment XF_VERSION in the next commit, which also touches this area. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
| * Conditionally perform common relocation fixupsPeter Tyser2009-10-038-4/+27
| | | | | | | | | | | | | | | | | | | | | | Add #ifdefs where necessary to not perform relocation fixups. This allows boards/architectures which support relocation to trim a decent chunk of code. Note that this patch doesn't add #ifdefs to architecture-specific code which does not support relocation. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* | ppc4xx: Rework cmd reginfoNiklaus Giger2009-10-071-154/+4
|/ | | | | | | | | | The command "reginfo" got an overhaul for the ppc4xx. It dumps all the relevant HW configuration registers (address, symbolic name, content). This allows to easily detect errors in *.h files and changes in the HW configuration. Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org> Signed-off-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-ppc4xxWolfgang Denk2009-09-301-39/+39
|\
| * ppc4xx: Convert PPC4xx SDRAM defines from lower case to upper caseStefan Roese2009-09-281-21/+21
| | | | | | | | | | | | | | | | | | The latest PPC4xx register cleanup patch missed some SDRAM defines. This patch now changes lower case UIC defines to upper case. Also some names are changed to match the naming in the IBM/AMCC users manuals (e.g. mem_mcopt1 -> SDRAM0_CFG). Signed-off-by: Stefan Roese <sr@denx.de>
| * ppc4xx: Convert PPC4xx UIC defines from lower case to upper caseStefan Roese2009-09-281-18/+18
| | | | | | | | | | | | | | The latest PPC4xx register cleanup patch missed the UIC defines. This patch now changes lower case UIC defines to upper case. Signed-off-by: Stefan Roese <sr@denx.de>
* | cmd_fdt.c: fix parse of byte streams and stringsKen MacLeod2009-09-241-8/+15
|/ | | | | | | | | | | | | | | | | | | | | | | | Commit 4abd844d8e extended the fdt command parser to handle property strings which are split across multiple arguments but it was broken for byte streams and strings. Byte stream parsing: * Fixes where it would terminate early or go into an endless loop. * Fixes a 0x00 being inserted into the data if there is a space after '[' or a separate argument. * Fixes dereferencing the argument pointer after the last argument. * Checks for bad characters. String parsing: * Treat multiple arguments as a string list. This fixes an issue where only the last argument was stored. Signed-off-by: Ken MacLeod <ken@bitsko.slc.ut.us>
* mucmc52, uc101: delete ata@3a00 node, if no CF card is detectedHeiko Schocher2009-09-251-0/+8
| | | | | | | | | | | U-Boot can detect if an IDE device is present or not. If not, and this new config option is activated, U-Boot removes the ATA node from the DTS before booting Linux, so the Linux IDE driver does not probe the device and crash. This is needed for buggy hardware (uc101) where no pull down resistor is connected to the signal IDE5V_DD7. Signed-off-by: Heiko Schocher <hs@denx.de>
* Remove deprecated 'autoscr' command/variablesPeter Tyser2009-09-223-51/+0
| | | | | | | | | | | | | | | The more standard 'source' command provides identical functionality to the autoscr command. Environment variable names/values on the MVBC_P, MVBML7, kmeter1, mgcoge, and km8xx boards are updated to no longer refernce 'autoscr'. The 'autoscript' and 'autoscript_uname' environment variables are also removed. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Andre Schwarz <andre.schwarz@matrix-vision.de> Acked-by: Heiko Schocher <hs@denx.de>
* ppc4xx: Big cleanup of PPC4xx definesStefan Roese2009-09-111-73/+73
| | | | | | | | | | | | | | | | This patch cleans up multiple issues of the 4xx register (mostly DCR, SDR, CPR, etc) definitions: - Change lower case defines to upper case (plb4_acr -> PLB4_ACR) - Change the defines to better match the names from the user's manuals (e.g. cprpllc -> CPR0_PLLC) - Removal of some unused defines Please test this patch intensive on your PPC4xx platform. Even though I tried not to break anything and tested successfully on multiple 4xx AMCC platforms, testing on custom platforms is recommended. Signed-off-by: Stefan Roese <sr@denx.de>
* mkimage: Add Kirkwood Boot Image support (kwbimage)Prafulla Wadaskar2009-09-101-0/+1
| | | | | | | | | | | | | | This patch adds support for "kwbimage" (Kirkwood Boot Image) image types to the mkimage code. For details refer to docs/README.kwbimage This patch is tested with Sheevaplug board Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Acked-by: Ron Lee <ron@debian.org> Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
* mkimage: Make table_entry code globalPrafulla Wadaskar2009-09-101-8/+2
| | | | | | | | | | | | | | | | | | - make get_table_entry_id() global - make get_table_entry_name() global - move struct table_entry to image.h Currently this code is used by image.c only. This patch makes this API global so it can be used by other parts of code, too. Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Acked-by: Ron Lee <ron.debian.org> Edit comments and commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
* mkimage: Make genimg_print_size() globalPrafulla Wadaskar2009-09-101-2/+1
| | | | | | | | | | | | Currently it is used by image.c only, but the the function can be used to support additional mkimage types like for example kwbimage, so make this function globally visible. Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Edited commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
* tools/mkimage: fix compiler warnings, use "const"Wolfgang Denk2009-09-101-19/+20
| | | | | | | | | | This fixes some compiler warnings: tools/default_image.c:141: warning: initialization from incompatible pointer type tools/fit_image.c:202: warning: initialization from incompatible pointer type and changes to code to use "const" attributes in a few places where it's appropriate. Signed-off-by: Wolfgang Denk <wd@denx.de>
* cmd_mtdparts.c: fix compiler warning in debug codeWolfgang Denk2009-09-041-1/+1
| | | | | | | | | | Fix warning messages: cmd_mtdparts.c:1429: warning: format '%08lx' expects type 'long unsigned int', but argument 6 has type 'u32' cmd_mtdparts.c:1429: warning: format '%08lx' expects type 'long unsigned int', but argument 7 has type 'u32' Signed-off-by: Wolfgang Denk <wd@denx.de>
* Add ability for arch code to make changes before we bootKumar Gala2009-09-041-0/+10
| | | | | | | | | Added a arch_preboot_os() function that cpu specific code can implement to allow for various modifications to the state of the machine right before we boot. This can be useful to setup register state to a specific configuration. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Consolidate arch-specific mem_malloc_init() implementationsPeter Tyser2009-09-041-0/+15
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Consolidate arch-specific sbrk() implementationsPeter Tyser2009-09-041-1/+17
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Merge branch 'next' of ../nextWolfgang Denk2009-08-312-3/+71
|\
| * 8xxx: Removed CONFIG_NUM_CPUS from 85xx/86xxPoonam Aggrwal2009-08-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The number of CPUs are getting detected dynamically by checking the processor SVR value. Also removed CONFIG_NUM_CPUS references from all the platforms with 85xx/86xx processors. This can help to use the same u-boot image across the platforms. Also revamped and corrected few Freescale Copyright messages. Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * Add md5sum and sha1 commands...Robin Getz2009-08-251-0/+68
| | | | | | | | | | | | | | Now that we have sha1 and md5 in lib_generic, allow people to use them on the command line, for checking downloaded files. Signed-off-by: Robin Getz <rgetz@analog.com>
* | bugfix CONFIG_SYS_CONSOLE_INFO_QUIETDavid Brownell2009-08-301-1/+1
|/ | | | | | | | | The "console: unify printing current devices" patch goofed: CONFIG_SYS_CONSOLE_INFO_QUIET is supposed to *REMOVE* boot time noise, not add it. Said patch changed the #ifndefs to #ifdef; this one restores them to the proper sense. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* fdt: Fix fdt_pci_dma_ranges handling of 64-bit rangesKumar Gala2009-08-091-2/+2
| | | | | | | | | | If the size of a region equal to 4G it can't be represnted in a 32-bit BAR so we should have marked that case as MEM64. Additionally bump the number of inbound windows up to 4 to handle the fact that Freescale PPCs that have an implicit window for CCSRBAR. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* hush: Fix bogus free() callPeter Tyser2009-08-091-1/+1
| | | | | | | An off-by-one error in hush.c resulted in an unintentional free() call every time a command was executed Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* env: kill off default_environment_sizeMike Frysinger2009-08-098-22/+1
| | | | | | | | | The only environment type that uses this variable is spi flash, and that is only because it is reimplementing the common set_default_env() function. So fix the spi flash code and kill off the default_environment_size in the process. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
OpenPOWER on IntegriCloud