summaryrefslogtreecommitdiff
path: root/common/cmd_fdc.c
Commit message (Collapse)AuthorAgeLines
* fs/fdos: RemoveTom Rini2014-02-21-67/+0
| | | | | | We have an unused FAT implementation in fs/fdos, remove. Signed-off-by: Tom Rini <trini@ti.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-18/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Consolidate bool typeYork Sun2013-04-01-61/+56
| | | | | | | | | | | | | 'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by: York Sun <yorksun@freescale.com>
* Convert cmd_usage() calls in common to use a return valueSimon Glass2012-03-06-1/+1
| | | | | | | | | Change all files in common/ to use CMD_RET_USAGE instead of calling cmd_usage() directly. I'm not completely sure about this patch since the code since impact is small (100 byte or so on ARM) and it might need splitting into smaller patches. But for now here it is. Signed-off-by: Simon Glass <sjg@chromium.org>
* common/cmd_fdc.c: Fix GCC 4.6 build warningsWolfgang Denk2011-11-16-12/+17
| | | | | | | | | | | | | | | Fix: cmd_fdc.c: In function 'fdc_read_data': cmd_fdc.c:435:6: warning: variable 'flags' set but not used [-Wunused-but-set-variable] cmd_fdc.c:432:16: warning: variable 'pcn' set but not used [-Wunused-but-set-variable] cmd_fdc.c:431:20: warning: variable 'lastblk' set but not used [-Wunused-but-set-variable] Note: no attempts were made to otherwise cleanup the code. Signed-off-by: Wolfgang Denk <wd@denx.de>
* autostart: unify duplicated logic into the bootm codeMike Frysinger2011-07-25-15/+1
| | | | | | | | | | | Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Revert "boot cmds: convert to getenv_yesno() with autostart"Wolfgang Denk2011-01-11-1/+2
| | | | | | | | | | 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>
* boot cmds: convert to getenv_yesno() with autostartMike Frysinger2010-11-28-2/+1
| | | | | | | Use the new helper func to clean up duplicate logic handling of the autostart env var. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* do_bootm: unify duplicate prototypesMike Frysinger2010-11-28-1/+0
| | | | | | | | The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* cmd_usage(): simplify return code handlingWolfgang Denk2010-07-24-2/+1
| | | | | | | | | | | | | | | | Lots of code use this construct: cmd_usage(cmdtp); return 1; Change cmd_usage() let it return 1 - then we can replace all these ocurrances by return cmd_usage(cmdtp); This fixes a few places with incorrect return code handling, too. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Remove AmigaOneG3SE boardWolfgang Denk2010-06-23-60/+0
| | | | | | | | | | The AmigaOneG3SE board has been orphaned or a very long time, and broken for more than 12 releases resp. more than 3 years. As nobody seems to be interested any more in this stuff we may as well ged rid of it, especially as it clutters many areas of the code so it is a continuous pain for all kinds of ongoing work. Signed-off-by: Wolfgang Denk <wd@denx.de>
* General help message cleanupWolfgang Denk2009-06-12-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of the help messages were not really helpful; for example, many commands that take no arguments would not print a correct synopsis line, but "No additional help available." which is not exactly wrong, but not helpful either. Commit ``Make "usage" messages more helpful.'' changed this partially. But it also became clear that lots of "Usage" and "Help" messages (fields "usage" and "help" in struct cmd_tbl_s respective) were actually redundant. This patch cleans this up - for example: Before: => help dtt dtt - Digital Thermometer and Thermostat Usage: dtt - Read temperature from digital thermometer and thermostat. After: => help dtt dtt - Read temperature from Digital Thermometer and Thermostat Usage: dtt Signed-off-by: Wolfgang Denk <wd@denx.de>
* Command usage cleanupPeter Tyser2009-01-28-1/+1
| | | | | | | | Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Standardize command usage messages with cmd_usage()Peter Tyser2009-01-28-1/+1
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-16/+16
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* cmd_fdc: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-09-10-12/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Code cleanup: fix old style assignment ambiguities like "=-" etc.Wolfgang Denk2008-07-14-2/+2
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Delay FIT format check on sector based devicesMarian Balakowicz2008-06-30-7/+8
| | | | | | | | | | Global FIT image operations like format check cannot be performed on a first sector data, defer them to the point when whole FIT image was uploaded to a system RAM. Signed-off-by: Marian Balakowicz <m8@semihalf.com> Partial ('cmd_nand' case) Acked-by: Grant Erickson <gerickson@nuovations.com> NAND and DOC bits Acked-by: Scott Wood <scottwood@freescale.com>
* Big white-space cleanup.Wolfgang Denk2008-05-21-69/+67
| | | | | | | | | | | This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
* [new uImage] Add new uImage format handling to other bootm related commandsMarian Balakowicz2008-03-12-7/+20
| | | | | | | | | | | | | Updated commands: docboot - cmd_doc.c fdcboot - cmd_fdc.c diskboot - cmd_ide.c nboot - cmd_nand.c scsiboot - cmd_scsi.c usbboot - cmd_usb.c Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Update naming convention for bootm/uImage related codeMarian Balakowicz2008-02-29-1/+1
| | | | | | | | | | | | | | | This patch introduces the following prefix convention for the image format handling and bootm related code: genimg_ - dual format shared code image_ - legacy uImage format specific code fit_ - new uImage format specific code boot_ - booting process related code Related routines are renamed and a few pieces of code are moved around and re-grouped. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Add dual format uImage support frameworkMarian Balakowicz2008-02-25-16/+28
| | | | | | | | | | | | | | This patch adds framework for dual format images. Format detection is added and the bootm controll flow is updated to include cases for new FIT format uImages. When the legacy (image_header based) format is detected appropriate legacy specific handling is invoked. For the new (FIT based) format uImages dual boot framework has a minial support, that will only print out a corresponding debug messages. Implementation of the FIT specific handling will be added in following patches. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Fix erroneous use of image_get_magic() in fdc/usb cmdsMarian Balakowicz2008-02-21-1/+1
| | | | Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Rename and move print_image_hdr() routineMarian Balakowicz2008-02-21-1/+1
| | | | Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Define a API for image handling operationsMarian Balakowicz2008-02-07-4/+4
| | | | | | | | | - Add inline helper macros for basic header processing - Move common non inline code common/image.c - Replace direct header access with the API routines - Rename IH_CPU_* to IH_ARCH_* Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* common/cmd_[af]*: Remove obsolete references to CONFIG_COMMANDS.Jon Loeliger2007-07-08-9/+8
| | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
* common/cmd_[a-f]* : Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-04-5/+6
| | | | | | | | | | | | | | This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
* Add loads of ntohl() in image header handlingWolfgang Denk2006-03-12-2/+2
| | | | Patch by Steven Scholz, 10 Jun 2005
* Patch by Kenneth Johansson, 30 Jun 2003:wdenk2003-07-01-2/+2
| | | | get rid of MK_CMD_ENTRY macro; update doc/README.command
* * Code cleanup:wdenk2003-06-27-19/+28
| | | | | | | | | - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
* * Patch by Thomas Frieden, 13 Nov 2002:wdenk2002-11-19-2/+60
| | | | | | | | | | | | | Add code for AmigaOne board (preliminary merge to U-Boot, still WIP) * Patch by Jon Diekema, 12 Nov 2002: - Adding URL for IEEE OUI lookup - Making the autoboot #defines dependent on CONFIG_AUTOBOOT_KEYED being defined. - In the CONFIG_EXTRA_ENV_SETTINGS #define, the root-on-initrd and root-on-nfs macros are designed to switch how the default boot method gets defined.
* * Patch by Daniel Engström, 13 Nov 2002:wdenk2002-11-18-10/+83
| | | | | | | Add support for i386 architecture and AMD SC520 board * Patch by Pierre Aubert, 12 Nov 2002: Add support for DOS filesystem and booting from DOS floppy disk
* * Vince Husovsky, 7 Nov 2002:wdenk2002-11-10-14/+35
| | | | | | | | | | | | | | | | | | | | | Add "-n" to linker options to get rid of "Not enough room for program headers" problem * Patch by David Müller, 05 Nov 2002 Rename CONFIG_PLL_INPUT_FREQ to CONFIG_SYS_CLK_FREQ so we can use an already existing name * Patch by Pierre Aubert, 05 Nov 2002 Hardware related improvements in FDC boot code * Patch by Holger Schurig, 5 Nov 2002: Make the PXA really change it's frequency * Patch by Pierre Aubert, 05 Nov 2002 Add support for slave serial Spartan 2 FPGAs * Fix uninitialized memory (MAC address) in 8xx SCC/FEC ethernet drivers
* Initial revisionwdenk2002-08-27-0/+735