summaryrefslogtreecommitdiff
path: root/common/cmd_mii.c
Commit message (Collapse)AuthorAgeLines
* miiphy: constify device nameMike Frysinger2010-08-09-1/+1
| | | | | | | The driver name does not need to be writable, so constify it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* cmd_usage(): simplify return code handlingWolfgang Denk2010-07-24-6/+3
| | | | | | | | | | | | | | | | 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>
* 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-2/+2
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Add CONFIG_MII_INIT support to related boardsTsiChung Liew2008-04-13-1/+1
| | | | | | | | | Replace CONFIG_8xx and CONFIG_MCF532x to CONFIG_MII_INIT in cmd_init.c. Add CONFIG_MII_INIT to board configuration files that use mii_init() in cmd_init.c. Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com> Acked-by: Ben Warren <biggerbadderben@gmail.com>
* Fix macro typo in common/cmd_mii.cBen Warren2008-03-30-1/+1
| | | | | | | This typo was introduced in commit 233a8bcd94997f3f345833a3b82e836222f2a206. I actually applied the wrong patch. Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Add CONFIG_MII_INIT in cmd_mii.cTsi-Chung Liew2008-03-30-1/+1
| | | | | | | | Provide common configuration in do_mii() to execute mii_init() for all cpu architectures Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Remove the obsolete terse version of do_mii()Shinya Kuribayashi2008-01-09-139/+0
| | | | | | | | | | | | | | | | | We now have more useful version of do_mii() and everybody use it. Gerald Van Baren says: > When I originally wrote the mii command 6(!) years ago, I wrote a > verbose version that printed human readable decomposition of the flags, > etc., and a terse one that didn't print as much stuff and thus had a > smaller memory footprint. > > It sounds like the terse version has withered and died, apparently > people are only using the verbose version (which is very understandable, > I do myself). Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com> Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
* common/cmd_mii.c: Add sanity argc checkShinya Kuribayashi2008-01-09-0/+5
| | | | | | | If type mii command without arguments, we suffer from uninitialized argv[] entries; for example we MIPS get stuck by TLB error. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
* [BUILD] conditionally compile common/cmd_*.c in common/MakefileGrant Likely2007-11-20-4/+0
| | | | | | | Modify common/Makefile to conditionally compile the cmd_*.c files based on the board config. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* NET: Add Ethernet 1000BASE-X support for PPC4xxLarry Johnson2007-11-06-2/+6
| | | | | | | | | | This patch adds support for 1000BASE-X to functions "miiphy_speed ()" and "miiphy_duplex()". It also adds function "miiphy_is_1000base_x ()", which returns non-zero iff the PHY registers are configured for 1000BASE-X. The "mii info" command is modified to distinguish between 1000BASE-T and -X. Signed-off-by: Larry Johnson <lrj@acm.org> Signed-off-by: Ben Warren <bwarren@qstreams.com>
* Merge with git://www.denx.de/git/u-boot.gitStefan Roese2007-08-15-2/+2
|\
| * common/: Remove lingering references to CFG_CMD_* symbols.Jon Loeliger2007-07-10-1/+1
| | | | | | | | | | | | | | | | Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. Those always evaluated TRUE, and thus were always compiled even when IDE really wasn't defined/wanted. Signed-off-by: Jon Loeliger <jdl@freescale.com>
| * common/cmd_[i-n]*: Remove obsolete references to CONFIG_COMMANDS.Jon Loeliger2007-07-08-1/+1
| | | | | | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
| * common/cmd_[i-z]* : Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Added M5329AFEE and M5329BFEE PlatformsTsiChung Liew2007-06-18-1/+1
|/ | | | | | | | | | | | | | | | Added board/freescale/m5329evb, cpu/mcf532x, drivers/net, drivers/serial, immap_5329.h, m5329.h, mcfrtc.h, include/configs/M5329EVB.h, lib_m68k/interrupts.c, and rtc/mcfrtc.c Modified CREDITS, MAKEFILE, Makefile, README, common/cmd_bdinfo.c, common/cmd_mii.c, include/asm-m68k/byteorder.h, include/asm-m68k/fec.h, include/asm-m68k/io.h, include/asm-m68k/mcftimer.h, include/asm-m68k/mcfuart.h, include/asm-m68k/ptrace.h, include/asm-m68k/u-boot.h, lib_m68k/Makefile, lib_m68k/board.c, lib_m68k/time.c, net/eth.c and rtc/Makefile Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
* Change "mii info" to not print an error upon missing PHY at addressStefan Roese2006-08-07-4/+0
| | | | Patch by Stefan Roese, 07 Aug 2006
* Check argument count in "mii" command.Wolfgang Denk2006-07-21-0/+5
| | | | Problem pointed out by Andrew Dyer, 13 Jun 2005
* Add support for multiple PHYs.Marian Balakowicz2005-10-28-36/+73
|
* Added support for TQM834x boards.Marian Balakowicz2005-10-11-1/+1
|
* * Fix PHY address argument passing with mii info commandWolfgang Denk2005-09-24-6/+5
| | | | | | Patch by Andrew Dyer, 28 Dec 2004 * Cleanup: fix broken builds
* Fix 'mii help' text formattingWolfgang Denk2005-08-06-1/+1
| | | | Patch by Cory Tusar, 10 Dec 2004
* * Patch by John Kerl, 19 Apr 2004:wdenk2004-04-25-13/+9
| | | | | | | | | | | Use U-boot's miiphy.h for PHY register names, rather than introducing a new header file. * Update pci_ids.h from linux-2.4.26 * Patch by Masami Komiya, 19 Apr 2004: Fix problem cause by VLAN function on little endian architecture without VLAN environment
* * Modify KUP4X board configuration to use SL811 driver for USB memorywdenk2004-04-23-1/+1
| | | | | | | | | | | | | | | sticks (including FAT / VFAT filesystem support) * Add SL811 Host Controller Interface driver for USB * Add CFG_I2C_EEPROM_ADDR_OVERFLOW desription to README * Patch by Pantelis Antoniou, 19 Apr 2004: Allow to use shell style syntax (i. e. ${var} ) with standard parser. Minor patches for Intracom boards. * Patch by Christian Pell, 19 Apr 2004: cleanup support for CF/IDE on PCMCIA for PXA25X
* * Temporarily disabled John Kerl's extended MII command code becausewdenk2004-04-18-3/+7
| | | | | | | | | | | "miivals.h" is missing * Patches by Mark Jonas, 13 Apr 2004: - Remove CS0 chip select timing setting from cpu/mpc5xxx/start.S - Add sync instructions to IceCube SDRAM init code - Move SDRAM chip constants into seperate include files - Unify DDR and SDR initialization code - Unify all IceCube (Lite5xxx) target names
* * Patch by John Kerl, 16 Apr 2004:wdenk2004-04-18-0/+413
| | | | | | | | | Enable ranges in mii command, e.g. mii read 0-1f 0 or mii read 4-7 18-1a. Also add mii dump subcommand for pretty-printing standard regs 0-5. * Patch by Stephen Williams, 16 April 2004: fix typo in JSE.h; update MAINTAINERS
* * Patches by Thomas Viehweger, 16 Mar 2004:wdenk2004-03-23-2/+2
| | | | | | | | | - show PCI clock frequency on MPC8260 systems - add FCC_PSMR_RMII flag for HiP7 processors - in do_jffs2_fsload(), take load address from load_addr if not set explicit, update load_addr otherwise - replaced printf by putc/puts when no formatting is needed (smaller code size, faster execution)
* * Patches by Travis Sawyer, 12 Mar 2004:wdenk2004-03-14-1/+1
| | | | | | | | | | | | | | | | | | | | | - Fix Gigabit Ethernet support for 440GX - Add Gigabit Ethernet Support to MII PHY utilities * Patch by Brad Kemp, 12 Mar 2004: Fixes for drivers/cfi_flash.c: - Better support for x8/x16 implementations - Added failure for AMD chips attempting to use CFG_FLASH_USE_BUFFER_WRITE - Added defines for AMD command and address constants * Patch by Leon Kukovec, 12 Mar 2004: Fix get_dentfromdir() to correctly handle deleted dentries * Patch by George G. Davis, 11 Mar 2004: Remove hard coded network settings in TI OMAP1610 H2 default board config * Patch by George G. Davis, 11 Mar 2004: add support for ADS GraphicsClient+ board.
* * Patch by Markus Pietrek, 24 Feb 2004:wdenk2004-02-26-0/+1
| | | | | | | | | | | | | NS9750 DevBoard added * Patch by Pierre AUBERT, 24 Feb 2004 add USB support for MPC5200 * Patch by Steven Scholz, 24 Feb 2004: - fix MII commands to use values from last command * Patch by Torsten Demke, 24 Feb 2004: Add support for the eXalion platform (SPSW-8240, F-30, F-300)
* * Some code cleanupwdenk2004-02-12-1/+1
| | | | | | | | * Patch by Josef Baumgartner, 10 Feb 2004: Fixes for Coldfire port * Patch by Brad Kemp, 11 Feb 2004: Fix CFI flash driver problems
* * Patches by Stephan Linz, 3 Nov 2003:wdenk2003-12-06-2/+8
| | | | | | | | | | | | - more endianess fixes for LAN91C111 driver - CFG_HZ configuration patch for NIOS Cyclone board * Patch by Stephan Linz, 28 Oct 2003: fix PHY_INT_REG vs. PHY_MASK_REG bug in drivers/smc91111.c * Patch by Steven Scholz, 20 Oct 2003: - make "mii info <addr>" show infor for PHY at "addr" only - Endian fix for miiphy_info()
* 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-1/+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)
* Add support for TQM862L moduleswdenk2003-04-10-1/+1
|
* Initial revisionwdenk2002-09-18-0/+131