summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Bring mtest putc() into common codeSimon Glass2013-02-281-23/+9
| | | | | | | | | | | | | | | | | | | | | If we get a Ctrl-C abort, we always print a newline. Move this repeated code out of the functions and into a single place in the caller. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Fix mtest indentingSimon Glass2013-02-281-161/+161
| | | | | | | | | | | | | | | | | | Some of the inner loops are not indented correctly. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Use common mtest iteration countingSimon Glass2013-02-281-64/+59
| | | | | | | | | | | | | | | | | | | | | The iteration code is the same for each version of the memory test, so pull it out into the common function. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Split out the memory tests into separate functionsSimon Glass2013-02-281-101/+116
| | | | | | | | | | | | | | | | | | | | | | | | Half of the code is currently hidden behind an #ifdef. Move the two memory tests into their own functions and use the compiler to eliminate the unused code. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: Change memory commands to use map_physmemSimon Glass2013-02-281-43/+79
| | | | | | | | | | | | | | | | | | | | | Sandbox wants to support commands which use memory. The map_sysmen() call provides this feature, so use this in the memory commands. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Tidy up error checking and fix bug in hash commandSimon Glass2013-02-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are two problems: 1. The argument count needs to be checked before argv is used 2. When verify is not enabled, we need to define a constant zero value Signed-off-by: Simon Glass <sjg@chromium.org>
* | | Merge branch 'master' of git://git.denx.de/u-boot-blackfinTom Rini2013-03-041-1/+18
|\ \ \
| * | | blackfin: bf60x: Port blackfin core architecture code to boot on bf60x.Sonic Zhang2013-03-041-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set up clocks, DDR controller, Nor flash controller, reboot, serial port. Add new SPI boot modes. Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
* | | | SPL: Change description for spl commandStefano Babic2013-03-011-4/+8
| |/ / |/| | | | | | | | | | | | | | | | | | | | Add a more descriptive text to the help of the spl command. Signed-off-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Tom Rini <trini@ti.com>
* | | common/env_nand.c: calculate crc only when readenv was OKPhil Sutter2013-02-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Calculating the checksum of incompletely read data is useless. Signed-off-by: Phil Sutter <phil.sutter@viprinet.com> [scottwood@freescale.com: minor formatting fix] Signed-off-by: Scott Wood <scottwood@freescale.com>
* | | env_nand.c: clarify log messages when env reading failsPhil Sutter2013-02-221-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | The single message is misleading, since there is no equivalent success note when reading the other copy succeeds. Instead, warn if one of the redundant copies could not be loaded and emphasise on the error when reading both fails. Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
* | | nand: fix nand read.option parsingHarvey Chapman2013-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | "nand read.part addr off size" would be treated as "nand read.raw addr off 1" It now fails as intended stating "Unknown nand command suffix '.part'" Signed-off-by: Harvey Chapman <hchapman@3gfp.com>
* | | imls: Add support to list images in NAND deviceVipin Kumar2013-02-221-3/+164
|/ / | | | | | | | | | | This patch adds support to list images in NAND flash through imls Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
* | gpt: fix partion size limitPiotr Wilczek2013-02-201-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Currently, in gpt command, partion size is converted from string to unsigned long type using 'ustrtol' function. That type limits the partition size to 4GB. This patch changes the conversion function to 'ustrtoll' to return unsigned long long type. Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* | led: The gpio_led.c code expects that LED state is from the enumHolger Hans Peter Freyther2013-02-201-2/+2
| | | | | | | | | | | | | | | | u-boot is not consistent if state should be 0|1 or of the enum, the GPIO driver expects this to be one of the enum values. Update the caller. Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
* | cmd_elf: Fix broken bootvx commandReinhard Arlt2013-02-201-1/+1
| | | | | | | | | | | | Fix broken bootvx command. Signed-off-by: Reinhard Arlt <reinhard.arlt@esd.eu>
* | cmd_load.c: Add #endif comments to reduce confusionRobert P. J. Day2013-02-191-4/+4
| | | | | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
* | cmd_mem.c: Fix some typoes, no functional changesRobert P. J. Day2013-02-191-4/+6
| | | | | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
* | malloc: make malloc_bin_reloc staticGabor Juhos2013-02-191-1/+5
|/ | | | | | | | | | | | | | | | | | | On architectures where manual relocation is needed, the 'malloc_bin_reloc' function must be called after 'mem_malloc_init'. Make the 'malloc_bin_reloc' function static and call it directly from 'mem_malloc_init' instead of calling that from board_init_{r,f} functions of the affected architectures. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Wolfgang Denk <wd@denx.de> Cc: Andreas Bießmann <andreas.devel@gmail.com> Cc: Jason Jin <Jason.jin@freescale.com> Cc: Macpaul Lin <macpaul@andestech.com> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
* common/fdt_support.c: sparse fixesKim Phillips2013-02-071-39/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trivial: fdt_support.c:89:64: warning: Using plain integer as NULL pointer fdt_support.c:325:65: warning: Using plain integer as NULL pointer fdt_support.c:352:65: warning: Using plain integer as NULL pointer For the following bad constant expression, We hardcode the max. number of memory banks to four for the foreseeable future, and add an error with instructions on what to do once it's exceeded: fdt_support.c:397:22: error: bad constant expression For the rest below, sparse found a couple of wrong endian conversions in of_bus_default_translate() and fdt_get_base_address(), but otherwise the rest is mostly annotation fixes: fdt_support.c:64:24: warning: cast to restricted __be32 fdt_support.c:192:21: warning: incorrect type in assignment (different base types) fdt_support.c:192:21: expected unsigned int [unsigned] [usertype] tmp fdt_support.c:192:21: got restricted __be32 [usertype] <noident> fdt_support.c:201:21: warning: incorrect type in assignment (different base types) fdt_support.c:201:21: expected unsigned int [unsigned] [addressable] [usertype] tmp fdt_support.c:201:21: got restricted __be32 [usertype] <noident> fdt_support.c:304:13: warning: incorrect type in assignment (different base types) fdt_support.c:304:13: expected unsigned int [unsigned] [usertype] val fdt_support.c:304:13: got restricted __be32 [usertype] <noident> fdt_support.c:333:13: warning: incorrect type in assignment (different base types) fdt_support.c:333:13: expected unsigned int [unsigned] [usertype] val fdt_support.c:333:13: got restricted __be32 [usertype] <noident> fdt_support.c:359:13: warning: incorrect type in assignment (different base types) fdt_support.c:359:13: expected unsigned int [unsigned] [usertype] val fdt_support.c:359:13: got restricted __be32 [usertype] <noident> fdt_support.c:373:21: warning: cast to restricted __be32 fdt_support.c:963:48: warning: incorrect type in argument 1 (different base types) fdt_support.c:963:48: expected restricted __be32 const [usertype] *p fdt_support.c:963:48: got unsigned int [usertype] *<noident> fdt_support.c:971:48: warning: incorrect type in argument 1 (different base types) fdt_support.c:971:48: expected restricted __be32 const [usertype] *p fdt_support.c:971:48: got unsigned int [usertype] *<noident> fdt_support.c:984:29: warning: incorrect type in argument 1 (different base types) fdt_support.c:984:29: expected restricted __be32 const [usertype] *cell fdt_support.c:984:29: got unsigned int [usertype] *addr fdt_support.c:996:32: warning: incorrect type in argument 1 (different base types) fdt_support.c:996:32: expected restricted __be32 const [usertype] *cell fdt_support.c:996:32: got unsigned int [usertype] *addr fdt_support.c:1041:41: warning: incorrect type in argument 1 (different base types) fdt_support.c:1041:41: expected restricted __be32 const [usertype] *cell fdt_support.c:1041:41: got unsigned int [usertype] *addr fdt_support.c:1053:41: warning: incorrect type in argument 2 (different base types) fdt_support.c:1053:41: expected restricted __be32 const [usertype] *range fdt_support.c:1053:41: got unsigned int const [usertype] *[assigned] ranges fdt_support.c:1064:53: warning: incorrect type in argument 2 (different base types) fdt_support.c:1064:53: expected restricted __be32 const [usertype] *addr fdt_support.c:1064:53: got unsigned int [usertype] *addr fdt_support.c:1110:50: warning: incorrect type in argument 2 (different base types) fdt_support.c:1110:50: expected restricted __be32 const [usertype] *addr fdt_support.c:1110:50: got unsigned int *<noident> fdt_support.c:1121:49: warning: incorrect type in argument 1 (different base types) fdt_support.c:1121:49: expected restricted __be32 const [usertype] *cell fdt_support.c:1121:49: got unsigned int *<noident> fdt_support.c:1147:60: warning: incorrect type in argument 2 (different base types) fdt_support.c:1147:60: expected restricted __be32 const [usertype] *addr fdt_support.c:1147:60: got unsigned int *<noident> fdt_support.c:1081:5: warning: symbol '__of_translate_address' was not declared. Should it be static? fdt_support.c:1154:5: error: symbol 'fdt_translate_address' redeclared with different type (originally declared at include/fdt_support.h:95) - incompatible argument 3 (different base types) fdt_support.c: In function 'fdt_node_offset_by_compat_reg': fdt_support.c:1173:17: warning: initialization discards 'const' qualifier from pointer target type [enabled by default] See also linux kernel commit 0131d897 "of/address: use proper endianess in get_flags". Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Cc: Jerry Van Baren <gvb.uboot@gmail.com>
* treewide: include libfdt_env.h before fdt.hKim Phillips2013-02-074-4/+0
| | | | | | | | | | | and, if including libfdt.h which includes libfdt_env.h in the correct order, don't include fdt.h before libfdt.h. this is needed to get the fdt type definitions set from the project environment before fdt.h uses them. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Cc: Jerry Van Baren <gvb.uboot@gmail.com>
* Merge branch 'master' of git://www.denx.de/git/u-boot-microblazeTom Rini2013-02-041-5/+22
|\
| * common: cmd_bdinfo: Fix compilation warning for microblazeMichal Simek2013-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fix one printf compilation warning in microblaze bdinfo part. Warning log: cmd_bdinfo.c: In function 'do_bdinfo': cmd_bdinfo.c:219:2: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat] Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * common: cmd_bdinfo: Fix bdinfo to show all MACs for Microblaze and ARMMichal Simek2013-02-041-4/+21
| | | | | | | | | | | | | | - Show all ethernet MACs in the system. - Show current ethernet device Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | serial: arm_dcc: Remove CONFIG_ARM_DCC_MULTI optionMichal Simek2013-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_ARM_DCC_MULTI should be also removed in the patch "serial: Remove CONFIG_SERIAL_MULTI from serial drivers" (sha1: a3827250606895ec2dd4b8d867342b7cabf3692f) Because the driver defines serial_* functions which cause conflict with serial.c (multiple definition of serial_*) Removing CONFIG_SERIAL_MULTI function also require to define default_serial_console for cases where another serial driver is not available in the system. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Marek Vasut <marex@denx.de>
* | cmd_time: merge run_command_and_time_it with cmd_processRichard Genoud2013-02-044-34/+9
| | | | | | | | | | | | | | | | | | | | As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com>
* | console: USB: KBD: Fix incorrect autoboot timeoutJim Lin2013-02-041-5/+5
| | | | | | | | | | | | | | | | | | Autoboot timeout defined by CONFIG_BOOTDELAY will not be accurate if CONFIG_USB_KEYBOARD and CONFIG_SYS_USB_EVENT_POLL are defined in configuration file and when tstc() function for checking key pressed takes longer time than 10 ms (e.g., 50 ms) to finish. Signed-off-by: Jim Lin <jilin@nvidia.com>
* | common: env_mmc: Use __weak annotation to simplify codeFabio Estevam2013-02-041-3/+1
| | | | | | | | | | | | | | Using the __weak annotation can make the code cleaner. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marek Vasut <marex@denx.de>
* | common/cmd_bootm.c: prevent running of subcommands before 'bootm start'Gabor Juhos2013-02-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The execution order of the bootm subcommands is fixed. Although here is a sanity check in the state machine which should prevent running the subcommands in wrong order but it does not catch all possible errors. It is possible to run any subcommand without running 'bootm start' first which leads to unexpected behaviour. For example, running 'bootm loados' without 'bootm start' causes a hang: U-Boot> bootm loados XIP Invalid Image ... OK OK Add a sanity check to 'do_bootm_subcommand' in order to ensure that no subcommands can be executed before 'bootm start'. After the patch running of any subcommand without running 'bootm start' will cause an error like this: U-Boot> bootm loados Trying to execute a command out of order bootm - boot application image from memory Usage: bootm [addr [arg ...]] - boot application image stored in memory ... Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
* | Only use fb_base if we have a displaySimon Glass2013-02-041-0/+4
| | | | | | | | | | | | | | | | The ideal of having a frame buffer when there isn't a display is not that useful. Change the bdinfo command to expect this only when we have an lcd or video display. Signed-off-by: Simon Glass <sjg@chromium.org>
* | ppc: Move brg_clk to arch_global_dataSimon Glass2013-02-011-1/+1
| | | | | | | | | | | | Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
* | arm: Move tlb_addr and tlb_size to arch_global_dataSimon Glass2013-02-011-1/+1
|/ | | | | | | | Move these fields into arch_global_data and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Address tlb_size in this patch as well] Signed-off-by: Tom Rini <trini@ti.com>
* Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2013-01-141-1/+1
|\
| * lcd: restore ability to display 8 bpp BMPs on 16 bpp LCDsNikita Kiryanov2013-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit fb6a9aab7ae78c (LCD: display 32bpp decompressed bitmap image) broke the check that allowed U-Boot to display 8 bpp BMPs on a 16 bpp LCD screen, effectively turning this feature off. Restore this feature by changing the check back to the same meaning it originally had. To avoid future confusion, the check has also been rephrased to make its meaning clear. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
* | Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD2013-01-141-1/+1
|\ \ | |/ |/|
| * Sound: Add FDT support to CMD.Rajeshwari Shinde2013-01-081-1/+1
| | | | | | | | | | | | | | | | This patch adds FDT support to sound init in CMD. Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-01-111-0/+27
|\ \
| * | Add option to display customised memory informationSimon Glass2013-01-101-0/+27
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some boards want to report more than just memory size. For example, it might be useful to display the memory type (DDR2, DDR3) or manufacturer. Add a weak function to support this requirement, accessed through a new 'meminfo' command. Any example of the DRAM: output is below, just for illustration: SMDK5250 # meminfo DRAM: 2 GiB Elpida DDR3 @ 800MHz Signed-off-by: Simon Glass <sjg@chromium.org>
* | bootm: relocate names of sub-command table for archs with ↵Daniel Schwierzeck2013-01-101-1/+7
| | | | | | | | | | | | | | | | | | CONFIG_NEEDS_MANUAL_RELOC To make bootm sub-command feature working on archs with CONFIG_NEEDS_MANUAL_RELOC, the name pointers in the sub-command table need to be relocated. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* | x86: Add coreboot version to u-boot's version commandStefan Reinauer2012-12-261-1/+6
| | | | | | | | | | | | | | | | | | Since U-Boot runs from coreboot on x86, the Coreboot version is an important part of the boot state. This version information is available in the coreboot tables, so print it when the 'version' command is used. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2012-12-224-19/+179
|\ \ | |/
| * Merge remote-tracking branch 'u-boot/master' into u-boot-arm-mergedAllen Martin2012-12-1942-428/+3331
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: README arch/arm/cpu/armv7/exynos/clock.c board/samsung/universal_c210/universal.c drivers/misc/Makefile drivers/power/power_fsl.c include/configs/mx35pdk.h include/configs/mx53loco.h include/configs/seaboard.h
| * | lcd: Add CONFIG_CONSOLE_SCROLL_LINES option to speed consoleSimon Glass2012-11-191-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the cursor position gets to the end of the LCD console we normally scroll by one line. This adds an option to increase that value. Console scrolling is often slow, and if a large amount of output is being sent, increasing this option to 10 or so will speed things up considerably. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
| * | lcd: Add support for flushing LCD fb from dcache after updateSimon Glass2012-11-192-9/+49
| | | | | | | | | | | | | | | | | | | | | | | | This provides an option for the LCD to flush the dcache after each update (puts, scroll or clear). Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
| * | lcd: Add CONFIG_LCD_ALIGNMENT to select frame buffer alignmentSimon Glass2012-11-191-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The normal alignment is PAGE_SIZE, but if this is defined, we can support other alignments. The motivation for this change is to make the display section-aligned on ARM so that we can easily turn off data caching for the frame buffer region without resorting to level 2 page tables. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
| * | Sound: Add command for audio playbackRajeshwari Shinde2012-11-152-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds command to test audio playback. sound init - Initialises the audio subsystem (i2s and wm8994 codec) sound play - Plays predefined the audio data when specified length and frequency. Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2012-12-213-5/+52
|\ \ \
| * | | usb: properly detect empty mass storage media readerVincent Palatin2012-12-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a USB card reader is empty, it will return "Not Ready - medium not present" as Key Code Qualifier. In that situation, it's useless waiting for the full timeout since the result won't change until the user inserts a card. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
| * | | usb: Clean up newly allocated device nodes in case of configuration failureMilind Choudhary2012-12-172-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If probe of a newly connected device fails for some reason, clean up the allocated entry in usb_dev array. Signed-off-by: Milind Choudhary <milindc@codeaurora.org> Signed-off-by: Simon Glass <sjg@chromium.org>
| * | | usbh/ehci: Increase timeout for enumerationVipin Kumar2012-12-171-5/+28
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current logic reads the port status just once after usb_hub_power_on and expects the portstatus and portchange to report the connection status immediately and correctly. Few pen drives are not able to report both of them immediately ie. those pens report the connection change but not the connected state after the first read. This opportunity once lost is gone for ever because the u-boot, unlike linux or any other OS, works in polling mode. This patch modifies the logic to read the port status continuously until the portstatus and portchange both report a connection change as well as a connected state or no connection change and no connection. This logic is placed in a timeout of 10 sec. At the end of it, the pen drive would have either reported a ONE or a ZERO in bit 1 of portstatus as well as portchange. It enhances the set of pen drives which can eventually be detected by u-boot Note: This 10 second timeout is based purely on several experiments done with the broken pen drives Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
OpenPOWER on IntegriCloud