Commit Graph

1983 Commits

Author SHA1 Message Date
Mike Frysinger
feb12a1f6d cmd_mem: cmp: convert while() to for() loop
Simplify the code slightly by using a for() loop since this is
basically what we're already doing -- incrementing "ngood" to
the value in "count".

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-06-19 22:32:11 +02:00
Mike Frysinger
054ea170f2 cmd_mem: cmp: unify size code paths
Not only does the source code get simpler, but it also shrinks the
compiled object code too.

While we're here, tweak the summary message to avoid the plural
issue.  It isn't that big of a deal, and it's currently wrong
anyways in the single (1 byte) case:
	Total of 1 byte were the same
Grammar wise, that should be "was" rather than "were".  The new
output people should be able to easily figure out:
	Total of 1 byte(s) were the same
	Total of 10 byte(s) were the same

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-06-19 22:30:53 +02:00
Mike Frysinger
9504a5518c cmd_mem: replace custom PRINTF() with debug()
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-06-19 22:28:08 +02:00
Steve Sakoman
8d75c8964b cmd_nand: fix crashing bug in nand read/write
Commit 418396e212 introduced a
bug that causes nand read and nand write to crash in strcmp
due to a null pointer.

Root cause is that strchr(cmd, '.') returns a null pointer when
the input string does not contain a '.'

