summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Create PHY Lib for U-BootAndy Fleming2011-04-202-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-201-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 'sf' of git://git.denx.de/u-boot-blackfinWolfgang Denk2011-04-131-36/+75
|\
| * cmd_sf: use cmd_usage() in more placesMike Frysinger2011-04-121-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-121-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-121-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-131-1/+1
| | | | | | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* | common/cmd_bdinfo.c: fix do_bdinfo() for AVR32Andreas Bießmann2011-04-121-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-121-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-122-2/+2
|/ | | | Signed-off-by: Loïc Minier <loic.minier@linaro.org>
* bootm: replace blob_start with image_startLei Wen2011-04-111-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-082-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-081-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-052-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-041-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-041-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-021-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-211-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-211-1/+2
| | | | Signed-off-by: Tom Warren <twarren@nvidia.com>
* Fix build warnings in cmd_flash.cRemy Bohmer2011-02-191-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-192-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-151-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-151-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-121-1/+2
|\
| * cmd_ide: Fix an unused CONFIG_AU1X00 symbol to work as intendedShinya Kuribayashi2011-02-051-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-091-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-081-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-051-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-051-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-021-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-021-2/+2
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Print compiler and linker version with the version commandAlexander Holler2011-02-021-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-271-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-251-42/+44
|\
| * powerpc/8xxx: Add hwconfig APIs to address early parsing used by DDR initKumar Gala2011-01-191-42/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several users of the hwconfig APIs (8xxx DDR) before we have the environment properly setup. This causes issues because of the numerous ways the environment might be accessed because of the non-volatile memory it might be stored in. Additionally the access might be so early that memory isn't even properly setup for us. Towards resolving these issues we provide versions of all the hwconfig APIs that can be passed in a buffer to parse and leave it to the caller to determine how to allocate and populate the buffer. We use the _f naming convention for these new APIs even though they are perfectly useable after relocation and the environment being ready. We also now warn if the non-f APIs are called before the environment is ready to allow users to address the issues. Finally, we convert the 8xxx DDR code to utilize the new APIs to hopefully address the issue once and for all. We have the 8xxx DDR code create a buffer on the stack and populate it via getenv_f(). Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Wolfgang Denk <wd@denx.de>
* | Fix defines needed to enable command sha1sumAlexander Holler2011-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | Documented is CONFIG_CMD_SHA1, through confusion in the source CONFIG_CMD_SHA1 and CONFIG_CMD_SHA1SUM has to be used to enable sha1sum. Fix both, the documentation and the source, so that only CONFIG_CMD_SHA1SUM is needed to enable the command sha1sum. Signed-off-by: Alexander Holler <holler@ahsoftware.de>
* | cmd_jffs2: Fix get_part_sector_size_nor() overflow bugPeter Tyser2011-01-191-1/+1
|/ | | | | | | | | | | | | | When a flash partition was positioned at the very top of a 32-bit memory map (eg located at 0xf8000000 with a size of 0x8000000) get_part_sector_size_nor() would incorrectly calculate the partition's ending address to 0x0 due to overflow. When the overflow occurred get_part_sector_size_nor() would falsely return a sector size of 0. A sector size of 0 results in subsequent jffs2 operations failing. To workaround the overflow subtract 1 from calculated address of the partition endpoint. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* NAND: add the ability to directly write yaffs imageLei Wen2011-01-121-1/+14
| | | | | | | This patch add addition suffix to nand write to give the uboot the power to directly burn the yaffs image to nand. Signed-off-by: Lei Wen <leiwen@marvell.com>
* Revert "boot cmds: convert to getenv_yesno() with autostart"Wolfgang Denk2011-01-117-8/+9
| | | | | | | | | | 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>
* miiphy: convert to linux/mii.hMike Frysinger2011-01-092-40/+39
| | | | | | | | The include/miiphy.h header duplicates a lot of things from linux/mii.h. So punt all the things that overlap to keep the API simple and to make merging between U-Boot and Linux simpler. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* cmd editing: mark erase/tab seqs constantMike Frysinger2011-01-091-2/+2
| | | | | | These strings are only read, so no need to have them be writable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* cmd_mem: localize state variablesMike Frysinger2011-01-091-3/+3
| | | | | | These "last" variables aren't used outside of this file, so add static. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* load_addr: move to common env codeMike Frysinger2011-01-092-1/+2
| | | | | | | | | Rather than keep the load_addr definition with the bootm code (which just happens to use this), move it to the common env code. This way we can disable bootm support completely while retaining load_addr usage with many other commands. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* config_cmd_defaults.h: new header for common u-boot command defaultsMike Frysinger2011-01-091-1/+1
| | | | | | | | | | | | | We have config_defaults.h which are random configuration settings that everyone gets by default. We also have config_cmd_default.h which is a recommended list of defaults but boards have to opt into. Now we have config_cmd_defaults.h which is a list of defaults that everyone gets and has to actively opt out of. For now, we populate it with the bootm command which previously was unable to be disabled. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* env: re-add support for auto-completionMike Frysinger2011-01-092-27/+16
| | | | | | | Currently, only basic completion is supported (no globs), but this is what we had previously. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* cmd_net.c: fix build breakageWolfgang Denk2010-12-231-0/+1
| | | | | | | | | | | | Commit 722b061 "autocomplete: remove runtime handler install" caused some boards (like NETTA2_V2) to break with errors like these: cmd_net.c:296: error: expected expression before ',' token Fix this. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Mike Frysinger <vapier@gentoo.org>
* onenand: add yaffs write commandLei Wen2010-12-171-5/+36
| | | | | | | | | | | Yaffs image require to use the oob to store some info, so when we burn the yaffs image, we need to also write the image's oob part into flash. This patch add addition suffix to onenand write to give the uboot the power to directly burn the yaffs image to onenand. Signed-off-by: Lei Wen <leiwen@marvell.com>
* hashtable: drop all non-reentrant versionsMike Frysinger2010-12-1710-22/+24
| | | | | | | | | | | The non-reentrant versions of the hashtable functions operate on a single shared hashtable. So if two different people try using these funcs for two different purposes, they'll cause problems for the other. Avoid this by converting all existing hashtable consumers over to the reentrant versions and then punting the non-reentrant ones. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Merge branch 'master' of ../master into nextWolfgang Denk2010-12-165-16/+79
|\
| * hwconfig: Fix handling of env_hwconfig, board_hwconfig, and cpu_hwconfigKumar Gala2010-12-091-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | The handling of env_hwconfig, board_hwconfig, and cpu_hwconfig got broken when we removed the boards defining dummy board_hwconfig & cpu_hwconfig values. We fix this by handling the various strings in priority order. If hwconfig_parse returns NULL for a given string we check the next one in order (env_hwconfig, board_hwconfig, followed by cpu_hwconfig). Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
OpenPOWER on IntegriCloud