summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* flash: Add optional verify-after-write featureStefan Roese2013-04-221-0/+11
| | | | | | | | | | | | | Sometimes it might make sense to verify the written data to NOR flash. This patch adds this feature. To enable this verify-after-write, you need to define CONFIG_FLASH_VERIFY in your board config header. Please note that this option is useless in nearly all cases, since such flash programming errors usually are detected earlier while unprotecting/erasing/programming. Please only enable this option if you really know what you are doing. Signed-off-by: Stefan Roese <sr@denx.de>
* mmc: support the correct card version for eMMCJaehoon Chung2013-04-171-1/+1
| | | | | | | | | | | eMMC vesrion is supported up to v4.5. But bootloader isn't saw the exact eMMC version. After applied this patch, if use the mmcinfo command, then can see the exactly mmc version. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Rommel Custodio <sessyargc@gmail.com>
* printenv: Correct out-of-memory condition check.Maxime Larocque2013-04-171-1/+2
| | | | | | | | | | | In common/cmd_nvedit.c, en env_print(), the wrong type is used for len. hexport_r() returns -1 on error (like OOM), which is converted to 0xffffffff when put in an unsigned. Said value is obviously bigger then 0, and as a result an uninitialized string is then displayed. Other usages of hexport_r() in the code correctly uses ssize_t to keep its return value. Signed-off-by: Maxime Larocque <maxmtl2002@yahoo.ca>
* x86: Allow setup code to manage its own global dataSimon Glass2013-04-152-4/+1
| | | | | | | | | | | | Currently x86 has its own means of managing the global data and board data (bd_t), and this code resides in start.S. With generic board, we need to ensure that we leave this alone - i.e. don't clear it as we do on other archs. This fixes a problem where the memory init data is cleared which causes the video driver to operate very slowly. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Fix DRAM bank size init with generic boardSimon Glass2013-04-151-2/+1
| | | | | | | | | | | | | The intention of the memory init code is that it should work the same with CONFIG_SYS_GENERIC_BOARD and without. This is tricky because dram_init() is called prior to relocation with generic board (matching other archs) and after relocation without generic board. Adjust the init sequence so that dram_init() is not called in the generic board case, which seems like the easiest fix for now. Also ensure that relocation addresses are still calculated. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-04-151-0/+18
|\
| * Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD2013-04-1221-281/+1135
| |\ | | | | | | | | | | | | Conflicts: drivers/video/exynos_fb.c
| * \ Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD2013-04-041-0/+18
| |\ \
| | * | gen: Add sha h/w acceleration to hashAkshay Saraswat2013-03-291-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding H/W acceleration support to hash which can be used to test SHA 256 hash algorithm. Signed-off-by: ARUN MANKUZHI <arun.m@samsung.com> Signed-off-by: Akshay Saraswat <akshay.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* | | | tpm: Add TPM command libraryChe-liang Chiou2013-04-121-110/+599
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TPM command library implements a subset of TPM commands defined in TCG Main Specification 1.2 that are useful for implementing secure boot. More TPM commands could be added out of necessity. You may exercise these commands through the 'tpm' command. However, the raw TPM commands are too primitive for writing secure boot in command interpreter scripts; so the 'tpm' command also provides helper functions to make scripting easier. For example, to define a counter in TPM non-volatile storage and initialize it to zero: $ tpm init $ tpm startup TPM_ST_CLEAR $ tpm nv_define d 0x1001 0x1 $ tpm nv_write d 0x1001 0 And then increment the counter by one: $ tpm nv_read d 0x1001 i $ setexpr.l i $i + 1 $ tpm nv_write d 0x1001 $i Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
* | | env: Add redundant env support to UBI envJoe Hershberger2013-04-111-0/+117
| | | | | | | | | | | | | | | | | | Allow the user to specify two UBI volumes to use for the environment Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* | | env: Add support for UBI environmentJoe Hershberger2013-04-113-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | UBI is a better place for the environment on NAND devices because it handles wear-leveling and bad blocks. Gluebi is needed in Linux to access the env as an MTD partition. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* | | mtd: Make mtdparts work with pre-reloc envJoe Hershberger2013-04-112-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The env in UBI needs to look up the mtd partition as part of relocation, which happens before relocation. Make the mtdparts code capable of working on the default env to start with. The code tries to set values in the env as well, but again, the env isn't there yet, so add a check to setenv to not allow sets before the env is relocated. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* | | ubi: ubifs: Turn off verbose printsJoe Hershberger2013-04-111-0/+3
| | | | | | | | | | | | | | | | | | The prints are out of control. SILENCE! Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* | | ubi: Expose a few simple functions from the cmd_ubiJoe Hershberger2013-04-111-67/+83
| | | | | | | | | | | | | | | | | | Part, Read, and Write functionality that will be used by env_ubi. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* | | Do not call board_early_init_f() twiceVadim Bendebury2013-04-111-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently due to a missed rebase conflict resolution board_early_init_f() is included twice in the list of initialization functions. Leave only the first occurrence. . built and boot an Exynos 5250 target Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
* | | cmd_nand.c: Fix CONFIG_CMD_NAND_YAFFSTom Rini2013-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | The flag changed from WITH_INLINE_OOB to WITH_YAFFS_OOB by accident in 418396e. Signed-off-by: Tom Rini <trini@ti.com>
* | | nand: Extend nand_(read|write)_skip_bad with *actual and limit parametersTom Rini2013-04-102-23/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We make these two functions take a size_t pointer to how much space was used on NAND to read or write the buffer (when reads/writes happen) so that bad blocks can be accounted for. We also make them take an loff_t limit on how much data can be read or written. This means that we can now catch the case of when writing to a partition would exceed the partition size due to bad blocks. To do this we also need to make check_skip_len count not just complete blocks used but partial ones as well. All callers of nand_(read|write)_skip_bad are adjusted to call these with the most sensible limits available. The changes were started by Pantelis and finished by Tom. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Tom Rini <trini@ti.com>
* | | cmd_sf: include header file common.h before div64.hMingkai Hu2013-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The header file div64.h includes <asm/types.h> which defines the phys_addr_t according to the macro CONFIG_PHYS_64BIT, while the macro CONFIG_PHYS_64BIT is included in common.h which comes after div64.h, so in order to get consistent type definition for phys_addr_t, common.h should be included before div64.h, Or else, the parameters of phys_addr_t type will be passed wrongly when CONFIG_PHYS_64BIT is defined. Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
* | | common/cmd_test: Avoid macro expansionYork Sun2013-04-081-0/+9
| | | | | | | | | | | | | | | | | | | | | cmd_test.c adds "true" and "false" as new commands. We need to avoid macro expansion for U_BOOT_CMD. Signed-off-by: York Sun <yorksun@freescale.com>
* | | Revert "env: fix potential stack overflow in environment functions"Tom Rini2013-04-058-74/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wolfgang requested this be reverted and Rob agreed after further discussion. This was a symptom of a larger problem we need to deal with. This reverts commit 60d7d5a63189c9f77a190c9965861dc15482c2d0. Signed-off-by: Tom Rini <trini@ti.com>
* | | mmc: don't allow extra cmdline argumentsStephen Warren2013-04-021-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "mmc rescan" command takes no arguments. However, executing "mmc rescan 1" succeeds, leading the user to believe that MMC device 1 has been rescanned. In fact, the "current" MMC device has been rescanned, and the current device may well not be 1. Add error-checking to the "mmc" command to explicitly reject any extra command-line arguments so that it's more obvious when U-Boot isn't doing what the user thought they asked it to. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* | | env: fix potential stack overflow in environment functionsRob Herring2013-04-028-63/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the various environment functions create CONFIG_ENV_SIZE buffers on the stack. At least on ARM and PPC which have 4KB stacks, this can overflow the stack if we have large environment sizes. So move all the buffers off the stack to static buffers. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* | | Consolidate bool typeYork Sun2013-04-016-111/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by: York Sun <yorksun@freescale.com>
* | | Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-stagingTom Rini2013-03-314-13/+552
|\ \ \
| * | | New command bootmenu: ANSI terminal boot menu supportPali Rohár2013-03-292-0/+518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "bootmenu" command uses U-Boot menu interfaces and provides a simple mechanism for creating menus with several boot items. When running this command the menu will be assembled as defined by a set of environment variables which contain a title and command key-value pairs. The "Up" and "Down" keys are used for navigation through the items. Current active menu item is highlighted and can be selected using the "Enter" key. The command interprets and generates various ANSI escape sequencies, so for proper menu rendering and item selection the used terminal should support them. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> [agust: various fixes and documentation updates] Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | | menu: export menu_default_choice() functionAnatolij Gustschin2013-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking the default menu item and obtaining its data can be useful in custom menu code. Export menu_default_choice() function which serves this purpose. Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | | menu: Add support for user defined item choice functionPali Rohár2013-03-292-12/+33
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Selecting menu items is currently done in menu_interactive_choice() by reading the user input strings from standard input. Extend menu_interactive_choice() to support user defined function for selecting menu items. This function and its argument can be specified when creating the menu. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | | video: bcm2835: fix build issuesAnatolij Gustschin2013-03-291-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | After merging LCD patches for v2013.04 the bcm2835 video driver building is broken due to removal of many global variables. Fix the driver. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Stephen Warren <swarren@wwwdotorg.org>
* | | Merge branch 'for-v2013.04'Anatolij Gustschin2013-03-291-57/+74
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Conflicts: drivers/video/Makefile Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | Fix bitmap offsets for non 8-bit LCDsAndre Renaud2013-03-211-3/+4
| | | | | | | | | | | | | | | | | | | | | Currently bitmap logos don't interpret the X coordinate correctly if the bpp is anything other than 8. Signed-off-by: Andre Renaud <andre@bluewatersys.com>
| * | common/lcd.c: move the macro's to the c fileJeroen Hofstee2013-03-211-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | Hide the console macros since some reference global data which is no longer present. cc: Anatolij Gustschin <agust@denx.de> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
| * | common/lcd: cosmetic: clean up a bitJeroen Hofstee2013-03-211-52/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make the brackets of the function calls more consistent - Remove really unnecessary brackets - Removes the extern from the function definitions - Remove curly brackets from single line statements - Remove lcd_setmem proto since it is already in common.h - Cleanup comments, remove useless comments - Remove NOT_USED_SO_FAR ifdef - Cleanup coding style cc: Anatolij Gustschin <agust@denx.de> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> [agust: rebased the original patch] Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | common/lcd.c: remove global lcd_baseJeroen Hofstee2013-03-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lcd_base is available as gd->fb_base as well, there is no need to keep a seperate copy. For completeness the ack of Bo Shen is for the atmel part. Cc: Alessandro Rubini <rubini@unipv.it> Cc: Anatolij Gustschin <agust@denx.de> Cc: Bo Shen <voice.shen@atmel.com> Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Nikita Kiryanov <nikita@compulab.co.il> Cc: Simon Glass <sjg@chromium.org> Cc: Stelian Pop <stelian@popies.net> Cc: Tom Warren <twarren@nvidia.com> Acked-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> [agust: also fix cm_t35 board while rebasing] Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | common/lcd.c: cleanup use of global variablesJeroen Hofstee2013-03-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | console_col, console_row, lcd_line_length, lcd_console_address had to be declared in board / driver specific code, but were not actually used there on many boards. Get rid of the global variables. for completeness, the ack of Bo Shen is for the atmel part Cc: Alessandro Rubini <rubini@unipv.it> Cc: Anatolij Gustschin <agust@denx.de> Cc: Bo Shen <voice.shen@atmel.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Nikita Kiryanov <nikita@compulab.co.il> Cc: Simon Glass <sjg@chromium.org> Cc: Stelian Pop <stelian@popies.net> Cc: Tom Warren <twarren@nvidia.com> Acked-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> [agust: rebased and fixed cm_t35 board] Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | common/lcd.c: cleanup use of global variablesWolfgang Denk2013-03-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lcd_color_fg and lcd_color_bg had to be declared in board specific code, but were not actually used there; in addition, we have getter / setter functions for these, which were not used either. Get rid of the global variables, and use the getter function where needed (so far no setter calls are needed). Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Alessandro Rubini <rubini@unipv.it> Cc: Anatolij Gustschin <agust@denx.de> Cc: Bo Shen <voice.shen@atmel.com> Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Nikita Kiryanov <nikita@compulab.co.il> Cc: Simon Glass <sjg@chromium.org> Cc: Stelian Pop <stelian@popies.net> Cc: Tom Warren <twarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Jeroen Hofstee <jeroen@myspectrum.nl> [agust: also fixed cm_t35 board while rebasing] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | | Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD2013-03-282-3/+33
|\ \ \ | | |/ | |/| | | | | | | | | | | | | Conflicts: drivers/spi/tegra20_sflash.c include/fdtdec.h lib/fdtdec.c
| * | Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD2013-03-261-1/+31
| |\ \
| | * | TMU: Add TMU support in dtt commandAkshay Saraswat2013-03-121-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add generic TMU support alongwith i2c sensors in dtt command to enable temperature reading in cases where TMU is present along-with/instead-of i2c sensors. Signed-off-by: Akshay Saraswat <akshay.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * | | lcd: calculate line_length after lcd_ctrl_init()Stephen Warren2013-03-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an LCD driver is actually driving a regular external display, e.g. an HDMI monitor, the display resolution might not be known until the display controller has initialized, i.e. during lcd_ctrl_init(). However, lcd.c calculates lcd_line_length before calling this function, thus relying on a hard-coded resolution in struct panel_info. Instead, defer this calculation until after lcd_ctrl_init() has had the chance to dynamically determine the resolution. This needs to happen before lcd_clear(), since the value is used there. grep indicates that no code outside lcd.c uses this lcd_line_length; in particular, no lcd_ctrl_init() implementations read it. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* | | | image: Add support for Plan 9Steven Stallion2013-03-272-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Steven Stallion <sstallion@gmail.com> Cc: Tom Rini <trini@ti.com> Reviewed-by: Tom Rini <trini@ti.com>
* | | | cmd_ext4: BREAK and correct ext4write parameter orderTom Rini2013-03-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ext4write command was taking the in-memory address and filename path in reverse order from the rest of the filesystem read and write commands. This corrects the order to be the same as fatload, etc. Signed-off-by: Tom Rini <trini@ti.com>
* | | | env_callback: Mark find_env_callback as staticTom Rini2013-03-271-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | This is not called outside of env_callback.c so mark static, remove from <env_callback.h> Cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | Merge branch 'spi' of git://git.denx.de/u-boot-x86Tom Rini2013-03-201-4/+4
|\ \ \ | |/ / |/| |
| * | sf: Use unsigned type for buffersSimon Glass2013-03-191-4/+4
| | | | | | | | | | | | | | | | | | The verify code is broken on archs with signed char. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2013-03-183-1/+91
|\ \ \ | |/ / |/| |
| * | usb:gadget: USB Mass Storage Gadget supportLukasz Majewski2013-03-182-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the USB Mass Storage Gadget to u-boot New command called "ums" is implemented to provide access to on-device embedded persistent memory. USB Mass Storage is supposed to work on top of the USB Gadget framework Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Marek Vasut <marek.vasut@gmail.com>
| * | dfu: Fix crash when wrong number of arguments givenPantelis Antoniou2013-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Fix obvious crash when not enough arguments are given to the dfu command. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
| * | dfu: Only perform DFU board_usb_init() for TRATSPantelis Antoniou2013-03-161-0/+3
| | | | | | | | | | | | | | | | | | USB initialization shouldn't happen for all the boards. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* | | Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-03-188-4/+112
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Albert's rework of the linker scripts conflicted with Simon's making everyone use __bss_end. We also had a minor conflict over README.scrapyard being added to in mainline and enhanced in u-boot-arm/master with proper formatting. Conflicts: arch/arm/cpu/ixp/u-boot.lds arch/arm/cpu/u-boot.lds arch/arm/lib/Makefile board/actux1/u-boot.lds board/actux2/u-boot.lds board/actux3/u-boot.lds board/dvlhost/u-boot.lds board/freescale/mx31ads/u-boot.lds doc/README.scrapyard include/configs/tegra-common.h Build tested for all of ARM and run-time tested on am335x_evm. Signed-off-by: Tom Rini <trini@ti.com>
OpenPOWER on IntegriCloud