summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* Merge branch 'master' of git://88.191.163.10/u-boot-armTom Rini2013-08-18-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-26-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-16-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-16-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-16-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-16-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-16-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-13-3/+0
|\ \
| * | serial: arm_dcc: Remove stdio structure supportJagannadha Sutradharudu Teki2013-08-13-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-12-1/+0
|\ \ \ | |/ / |/| |
| * | video: Encapsulate font in video_font_data.hMarek Vasut2013-08-12-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-07-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-06-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-29-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-29-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-26-17/+1
| | | | | | | | Signed-off-by: Tom Rini <trini@ti.com>
* | powerpc/ppc4xx: Add fpgad command for dumping gdsys fpga registersDirk Eibach2013-07-25-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-24-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-23-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-23-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-23-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-23-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-24-33/+1
| | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* | Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-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-17-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-16-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>
* Fix ext2/ext4 filesystem accesses beyond 2TiBFrederic Leroy2013-07-15-1/+2
| | | | | | | | | | | | | | | | | 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>
* common: remove unaligned access error in bootmenu_getoption()Lan Yixun (dlan)2013-07-15-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* scsi: Correct types of scsi_read/write()Simon Glass2013-07-15-4/+6
| | | | | | | | | | | | | 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>
* bootm: Handle errors consistentlySimon Glass2013-07-12-13/+8
| | | | | | | | | | | | A recent bootm fix left the error path incomplete. If CONFIG_TRACE is set it may still not be a supported command, so cover that with the unsupported subcommand print. Once we handle BOOTM_STATE_OS_GO, we can just move into the error handler itself, no need for a goto there. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Update slightly based on Simon's changes to also cover CONFIG_TRACE/BOOTM_STATE_FAKE_OS_GO] Signed-off-by: Tom Rini <trini@ti.com>
* common/image.c: Fix regression with ramdisk load/entry points in FITStefano Babic2013-07-12-1/+1
| | | | | | | | A FIT image with a ramdisk that sets the entry or load points to 0x0 must be treated as meaning "leave in place" and NOT "relocate to 0x0". This regression was introduced in a51ec63. Signed-off-by: Stefano Babic <sbabic@denx.de>
* bootm: Correct the arguments for the ELF image loaderSimon Glass2013-07-12-3/+3
| | | | | | | The arguments were out of place since commit 983c72f, since this file was missed and not tested. Correct this. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: Use selected configuration for ramdisk and fdtSimon Glass2013-07-12-6/+11
| | | | | | | | | | | | | | | If a specific configuraion is selected by the bootm command, e.g. with 'bootm 84000000#recoveryconf' we must honour this for not just the kernel, but also the ramdisk and FDT. In the conversion to using a common fit_image_load() function for loading images from FITs (commits a51ec63 and 53f375f) this feature was lost. Reinstate it by passing the selected configuration back from fit_image_load() to boot_get_kernel(), then use this configuration (which is stored in images->fit_uname_cfg) in both boot_get_ramdisk() and boot_get_fdt(). Signed-off-by: Simon Glass <sjg@chromium.org>
* blackfin: x86: bootm: Handle PREP stage of bootmSimon Glass2013-07-12-0/+16
| | | | | | | The OS function is now always called with the PREP stage. Adjust the remaining bootm OS functions to deal with this correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: Remove extra OK messageSimon Glass2013-07-12-1/+0
| | | | | | This is not needed as we already print 'OK' later in all cases. Signed-off-by: Simon Glass <sjg@chromium.org>
* cmd_bootm.c: Re-order bootm_load_os return check for ELDK4.2Tom Rini2013-07-12-3/+2
| | | | | | | | | | | With ELDK4.2 we were getting a warning that load_end may be used uninitialized in calling lmb_reserve. This could not be the case, however. If we re-order the checks (and make them slightly clearer as well) the warning goes away. bootm_load_os may only return 0 on success, BOOTM_ERR_OVERLAP in a non-fatal overlap (already covered in comments) or a fatal BOOTM_ERR that is covered in the error handler. Signed-off-by: Tom Rini <trini@ti.com>
* cmd_bootm.c: Make bootz handle BOOTM_STATE_FINDOTHER itselfTom Rini2013-07-10-16/+40
| | | | | | | | | As a zImage does not have a U-Boot header, we cannot really do what BOOTM_STATE_FINDOTHER does, exactly. Break the ramdisk/fdt portions of bootm_find_other into bootm_find_ramdisk/fdt which can be called in both cases. Signed-off-by: Tom Rini <trini@ti.com>
* cmd_bootm.c: Make bootz consume 'bootz' from argv, decrement argcTom Rini2013-07-10-5/+13
| | | | | | | Like 'bootm', 'bootz' needs to consume 'bootz' so that the rest of the state functions will work. Signed-off-by: Tom Rini <trini@ti.com>
* bootm: Add the missing PREP stage to bootz and correct image handlingSimon Glass2013-07-10-2/+3
| | | | | | | | | | | | | In the recent bootm refactor, the PREP stage was missing in the bootz command. This causes unpredictable behaviour. The use of a local variable means that the reset of cmd_bootm.c does not in fact use the same image structure, so remove this. Also manually set the OS type to Linux, since this is the only possibility at present, and we need to select the right boot function. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: Clean up bootz_setup() functionSimon Glass2013-07-10-5/+3
| | | | | | | | | This function has no prototype in the headers and passes void * around, thus requiring several casts. Tidy this up. - Add new patch to clean up bootz_setup() function Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: Require boot function only if it is about to be usedSimon Glass2013-07-10-2/+5
| | | | | | | | | | | The original bootm code (before commit 35fc84f) did not check for a valid boot function in the subcommand case, which was incorrect. This check was introduced in all cases, but in fact we should only check for the function when we need it. Otherwise in some cases the check fires before the OS type is known. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: Disable interrupts only when loadingSimon Glass2013-07-10-24/+43
| | | | | | | | | | | With the move of the interrupt code to earlier in the sequence, we exposed a problem where the interrupts are disabled at each bootm stage. This is not correct - it should be done only once. Let's disable interrupts in the LOAD stage. Put the code in a function for clarity. Also, bootz lost its interrupt code altogether, so reinstate it. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2013-07-10-47/+96
|\
| * video: consolidate splash screen alignment codeAnatolij Gustschin2013-07-08-17/+30
| | | | | | | | | | | | | | | | | | | | Code for checking "splashpos" environment variable is duplicated in drivers, move it to the common function. Call this function also in the bmp display command to consider "splashpos" settings. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
| * video: lcd: Make splash_screen_prepare weak, remove config macroRobert Winkler2013-07-01-9/+4
| | | | | | | | | | | | | | | | Remove CONFIG_SPLASH_SCREEN_PREPARE from README Add doc/README.splashprepare to document functionality Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
| * video: lcd: Add CONFIG_SPLASH_SCREEN_PREPARE support to CONFIG_VIDEORobert Winkler2013-07-01-13/+40
| | | | | | | | | | | | | | | | Create splash.c/h to put the function and any future common splash screen code in. Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
| * lcd: align bmp header when uncopmressing imagePiotr Wilczek2013-07-01-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | When compressed image is loaded, it must be decompressed to an aligned address + 2 to avoid unaligned access exception on some ARM platforms. Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Anatolij Gustschin <agust@denx.de> CC: Wolfgang Denk <wd@denx.de> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * lcd: remove unaligned access in lcd_dt_simplefb_configure_node()Stephen Warren2013-07-01-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Some ARM compilers may emit code that makes unaligned accesses when faced with constructs such as: const char format[] = "r5g6b5"; Make this data static since it doesn't chagne; the compiler will simply place it into the .rodata section directly, and avoid any unaligned run- time initialization. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* | cmd_bootm.c: Correct check/return for unsupported sub-commandTom Rini2013-07-04-2/+7
| | | | | | | | | | | | | | | | | | | | | | With the do_bootm_states re-organization, we have the call to any potential sub-commands in a single spot. If one fails, we can then stop right there and return to the caller. Prior to these calls we have already ensured that ret is zero so we will not be returning this error for some other case. Signed-off-by: Tom Rini <trini@ti.com> Tested-by: Andreas Bießmann <andreas.devel@googlemail.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-nand-flashTom Rini2013-07-01-8/+1
|\ \ | |/ |/|