summaryrefslogtreecommitdiff
path: root/common/cmd_pcmcia.c
Commit message (Collapse)AuthorAgeLines
* 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>
* General help message cleanupWolfgang Denk2009-06-12-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* common/cmd_[p-x]*: Remove obsolete references to CONFIG_COMMANDS.Jon Loeliger2007-07-08-4/+3
| | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
* common/cmd_[i-z]* : Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-04-2/+3
| | | | | | | | | | | | | | 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>
* Change 'repeatable' attribute of some commands to sensible values.Detlev Zundel2007-06-12-1/+1
| | | | | | Most prominently this changes 'erase' to be non-repeatable. Signed-off-by: Detlev Zundel <dzu@denx.de>
* Major PCMCIA Cleanup to make code better readable and maintainable.Wolfgang Denk2006-07-10-3255/+132
| | | | | | | | | | | Notes: - Board-dependend code for RPXLITE and RPXCLASSIC-based boards placed to the drivers/rpx_pmcia.c file to avoid duplication. Same for TQM8xx-based boards (drivers/tqm8xx_pmcia.c). - drivers/i82365.c has been split into two parts located at board/atc/ti113x.c and board/cpc45/pd67290.c (ATC and CPC45 are the only boards using CONFIG_82365). - Changes were tested for clean build and *very* *few* boards.
* Fix PCMCIA support on virtlab2Wolfgang Denk2006-05-15-0/+7
|
* Cleanup compile warning.Wolfgang Denk2006-05-12-0/+2
|
* Add support for VirtLab2 boardWolfgang Denk2006-05-12-2/+171
| | | | (needed because of differences in the PCMCIA hardware).
* Cleanup for GCC-4.xWolfgang Denk2005-10-13-3/+3
|
* * Code cleanup, mostly for GCC-3.3.xwdenk2004-12-31-1/+12
| | | | | | | | | | | | * Cleanup confusing use of CONFIG_ETH*ADDR - ust his only to pre-define a MAC address; use CONFIG_HAS_ETH* to enable support for additional ethernet addresses. * Cleanup drivers/i82365.c - avoid duplication of code * Fix bogus "cannot span across banks" flash error message * Add support for CompactFlash for the CPC45 Board.
* Add support for UC100 boardwdenk2004-12-18-0/+193
|
* * Cleanup, minor fixeswdenk2004-04-18-6/+5
| | | | | | | | | * Patch by Rune Torgersen, 16 Apr 2004: LBA48 fixes * Patches by Pantelis Antoniou, 16 Apr 2004: - Fix some compile problems; add "once" functionality for the netretry variable
* Patches by Pantelis Antoniou, 16 Apr 2004:wdenk2004-04-18-1/+1
| | | | | | | | | | | | | | | | | - add support for a new version of an Intracom board and fix various other things on others. - add verify support to the crc32 command (define CONFIG_CRC32_VERIFY to enable it) - fix FEC driver for MPC8xx systems: 1. fix compilation problems for boards that use dynamic allocation of DPRAM 2. shut down FEC after network transfers - HUSH parser fixes: 1. A new test command was added. This is a simplified version of the one in the bourne shell. 2. A new exit command was added which terminates the current executing script. 3. Fixed handing of $? (exit code of last executed command)
* * Patch by Stephen Williams, 01 Apr 2004:wdenk2004-04-15-9/+130
| | | | | | | Add support for Picture Elements JSE board * Patch by Christian Pell, 01 Apr 2004: Add CompactFlash support for PXA systems.
* * Patches by Pantelis Antoniou, 30 Mar 2004:wdenk2004-04-15-0/+364
| | | | | | | | | | - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family
* * Patch by Klaus Heydeck, 13 Mar 2003:wdenk2004-03-25-4/+4
| | | | Add support for KUP4X Board
* * Patch by Rune Torgersen, 27 Feb 2004:wdenk2004-03-13-29/+29
| | | | | | | | | | | | | | | | | - Added LBA48 support (CONFIG_LBA48 & CFG_64BIT_LBA) - Added support for 64bit printing in vsprintf (CFG_64BIT_VSPRINTF) - Added support for 64bit strtoul (CFG_64BIT_STRTOUL) * Patch by Masami Komiya, 27 Feb 2004: Fix rarpboot: add autoload by NFS * Patch by Dan Eisenhut, 26 Feb 2004: fix flash_write return value in saveenv * Patch by Stephan Linz, 11 Dec 2003 expand config.mk to avoid trigraph warnings on NIOS * Rename "BMS2003" board into "HMI10"
* * Patch by Wolter Kamphuis, 15 Dec 2003:wdenk2004-02-06-0/+14
| | | | | | made CONFIG_SILENT_CONSOLE usable on all architectures * Disable date command on TQM866M - there is no RTC on MPC866
* * Make BMS2003 use a separate config file to avoid #ifdef mess;wdenk2004-01-04-1/+67
| | | | | | | | add I2C support; add support for DS1337 RTC * Add CompactFlash support for BMS2003 board * Add support for status LED on BMS2003 board
* * Make CPU clock on ICA-IP board controllable by a "cpuclk"wdenk2003-12-27-0/+12
| | | | | | | | | | | | | | environment variable which can set to "100", "133", or "150". The CPU clock will be configured accordingly upon next reboot. Other values are ignored. In case of an invalid or undefined "cpuclk" value, the compile-time default CPU clock speed will be used. * Enable Quad-UART on BMS2003 board (initialize the PCMCIA memory window that is used to access the UART registers by the Linux driver) * Patch by Reinhard Meyer, 20 Dec 2003: Fix clock calculation for the MPC5200 for higher clock frequencies (above 2**32 / 10 = 429.5 MHz).
* * Patch by Yuli Barcohen, 3 Dec 2003:wdenk2003-12-07-1/+1
| | | | | | | | | | "revive" U-Boot support for old Motorola MPC860ADS board * Patch by Cam(ilo?), 03 Dec 2003: make examples build even with broken Montavista objcopy * Patch by Pavel Bartusek, 27 Nov 2003: fix conversion problem with "bootretry" evironment variable
* Add CompactFlash support for NSCUdzu2003-10-19-12/+46
|
* 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-16/+11
| | | | | | | | | - 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 David Updegraff, 22 Apr 2003:wdenk2003-05-20-0/+6
| | | | | | | | | | | | | update for CrayL1 board * Patch by Pantelis Antoniou, 21 Apr 2003: add boot support for ARTOS (a proprietary OS) * Patch by Steven Scholz, 11 Apr 2003: Add support for RTC DS1338 * Patch by Rod Boyce, 24 Jan 2003: Fix counting of extended partitions in diskboot command
* Add support for CompactFlash on ATC boardwdenk2003-05-18-6/+49
| | | | | (includes support for Intel 82365 and compatible PC Card controllers, and Yenta-compatible PCI-to-CardBus controllers)
* * Patch by Rick Bronson, 16 Mar 2003:wdenk2003-03-26-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for Atmel AT91RM9200DK w/NAND * Patches by Robert Schwebel, 19 Mar 2003: - use arm-linux-gcc as default compiler for ARM - fix i2c fixup code - fix missing baudrate setting - added $loadaddr / CFG_LOAD_ADDR support to loadb - moved "ignoring trailing characters" _before_ u-boot wants to print out diagnostics messages; removes bogus characters at the end of transmission * Patch by John Zhan, 18 Mar 2003: Add support for SinoVee Microsystems SC8xx boards * Patch by Rolf Offermanns, 21 Mar 2003: ported the dnp1110 related changes from the current armboot cvs to current u-boot cvs. smc91111 does not work. problem marked in smc91111.c, grep for "FIXME". * Patch by Brian Auld, 25 Mar 2003: Add support for STM flash chips on ebony board * Add PCI support for MPC8250 Boards (PM825 module) * Patch by Stefan Roese, 25 Mar 2003:
* * Add support for 16 MB flash configuration of TRAB boardwdenk2003-02-28-0/+3
| | | | | | | | | | | | | | | | | * Patch by Erwin Rol, 27 Feb 2003: Add support for RTEMS * Add image information to README * Fix dual PCMCIA slot support (when running with just one slot populated) * Add VFD type detection to trab board * extend drivers/cs8900.c driver to synchronize ethaddr environment variable with value in the EEPROM * Start adding MIPS support files
* * Restrict baudrate settings on LWMON to higher speedswdenk2003-01-11-1/+1
| | | | | | | | | | | | when watchdog is on * Update baudrate in bd_info when it gets changed * Add watchdog trigger points while waiting for serial port (so far only 8xx -- needed on LWMON with 100ms watchdog) * Improve command line tool to access the U-Boot's environment (figuration of the utility, using a config file)
* Add LED indication for IDE activity on KUP4K boardwdenk2002-12-04-223/+187
|
* * Fix startup problems with VFD display on TRABwdenk2002-12-03-1/+1
| | | | | | * Patch by Pierre Aubert, 20 Nov 2002 Add driver for Epson SED13806 graphic controller. Add support for BMP logos in cfb_console driver.
* * Added support for both PCMCIA slots (at the same time!) on MPC8xxwdenk2002-11-21-57/+76
| | | | | | | | | * Patch by Rod Boyce, 21 Nov 2002: fix PCMCIA on MBX8xx board * Patch by Pierre Aubert , 21 Nov 2002 Add CFG_CPM_POST_WORD_ADDR to make the offset of the bootmode word in DPRAM configurable
* * Add support for log buffer which can be passed to Linux kernel'swdenk2002-11-05-0/+218
| | | | | | | syslog mechanism; used especially for POST results. * Patch by Klaus Heydeck, 31 Oct 2002: Add initial support for kup4k board
* Initial revisionwdenk2002-11-03-0/+2243