summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* env, eeprom: add redundant environment supportHeiko Schocher2010-01-18-4/+127
| | | | | | | | Add redundant environment support for environment lying on a EEPROM. Tested on uppcoming suen3 support Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
* cmd_eeprom: I2C updatesHeiko Schocher2010-01-18-11/+69
| | | | | | | | | | | | | - CONFIG_ENV_EEPROM_IS_ON_I2C define this, if you have I2C and SPI activated, and your EEPROM, which holds the environment, is on the I2C bus. - CONFIG_I2C_ENV_EEPROM_BUS if you have an Environment on an EEPROM reached over I2C muxes, you can now define, how to reach this EEPROM. Signed-off-by: Heiko Schocher <hs@denx.de>
* cmd_bootm.c: Change interpretation of standalone image parameters.Detlev Zundel2010-01-18-3/+0
| | | | | | | | | | Current code uses the second argument to bootm for standalone images to override the load address specified in the image instead of passing all parameters as is to the application. This behaviour is not documented and not in line with how the go command works for standalone applications, so we simply drop it. Signed-off-by: Detlev Zundel <dzu@denx.de>
* cmd_bootm.c: Do not load a ramdisk when not booting a kernel.Detlev Zundel2010-01-18-1/+2
| | | | | | | In case we boot an image marked as 'standalone' and 'linux', the current code erroneously tried to load a ramdisk. Signed-off-by: Detlev Zundel <dzu@denx.de>
* kgdb: update mem2hex/hex2mem funcsRobin Getz2010-01-18-11/+32
| | | | | | | | | | Convert the funcs to do the conversion inline so that we can do the copy all at once with memcpy. This let's us push out an weird arch-specific issue with accessing different regions of memory to the memcpy function like the MMRs on Blackfin systems, and it should be a bit faster. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* kgdb: add default generic stubsRobin Getz2010-01-18-1/+65
| | | | | | | | | The default kgdb functions can be implemented with common U-Boot functions, so rather than force everyone to copy & paste these things, create a set of weak stubs. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* config_defaults.h: new header for common u-boot config defaultsMike Frysinger2010-01-18-4/+0
| | | | | | | | There are a bunch of features in U-Boot that we want to enable by default, and it's best if we centralize them in one place rather than updating all the board files out there. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* malloc: return NULL if not initialized yetWolfgang Denk2010-01-15-0/+6
| | | | | | | | | | | When malloc() was called before it was properly initialized (as would happen if when used before relocation to RAM) it returned random, non-NULL values, which called all kinds of difficult to debug subsequent errors. Make sure to return NULL when initialization was not done yet. Signed-off-by: Wolfgang Denk <wd@denx.de>
* onenand: Fix compile errors due to FlexOneNANDSanjeev Premi2010-01-06-1/+8
| | | | | | | | | | | | | | | | | | | | This patch fixes the compile error while trying to compile for omap3evm. env_onenand.c: In function 'env_relocate_spec': env_onenand.c:70: error: 'CONFIG_ENV_ADDR_FLEX' undeclared (first use in this function) env_onenand.c:70: error: (Each undeclared identifier is re ported only once env_onenand.c:70: error: for each function it appears in.) env_onenand.c: In function 'saveenv': env_onenand.c:106: error: 'CONFIG_ENV_ADDR_FLEX' undeclare d (first use in this function) env_onenand.c:107: error: 'CONFIG_ENV_SIZE_FLEX' undeclare d (first use in this function) Signed-off-by: Sanjeev Premi <premi@ti.com> Acked-by: Tom Rix <Tom.Rix@windriver.com>
* move prototypes for gunzip() and zunzip() to common.hWolfgang Wegner2009-12-21-6/+0
| | | | | | | | Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus repeated in every file using it. This patch moves the prototypes to common.h and removes all prototypes distributed anywhere else. Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
* usb: write command for RAW partition.Mahavir Jain2009-12-20-0/+123
| | | | | | | | | | | | | | This patch implements write support to usb device with raw partition. It will be useful for filesystem write support to usb device from u-boot in future. Tested with writing kernel image to raw usb disk & booting with usb read command into ram. [Note: run usb part to get info about start sector & number of sectors on a partition for usb write operation.] Signed-off-by: Mahavir Jain <mjain@marvell.com>
* USB Consolidate descriptor definitionsTom Rix2009-12-20-45/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The header files usb.h and usbdescriptors.h have the same nameed structure definitions for usb_config_descriptor usb_interface_descriptor usb_endpoint_descriptor usb_device_descriptor usb_string_descriptor These are out right duplicates in usb.h usb_device_descriptor usb_string_descriptor This one has extra unused elements usb_endpoint_descriptor unsigned char bRefresh unsigned char bSynchAddress; These in usb.h have extra elements at the end of the usb 2.0 specified descriptor and are used. usb_config_descriptor usb_interface_descriptor The change is to consolidate the definition of the descriptors to usbdescriptors.h. The dublicates in usb.h are removed. The extra element structure will have their name shorted by removing the '_descriptor' suffix. So usb_config_descriptor -> usb_config usb_interface_descriptor -> usb_interface For these, the common descriptor elements are accessed now by an element 'desc'. As an example - if (iface->bInterfaceClass != USB_CLASS_HUB) + if (iface->desc.bInterfaceClass != USB_CLASS_HUB) This has been compile tested on MAKEALL arm, ppc and mips. Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
* common: delete CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOULHeiko Schocher2009-12-08-22/+4
| | | | | | | | | There is more and more usage of printing 64bit values, so enable this feature generally, and delete the CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL defines. Signed-off-by: Heiko Schocher <hs@denx.de>
* Merge branch 'master' of ../work into nextWolfgang Denk2009-12-07-4/+0
|\
| * i2c: fix dangling comment in do_i2c_mw()Heiko Schocher2009-12-07-4/+0
| | | | | | | | | | | | | | | | commit bd3784df94bfeca43fbf34094df9cb1bd3ecca3b deleted some unused code in do_i2c_mw(), but missed to also remove the respective commment. This patch fixes this. Signed-off-by: Heiko Schocher <hs@denx.de>
* | Merge branch 'master' into nextWolfgang Denk2009-12-07-2/+2
|\ \ | |/ | | | | | | | | | | Conflicts: lib_generic/zlib.c Signed-off-by: Wolfgang Denk <wd@denx.de>
| * bootm: Fix help message's sub-command orderingPeter Tyser2009-12-07-2/+2
| | | | | | | | | | | | | | | | | | | | The help message for the 'bootm' command listed the 'cmdline' and 'bdt' sub-commands in the wrong order which resulted in the error below when following the 'help' command's instructions: "Trying to execute a command out of order" Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* | Merge branch 'master' into nextWolfgang Denk2009-12-05-147/+14
|\ \ | |/ | | | | | | | | | | | | Conflicts: board/esd/plu405/plu405.c drivers/rtc/ftrtc010.c Signed-off-by: Wolfgang Denk <wd@denx.de>
| * Remove superfluous preprocessor tests from some cmd_*.c files.Robert P. J. Day2009-12-02-8/+0
| | | | | | | | | | | | | | | | | | | | A small number of common/cmd_*.c files contain preprocessor tests that are apparently superfluous since those same tests are used in the Makefile to control the compilation of those files. Those tests are clearly redundant as long as they surround the entirety of the source in those files. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
| * Removes dead code in the file common/cmd_i2c.cPratap Chandu2009-12-02-8/+0
| | | | | | | | | | | | | | | | There is some dead code enclosed by #if 0 .... #endif in the file common/cmd_i2c.c This patch removes the dead code. Signed-off-by: Pratap Chandu <pratap.rrke@gmail.com>
| * cmd_date: Fix spelling in error message.Magnus Lilja2009-12-02-3/+3
| | | | | | | | Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
| * Move do_irqinfo() to common/cmd_irq.cPeter Tyser2009-12-02-11/+9
| | | | | | | | | | | | | | cmd_irq.c is a much better home and it is already conditionally compiled based on CONFIG_CMD_IRQ. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
| * cmd_license: Remove unneeded #ifdef CONFIG_CMD_LICENSEPeter Tyser2009-12-02-4/+0
| | | | | | | | | | | | cmd_license is already conditionally compiled at the Makefile-level. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
| * circbuf: Move to lib_generic and conditionally compilePeter Tyser2009-12-02-111/+0
| | | | | | | | | | | | | | circbuf could be used as a generic library and is only currently needed when CONFIG_USB_TTY is defined. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
| * bootm: mark local boot_os[] table staticMike Frysinger2009-11-24-1/+1
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Repair build fail in case CONFIG_PPC=n and CONFIG_FIT=yRemy Bohmer2009-11-24-1/+1
| | | | | | | | Signed-off-by: Remy Bohmer <linux@bohmer.net>
* | add lzop decompression supportPeter Korsgaard2009-12-05-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Add lzop decompression support to the existing lzo bitstream handling (think gzip versus zlib), and support it for uImage decompression if CONFIG_LZO is enabled. Lzop doesn't compress as good as gzip (~10% worse), but decompression is very fast (~0.7s faster here on a slow ppc). The lzop decompression code is based on Albin Tonnerre's recent ARM Linux lzo support patch. Cc: albin.tonnerre@free-electrons.com Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* | i386: Fix malloc initializationGraeme Russ2009-12-05-6/+0
| | | | | | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* | exports: rewrite jump table initMike Frysinger2009-12-02-31/+27
| | | | | | | | | | | | | | | | | | | | | | | | The current jump table init fails to initialize a bunch of exported symbols (forceenv/do_reset/etc...). Rather than fix just these few missing pieces, rewrite the code to utilize the existing list of exported symbols -- _exports.h. Since every exported symbol has to be listed in this header, it makes sense to use it so that we only ever have one list that needs to be updated and things can't fall out of sync again. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Add 'true' and 'false' commandsPeter Tyser2009-11-23-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These commands are only enabled when the hush shell is enabled and can be useful in scripts such as: while true do echo "Booting OS..."; run $bootcmd; echo "Booting OS failed"; sleep 10; done Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* | cmd_help: General cleanupPeter Tyser2009-11-23-14/+7
| | | | | | | | | | | | | | Shorten the overly-verbose help message of 'help' and clean up some redundant ifdefery while we're at it. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* | command.c: Break commands out to appropriate cmd_*.c filesPeter Tyser2009-11-23-233/+353
| | | | | | | | | | | | | | command.c should contain common code related to commands, not miscellaneous command implementations. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* | ENV Variable support for Flex-OneNANDAmul Kumar Saha2009-11-13-0/+10
| | | | | | | | | | | | | | | | Define and use CONFIG_ENV_ADDR_FLEX and CONFIG_ENV_SIZE_FLEX for storing environment variables. Signed-off-by: Rohit Hagargundgi <h.rohit@samsung.com> Signed-off-by: Amul Kumar Saha <amul.saha@samsung.com>
* | cmd_nand: Move conditional compilation to MakefilePeter Tyser2009-11-13-5/+1
| | | | | | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* | cmd_nand: Remove duplicate includePeter Tyser2009-11-13-8/+0
|/ | | | | | Also remove vague, unnecessary comment Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Add 'editenv' commandPeter Tyser2009-10-27-0/+40
| | | | | | | | | The editenv command can be used to edit an environment variable. Editing an environment variable is useful when one wants to tweak an existing variable, for example fix a typo or change the baudrate in the 'bootargs' environment variable. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* setenv(): Delete 0-length environment variablesPeter Tyser2009-10-27-1/+1
| | | | | | | | | | | | Previously setenv() would only delete an environment variable if it was passed a NULL string pointer as a value. It should also delete an environment variable when it encounters a valid string pointer of 0-length. This change/fix is generally useful and is necessary for the upcoming "editenv" command. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* readline(): Add ability to modify a string bufferPeter Tyser2009-10-27-0/+10
| | | | | | | | | | | | If the 'buf' parameter is a non-0-length string, its contents will be edited. Previously, the initial contents of 'buf' were ignored and the user entered its contents from scratch. This change is necessary to support the upcoming "editenv" command but could also be used for future commands which require a user to modify an existing string. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* cread_line(): Remove unused variablesPeter Tyser2009-10-27-4/+1
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Check for NULL prompt in readline_into_buffer()Peter Tyser2009-10-27-1/+2
| | | | | | | | | | | | | Previously, passing readline() or readline_into_buffer() a NULL 'prompt' parameter would result in puts() printing garbage when CONFIG_CMDLINE_EDITING was enabled. Note that no board currently triggers this bug. Enabling CONFIG_CMDLINE_EDITING on some boards (eg bab7xx) would result in the bug appearing. This change is only intended to prevent someone from running into this issue in the future. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk2009-10-27-1/+21
|\
| * fdt_support: Add multi-serial support for stdout fixupAnton Vorontsov2009-10-26-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | Currently fdt_fixup_stdout() is using hard-coded CONFIG_CONS_INDEX constant. With multi-serial support, the CONS_INDEX may no longer represent actual console, so we should try to extract port number from the current stdio device name instead of always hard-coding the constant value. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Gerald Van Baren <vanbaren@cideas.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | Revert "env: only build env_embedded and envcrc when needed"Wolfgang Denk2009-10-27-0/+10
|/ | | | | | Breaks building on many boards, and no really clean fix available yet. This reverts commit 6dab6add2d8ee80905234b326abc3de11be1d178.
* sf: add GPL-2 license infoMike Frysinger2009-10-24-0/+2
| | | | | | | Some of the new spi flash files were missing explicit license lines. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* fdt: Fix fdt padding issue for initrd mem_rsvKumar Gala2009-10-24-2/+3
| | | | | | | | | | | | | Its possible that we end up with a device tree that happens to be a particular size that after we call fdt_resize() we don't have any space left for the initrd mem_rsv. Fix this be adding a second mem_rsv into the size calculation. We had one to cover the fdt itself and we have the potential of adding a second for the initrd. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* Merge branch 'master-sync' of git://git.denx.de/u-boot-armWolfgang Denk2009-10-24-0/+18
|\
| * s5pc1xx: support serial driverMinkyu Kang2009-10-13-0/+18
| | | | | | | | | | | | | | | | This patch includes the serial driver for s5pc1xx. s5pc1xx uart driver needs own register setting and clock configuration. So, need to special driver. Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | fdt: Add fdt_fixup_nor_flash_size() to fixup NOR FLASH size in dtbStefan Roese2009-10-23-0/+44
| | | | | | | | | | | | | | | | | | | | This function can be used to update the size in the "reg" property of the NOR FLASH device nodes. This is necessary for boards with non-fixed NOR FLASH sizes. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Gerald Van Baren <vanbaren@cideas.com> Acked-by: Wolfgang Denk <wd@denx.de>
* | lcd: remove '#if 0' 32-bit scroll, now memcpy does itAlessandro Rubini2009-10-18-21/+0
| | | | | | | | | | Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
* | setenv: do console redirection even if previously unsetAlessandro Rubini2009-10-18-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If "stdout" is not previously set, doing "setenv stdout lcd" had no effect, since console redirection only worked if the environment variable was already set; the second time you run setenv it worked. Most default environments lack stdin/out/err definitions, so I'm sure I'm not alone with this problem. This patch simply moves a block of code out of a conditional, to do the same work even if the variable was previously unset. Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>