The strcmp function does not check for null pointers, resulting
in a crash.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Scott Wood <scott@tyr.buserror.net>
2012-06-08 14:57:24 -05:00
Donghwa Lee
fb6a9aab7a LCD: display 32bpp decompressed bitmap image
This patch supports drawing 32bpp decompressed bitmap image.

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Kyungmin.park <kyungmin.park@samsung.com>
2012-05-25 09:15:10 +02:00
Anatolij Gustschin
2b5cb3d331 common/lcd.c: reduce one CONFIG_LCD_LOGO ifdef
Drop ifdef around bitmap_plot().

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-05-25 09:15:10 +02:00
Anatolij Gustschin
0f999c49e5 common/lcd.c: reduce some CONFIG_LCD_*_LOGO ifdefs
Move CONFIG_LCD_LOGO && !CONFIG_LCD_INFO_BELOW_LOGO ifdefs
to lcd_drawchars() func.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-05-25 09:15:10 +02:00
Anatolij Gustschin
095407da56 common/lcd.c: use ARRAY_SIZE
Use available macro for obtaining the size of bmp_logo_palette[]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-05-25 09:15:10 +02:00
Anatolij Gustschin
de3b49c4dd cmd_bmp.c: make bmp_display() usable by drivers or board code
Currently bmp_display() is static and can not be used directly
in the driver or board code. Export it for other users.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-05-25 09:15:09 +02:00
Joe Hershberger
d22c338e07 net: Add link-local addressing support
Code based on networking/zcip.c in busybox
commit 8531d76a15890c2c535908ce888b2e2aed35b172

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-05-23 17:53:08 -05:00
Joe Hershberger
a3e1a727fe net: Don't write the "serverip" env var if configured not to
Before this patch, bootp would not overwrite the value, but the
value was still clobbered in the env

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-05-23 17:53:04 -05:00
Anatolij Gustschin
10d4e0f9fe common/cmd_nand.c: Fix GCC 4.6 warning
cmd_nand.c: In function 'raw_access':
cmd_nand.c:397:9: warning: variable 'rwsize' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
2012-05-22 10:15:42 +02:00
Anatolij Gustschin
5017436366 common/cmd_nvedit.c: Fix GCC 4.6 warning
cmd_nvedit.c: In function '_do_env_set':
cmd_nvedit.c:207:9: warning: unused variable 'bd' [-Wunused-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-05-22 10:15:10 +02:00
Anatolij Gustschin
a075a79f98 common/cmd_bootm.c: Fix GCC 4.6 warning
cmd_bootm.c: In function 'do_bootz':
cmd_bootm.c:1590:9: warning: variable 'iflag' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-05-22 10:12:58 +02:00
Wolfgang Denk
2ab5be7af0 Merge branch 'master' of git://git.denx.de/u-boot-usb
* 'master' of git://git.denx.de/u-boot-usb:
  USB: S5P: Add ehci support
  usb:udc:samsung Add functions for storing private gadget data in UDC driver
  usb:gadget:composite: Support for composite at gadget.h
  usb:gadget:composite USB composite gadget support
  usb:udc:samsung:cleanup Replace DEBUG_* macros with debug_cond() calls
  usb:udc: Remove duplicated USB definitions from include/linux/usb/ch9.h file
  USB: Document the QH and qTD antics in EHCI-HCD
  USB: Drop cache flush bloat in EHCI-HCD
  USB: Drop ehci_alloc/ehci_free in ehci-hcd
  USB: Align buffers at cacheline
  usb: use noinline define
2012-05-20 22:51:41 +02:00
Wolfgang Denk
8fa3d2b816 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
* 'master' of git://git.denx.de/u-boot-nand-flash:
  NAND: Remove ONFI detection message to from bootup log
  driver/mtd:IFC: Fix possible memory leak
  driver/mtd: IFC NAND: Add support of ONFI NAND flash
  mtd, nand: move some printfs to debug output.
  nand_util: correct YAFFS image write function
  powerpc/85xx: fix NAND boot linker scripts for -fpic
  nand: extend .raw accesses to work on multiple pages
2012-05-20 22:47:40 +02:00
Wolfgang Denk
8bd07c9aaf Merge branch 'master' of git://git.denx.de/u-boot-net
* 'master' of git://git.denx.de/u-boot-net:
  net: move bootfile init into eth_initialize
  net: punt bd->bi_ip_addr
  net: cosmetic: netconsole.c checkpatch compliance
  net: cosmetic: tftp.* checkpatch compliance
  net: cosmetic: sntp.* checkpatch compliance
  net: cosmetic: rarp.* checkpatch compliance
  net: cosmetic: nfs.* checkpatch compliance
  net: cosmetic: net.c checkpatch compliance
  net: cosmetic: eth.c checkpatch compliance
  net: cosmetic: bootp.* checkpatch compliance
  net: cosmetic: net.h checkpatch compliance
  net: Remove volatile from net API
2012-05-20 22:33:44 +02:00
Puneet Saxena
f57661394a USB: Align buffers at cacheline
This avoids cache-alignment warnings shown in console
when a usb command is entered.

Whenever X bytes of unaligned buffer is invalidated, arm core
invalidates X + Y bytes as per the cache line size and throws
these warnings.

Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Signed-off-by: Marek Vasut <marex@denx.de>
2012-05-20 08:32:32 +02:00
Mike Frysinger
66cf64107b usb: use noinline define
Building usb for Blackfin boards fails as we get linux/compiler.h
included which expands the "noinline" inside of the attribute and
we get attribute(attribute(noinline)).

Explicitly use the helper define to avoid this.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-20 08:32:31 +02:00
Scott Wood
418396e212 nand: extend .raw accesses to work on multiple pages
A use for this is to read, modify, erase, and write an entire block as a
single unit, as a replacement for the biterr command.  This way gives
more flexibility in that you can also test multiple bit errors, errors
in the ECC, etc.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-05-18 17:34:31 -05:00
Mike Frysinger
50a47d0523 net: punt bd->bi_ip_addr
This field gets read in one place (by "bdinfo"), and we can replace
that with getenv("ipaddr").  After all, the bi_ip_addr field is kept
up-to-date implicitly with the value of the ipaddr env var.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2012-05-15 17:32:05 -05:00
Joe Hershberger
48522bb503 net: cosmetic: net.c checkpatch compliance
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
2012-05-15 17:16:19 -05:00
Stefano Babic
71cadda3ff SATA: check for return value from sata functions
sata functions are called even if previous functions failed
because return value is not checked.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Dirk Behme <dirk.behme@de.bosch.com>
CC: Fabio Estevam <fabio.estevam@freescale.com>
2012-05-15 08:31:30 +02:00
Wolfgang Denk
0a6deb3251 Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
* 'agust@denx.de' of git://git.denx.de/u-boot-staging:
  lin_gadget: use common linux/compat.h
  linux/compat.h: rename from linux/mtd/compat.h
  lin_gadget: use common mdelay
  gunzip: rename z{alloc, free} to gz{alloc, free}
  fs/fat: align disk buffers on cache line to enable DMA and cache
  part_dos: align disk buffers on cache line to enable DMA and cache
2012-04-30 18:19:28 +02:00
Mike Frysinger
7b15e2bb9b linux/compat.h: rename from linux/mtd/compat.h
This lets us use it in more places than just mtd code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-30 16:54:51 +02:00
Wolfgang Denk
05f132d74d Merge branch 'master' of /home/wd/git/u-boot/custodians
* 'master' of /home/wd/git/u-boot/custodians:
  powerpc/85xx: don't touch MAS7 on e500v1 when relocating CCSR
  powerpc/85xx: don't display address map size (32-bit vs. 36-bit) during boot
  cmd_bdinfo: display the address map size (32-bit vs. 36-bit)
  PowerPC: correct the SATA for p1/p2 rdb-pc platform
  powerpc/corenet_ds: Slave core in holdoff when boot from SRIO
  powerpc/corenet_ds: Slave reads ENV from master when boot from SRIO
  powerpc/corenet_ds: Slave uploads ucode when boot from SRIO
  powerpc/corenet_ds: Slave module for boot from SRIO
  powerpc/corenet_ds: Master module for boot from SRIO
  powerpc/corenet_ds: Document for the boot from SRIO
  powerpc/corenet_ds: Correct the compilation errors about ENV
  powerpc/srio: Rewrite the struct ccsr_rio
  powerpc/85xx:Fix lds for nand boot debug info
  powerpc/p2041rdb: add env in NAND support
  powerpc/p2041rdb: add NAND and NAND boot support
  powerpc/mpc8xxx: Fix CONFIG_DDR_RAW_TIMING for two boards
  powerpc/85xx:Avoid vector table compilation for nand_spl
  powerpc/85xx:Fix IVORs addr after vector table relocation
  powerpc/85xx:Avoid hardcoded vector address for IVORs
  powerpc/p1023rds: Disable nor flash node and enable nand flash node
2012-04-30 16:45:59 +02:00
Wolfgang Denk
5f6db68b42 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
* 'master' of git://git.denx.de/u-boot-mpc85xx:
  powerpc/85xx: don't touch MAS7 on e500v1 when relocating CCSR
  powerpc/85xx: don't display address map size (32-bit vs. 36-bit) during boot
  cmd_bdinfo: display the address map size (32-bit vs. 36-bit)
  PowerPC: correct the SATA for p1/p2 rdb-pc platform
  powerpc/corenet_ds: Slave core in holdoff when boot from SRIO
  powerpc/corenet_ds: Slave reads ENV from master when boot from SRIO
  powerpc/corenet_ds: Slave uploads ucode when boot from SRIO
  powerpc/corenet_ds: Slave module for boot from SRIO
  powerpc/corenet_ds: Master module for boot from SRIO
  powerpc/corenet_ds: Document for the boot from SRIO
  powerpc/corenet_ds: Correct the compilation errors about ENV
  powerpc/srio: Rewrite the struct ccsr_rio
  powerpc/85xx:Fix lds for nand boot debug info
  powerpc/p2041rdb: add env in NAND support
  powerpc/p2041rdb: add NAND and NAND boot support
  powerpc/mpc8xxx: Fix CONFIG_DDR_RAW_TIMING for two boards
  powerpc/85xx:Avoid vector table compilation for nand_spl
  powerpc/85xx:Fix IVORs addr after vector table relocation
  powerpc/85xx:Avoid hardcoded vector address for IVORs
  powerpc/p1023rds: Disable nor flash node and enable nand flash node
2012-04-30 16:45:56 +02:00
Mike Frysinger
314f634b48 image/fit: drop inline markings on parser code
Putting "inline" on extern funcs makes no sense, so drop them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-30 16:38:54 +02:00
Marek Vasut
f624dd15e3 GCC47: Fix warning in cmd_nand.c
cmd_nand.c: In function ‘arg_off_size’:
cmd_nand.c:216:5: warning: ‘maxsize’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Wolfgang Denk <wd@denx.de>
2012-04-29 14:13:53 +02:00
Timur Tabi
34e210f5bd cmd_bdinfo: display the address map size (32-bit vs. 36-bit)
Some Freescale SOCs support 32-bit and 36-bit physical addressing, and
U-Boot must be built to enable one or the other.  Add this information
to the bdinfo command.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-04-24 23:58:34 -05:00
Liu Gang
0a85a9e705 powerpc/corenet_ds: Slave reads ENV from master when boot from SRIO
When boot from SRIO, slave's ENV can be stored in master's memory space,
then slave can fetch the ENV through SRIO interface.

NOTE: Because the slave can not erase, write master's NOR flash by SRIO
	  interface, so it can not modify the ENV parameters stored in
	  master's NOR flash using "saveenv" or other commands.

Master needs to:
	1. Put the slave's ENV into it's own memory space.
	2. Set an inbound SRIO window covered slave's ENV stored in master's
	   memory space.
Slave needs to:
	1. Set a specific TLB entry in order to fetch ucode and ENV from master.
	2. Set a LAW entry with the TargetID SRIO1 or SRIO2 for ucode and ENV.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
2012-04-24 23:58:33 -05:00
Timo Ketola
030fca5228 Fix the behaviour of the 'run' command
If one command fails, 'run' command should terminate and not execute
any remaining variables.

Signed-off-by: Timo Ketola <timo@exertus.fi>
Tested-by: Wolfgang Denk <wd@denx.de>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
2012-04-23 22:07:00 +02:00
Simon Glass
3786980dd3 Move bootstage timer out of lib/time.c
The standalone example does not have get_timer() defined, so we cannot
rely on it being available.

Move the timer function into boootstage.c to avoid this problem.

This corrects a build breakage for the standalone example on some boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
2012-04-10 23:35:32 +02:00
Marek Vasut
35cf5fe510 LMB: Fix undefined lmb_reserve() on non-lmb platforms
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <TWarren@nvidia.com>
Cc: Graeme Russ <graeme.russ@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-04-09 16:53:07 +02:00
Marek Vasut
57d40ab70b RAMDISK: Fix unused variable issue caused by raw rd support
image.c: In function ‘boot_get_ramdisk’:
image.c:800:8: warning: unused variable ‘end’ [-Wunused-variable]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
2012-03-30 23:52:35 +02:00
Marek Vasut
017e1f3f9f BOOT: Add RAW ramdisk support to bootz
This patch allows loading RAW ramdisk via bootz command. The raw ramdisk is
loaded only in case it's size is specified:

  bootz <kernel addr> <ramdisk addr>:<ramdisk size> <fdt addr>

For example:

  bootz 0x42000000 0x43000000:0x12345 0x44000000

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Tom Warren <TWarren@nvidia.com>
Cc: albert.u.boot@aribaud.net
Cc: afleming@gmail.com
Cc: Simon Glass <sjg@chromium.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2012-03-30 23:00:47 +02:00
Marek Vasut
44f074c771 BOOT: Add "bootz" command to boot Linux zImage on ARM
This command boots Linux zImage from where the zImage is loaded to. Passing
initrd and fdt is supported.

Tested on i.MX28 based DENX M28EVK
Tested on PXA270 based Voipac PXA270.

NOTE: This currently only supports ARM, but other architectures can be easily
added by defining bootz_setup().

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Warren <TWarren@nvidia.com>
Cc: albert.u.boot@aribaud.net
Cc: afleming@gmail.com,
Cc: Simon Glass <sjg@chromium.org>,
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2012-03-30 22:58:55 +02:00
Maximilian Schwerin
57210c7cc3 Add support for loading and saving the environment to a FAT partition
The following must be defined:

CONFIG_ENV_IS_IN_FAT
	Enable this saving environment to FAT.

FAT_ENV_INTERFACE
	Interface the FAT resides on (e.g. mmc).

FAT_ENV_DEVICE
	The interface device number (e.g. 0 for mmc0)

FAT_ENV_PART
	The device part (e.g. 1 for mmc0:1)

FAT_ENV_FILE
	The filename of the environment file.

Author:    Maximilian Schwerin <mvs@tigris.de>

Removed dead DEBUG comment.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2012-03-30 22:38:14 +02:00
Heiko Schocher
c0b77e097f cmd_log: print log->v2.con value in the "log info" command
print in the "log info" command, if "log_version = 2" also the
value from "log->v2.con".

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
2012-03-30 22:32:50 +02:00
Heiko Schocher
1e8e7ae599 command, log: Coding Style cleanup
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
2012-03-30 22:31:41 +02:00
Heiko Schocher
c16a123fd3 command, log: print with "log show" a full logbuffer
If the logbuffer contains LOGBUFF_LEN chars, they never got
printed with the "log show" command, because chars get
printed with the following for loop:

for (i = 0; i < (size & LOGBUFF_MASK); i++) {

with size = LOGBUFF_LEN and LOGBUFF_MASK = (LOGBUFF_LEN-1)
for loop never executed ...

Fix this.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>

Fixed merge conflict.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2012-03-30 22:28:56 +02:00
Wolfgang Denk
a939ea3ab4 Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
* 'agust@denx.de' of git://git.denx.de/u-boot-staging:
  lzma: fix printf warnings
  Remove CONFIG_SYS_EXTBDINFO from snapper9260.h
  cmd_pxe.c: fix strict-aliasing warnings
  net: smc91111: use mdelay()
  doc: Fix some typos in different files
  disk/part.c: Fix device enumeration through API
  mkenvimage: Really set the redundant byte when applicable
  mkenvimage: Don't try to detect comments in the input file
  mkenvimage: Use mmap() when reading from a regular file
  mkenvimage: Read/Write from/to stdin/out by default or if the filename is "-"
  mkenvimage: More error handling
  mkenvimage: Correct an include and add a missing one
  mkenvimage: correct and clarify comments and error messages
  MAKEALL: display SPL size if present
  ARMV7/Vexpress: add missing get_ticks() and get_tbclk()
  mkenvimage: fix usage message
  cmd_fat: add FAT write command
  fs/fat/fat_write.c: Fix GCC 4.6 warnings
  FAT write: Fix compile errors
2012-03-30 20:17:02 +02:00
Simon Schwarz
1648a37505 Add cmd_spl command
This adds a spl command to the u-boot.

Related config:
CONFIG_CMD_SPL
	activate/deactivate the command
CONFIG_CMD_SPL_NAND_OFS
	Offset in NAND to use

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
2012-03-27 22:05:28 +02:00
Jason Hobbs
834c9384a4 cmd_pxe.c: fix strict-aliasing warnings
Without this patch, some versions of gcc (at least ELDK 4.2) complain
about dereferencing type-punned pointers.

Reported-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
2012-03-27 15:17:32 +02:00
Matt Porter
24de357a30 SPL: Add YMODEM over UART load support
Adds support for loading U-Boot from UART using YMODEM protocol.
If YMODEM support is enabled in SPL and the romcode indicates
that SPL loaded via UART then SPL will wait for start of a
YMODEM transfer via the console port.

Signed-off-by: Matt Porter <mporter@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
2012-03-26 23:09:25 +02:00
Donggeun Kim
656f4c6537 cmd_fat: add FAT write command
Once CONFIG_FAT_WRITE is defined, users can invoke 'fatwrite' command
that saves data in RAM as a FAT file.

This patch was originally part of

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/121847

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Maximilian Schwerin <mvs@tigris.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-03-26 11:00:31 +02:00
Simon Glass
3fa4977a9e Revert "Add board_pre_console_putc to deal with early console output"
This reverts commit 295d3942b8.

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>
2012-03-23 21:27:32 +01:00
Mike Frysinger
5b84dd67cf usb: replace wait_ms() with mdelay()
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>
2012-03-19 00:08:16 +01:00
Simon Glass
573f14fe4e bootstage: Plumb in bootstage calls for basic operations
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>
2012-03-18 21:42:56 +01:00
Simon Glass
3a608ca01d bootstage: Implement core microsecond boot time measurement
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>
2012-03-18 21:42:14 +01:00