summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Fix loading freeze when netconsole is activeFrederic Leroy2013-09-201-0/+1
| | | | | | | | | | | | | Netconsole calls eth_halt() before giving control to another operating system. But the state machine of netconsole don't take it into account. Thus, netconsole calls network functions of an halted network device, making the whole system freeze. Rather than modifying the state machine of netconsole, we just unregister the current network device before booting. It does work because nc_send_packet() verifies that the current network device is not null. Signed-off-by: Frédéric Leroy <fredo@starox.org>
* Fix some obvious typos across multiple subsystems.Robert P. J. Day2013-09-204-6/+6
| | | | | | | | | | Typoes fixed: "partion" -> "partition" "retrive", "retreive" -> "retrieve" "th" -> "to" Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
* bootm: use BOOTM_STATE_OS_CMDLINE flag for plain bootmPaul Burton2013-09-201-2/+3
| | | | | | | | | | | | | | | | | | | A plain bootm used to call the architecture specific boot function with no flags, but was modified by commit 35fc84fa "Refactor the bootm command to reduce code duplication" to call the architecture specific boot function multiple times with various flags in sequence. The BOOTM_STATE_OS_CMDLINE flag was not used, indeed it seems that at least ARM prepares the command line on BOOTM_STATE_OS_PREP. However on MIPS since commit 59e8cbdb "MIPS: bootm: refactor initialisation of kernel cmdline" the command line is not prepared in response to a BOOTM_STATE_OS_PREP flag, only on BOOTM_STATE_OS_CMDLINE or a call with no flags. The end result is that a combination of those 2 commits leads to MIPS boards booting kernels with no command line arguments. An extra invocation of the architecture specific boot function with BOOTM_STATE_OS_CMDLINE fixes this. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
* Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2013-09-161-1/+12
|\
| * cmd_sf: let "sf update" preserve the final part of the last sectorGerlando Falauto2013-08-271-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Since "sf update" erases the last block as a whole, but only rewrites the meaningful initial part of it, the rest would be left erased, potentially erasing meaningful information. So, as a safety measure, have it rewrite the original content. Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com> Cc: Valentin Longchamp <valentin.longchamp@keymile.com> Cc: Holger Brunck <holger.brunck@keymile.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-09-061-0/+1
|\ \
| * \ Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD2013-09-051-0/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/serial/serial.c The conflict above was a trivial case of adding one init function in each branch, and manually resolved in merge.
| | * | ARM: mxs: tools: Add mkimage support for MXS bootstreamMarek Vasut2013-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mkimage support for generating and verifying MXS bootstream. The implementation here is mostly a glue code between MXSSB v0.4 and mkimage, but the long-term goal is to rectify this and merge MXSSB with mkimage more tightly. Once this code is properly in U-Boot, MXSSB shall be deprecated in favor of mkimage-mxsimage support. Note that the mxsimage generator needs libcrypto from OpenSSL, I therefore enabled the libcrypto/libssl unconditionally. MXSSB: http://git.denx.de/?p=mxssb.git;a=summary The code is based on research presented at: http://www.rockbox.org/wiki/SbFileFormat Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Otavio Salvador <otavio@ossystems.com.br>
* | | | bootm: allow correct bounds-check of destinationKees Cook2013-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While nothing presently examines the destination size, it should at least be correct so that future users of sys_mapmem() will not be surprised. Without this, it might be possible to overflow memory. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* | | | sandbox: Correct compiler warnings in cmd_bootm/cmd_ximgSimon Glass2013-09-032-6/+9
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct the following warnings found with sandbox when compression is enabled. cmd_bootm.c: In function 'bootm_load_os': cmd_bootm.c:443:11: warning: passing argument 4 of 'lzop_decompress' from incompatible pointer type [enabled by default] /usr/local/google/c/cosarm/src/third_party/u-boot/files/include/linux/lzo.h:31:5: note: expected 'size_t *' but argument is of type 'uint *' cmd_ximg.c: In function 'do_imgextract': cmd_ximg.c:225:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cmd_ximg.c:225:14: warning: 'hdr' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Kees Cook <keescook@chromium.org>
* | | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2013-08-273-26/+102
|\ \ \
| * | | console: usb: kbd: To fix slow TFTP bootingJim Lin2013-08-261-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TFTP booting is slow when a USB keyboard is installed and stdin has usbkbd added. This fix is to change Ctrl-C polling for USB keyboard to every second when NET transfer is running. My previous patch is expected to be put into usb_kbd_testc(). But it went into usb_kbd_getc() after applied. This patch is to put change in correct place. Signed-off-by: Jim Lin <jilin@nvidia.com>
| * | | console: usb: kbd: To improve TFTP booting performanceJim Lin2013-08-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TFTP booting is slow when a USB keyboard is installed and stdin has usbkbd added. This fix is to change Ctrl-C polling for USB keyboard to every second when NET transfer is running. Signed-off-by: Jim Lin <jilin@nvidia.com>
| * | | usb: Use well-known descriptor sizes when parsing configurationJulius Werner2013-08-262-26/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing USB configuration parsing code relies on the descriptors' own length values when reading through the configuration blob. Since the size of those descriptors is always well-defined, we should rather use the known sizes instead of trusting device-provided values to be correct. Also adds some safety to potential out-of-order descriptors. Change-Id: I16f69dfdd6793aa0fe930b5148d4521f3e5c3090 Signed-off-by: Julius Werner <jwerner@chromium.org>
| * | | USB: usb-hub: Add a weak function for resetting devicesDan Murphy2013-08-261-0/+12
| | |/ | |/| | | | | | | | | | | | | | | | Add a __weak function that can be overridden to reset devices attached to an ehci devices after the FEAT_POWER has been submitted Signed-off-by: Dan Murphy <dmurphy@ti.com>
* | | i2c: fix i2c dev command for not using new frameworkHeiko Schocher2013-08-271-0/+2
|/ / | | | | | | | | | | | | | | | | i2c dev command does not work anymore for legacy drivers because a check is executed that is valid only in the new framework. Signed-off-by: Heiko Schocher <hs@denx.de> Tested-by: Stefano Babic <sbabic@denx.de>
* | env_nand.c: support falling back to redundant env when writingPhil Sutter2013-08-221-62/+54
| | | | | | | | | | | | | | | | | | | | Without this patch, when the currently chosen environment to be written has bad blocks, saveenv fails completely. Instead, when there is redundant environment fall back to the other copy. Environment reading needs no adjustment, as the fallback logic for incomplete writes applies to this case as well. Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
* | cmd_nand: Do not show usage when scrub is abortedMasahiro Yamada2013-08-221-2/+2
| | | | | | | | | | | | | | | | | | | | When executing nand scrub, the user gets the prompt: Really scrub this NAND flash? <y/N> We do not want the annoying usage displayed when saying N here. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | cmd_nand: slight optimization of nand_dump functionMasahiro Yamada2013-08-221-5/+8
| | | | | | | | | | | | | | | | | | | | If a non-zero value is given to only_oob argument, printing the main area is skipped. With a little modification, we can skip the whole while loop. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | cmd_nand: fix a memory leak in nand_dump functionMasahiro Yamada2013-08-221-7/+16
| | | | | | | | | | | | | | | | | | If datbuf = memalign(ARCH_DMA_MINALIGN, nand->writesize); succeeds and oobbuf = memalign(ARCH_DMA_MINALIGN, nand->oobsize); fails, nand_dump function should free databuf. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxTom Rini2013-08-211-2/+0
|\ \
| * | spl: env_common.c: make CONFIG_SPL_BUILD contain function env_importYing Zhang2013-08-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The functionality env_import will be used in the SPL. They had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it into the SPL. Signed-off-by: Ying Zhang <b40530@freescale.com> Acked-by: Tom Rini <trini@ti.com> Acked-by: York Sun <yorksun@freescale.com>
* | | ppc4xx: Remove support for PPC405CR CPUsMatthias Fuchs2013-08-201-3/+3
|/ / | | | | | | | | | | | | This patch removes support for the APM 405CR CPU. This CPU is EOL and no board uses this chip. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
* | SPDX-License-Identifier: convert BSD-3-Clause filesWolfgang Denk2013-08-191-24/+1
| | | | | | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini Don't remove some copyrights by accident] Signed-off-by: Tom Rini <trini@ti.com>
* | Merge branch 'master' of git://88.191.163.10/u-boot-armTom Rini2013-08-181-0/+4
|\ \ | |/ | | | | | | | | | | | | | | | | Fixup an easy conflict over adding the clk_get prototype and USB_OTG defines for am33xx having moved. Conflicts: arch/arm/include/asm/arch-am33xx/hardware.h Signed-off-by: Tom Rini <trini@ti.com>
| * spl_mmc.c: Detect missing kernel image in RAW MMCTom Rini2013-07-261-0/+4
| | | | | | | | | | | | | | | | | | Currently, we assume that if we can read from MMC correctly, we have found a valid image. This is not the case as an empty area will read just fine. Add a check for a valid IH_MAGIC. Signed-off-by: Tom Rini <trini@ti.com> Reviewed-by: Peter Korsgaard <jacmet@sunsite.dk>
* | image: Display FIT timestamp when bootingSimon Glass2013-08-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | The timestamp is shown in fit_print_contents() but for some reason not in fit_image_print(). This seems to be an oversight, since it is the latter which is used by bootm. Add timestamp printing in this case. (There is code duplication in these two function, for looking at in a future patch). Signed-off-by: Simon Glass <sjg@chromium.org>
* | bootm: fix conditional controlling call to fixup_silent_linuxPaul B. Henson2013-08-161-1/+1
| | | | | | | | | | | | | | | | | | This function is only defined if CONFIG_SILENT_CONSOLE is set and CONFIG_SILENT_U_BOOT_ONLY is not set, the call to it should be based on the same conditions. Signed-off-by: Paul B. Henson <henson@acm.org> Acked-by: Simon Glass <sjg@chromium.org>
* | RFC: bootm: Add silent_linux environment variableSimon Glass2013-08-161-2/+12
| | | | | | | | | | | | | | | | | | | | At present the console for linux is silent if the U-Boot console is silent, unless CONFIG_SILENT_U_BOOT_ONLY is set. I wonder if a better way would be to have an environment variable to control this? Then we can control the verbosity from scripts, and set the variable to 'no' for those boards that want Linux to boot with console output. Signed-off-by: Simon Glass <sjg@chromium.org>
* | SPL: Limit image name print lengthTaras Kondratiuk2013-08-161-2/+3
| | | | | | | | | | | | | | | | | | If image name is longer than 32 bytes, then it will be truncated. This will remove '\0' at the end of the line, so printf will go out of string limit. Signed-off-by: Taras Kondratiuk <taras@ti.com> Reviewed-by: Tom Rini <trini@ti.com>
* | Enable xmodem supportAngus Ainslie2013-08-161-4/+20
| | | | | | | | | | | | | | This is a trivial patch that just enables xmodem downloads using the existing ymodem framework. Signed-off-by: Angus Ainslie <angus@akkea.ca>
* | Merge branch 'dcc' of git://www.denx.de/git/u-boot-microblazeTom Rini2013-08-131-3/+0
|\ \
| * | serial: arm_dcc: Remove stdio structure supportJagannadha Sutradharudu Teki2013-08-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Removed stdio structure ops support on arm_dcc driver, and need to register with serial core so-that it can access like remianing serial drivers. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | | Merge branch 'master' of git://www.denx.de/git/u-boot-videoTom Rini2013-08-121-1/+0
|\ \ \ | |/ / |/| |
| * | video: Encapsulate font in video_font_data.hMarek Vasut2013-08-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves all the font configuration values into video_font_data.h so they are all in the right place with the font. The video_font.h now only includes video_font_data.h and will allow us to select and include different font once more fonts are added. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de> [agust: fixed build warning for mcc200] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | | cmd_sf: let "sf update" erase last sector as a wholeGerlando Falauto2013-08-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make "sf update" work with unaligned `len' parameter, by deleting the whole last sector before writing, so to allow for: sf update ${load_addr_r} 0 ${filesize} Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com> Cc: Valentin Longchamp <valentin.longchamp@keymile.com> Cc: Holger Brunck <holger.brunck@keymile.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
* | | cmd_sf|env_sf: Fix code cleanupJagannadha Sutradharudu Teki2013-08-062-14/+15
|/ / | | | | | | | | | | | | | | - line over 80 characters - add tabs - CHECK: Alignment should match open parenthesis Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
* | usb_hub: fix power cycling logicNikita Kiryanov2013-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | When power cycling the hub ports, a misbehaving port will prevent all ports from being powered on because we quit at the first sign of trouble. Skip problematic ports instead of failing the entire power on. Cc: Marek Vasut <marex@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
* | dfu: Implementation of target reset after communication with dfu-util's -R ↵Lukasz Majewski2013-07-291-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | switch This patch extends dfu code to support transmission with -R switch specified at dfu-util. When -R is specified, the extra USB_REQ_DFU_DETACH request is sent after successful data transmission. Then dfu resources are released and reset command is issued. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* | powerpc/ppc4xx: Convert new gdsys files to SPDX license tagsTom Rini2013-07-261-17/+1
| | | | | | | | Signed-off-by: Tom Rini <trini@ti.com>
* | powerpc/ppc4xx: Add fpgad command for dumping gdsys fpga registersDirk Eibach2013-07-252-0/+101
|/ | | | | Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini2013-07-247-298/+123
|\ | | | | | | | | | | | | | | | | | | | | The sandburst-specific i2c drivers have been deleted, conflict was just over the SPDX conversion. Conflicts: board/sandburst/common/ppc440gx_i2c.c board/sandburst/common/ppc440gx_i2c.h Signed-off-by: Tom Rini <trini@ti.com>
| * cmd_i2c: Use ARRAY_SIZE instead of reinventing itAxel Lin2013-07-231-4/+2
| | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Simon Glass <sjg@chromium.org>
| * i2c, multibus: get rid of CONFIG_I2C_MUXHeiko Schocher2013-07-232-260/+6
| | | | | | | | | | | | | | | | | | | | | | CONFIG_I2C_MUX is replaced through the new i2c multibus/multiadapter framework, configured through CONFIG_SYS_I2C. As CONFIG_I2C_MUX is only used on the keymile boards, and they are now completely moved to the new framework, remove CONFIG_I2C_MUX. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Holger Brunck <holger.brunck@keymile.com> Tested-By: Holger Brunck <holger.brunck@keymile.com>
| * i2c, soft-i2c: switch to new multibus/multiadapter supportHeiko Schocher2013-07-233-11/+6
| | | | | | | | | | | | | | | | | | - added to soft_i2c driver new multibus/multiadpater support - adapted all config files, which uses this driver Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stephen Warren <swarren@wwwdotorg.org>
| * i2c: common changes for multibus/multiadapter supportHeiko Schocher2013-07-236-43/+129
| | | | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> Cc: Henrik Nordström <henrik@henriknordstrom.net>
* | Add eCos-2.0 SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-33/+1
| | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* | Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24146-2405/+159
|/ | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* bootm: Move fixup_silent_linux() earlier in the bootm stagesSimon Glass2013-07-171-4/+4
| | | | | | | | | | | | Before the bootm refactor, fixup_silent_linux() was done only in the monolithic bootm case, not in the subcommand case. With the refactor, it is done always, which is good. Unfortunately it is done too late, since it is the PREP or CMDLINE stages that set up the command line for Linux. Move fixup_silent_linux() into the LOADOS stage, which is where we find out the OS being used, and can thus decide whether to perform this step. Signed-off-by: Simon Glass <sjg@chromium.org>
* tpm: add AUTH1 cmds for LoadKey2 and GetPubKeyReinhard Pfau2013-07-161-0/+100
| | | | | | | | | | | | | | | | | | | | | | Extend the tpm library with support for single authorized (AUTH1) commands as specified in the TCG Main Specification 1.2. (The internally used helper functions are implemented in a way that they could also be used for double authorized commands if someone needs it.) Provide enums with the return codes from the TCG Main specification. For now only a single OIAP session is supported. OIAP authorized version of the commands TPM_LoadKey2 and TPM_GetPubKey are provided. Both features are available using the 'tpm' command, too. Authorized commands are enabled with CONFIG_TPM_AUTH_SESSIONS. (Note that this also requires CONFIG_SHA1 to be enabled.) Signed-off-by: Reinhard Pfau <reinhard.pfau@gdsys.cc> Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Acked-by: Che-Liang Chiou <clchiou@chromium.org> Signed-off-by: Andy Fleming <afleming@freescale.com>
OpenPOWER on IntegriCloud