summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2013-04-01Consolidate bool typeYork Sun
'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>
2013-03-31Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-stagingTom Rini
2013-03-29video: bcm2835: fix build issuesAnatolij Gustschin
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>
2013-03-29Merge branch 'for-v2013.04'Anatolij Gustschin
Conflicts: drivers/video/Makefile Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-03-29New command bootmenu: ANSI terminal boot menu supportPali Rohár
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>
2013-03-29menu: export menu_default_choice() functionAnatolij Gustschin
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>
2013-03-29menu: Add support for user defined item choice functionPali Rohár
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>
2013-03-28Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD
Conflicts: drivers/spi/tegra20_sflash.c include/fdtdec.h lib/fdtdec.c
2013-03-27image: Add support for Plan 9Steven Stallion
Signed-off-by: Steven Stallion <sstallion@gmail.com> Cc: Tom Rini <trini@ti.com> Reviewed-by: Tom Rini <trini@ti.com>
2013-03-27cmd_ext4: BREAK and correct ext4write parameter orderTom Rini
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>
2013-03-27env_callback: Mark find_env_callback as staticTom Rini
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>
2013-03-26Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD
2013-03-21Fix bitmap offsets for non 8-bit LCDsAndre Renaud
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>
2013-03-21common/lcd.c: move the macro's to the c fileJeroen Hofstee
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>
2013-03-21common/lcd: cosmetic: clean up a bitJeroen Hofstee
- 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>
2013-03-21common/lcd.c: remove global lcd_baseJeroen Hofstee
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>
2013-03-21common/lcd.c: cleanup use of global variablesJeroen Hofstee
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>
2013-03-21common/lcd.c: cleanup use of global variablesWolfgang Denk
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>
2013-03-20Merge branch 'spi' of git://git.denx.de/u-boot-x86Tom Rini
2013-03-20lcd: calculate line_length after lcd_ctrl_init()Stephen Warren
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>
2013-03-19sf: Use unsigned type for buffersSimon Glass
The verify code is broken on archs with signed char. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-18Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
2013-03-18Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini
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>
2013-03-18usb:gadget: USB Mass Storage Gadget supportLukasz Majewski
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>
2013-03-16dfu: Fix crash when wrong number of arguments givenPantelis Antoniou
Fix obvious crash when not enough arguments are given to the dfu command. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
2013-03-16dfu: Only perform DFU board_usb_init() for TRATSPantelis Antoniou
USB initialization shouldn't happen for all the boards. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
2013-03-15x86: Enable generic board supportSimon Glass
This enables generic board support so that x86 boards can define CONFIG_SYS_GENERIC_BOARD. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15x86: Adjust board_r.c for x86Simon Glass
For x86 the global_data is managed entirely by the start.S code so we do not need to touch it. However, we do have some more initcalls to add. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15x86: Adjust board_f.c for x86Simon Glass
For x86, things have adjusted somewhat since this series was originally written. It has its own way of running through initcalls which is actually nicer than others archs. Unfortunately this does introduce exceptions. We will soon require use of generic board on x86, but until then we need to fit in with what is there, and treat x86 as a special case. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Adjust board_r.c for ppcSimon Glass
This adds ppc features to the generic post-relocation board init. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Adjust board_f.c for ppcSimon Glass
This adds ppc features to the generic pre-relocation board init. This is a separate commit so that these features are clearly shown. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Add CONFIG_SYS_SYM_OFFSETS to support offset symbolsSimon Glass
Link symbols as created by the link script can either be absolute or relative to the text start. This option switches between the two options so that we can support both. As we convert architectures over to generic board, we can see if this option is actually needed, or whether it is possible to unify this feature also. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Add spl load featureSimon Glass
This adds secondary program loader support to the generic board. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Introduce generic post-relocation board_r.cSimon Glass
This file handles common post-relocation init for boards which use the generic framework. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Introduce generic pre-relocation board_f.cSimon Glass
This file handles common pre-relocation init for boards which use the generic framework. It starts up the console, DRAM, performs relocation and then jumps to post-relocation init. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Wolfgang Denk <wd@denx.de> Acked-by: Wolfgang Denk <wd@denx.de>
2013-03-15Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD
2013-03-12Refactor linker-generated arraysAlbert ARIBAUD
Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2013-03-12cmd_mem.c: Fix warning when CONFIG_CMD_MEMTEST is not setTom Rini
mem_test_quick and mem_test_alt functions are only called by do_mem_mtest, so move them under the #ifdef Signed-off-by: Tom Rini <trini@ti.com>
2013-03-12CONFIG_BOOTDELAY default should not affect runtimeJoe Hershberger
Because the code that handles bootdelay is compiled in conditionally based on the default value, you are restricted in the default, regardless of what you want the runtime options to be. Change the source to always check if any default is given so that other values can be selected and used at runtime. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2013-03-12common/main: move set_working_fdt_addr to enable usage of $fdtaddrBarak Wasserstrom
When using $fdtaddr in $bootcmd and $bootcmd is automatically called, $fdtaddr is yet not defined. Signed-off-by: Barak Wasserstrom <wbarak@gmail.com>
2013-03-12env: fix "env ask" commandWolfgang Denk
The "env ask" traditionally uses a somewhat awkward syntax: env ask name [message ...] [size] So far, when a mesage was given, you always also had to enter a size. If you forgot to do that, the command would terminate without any indication of the problem. To avoid incompatible changes of the interface, we now check the last argument if it can be converted into a decimal number. If this is the case, we assume it is a size; otherwise we treat it as part of the message. Also, add a space after the message fore easier reading, and clean up help mesage. Signed-off-by: Wolfgang Denk <wd@denx.de>
2013-03-12cmd_fat.c: Note in fatread help about alignment requirementsTom Rini
When using the partial read feature of fatwrite the buffer we read into can become unaligned not just due to initial location but the size of our partial reads as well. Make this clear in the help text. Signed-off-by: Tom Rini <trini@ti.com>
2013-03-12TMU: Add TMU support in dtt commandAkshay Saraswat
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>
2013-03-11cmd_df.c: Delete this clearly unused source file.Robert P. J. Day
Nothing appears to use or compile cmd_df.c anymore. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2013-03-11cmd_mtdparts.c: Correct "reseting" to "resetting" in error msgsRobert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2013-03-11Allow u-boot to be silent without forcing Linux to beJoe Hershberger
That's a bit presumptuous of you, u-boot! Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2013-03-11cmd_part: don't print cmd name twice in helpStephen Warren
The core implementation of "help" already prints the command name before the help text of a specific command. Remove it from part's own help text to avoid it being printed twice: Tegra114 (Dalmore) # help part part - disk partition related commands Usage: part part uuid <interface> <dev>:<part> - print partition UUID ... Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-03-11Feature Removal: disable "mtest" command by defaultWolfgang Denk
The "mtest" command is of little practical use (if any), and experience has shown that a large number of board configurations define useless or even dangerous start and end addresses. If not even the board maintainers are able to figure out which memory range can be reliably tested, how can we expect such from the end users? As this problem comes up repeatedly, we rather do not enable this command by default, so only people who know what they are doing will be confronted with it. As this changes the user interface, we allow for a grace period before this change takes effect. For now, we make "mtest" configurable through the CONFIG_CMD_MEMTEST variable, which is defined in include/config_cmd_default.h; we also add an entry to doc/feature-removal-schedule.txt which announces the removal of this default setting in two releases from now, i. e. with v2013.07. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Tom Rini <trini@ti.com>
2013-03-11Merge u-boot/master into u-boot-ti/masterTom Rini
In master we had already taken a patch to fix the davinci GPIO code for CONFIG_SOC_DM646X and in u-boot-ti we have additional patches to support DA830 (which is CONFIG_SOC_DA8XX && !CONFIG_SOC_DA850). Resolve these conflicts manually and comment the #else/#endif lines for clarity. Conflicts: arch/arm/include/asm/arch-davinci/gpio.h drivers/gpio/da8xx_gpio.c Signed-off-by: Tom Rini <trini@ti.com>
2013-03-11lcd: implement a callback for splashimageNikita Kiryanov
On some architectures certain values of splashimage will lead to a data abort exception. Document the problem, and implement a callback for splashimage to reject such values. Cc: Anatolij Gustschin <agust@denx.de> Cc: Wolfgang Denk <wd@denx.de> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il>