summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2013-09-16Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini
2013-09-06Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini
2013-09-05Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD
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.
2013-09-03bootm: allow correct bounds-check of destinationKees Cook
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>
2013-09-03sandbox: Correct compiler warnings in cmd_bootm/cmd_ximgSimon Glass
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>
2013-08-31ARM: mxs: tools: Add mkimage support for MXS bootstreamMarek Vasut
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>
2013-08-27cmd_sf: let "sf update" preserve the final part of the last sectorGerlando Falauto
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>
2013-08-27Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
2013-08-27i2c: fix i2c dev command for not using new frameworkHeiko Schocher
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>
2013-08-26console: usb: kbd: To fix slow TFTP bootingJim Lin
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>
2013-08-26console: usb: kbd: To improve TFTP booting performanceJim Lin
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>
2013-08-26usb: Use well-known descriptor sizes when parsing configurationJulius Werner
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>
2013-08-26USB: usb-hub: Add a weak function for resetting devicesDan Murphy
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>
2013-08-22env_nand.c: support falling back to redundant env when writingPhil Sutter
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>
2013-08-22cmd_nand: Do not show usage when scrub is abortedMasahiro Yamada
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>
2013-08-22cmd_nand: slight optimization of nand_dump functionMasahiro Yamada
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>
2013-08-22cmd_nand: fix a memory leak in nand_dump functionMasahiro Yamada
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>
2013-08-21Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxTom Rini
2013-08-20spl: env_common.c: make CONFIG_SPL_BUILD contain function env_importYing Zhang
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>
2013-08-20ppc4xx: Remove support for PPC405CR CPUsMatthias Fuchs
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>
2013-08-19SPDX-License-Identifier: convert BSD-3-Clause filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini Don't remove some copyrights by accident] Signed-off-by: Tom Rini <trini@ti.com>
2013-08-18Merge branch 'master' of git://88.191.163.10/u-boot-armTom Rini
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>
2013-08-16image: Display FIT timestamp when bootingSimon Glass
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>
2013-08-16bootm: fix conditional controlling call to fixup_silent_linuxPaul B. Henson
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>
2013-08-16RFC: bootm: Add silent_linux environment variableSimon Glass
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>
2013-08-16SPL: Limit image name print lengthTaras Kondratiuk
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>
2013-08-16Enable xmodem supportAngus Ainslie
This is a trivial patch that just enables xmodem downloads using the existing ymodem framework. Signed-off-by: Angus Ainslie <angus@akkea.ca>
2013-08-13Merge branch 'dcc' of git://www.denx.de/git/u-boot-microblazeTom Rini
2013-08-13serial: arm_dcc: Remove stdio structure supportJagannadha Sutradharudu Teki
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>
2013-08-12Merge branch 'master' of git://www.denx.de/git/u-boot-videoTom Rini
2013-08-12video: Encapsulate font in video_font_data.hMarek Vasut
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>
2013-08-07cmd_sf: let "sf update" erase last sector as a wholeGerlando Falauto
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>
2013-08-06cmd_sf|env_sf: Fix code cleanupJagannadha Sutradharudu Teki
- line over 80 characters - add tabs - CHECK: Alignment should match open parenthesis Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2013-07-29usb_hub: fix power cycling logicNikita Kiryanov
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>
2013-07-29dfu: Implementation of target reset after communication with dfu-util's -R ↵Lukasz Majewski
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>
2013-07-26spl_mmc.c: Detect missing kernel image in RAW MMCTom Rini
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>
2013-07-26powerpc/ppc4xx: Convert new gdsys files to SPDX license tagsTom Rini
Signed-off-by: Tom Rini <trini@ti.com>
2013-07-25powerpc/ppc4xx: Add fpgad command for dumping gdsys fpga registersDirk Eibach
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2013-07-24Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini
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>
2013-07-24Add eCos-2.0 SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-07-23cmd_i2c: Use ARRAY_SIZE instead of reinventing itAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-07-23i2c, multibus: get rid of CONFIG_I2C_MUXHeiko Schocher
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>
2013-07-23i2c, soft-i2c: switch to new multibus/multiadapter supportHeiko Schocher
- 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>
2013-07-23i2c: common changes for multibus/multiadapter supportHeiko Schocher
Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> Cc: Henrik Nordström <henrik@henriknordstrom.net>
2013-07-17bootm: Move fixup_silent_linux() earlier in the bootm stagesSimon Glass
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>
2013-07-16tpm: add AUTH1 cmds for LoadKey2 and GetPubKeyReinhard Pfau
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>
2013-07-15Fix ext2/ext4 filesystem accesses beyond 2TiBFrederic Leroy
With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type, which is required to represent block numbers for storage devices that exceed 2TiB (the block size usually is 512B), e.g. recent hard drives We now use lbaint_t for partition offset to reflect the lbaint_t change, and access partitions beyond or crossing the 2.1TiB limit. This required changes to signature of ext4fs_devread(), and type of all variables relatives to block sector. ext2/ext4 fs uses logical block represented by a 32 bit value. Logical block is a multiple of device block sector. To avoid overflow problem when calling ext4fs_devread(), we need to cast the sector parameter. Signed-off-by: Frédéric Leroy <fredo@starox.org>
2013-07-15common: remove unaligned access error in bootmenu_getoption()Lan Yixun (dlan)
Some ARM compilers may emit code that makes unaligned accesses when faced with constructs such as: char name[12] = "bootmenu_"; same fix as commit: 064d55f8bc8d7d205ed0be6abb6717e92eeb7cad ========================================================= data abort MAYBE you should read doc/README.arm-unaligned-accesses pc : [<3ff4b60c>] lr : [<3ff4b7b0>] sp : 3f346a58 ip : 3ff9c8e6 fp : 02000060 r10: 00000000 r9 : 3df47fc0 r8 : 3f347f40 r7 : 00000000 r6 : 00000000 r5 : 00000003 r4 : 3f759140 r3 : 000003f0 r2 : 00000000 r1 : 000003f1 r0 : 00000000 Flags: nzCv IRQs on FIQs off Mode SVC_32 Resetting CPU ... ====================================================== Signed-off-by: Lan Yixun (dlan) <dennis.yxun@gmail.com>
2013-07-15scsi: Correct types of scsi_read/write()Simon Glass
The block device expects to see lbaint_t for the blknr parameter. Change the SCSI read/write functions to suit. This fixes the following build warnings for coreboot: cmd_scsi.c: In function ‘scsi_scan’: cmd_scsi.c:119:30: error: assignment from incompatible pointer type [-Werror] cmd_scsi.c:120:32: error: assignment from incompatible pointer type [-Werror] Signed-off-by: Simon Glass <sjg@chromium.org>