summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Add board_pre_console_putc to deal with early console output"Simon Glass2012-03-231-9/+1
| | | | | | | | | | | This reverts commit 295d3942b806552503243f5cfb36aec6f1b5a9bf. It turns that this really doesn't work very nicely. Instead we should have a pre-console panic function so that we know that further execution is impossible and we don't need to worry about trampling on UARTs, etc. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Wolfgang Denk <wd@denx.de>
* usb: replace wait_ms() with mdelay()Mike Frysinger2012-03-193-26/+16
| | | | | | | | | | | | | | | | | | | | | | | Common code has a mdelay() func, so use that instead of the usb-specific wait_ms() func. This also fixes the build errors: ohci-hcd.c: In function 'submit_common_msg': /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1519:9: sorry, unimplemented: called from here /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1816:10: sorry, unimplemented: called from here /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1827:10: sorry, unimplemented: called from here /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1844:10: sorry, unimplemented: called from here /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1563:11: sorry, unimplemented: called from here /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1583:9: sorry, unimplemented: called from here make[1]: *** [ohci-hcd.o] Error 1 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Marek Vasut <marex@denx.de>
* bootstage: Plumb in bootstage calls for basic operationsSimon Glass2012-03-183-1/+9
| | | | | | | | This inserts bootstage calls into tftp, usb start and bootm. We could go further, but this is a reasonable start to illustrate the concept. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Implement core microsecond boot time measurementSimon Glass2012-03-182-0/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This defines the basics of a new boot time measurement feature. This allows logging of very accurate time measurements as the boot proceeds, by using an available microsecond counter. To enable the feature, define CONFIG_BOOTSTAGE in your board config file. Also available is CONFIG_BOOTSTAGE_REPORT which will cause a report to be printed just before handing off to the OS. Most IDs are not named at this stage. For that I would first like to renumber them all. Timer summary in microseconds: Mark Elapsed Stage 0 0 reset 205,000 205,000 board_init_f 6,053,000 5,848,000 bootm_start 6,053,000 0 id=1 6,058,000 5,000 id=101 6,058,000 0 id=100 6,061,000 3,000 id=103 6,064,000 3,000 id=104 6,093,000 29,000 id=107 6,093,000 0 id=106 6,093,000 0 id=105 6,093,000 0 id=108 7,089,000 996,000 id=7 7,089,000 0 id=15 7,089,000 0 id=8 7,097,000 8,000 start_kernel Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Replace show_boot_progress/error() with bootstage_...()Simon Glass2012-03-186-121/+121
| | | | | | | These calls should not be made directly any more, since bootstage will call the show_boot_...() functions as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Convert FIT progress numbers to enumsSimon Glass2012-03-182-38/+42
| | | | | | | This changes over all the FIT image progress numbers to use enums from bootstage.h. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Convert net progress numbers to enumsSimon Glass2012-03-182-9/+10
| | | | | | | This changes over the network-related progress numbers to use enums from bootstage.h. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Convert NAND progress numbers to enumsSimon Glass2012-03-181-17/+17
| | | | | | | This changes over the NAND progress numbers to use enums from bootstage.h. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Convert IDE progress numbers to enumsSimon Glass2012-03-181-23/+25
| | | | | | This changes over the IDE progress numbers to use enums from bootstage.h. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Convert progress numbers 10-19 to enumsSimon Glass2012-03-181-10/+10
| | | | | Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* bootstage: Convert progress numbers 1-9 into enumsSimon Glass2012-03-182-22/+21
| | | | Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Use show_boot_error() for -ve progress numbersSimon Glass2012-03-186-63/+63
| | | | | | | | Rather than the caller negating our progress numbers to indicate an error has occurred, which seems hacky, add a function to indicate this. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* bootstage: Make use of BOOTSTAGE_ID_RUN_OS in show_boot_progress()Simon Glass2012-03-181-4/+4
| | | | | | | | | This changes the number 15 as used in boot_stage_progress() to use the new name provided for it. This is a separate patch because it touches so many files. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* bootvx: Clear and disable data cache, and call vxWorks with parameter.Reinhard Arlt2012-03-181-1/+2
| | | | | | | | | | | | | | | | | This patch clear and disable the data cache for vxWorks. The entry point sysInit(int) intended by Windriver to be called from the vxWorks bootrom, a very small vxWorks system. The routine is called by the go() handler in the bootrom, that clears the cache from start of image to end of usable memory. The PowerPC implementations only invalidates and disable the cache, the ARM implementations also flush it. U-Boot will be on the safe side, if it disables the data cache before calling vxWorks sysInit(int). Signed-off-by: Reinhard Arlt <reinhard.arlt@esd.eu>
* image: Support FDTs already loaded at their load addressStephen Warren2012-03-061-3/+10
| | | | | | | | | | | | | boot_get_fdt() expects a uImage-wrapped FDT to be loaded to a staging location, and then memmove()s it to the load address specified in the header. This change enhances boot_get_fdt() to detect when the image has already been loaded to the correct address, and skip this memmove(). The detection algorithm was written to match the equivalent for the kernel; see bootm_load_os()'s IH_COMP_NONE case. v2: New patch Signed-off-by: Stephen Warren <swarren@nvidia.com>
* cmd_cache: use cache/invalidate functions available in common.hStefan Kristiansson2012-03-061-8/+8
| | | | | | | | | | flush_dcache()/flush_icache() aren't defined in common.h, flush_dcache_all()/invalidate_icache_all() however are. Let the icache and dcache commands use those instead. Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Convert cmd_usage() calls in common to use a return valueSimon Glass2012-03-0657-168/+167
| | | | | | | | | Change all files in common/ to use CMD_RET_USAGE instead of calling cmd_usage() directly. I'm not completely sure about this patch since the code since impact is small (100 byte or so on ARM) and it might need splitting into smaller patches. But for now here it is. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add cmd_process() to process commands in one placeSimon Glass2012-03-063-77/+53
| | | | | | | | | | | | | We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org>
* Remove interleave of non-U-Boot code in hushSimon Glass2012-03-061-13/+11
| | | | | | | There is a nasty interleave of #ifdefs in hush.c where the two code paths have different indents. Remove this ickiness. Signed-off-by: Simon Glass <sjg@chromium.org>
* Create a single cmd_call() function to handle command executionSimon Glass2012-03-063-8/+25
| | | | | | | We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org>
* Don't include standard parser if hush is usedSimon Glass2012-03-061-0/+2
| | | | | | | This saves about 1KB of code space on ARM with CONFIG_SYS_HUSH_PARSER defined. Signed-off-by: Simon Glass <sjg@chromium.org>
* Stop using builtin_run_command()Simon Glass2012-03-064-33/+30
| | | | | | | | | | Boards can select either the 'built-in' parser or the hush parser. We should not call builtin_run_command() if we are using the hush parser. We use run_command() instead, since it knows how to call the correct parser. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Rename run_command2() to run_command()Simon Glass2012-03-062-6/+6
| | | | | | | This is a more sensible name, so rename it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Rename run_command() to builtin_run_command()Simon Glass2012-03-064-8/+9
| | | | | | | | | The current run_command() is only one of the parsing options - the other is hush. We should not call run_command() when the hush parser is being used. So we rename this function to better explain its purpose. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Remove CMD_PXE's static on run_command()Simon Glass2012-03-061-3/+0
| | | | | | | | It really isn't clear why this is here and there is no comment, so drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* USB: relax usbcore reset timingsWolfgang Grandegger2012-03-031-1/+4
| | | | | | | | | | | | Following the corresponding Linux code, this patch relaxes reset timings waiting at least 100ms after power to the ports. There are some reports that it helps make enumeration work better on some high speed devices. Furthermore, the wait is only done once after power has been enabled on all ports. CC: Remy Bohmer <linux@bohmer.net> CC: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
* USB: move keyboard polling into kbd driveramartin@nvidia.com2012-03-031-1/+17
| | | | | | | | | This moves keyboard polling logic from USB HCD drivers into USB keyboard driver. Remove usb_event_poll() as keyboard polling was the only user of this API. With this patch USB keyboard works with EHCI controllers again. Tested on a tegra2 seaboard. Signed-off-by: Allen Martin <amartin@nvidia.com>
* USB: reevaluate iomux stdin on USB kbd detectamartin@nvidia.com2012-03-031-0/+6
| | | | | | | If CONSOLE_MUX is enabled, reevaluate console stdin when USB keyboard device is detected. Signed-off-by: Allen Martin <amartin@nvidia.com>
* usb: add numeric keypad support to HID driverVincent Palatin2012-03-031-0/+10
| | | | | | | When keys are pressed on the numeric keypad, emit key codes for the numbers, operators, dot and enter. Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
* USB: fix USB keyboard polling parameterVincent Palatin2012-03-031-1/+1
| | | | | | | | When doing a "GET_REPORT" request on the keyboard control endpoint, the report ID should 0 (ie report ID not used) rather than 1 as reports are not used in boot mode. Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
* USB: Make struct devrequest setup_packet localMarek Vasut2012-03-031-1/+2
| | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Remy Bohmer <linux@bohmer.net> Acked-by: Mike Frysinger <vapier@gentoo.org>
* USB: Separate out USB hub driverMarek Vasut2012-03-033-431/+479
| | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Remy Bohmer <linux@bohmer.net> Acked-by: Mike Frysinger <vapier@gentoo.org>
* USB: Staticize internal functionsMarek Vasut2012-03-031-22/+23
| | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Remy Bohmer <linux@bohmer.net> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Merge branch 'master' of git://git.denx.de/u-boot-nand-flashWolfgang Denk2012-03-031-2/+3
|\ | | | | | | | | | | | | | | | | * 'master' of git://git.denx.de/u-boot-nand-flash: cmd_nand.c: Fix 'nand dump' after latest MTD resync mtd/nand:Fix wrong usage of is_blank() in fsl_ifc_run_command mtd/nand: Fix IFC driver to support 2K NAND page nand: reinstate lazy bad block scanning Revert "nand: make 1-bit software ECC configurable"
| * cmd_nand.c: Fix 'nand dump' after latest MTD resyncTom Rini2012-02-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With 2a8e0fc nand_do_read_ops changed in behavior slightly (keeping in sync with the kernel which did this change in b64d39d8) such that the OOB data is always copied into oobbuf and never appended to datbuf. Within U-Boot only the nand_dump function (for the dump nand subcommand) was expecting the OOB data to only be appended to datbuf. So we now change nand_dump to not malloc extra space, correct the comment about datbuf and OOB data and switch the pointer to oobbuf before printing. Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | common/image.c: align usage of fdt_high with initrd_highShawn Guo2012-02-271-7/+5
|/ | | | | | | | | | | | | | | | | | The commit message of a28afca (Add uboot "fdt_high" enviroment variable) states that fdt_high behaves similarly to the existing initrd_high. But fdt_high actually has an outstanding difference from initrd_high. The former specifies the start address, while the later specifies the end address. As fdt_high and initrd_high will likely be used together, it'd be nice to have them behave same. The patch changes the behavior of fdt_high to have it aligned with initrd_high. The document of fdt_high in README is updated with an example to demonstrate the usage of this environment variable. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Simon Glass <sjg@chromium.org>
* Merge branch 'trini@ti.com' of git://git.denx.de/u-boot-stagingWolfgang Denk2012-02-171-1/+1
|\ | | | | | | | | | | | | * 'trini@ti.com' of git://git.denx.de/u-boot-staging: usb_ether: fix typo cmd_eeprom: typo doc: complete, typos
| * cmd_eeprom: typoPeter Meerwald2012-02-141-1/+1
| | | | | | | | | | Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | Merge branch 'sf' of git://git.denx.de/u-boot-blackfinWolfgang Denk2012-02-131-16/+21
|\ \ | |/ |/| | | | | | | | | | | * 'sf' of git://git.denx.de/u-boot-blackfin: README: Add description of SPI Flash (SF) command configuration sf command: allow default bus and chip selects sf: eeprom_m95xxx: set a sane default timeout sf: eeprom_m95xxx: fix up style
| * sf command: allow default bus and chip selectsEric Nelson2012-02-121-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows a board configuration file to provide default bus and chip-selects for SPI flash so that first argument to the 'sf' command is optional. On boards that use the mxc_spi driver and a GPIO for chip select, this allows a much simpler command line: U-Boot> sf probe instead of U-Boot> sf probe 0x5300 Tested-by: Jason Liu <jason.hui@linaro.org> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | davinci: add support for printing clock frequencyHadli, Manjunath2012-02-121-0/+9
| | | | | | | | | | | | | | | | | | add support for printing various clock frequency info found in SOC such as ARM core frequency, DSP core frequency and DDR frequency as part of bdinfo command. Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Cc: Tom Rini <trini@ti.com>
* | common, menu: do not trigger timeout again, if a line is readHeiko Schocher2012-02-121-1/+3
| | | | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Jason Hobbs <jason.hobbs@calxeda.com> Acked-by: Jason Hobbs <jason.hobbs@calxeda.com>
* | common, menu: show menu on startup if CONFIG_MENU_SHOW is definedHeiko Schocher2012-02-121-0/+4
| | | | | | | | | | | | | | | | | | show a menu on startup instead running the shell. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Jason Hobbs <jason.hobbs@calxeda.com> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Jason Hobbs <jason.hobbs@calxeda.com>
* | common, menu: add statusline supportHeiko Schocher2012-02-121-0/+8
| | | | | | | | | | | | | | | | | | add the possibility to show a statusline when printing a menu Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Jason Hobbs <jason.hobbs@calxeda.com> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | common: add possibility for readline_into_buffer timeoutHeiko Schocher2012-02-123-6/+19
|/ | | | | | | | | add possibility to add a timeout when reading a line into a buffer. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* openrisc: Add board info printout to cmd_bdinfoStefan Kristiansson2012-01-131-0/+22
| | | | Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
* openrisc: Add architecture image supportStefan Kristiansson2012-01-131-0/+1
| | | | Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
* usb_storage: Fix EHCI "out of buffer pointers" with CD-ROMKyle Moffett2012-01-051-20/+25
| | | | | | | | | | | | | | | | | When performing large bulk reads from a CD or DVD using the U-Boot usb_storage driver, it generates requests of up to 20 blocks at a time. With a standard 512-byte block size, that is 10240 bytes and within the limit of U-Boot's EHCI driver (maximum 5 pages at 4k per page). Unfortunately CD-ROM media has a 2048-byte blocksize, resulting in a maximum transfer size of 40960 bytes, which does not fit. Since the EHCI specification is impossibly obtuse and far beyond my comprehension, I chose to dynamically compute the limit based on the blocksize. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
* env: factor out the env_get_char_spec() functionIgor Grinberg2012-01-059-39/+9
| | | | | | | | | env_get_char_spec() function is duplicated across multiple environment files. Remove the duplication by providing a default implementation. Add "weak" declaration, so the default implementation can be overridden. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
* FPGA: use debug() instead of module debug printfStefano Babic2012-01-051-31/+28
| | | | | | Replace also __FUNCTION__ with standard __func__ Signed-off-by: Stefano Babic <sbabic@denx.de>
OpenPOWER on IntegriCloud