summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* Add 'led' commandJason Kridner2011-04-27-0/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows any board implementing the coloured LED API to control the LEDs from the console. led [green | yellow | red | all ] [ on | off ] or led [ 1 | 2 | 3 | all ] [ on | off ] Adds configuration item CONFIG_CMD_LED enabling the command. Partially based on patch from Ulf Samuelsson: http://www.mail-archive.com/u-boot@lists.denx.de/msg09593.html. Updated based on feedback: http://www.mail-archive.com/u-boot@lists.denx.de/msg41847.html https://groups.google.com/d/topic/beagleboard/8Wf1HiK_QBo/discussion * Fixed a handful of style issues. * Significantly reduced the number of #ifdefs and redundant code * Converted redundant code into loops test against a structure * Made use of cmd_usage() * Introduced a str_onoff() function, but haven't yet put it in common * Eliminated trailing newline Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* Fix typo in #error: IS_IN_NOWHERE vs. IS_NOWHERELoïc Minier2011-04-26-1/+1
| | | | Signed-off-by: Loïc Minier <loic.minier@linaro.org>
* Merge branch 'phylib' of git://git.denx.de/u-boot-mmcWolfgang Denk2011-04-20-101/+500
|\
| * Add mdio command for new PHY infrastructureAndy Fleming2011-04-20-0/+289
| | | | | | | | | | | | | | | | | | | | | | The new mdio command doesn't have all of the features of the mii command, but it provides the necessary read/write primitives, and allows users to interact with 10G PHYs, and other PHYs which use Clause 45 of 802.3. This means that the mdio command requires a "Device Address" argument, though for clause 22 PHYs, the argument can be "-". Signed-off-by: Andy Fleming <afleming@freescale.com> Acked-by: Detlev Zundel <dzu@denx.de>
| * Create PHY Lib for U-BootAndy Fleming2011-04-20-36/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extends the mii_dev structure to participate in a full-blown MDIO and PHY driver scheme. The mii_dev structure and miiphy calls are modified in such a way to allow the original mii command and miiphy infrastructure to work as before, but also to support a new set of APIs which allow (among other things) sharing of PHY driver code and 10G support The mii command will continue to support normal PHY management functions (Clause 22 of 802.3), but will not be changed to support 10G (Clause 45). The basic design is similar to PHY Lib from Linux, but simplified for U-Boot's network and driver infrastructure. We now have MDIO drivers and PHY drivers An MDIO driver provides: read write reset A PHY driver provides: (optionally): probe config - initial setup, starting of auto-negotiation startup - waiting for AN, and reading link state shutdown - any cleanup needed The ethernet drivers interact with the PHY Lib using these functions: phy_connect() phy_config() phy_startup() phy_shutdown() Each PHY driver can be configured separately, or all at once using config_phylib_all_drivers.h (added in the patch which adds the drivers) We also provide generic drivers for Clause 22 (10/100/1000), and Clause 45 (10G) PHYs. We also implement phy_reset(), and call it in phy_connect(). Because phy_reset() is essentially the same as miiphy_reset, but: a) must support 10G PHYs, and b) should use the phylib primitives, we implement miiphy_reset, using phy_reset(), but only when CONFIG_PHYLIB is set. Otherwise, we just use the old version. In this way, we save on compile size, even if we don't manage to save code size. Pulled ethtool.h and mdio.h from: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 782d640afd15af7a1faf01cfe566ca4ac511319d With many, many deletions so as to enable compilation under u-boot Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Detlev Zundel <dzu@denx.de>
| * miiphy: Fix some formatting issuesAndy Fleming2011-04-20-72/+72
| | | | | | | | | | | | | | | | Mostly putting a space between function name and "(", and doing return (foo) Signed-off-by: Andy Fleming <afleming@freescale.com> Acked-by: Detlev Zundel <dzu@denx.de>
* | Merge branch 'misc' of git://git.denx.de/u-boot-blackfinWolfgang Denk2011-04-20-102/+276
|\ \
| * | gpio: check request resultMike Frysinger2011-04-13-1/+4
| | | | | | | | | | | | | | | | | | Make sure the pin request passed before attempting to use it later on. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | gpio: generalize for all generic gpio providersMike Frysinger2011-04-13-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Blackfin gpio command isn't terribly Blackfin-specific. So generalize the few pieces into two new optional helpers: name_to_gpio() - turn a string name into a GPIO # gpio_status() - display current pin bindings (think /proc/gpio) Once these pieces are pulled out, we can relocate the cmd_gpio.c into the common directory. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | md5sum/sha1sum/unzip: split out of mondo mem fileMike Frysinger2011-04-13-104/+168
| | | | | | | | | | | | | | | | | | | | | | | | There's no real need to keep these functions in the cmd_mem file since they do not use any of the common global mem variables. So split them out into their own dedicated cmd files. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | crc32: make command optionalMike Frysinger2011-04-13-0/+8
| | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | make `go` optionalMike Frysinger2011-04-13-0/+4
| | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | env: make import/export optionalMike Frysinger2011-04-13-0/+8
| | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | | Merge branch 'master' of git://git.denx.de/u-boot-fdtWolfgang Denk2011-04-20-1/+1
|\ \ \
| * | | fdt_support: Fix buffer overflow in fdt_fixup_memory_banksKyle Moffett2011-04-17-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When fdt_fixup_memory_banks is called with 2-cell address and size fields in the device-tree (IE: 64-bit address and size), then it will overflow its on-stack "tmp" buffer. This fixes the buffer size and adds a comment explaining how many bytes need to be allocated per record. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Cc: Jerry Van Baren <vanbaren@cideas.com> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* | | Merge branch 'master' of git://git.denx.de/u-boot-mmcWolfgang Denk2011-04-20-1/+91
|\ \ \ | |/ / |/| |
| * | mmc: show mmc capacity using print_sizeMinkyu Kang2011-04-13-1/+2
| | | | | | | | | | | | | | | Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
| * | mmc: add generic mmc spi driverThomas Chou2011-04-13-0/+89
| |/ | | | | | | | | | | | | | | | | | | | | | | | | This patch supports mmc/sd card with spi interface. It is based on the generic mmc framework. It works with SDHC and supports multi blocks read/write. The crc checksum on data packet is enabled with the def, There is a subcomamnd "mmc_spi" to setup spi bus and cs at run time. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Andy Fleming <afleming@freescale.com>
* | Merge branch 'sf' of git://git.denx.de/u-boot-blackfinWolfgang Denk2011-04-13-36/+75
|\ \
| * | cmd_sf: use cmd_usage() in more placesMike Frysinger2011-04-12-30/+29
| | | | | | | | | | | | | | | | | | | | | Requires a little reworking of the code flow with sub-functions, but not a big deal. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | cmd_sf: drop device status message when probingMike Frysinger2011-04-12-3/+0
| | | | | | | | | | | | | | | | | | | | | The common spi flash layer displays useful info when probing, so no need for us to duplicate that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | cmd_sf: add handler for +len arg for erase commandRichard Retanubun2011-04-12-4/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds [+]len handler for the erase command that will automatically round up the requested erase length to the flash's sector_size. Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | | x86: Rename i386 to x86Graeme Russ2011-04-13-1/+1
| |/ |/| | | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* | common/cmd_bdinfo.c: fix do_bdinfo() for AVR32Andreas Bießmann2011-04-12-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes following warning message: ---8<--- cmd_bdinfo.c:458: warning: initialization from incompatible pointer type --->8--- There was a prototype change in 54841ab50c20d6fa6c9cc3eb826989da3a22d934 for argv[] pointer type to const. This change was not made for AVR32 cause this code came in later by a merge. Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
* | cmd_nvedit: use explicit typecast for printfAndreas Bießmann2011-04-12-2/+2
| | | | | | | | | | | | | | | | | | | | | | This patch fixes warnings in MAKEALL for avr32: ---8<--- cmd_nvedit.c: In function 'do_env_export': cmd_nvedit.c:663: warning: format '%zX' expects type 'size_t', but argument 3 has type 'ssize_t' --->8--- Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
* | Fix misc spelling errors found by lintianLoïc Minier2011-04-12-2/+2
|/ | | | Signed-off-by: Loïc Minier <loic.minier@linaro.org>
* bootm: replace blob_start with image_startLei Wen2011-04-11-1/+1
| | | | | | | | | | | For uImage always has a 64 bytes header, we couldn't expect to do the xip from the header but should xip from the image start. The latter logic in that section is also move the image from image_start to the load address, so sync this logic to the xip operation. Signed-off-by: Lei Wen <leiwen@marvell.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: ldrinfo: new commandMike Frysinger2011-04-08-0/+193
| | | | | | Simple command to decode/check an LDR image before we try to boot it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bootldr: use common definesMike Frysinger2011-04-08-13/+8
| | | | | | | Now that the common bootrom.h sets up defines for us, switch to them rather than our own local set. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 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
|\