summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* command.c: Fix auto-completion for the full commands list caseAndrew Gabbasov2014-01-14-2/+2
| | | | | | | | | Compiling of full list of commands does not advance the counter, so it always results in an empty list. This seems to be (inadvertently?) introduced by commit 6c7c946cadfafdea80eb930e3181085b907a0362. Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
* Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2014-01-13-5/+9
|\
| * sandbox: spi: Adjust 'sf test' to work on sandboxSimon Glass2014-01-11-5/+9
| | | | | | | | | | | | | | | | Add map_sysmem() calls so that this test works correctly on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Hung-ying Tyan <tyanh@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
* | usb: ums: wait for usb cable connection before enter ums modePrzemyslaw Marczak2014-01-13-0/+24
|/ | | | | | | | Before this change ums mode can not be entered when device was using the same usb port for usb/uart communication. Switching USB cable from UART to USB always causes ums exit. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2014-01-10-41/+50
|\ | | | | | | | | | | | | | | | | | | Bringing in the MMC tree means that CONFIG_BOUNCE_BUFFER needed to be added to include/configs/exynos5-dt.h now. Conflicts: include/configs/exynos5250-dt.h Signed-off-by: Tom Rini <trini@ti.com>
| * arm64: generic board supportDavid Feng2014-01-09-7/+13
| | | | | | | | Signed-off-by: David Feng <fenghua@phytium.com.cn>
| * arm64: core supportDavid Feng2014-01-09-0/+1
| | | | | | | | | | | | | | Relocation code based on a patch by Scott Wood, which is: Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Feng <fenghua@phytium.com.cn>
| * cmd_pxe: remove compiling warningsDavid Feng2014-01-09-2/+2
| | | | | | | | Signed-off-by: David Feng <fenghua@phytium.com.cn>
| * fdt_support: 64bit initrd start address supportDavid Feng2014-01-09-32/+34
| | | | | | | | Signed-off-by: David Feng <fenghua@phytium.com.cn>
* | Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini2014-01-09-0/+23
|\ \
| * | mmc: add setdsr supportMarkus Niebel2014-01-09-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The eMMC and the SD-Card specifications describe the optional SET_DSR command. During measurements at our lab we found that some cards implementing this feature having really strong driver strengts per default. This can lead to voltage peaks above the specification of the host on signal edges for data sent from a card to the host. Since availability of a given card type may be shorter than the time a certain hardware will be produced it is useful to have support for this command (Alternative would be changing termination resistors and adapting the driver strength of the host to the used card.) Following proposal for an implementation: - new field that reflects CSD field DSR_IMP in struct mmc - new field for design specific DSR value in struct mmc - board code can set DSR value in mmc struct just after registering an controller - mmc_startup sends the the stored DSR value before selecting a card, if DSR_IMP is set Additionally the mmc command is extended to make is possible to play around with different DSR values. The concept was tested on a i.MX53 based platform using a Micron eMMC card where the default DSR is 0x0400 (12mA) but in our design 0x0100 (0x0100) were enough. To use this feature for instance on a mx53loco one have to add a call to mmc_set_dsr() in board_mmc_init() after calling fsl_esdhc_initialize() for the eMMC. Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* | | sandbox: Allow reading/writing of RAM bufferSimon Glass2014-01-08-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is useful to be able to save and restore the RAM contents of sandbox U-Boot either for setting up tests, for later analysys, or for chaining together multiple tests which need to keep the same memory contents. Add a function to provide a memory file for U-Boot. This is read on start-up and written when shutting down. If the file does not exist on start-up, it will be created when shutting down. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | sandbox: Allow the console to work earlierSimon Glass2014-01-08-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With sandbox, errors and problems may be reported before console_init_f() is executed. For example, an argument may not parse correctly or U-Boot may panic(). At present this output is swallowed so there is no indication what is going wrong. Adjust the console to deal with a very early sandbox setup, by detecting that there is no global_data yet, and calling os functions in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | sandbox: Allow return from board_init_f()Simon Glass2014-01-08-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The execution flow becomes easier if we can return from board_init_f() as ARM does. We can control things from start.c instead of having to call back into that file from other places. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | sandbox: block driver using host file/device as backing storeHenrik Nordström2014-01-08-0/+64
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a way to use any host file or device as a block device in U-Boot. This can be used to provide filesystem access within U-Boot to an ext2 image file on the host, for example. The support is plumbed into the filesystem and partition interfaces. We don't want to print a message in the driver every time we find a missing device. Pass the information back to the caller where a message can be printed if desired. Signed-off-by: Henrik Nordström <henrik@henriknordstrom.net> Signed-off-by: Simon Glass <sjg@chromium.org> - Removed change to part.c get_device_and_partition() Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* | common/fdt_support.c: avoid unintended return from fdt_fixup_memory_banks()Miao Yan2013-12-16-2/+3
| | | | | | | | | | | | | | | | | | | | fdt_fixup_memory_banks() will add and update /memory node in device tree blob. In the case that /memory node doesn't exist, after adding a new one, this function returns error. The correct behavior should be continuing to update its properties. Signed-off-by: Miao Yan <miao.yan@windriver.com>
* | common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot ↵Miao Yan2013-12-16-12/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interface. The next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware description mechanism. For PowerPC, the boot interface conforms to the ePAPR standard, which is: void (*kernel_entry)(ulong fdt_addr, ulong r4 /* 0 */, ulong r5 /* 0 */, ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */, ulong r8 /* 0 */, ulong r9 /* 0 */) For ARM, the boot interface is: void (*kernel_entry)(void *fdt_addr) Signed-off-by: Miao Yan <miao.yan@windriver.com> [trini: Fix build error when !CONFIG_OF_FDT is set, typo on PowerPC, missing extern ft_fixup_num_cores] Signed-off-by: Tom Rini <trini@ti.com>
* | common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF.Miao Yan2013-12-13-3/+12
| | | | | | | | | | | | | | | | | | do_bootm_vxworks now is available under the configuration option CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems that supported by bootm command. The bootvx command still depneds on CONFIG_CMD_ELF. Signed-off-by: Miao Yan <miao.yan@windriver.com>
* | Makefile: delete unnecessary CPPFLAGS settingsMasahiro Yamada2013-12-13-2/+0
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | board_f: explicitly disable console on early bootAlexey Brodkin2013-12-13-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If U-Boot build with DEBUG enabled/defined the first call of "debug" function (that dumps data to any available console) will happen before zeroing of initial "gd" in init call "zero_global_data" in "init_sequence_f". And if stack was not filled with zeros chances are high that "gd->have_console" won't be 0. In its turn it will cause attempt to output things to non-initialized yet serial console. So for safety and predictability we set "gd->have_console = 0". Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Mischa Jonker <mjonker@synopsys.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* | Correct vxWorks elf boot to load at correct addressStany MARCEL2013-12-13-3/+3
| | | | | | | | | | | | | | argv[0] contains bootvx (command name) not the load address, if called with argv < 2 use load_addr, else use address argument given to the command. Signed-off-by: Stany MARCEL <smarcel@novasys-ingenierie.com>
* | netbsd:fix documentation typo.Kees Jongenburger2013-12-13-4/+4
|/ | | | | | | The documentation suggested the arguments where passed over r3-r6 while the code below simply does that over r0-r3. Cc: Kumar Gala <galak@kernel.crashing.org>
* cmd_eeprom: bug fix for i2c read/writeKuo-Jung Su2013-12-05-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The local pointer of address (i.e., addr) only gets referenced under SPI mode, and it won't be appropriate to pass only 1-byte addr[1] to i2c_read/i2c_write while CONFIG_SYS_I2C_EEPROM_ADDR_LEN > 1. 1. In U-boot's I2C model, the address would be re-assembled to a byte string in MSB order inside I2C controller drivers. 2. The 'CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW' option which could be found at soft_i2c.c is always turned on in cmd_eeprom.c, the addr[0] always contains the device address with overflowed MSB address bits. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> cc: Peter Tyser <ptyser@xes-inc.com> Cc: Heiko Schocher <hs@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Mischa Jonker <mjonker@synopsys.com>
* Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini2013-11-25-18/+61
|\
| * net: add support for extended registers to mdio commandStefano Babic2013-11-22-16/+59
| | | | | | | | | | | | | | | | Some phys (Micrel) have additional registers that can be accessed using a special sequence. This patch allows to use standard "mdio" command to accesss these registers. Signed-off-by: Stefano Babic <sbabic@denx.de>
| * net: trivial: Fix typos in mii field descriptionsStephan Bauroth2013-11-22-2/+2
| | | | | | | | | | Signed-off-by: Stephan Bauroth <stephan.bauroth@iav.de> Patch: 265707
* | common: Delete unnecessary rules.Masahiro Yamada2013-11-25-4/+1
| | | | | | | | | | | | | | | | The directory tools/ is always built before common/. So when envcrc tool is necessary in common/Makefile, it already exists. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | hash.c: Correct non-hash subcommand crc32 addr-save supportTom Rini2013-11-25-2/+2
|/ | | | | | | | | | | | | In the case of not having CONFIG_CMD_HASH but having CONFIG_CMD_CRC32 enabled (and not CONFIG_CRC32_VERIFY), we end up in this part of the code path on hash_command(). However, we will only have exactly 3 args here, and 3 > 3 is false, and we will not try and store the hash at the address given as arg #3. The next problem however is that we've been moving argv around so the third value is now in argv[0] not argv[3]. Confirmed on AM335x Beaglebone White. Signed-off-by: Tom Rini <trini@ti.com>
* cmd_eeprom: fix i2c_{read|write} usage if env is in I2C EEPROMAlexey Brodkin2013-11-13-2/+2
| | | | | | | | | | | | | | | Data "offset" is not used directly in case of I2C EEPROM. Istead it is split into "block number" and "offset within mentioned block". Which are "addr[0]" and "addr[1]" respectively. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> cc: Peter Tyser <ptyser@xes-inc.com> Cc: Heiko Schocher <hs@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Mischa Jonker <mjonker@synopsys.com>
* lcd: allow overriding lcd_get_size()Anatolij Gustschin2013-11-12-3/+7
| | | | | | | | | | | | | | Remove the redundant lcd_line_length initialisation which sneaked in when an earlier version of the patch of commit 6d330719 has been rebased. Some lcd drivers need to setup lcd_line_length not from the panel_info parameters but by different means. Make the lcd_get_size() weak to allow setting lcd_line_length in a driver specific way. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Stephen Warren <swarren@wwwdotorg.org>
* Merge branch 'master' of git://www.denx.de/git/u-boot-usbTom Rini2013-11-08-28/+23
|\
| * usb: ums: add ums exit feature by ctrl+c or by detach usb cablePrzemyslaw Marczak2013-11-08-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows exiting from UMS mode to u-boot prompt by detaching usb cable or by pressing ctrl+c. Add new config: CONFIG_USB_CABLE_CHECK. If defined then board file should provide function: usb_cable_connected() (include/usb.h) that return 1 if cable is connected and 0 otherwise. Changes v2: - add a note to the README Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Marek Vasut <marex@denx.de>
| * usb: ums: allows using every mmc device with ums.Przemyslaw Marczak2013-11-08-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Before this change ums command only allowed use of mmc 0. Now this argument can be set. Changes: - remove mmc device number checking because it is always positive number - remove printing "no such device" - it is done by find_mmc_device() Change-Id: I767e45151ad515c7bef19e6c13087374f5e23c11 Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Marek Vasut <marex@denx.de>
| * usb: ums: code refactoring to improve reusability on other boards.Przemyslaw Marczak2013-11-08-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces some cleanups to ums code. Changes: ums common: - introduce UMS_START_SECTOR and UMS_NUM_SECTORS as defined in usb_mass_storage.h both default values as 0 if board config doesn't define them common cleanup changes: - change name of struct "ums_board_info" to "ums" - "ums_device" fields are moved to struct ums and "dev_num" is removed - change function name: board_ums_init to ums_init - remove "extern" prefixes from usb_mass_storage.h cmd_usb_mass_storage: - change error() to printf() if need to print info message - change return values to command_ret_t type at ums command code - add command usage string Changes v2: ums common: - always returns number of read/write sectors - coding style clean-up ums gadget: - calculate amount of read/write from device returned value. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Marek Vasut <marek.vasut@gmail.com>
* | env: fix the env export varnamePierre Aubert2013-11-08-4/+2
| | | | | | | | | | | | | | | | The env export command doesn't export the first variable of the list since commit 5a31ea04c9ee5544fbb70ad7597ea4b294840eab "env grep" - reimplement command using hexport_r() Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
* | autoboot: add an option to override keyed autobootMark Langsdorf2013-11-08-2/+2
| | | | | | | | | | | | | | | | As originally implemented, setting the AUTOBOOT_KEYED config option will prevent users from breaking into the autoboot script with ctrl-c. Restore that option with a new config symbol. Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
* | cmd_zfs: normalize 'file not found' errorsLuka Perkov2013-11-08-1/+1
| | | | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org>
* | cmd_reiser: normalize 'file not found' errorsLuka Perkov2013-11-08-1/+1
| | | | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org>
* | cmd_ubifs: normalize 'file not found' errorsTim Harvey2013-11-08-4/+8
| | | | | | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* | cmd/gpt: Support gpt command for all devicesEgbert Eich2013-11-08-26/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | The gpt command was only implemented for mmc devices. There is no reason why this command should not be generalized and be applied all other storage device classes. This change both simplifies the implementation and eliminates a build failure for systems that don't support mmcs. Signed-off-by: Egbert Eich <eich@suse.com> Tested-by: Piotr Wilczek <p.wilczek@samsung.com> [trini: Change coding style slightly] Signed-off-by: Tom Rini <trini@ti.com>
* | common/cmd_bootm.c: fix subcommand processing in OS specific do_bootm_xxx() ↵Miao Yan2013-11-08-24/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions In commit "5c427e4: use BOOTM_STATE_OS_CMDLINE flag for plain bootm" and "3d187b3: Only pass BOOTM_STATE_OS_CMDLINE on PowerPC/MIPS", BOOTM_STATE_OS_CMDLINE was added to do_bootm for PowerPC and MIPS. This breaks other OSes (vxworks, netbsd, plan9,...) that don't support subcommand processing, e.g. they all contain the following code in their do_bootm_xxx(): if (flag & BOOTM_STATE_OS_PREP) return 0; if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; which will result a "subcommand not supported" error. This patch changes the above logic to: /* if not go command, pretend everything to be OK */ if (flag != BOOTM_STATE_OS_GO) return 0; Signed-off-by: Miao Yan <miao.yan@windriver.com>
* | cmd_nvedit.c: Add env exists commandAndrew Ruder2013-11-08-0/+23
|/ | | | | | | | | | | | | | | | | | | | env exists is a way to test (in hush) if an environment variable exists. A workaround existed using printenv but this new command doesn't require all the stdout/stderr redirection to prevent printing information to the screen. Example: $ set testexists 1 $ env exists testexists && echo "yes" yes $ env exists testexists || echo "no" $ set testexists $ env exists testexists && echo "yes" $ env exists testexists || echo "no" no $ Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
* fpga: Add support for gzip images with bitstreamsMichal Simek2013-11-06-3/+19
| | | | | | | | | | | | | | | | | | | Here is the set of command which has been performed to proof this feature. gzip < fpga.bin > fpga.bin.gz mkimage -A arm -O u-boot -T firmware -C gzip \ -a 20000000 -n "zc702_fpga_bin" -d fpga.bin.gz fpga.bin.gz.ub tftp 100000 fpga.bin.gz.ub fpga loadmk 0 100000 This flow should speedup loading bitstream data from external memory and save image footprint in non volatile memory. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
* pxe: fix handling of absolute pathsRob Herring2013-11-04-1/+8
| | | | | | | | | | | pxelinux and syslinux differ in their handling of absolute paths in menu files. A pxelinux path is aways prepended with the bootfile path while syslinux allows for absolute paths. u-boot was always treating a leading / as an absolute path breaking some pxelinux setups. Fix this by adding a flag to distinguish pxelinux vs. syslinux behavior. Reported-by: Ian Campbell <Ian.Campbell@citrix.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* common: convert makefiles to Kbuild styleMasahiro Yamada2013-10-31-237/+190
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2013-10-21-36/+152
|\
| * usb: add enum usb_init_type parameter to usb_lowlevel_initTroy Kisky2013-10-20-1/+1
| | | | | | | | | | | | This parameter will later be used to verify OTG ports. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
| * usb: rename board_usb_init_type to usb_init_typeTroy Kisky2013-10-20-1/+1
| | | | | | | | | | | | | | | | | | | | This will be used by usb_lowlevel_init so it will no longer be used by only board specific functions. Move definition of enum usb_init_type higher in file so that it will be available for usb_low_level_init. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
| * cmd:thor: Support for TIZEN's download command (thordown)Lukasz Majewski2013-10-20-0/+73
| | | | | | | | | | | | | | | | New command - thordown - has been added to support downloading data via lthor TIZEN program. It is similar to dfu command syntax and reuses its code for flashing data. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
| * usb: new board-specific USB init interfaceMateusz Zalega2013-10-20-33/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit unifies board-specific USB initialization implementations under one symbol (usb_board_init), declaration of which is available in usb.h. New API allows selective initialization of USB controllers whenever needed. Signed-off-by: Mateusz Zalega <m.zalega@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com>