Commit Graph

1249 Commits

Author SHA1 Message Date
Minkyu Kang fca0cecff7 bootm: Reduce the unnecessary memmove
Although load address and image start address are same address,
bootm command always does memmove.
That is unnecessary memmove and can be taken few milliseconds
(about 500 msec to 1000 msec).
If skip this memmove, we can reduce the boot time.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2009-02-21 23:00:20 +01:00
Derek Ou 6bcb4b806c lcd_putc bug fix for tab.
Signed-off-by: Derek Ou <dou@siconix.com>
2009-02-21 22:26:55 +01:00
Dirk Behme 3511b4e208 MMC: Don't use new framework code if not enabled
Don't use code of new MMC framework in cmd_mmc if CONFIG_GENERIC_MMC
isn't enabled.

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2009-02-19 21:12:03 +01:00
Wolfgang Denk 1bba30efe1 Coding style cleanup, update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-02-19 00:41:08 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5f03201088 common/console: avoid ifdef CONFIG_CONSOLE_MUX when it's possible
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-02-18 00:55:18 +01:00
Jean-Christophe PLAGNIOL-VILLARD ec6f149946 common/console: coding style cleanup
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-02-18 00:54:15 +01:00
Mike Frysinger bdab39d358 rename CONFIG_CMD_ENV to CONFIG_CMD_SAVEENV
The CONFIG_CMD_ENV option controls enablement of the `saveenv` command
rather than a generic "env" command, or anything else related to the
environment.  So, let's make sure the define is named accordingly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-18 00:47:43 +01:00
Andy Fleming 272cc70b21 Add MMC Framework
Here's a new framework (based roughly off the linux one) for managing
MMC controllers.  It handles all of the standard SD/MMC transactions,
leaving the host drivers to implement only what is necessary to
deal with their specific hardware.

This also hooks the infrastructure into the PowerPC board code
(similar to how the ethernet infrastructure now hooks in)

Some of this code was contributed by Dave Liu <daveliu@freescale.com>

Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-02-16 18:07:41 -06:00
Andy Fleming abb5466ccf Convert mmc_init to mmc_legacy_init
This is to get it out of the way of incoming MMC framework

Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-02-16 18:07:40 -06:00
Andy Fleming b2e2ed0233 Eliminate support for using MMC as memory
MMC cards are not memory, so we stop treating them that way.

Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-02-16 18:07:40 -06:00
Abraham, Thomas 9704f9caf5 USB: Remove LUN number from CDB
The LUN number is not part of the Command Descriptor Block (CDB) for scsi inquiry, request sense, test unit ready, read capacity and read10 commands. This patch removes the LUN number information from the CDB.

Signed-off-by: Thomas Abraham <t-abraham@ti.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-02-15 17:14:38 +01:00
Mike Frysinger e915f8bb73 common/{hush, kgdb, serial}.c: build by COBJS-$(...) in Makefile
Move global '#ifdef CONFIG_xxx .... #endif' out of the .c files and into
the COBJS-$(CONFIG_xxx) in the Makefile.  Also delete unused var in kgdb
code in the process.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-11 23:05:57 +01:00
Kumar Gala ff4e66e93c pci: Rename PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY for clarity
The PCI_REGION_MEMORY and PCI_REGION_MEM are a bit to similar and
can be confusing when reading the code.

Rename PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY to clarify its used
for system memory mapping purposes.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-02-07 23:50:04 +01:00
Wolfgang Denk 64ace0d1e5 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2009-02-07 23:37:10 +01:00
Wolfgang Denk 0cfa6a9de6 Merge branch 'master' of git://git.denx.de/u-boot-coldfire 2009-02-07 23:24:38 +01:00
derek@siconix.com 5a9427dc9b env_nand: fix env memory release
This fixes a bug that tmp environment memory not being released.

Signed-off-by: Derek Ou <dou@siconix.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-02-06 16:06:53 -06:00
Richard Retanubun ee73cc59ab Coldfire: cmd_bdinfo cleanup
CONFIG_M68K bdinfo cleanup:

Fixed compiler warning about baudrate printing.
format '%d' expects type 'int', but argument 2 has type 'long unsigned int'.

Added printing of "cpufreq"

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
2009-02-06 14:54:46 -07:00
Ralph Kondziella 70a4da45e1 ADS5121 Add PATA support
Original patch from Ralph Kondziella
plus clean up by Wolfgang Denk
plus changes by John Rigby
    use ips clock not lpc
    port forward to current u-boot release

Signed-off-by: Ralph Kondziella <rk@argos-messtechnik.de>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: John Rigby <jrigby@freescale.com>
2009-02-03 15:40:29 -07:00
Wolfgang Denk 6b7243aa89 Merge branch 'master' of git://git.denx.de/u-boot-usb 2009-01-28 21:09:46 +01:00
Bryan Wu 1a448db77b usb_scan_devices: fix output with no devices
We should check the return of usb_new_device() so that if no USB device is
found, we print out the right message rather than always saying "new usb
device found".

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-01-28 19:57:31 +01:00
Stefan Roese f1c1f54024 USB: Add high-speed (480Mb/s) to all USB related outputs
With this patch the USB related connection speed output ("usb tree" command and
debug output) is now high-speed enabled.

This patch also fixes a compilation warning when debugging is enabled.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-01-28 19:57:31 +01:00
Mike Frysinger c7d703f3f3 usb.h: use standard __LITTLE_ENDIAN from Linux headers
Rather than forcing people to define a custom "LITTLEENDIAN", just use the
__LITTLE_ENDIAN one from the Linux byteorder headers that every arch is
already setting up.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-01-28 19:57:29 +01:00
Bryan Wu 14e4111cda usb_storage: do not reset SanDisk Corporation U3 Cruzer Micro USB thumb drive
The SanDisk Corporation U3 Cruzer Micro 1/4GB Flash Drive 000016244373FFB4
does not like to be reset, so check for it.

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-01-28 19:57:28 +01:00
Thomas Abraham 1eb734fed3 usb : usb_kbd : Populating 'priv' member of USB keyboard device_t structure
This patch populates the 'priv' field of the USB keyboard device_t
structure. The 'priv' field is populated with the address of the
'struct usb_device' structure that represents the USB device.

The 'priv' field can then be used in the 'usb_event_poll' function to
determine the USB device that requires to be polled. An
example of its usage in 'usb_event_poll' function is as below.

	device_t *dev;
	struct usb_device *usb_kbd_dev;

	<snip>

	dev = device_get_by_name("usbkbd");
	usb_kbd_dev = (struct usb_device *)dev->priv;
	iface = &usb_kbd_dev->config.if_desc[0];

Signed-off-by: Thomas Abraham <t-abraham@ti.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-01-28 19:57:28 +01:00
Michael Trimarchi 366523c26b USB change speed
USB changes the speed according to the port status

Signed-off-by: Michael Trimarchi <trimarchimichael@yahoo.it>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-01-28 19:57:28 +01:00
Michael Trimarchi 3e126484df Prepare USB layer for ehci
Prepare USB layer for ehci support

Signed-off-by: Michael Trimarchi <trimarchi@gandalf.sssup.it>
Signed-off-by: Remy Böhmer <linux@bohmer.net>
2009-01-28 19:57:27 +01:00
Michael Trimarchi a0cb3fc31e USB storage cleanup patch
Cleanup usb storage

Signed-off-by: Michael Trimarchi <trimarchimichael@yahoo.it>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-01-28 19:57:26 +01:00
Mike Frysinger fe033ad6d0 Blackfin: fixup misc warnings such as printf's and missing casts
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-28 13:27:28 -05:00
Mike Frysinger 29d4ea0a90 Blackfin: bootldr: implement BF53x/BF56x LDR loader
The BF53x/BF56x parts do not have an on-chip ROM to boot LDRs out of
arbitrary memory locations, so implement a basic one in software.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-28 13:27:09 -05:00
Mike Frysinger 8b35e3aeff Blackfin: implement real write support for OTP
Now that real documentation has been released for the OTP interface and
the on-chip ROM wrt writing/timings, implement support for reading/writing
as well as dumping/locking.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-28 13:27:09 -05:00
Mike Frysinger 36ea8e9ad1 Blackfin: support console-over-JTAG
The Blackfin JTAG has the ability to pass data via a back-channel without
halting the processor.  Utilize that channel to emulate a console.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-28 13:26:15 -05:00
Peter Tyser 2fb2604d5c Command usage cleanup
Remove command name from all command "usage" fields and update
common/command.c to display "name - usage" instead of
just "usage". Also remove newlines from command usage fields.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-01-28 08:49:52 +01:00
Peter Tyser 62c3ae7c6e Standardize command usage messages with cmd_usage()
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-01-28 08:43:45 +01:00
Mike Frysinger cf7e399fb3 SATA: do not auto-initialize during boot
Rather than have the board code initialize SATA automatically during boot,
make the user manually run "sata init".  This brings the SATA subsystem in
line with common U-Boot policy.

Rather than having a dedicated weak function "is_sata_supported", people
can override sata_initialize() to do their weird board stuff.  Then they
can call the actual __sata_initialize().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-27 23:42:39 +01:00
Tomasz Figa b5b004ad8a jffs2: Fix zero sector_size when not using CONFIG_JFFS2_CMDLINE
This patch fixes a bug (?) introduced after inclusion of the new
JFFS2 code.

When not using CONFIG_JFFS2_CMDLINE, the code in cmd_jffs2.c doesn't
fill in part->sector_size (keeping it as 0), but a correct value is
needed by the code in jffs2_1pass.c. This causes all JFFS2 accesses
to be in the same place of the memory, what obviously means
impossibility to use the JFFS2 partition.

This problem is fixed in this patch by including sector size
calculation in non-CONFIG_JFFS2_CMDLINE mtdparts_init variant.

Signed-off-by: Tomasz Figa <tomasz.figa_at_gmail.com>
2009-01-27 22:52:58 +01:00
Mike Frysinger ba69dc26a5 saveenv: standardize enablement
Rather than special casing each environment type for enabling the saveenv
command, have them all behave the same.  This avoids bitrot as new env
sources are added/removed.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-27 22:30:42 +01:00
Matthias Fuchs 107b801cf3 Fix gunzip in case of insufficient output buffer
U-Boot's gunzip() function does not handle the return code
of zlib's inflate() function correctly. gunzip() is implemented
to uncompress all input data in one run. So the correct return
code for the good case is Z_STREAM_END. In case of insufficient
output buffer memory inflate returns Z_OK. For gunzip() this
is an error.

It also makes sense to me to call inflateEnd() also in case
of an error.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2009-01-27 20:59:09 +01:00
Dirk Eibach b6fc6fd49a common: Iteration limit for memory test.
The iteration limit is passed to mtest as a fourth parameter:
[start [end [pattern [iterations]]]]
If no fourth parameter is supplied, there is no iteration limit and the
test will loop forever.

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
2009-01-24 01:42:05 +01:00
Peter Korsgaard c3284b030b common/main: support bootdelay=0 for CONFIG_AUTOBOOT_KEYED
Support bootdelay=0 in abortboot for the CONFIG_AUTOBOOT_KEYED case
similar to the CONFIG_ZERO_BOOTDELAY_CHECK support for the
!CONFIG_AUTOBOOT_KEYED case.

Do this by reversing the loop so we do at least one iteration before
checking for timeout.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-01-24 01:24:15 +01:00
Mike Frysinger 6dadc9195a Blackfin: use common strmhz() in system output
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-23 22:59:16 +01:00
Mike Frysinger d4bade8d77 nand: fixup printf modifiers to match types used
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-01-23 10:32:52 -06:00
Schlaegl Manfred jun 389e6620e2 nand read.jffs2 (nand_legacy) in common/cmd_nand.c
Error with CONFIG_NAND_LEGACY in common/cmd_nand.c:
With current code "nand read.jffs2s" (read and skip bad blocks) is always interpreted as
"nand read.jffs2" (read and fill bad blocks with 0xff). This is because ".jffs2" is
tested before ".jffs2s" and only the first two characters are compared.

Correction:
Test for ".jffs2s" first and compare the first 7 characters.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-01-23 10:32:52 -06:00
Nishanth Menon 50657c2732 NAND: Enable nand lock, unlock feature
Enable nand lock, unlock and status of lock feature.
Not every device and platform requires this, hence,
it is under define for CONFIG_CMD_NAND_LOCK_UNLOCK

Nand unlock and status operate on block boundary instead
of page boundary. Details in:
http://www.micron.com/products/partdetail?part=MT29C2G24MAKLAJG-6%20IT

Intial solution provided by Vikram Pandita <vikram.pandita@ti.com>
Includes preliminary suggestions from Scott Wood

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-01-23 10:32:49 -06:00
Stefan Roese c438ea175d OneNAND: Bad block aware read/write command support
Update OneNAND command to support bad block awareness.
Also change the OneNAND command style to better match the
NAND version.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
2009-01-23 10:32:47 -06:00
Peter Korsgaard c088a108c7 fdt_resize(): fix actualsize calculations with unaligned blobs
The code in fdt_resize() to extend the fdt size to end on a page boundary
is wrong for fdt's not located at an address aligned on a page boundary.
What's even worse, the code would make actualsize shrink rather than grow
if (blob & 0xfff) was bigger than the amount of padding added by ALIGN(),
causing fdt_add_mem_rsv to fail.

Fix it by aligning end address (blob + size) to a page boundary instead.
For aligned fdt's this is equivalent to what we had before.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-01-17 13:03:29 -05:00
Jean-Christophe PLAGNIOL-VILLARD fea91edee8 usb_kbd: fix usb_kbd_deregister when DEVICE_DEREGISTER not enable
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Remy Böhmer <linux@bohmer.net>
2008-12-20 11:03:01 +01:00
Wolfgang Denk 455ae7e87f Coding style cleanup, update CHANGELOG.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-12-16 01:02:17 +01:00
Mike Frysinger 5b3375ac8c env_sf: support embedded environments
If both CONFIG_ENV_SECT_SIZE and CONFIG_ENV_SIZE are defined, and the sect
size is larger than the env size, then it means the env is embedded in a
block.  So we have to save/restore the part of the sector which is not the
environment.  Previously, saving the environment in SPI flash in this
setup would probably brick the board as the rest of the sector tends to
contain actual U-Boot data/code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-12-16 00:47:10 +01:00
Peter Tyser d16da93430 cmd_mem: Remove unused variable
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-12-14 11:13:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD cd6734510a Fix FIT and FDT support to have CONFIG_OF_LIBFDT and CONFIG_FIT independent
FDT support is used for both FIT style images and for architectures
that can pass a fdt blob to an OS (ppc, m68k, sparc).

For other architectures and boards which do not pass a fdt blob to an
OS but want to use the new uImage format, we just need FIT support.

Now we can have the 4 following configurations :

1) FIT only             CONFIG_FIT
2) fdt blob only        CONFIG_OF_LIBFDT
3) both                 CONFIG_OF_LIBFDT & CONFIG_FIT
4) none                 none

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-12-13 23:31:49 +01:00
Wolfgang Denk bd4345c175 Merge branch 'master' of git://git.denx.de/u-boot-ubi 2008-12-13 00:20:01 +01:00
Stefan Roese 3b089e4f88 UBI: Set ubi_dev.type back to DEV_TYPE_NONE upon failing initialization
With this patch we set the type back to NONE upon failing UBI partition
initialization. Otherwise further calls to the UBI subsystem would try
to really access the non-existing UBI partition.

Thanks to Michael Lawnick for pointing this out.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-12-10 12:55:29 +01:00
Ilya Yanok e0b5532579 jffs2: add sector_size field to part_info structure
This patch adds sector_size field to part_info structure (used
by new JFFS2 code).

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2008-12-09 23:38:46 +01:00
Stefan Roese 2d2e05727f UBI: Fix size parsing in "ubi create"
Signed-off-by: Stefan Roese <sr@denx.de>
2008-12-09 10:07:41 +01:00
Stefan Roese 2ee951ba2a UBI: Enable re-initializing of the "ubi part" command
With this patch now, the user can call "ubi part" multiple times to
re-connect the UBI device to another MTD partition.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-12-09 10:07:36 +01:00
Wolfgang Denk c645b181a9 Merge branch 'master' of git://git.denx.de/u-boot-net 2008-12-09 01:00:24 +01:00
Heiko Schocher 4b53001876 jffs2: rename devices_init () in common/jffs2.c
rename devices_init () in common/jffs2.c to
jffs2_devices_init (), because there is also a
devices_init () in common/devices.c.

Signed-off-by: Heiko Schocher <hs@denx.de>
2008-12-08 22:39:40 +01:00
Richard Retanubun bcdf1d2cf6 common/cmd_ide.c: Corrected endian order printing for compact flash serial number.
Corrected endian order printing for compact flash serial number.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
2008-12-07 01:24:53 +01:00
Gary Jennejohn 16a28ef219 IOMUX: Add console multiplexing support.
Modifications to support console multiplexing.  This is controlled using
CONFIG_SYS_CONSOLE_MUX in the board configuration file.

This allows a user to specify multiple console devices in the environment
with a command like this: setenv stdin serial,nc.  As a result, the user can
enter text on both the serial and netconsole interfaces.

All devices - stdin, stdout and stderr - can be set in this manner.

1) common/iomux.c and include/iomux.h contain the environment setting
implementation.
2) doc/README.iomux contains a somewhat more detailed description.
3) The implementation in (1) is called from common/cmd_nvedit.c to
handle setenv and from common/console.c to handle initialization of
input/output devices at boot time.
4) common/console.c also contains the code needed to poll multiple console
devices for input and send output to all devices registered for output.
5) include/common.h includes iomux.h and common/Makefile generates iomux.o
when CONFIG_SYS_CONSOLE_MUX is set.

Signed-off-by: Gary Jennejohn <garyj@denx.de>
2008-12-07 01:23:35 +01:00
Mike Frysinger 774ce72026 strings: use puts() rather than printf()
When running `strings` on really long strings, the stack tends to get
smashed due to printf().  Switch to puts() instead since we're only passing
the data through.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-12-07 01:17:19 +01:00
Niklaus Giger 29a4c24de9 cmd_elf.c: Cleanup bootvx and handle new CONFIG_SYS_VXWORKS parameters
- fix size too small by one in sprintf
- changed old (pre 2004) device name ibmEmac to emac
- boot device may be overriden in board config
- servername may be defined in board config
- additional parameters may be defined in board config
- fixed some line wrappings
- replaced  redundant MAX define by max

Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
2008-12-07 00:18:53 +01:00
Peter Tyser ace514837c lcd: Let the board code show board-specific info cleanup
remove unneeded version.h from lcd.c

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-12-07 00:08:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD c8aa7dfc18 FPGA: move fpga drivers to drivers/fpga
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-12-05 22:41:33 +01:00
Peter Tyser 2e4970d810 net: Fix download command parsing
When CONFIG_SYS_HUSH_PARSER is defined network download
commands with 1 argument in the format 'tftp "/path/file"'
do not work as expected. The hush command parser strips
the quotes from "/path/file" which causes the network
commands to interpret "/path/file" as an address
instead of the intended filename.

The previous check for a leading quote in netboot_common()
was replaced with a check which ensures only valid
numbers are treated as addresses.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-12-04 22:51:54 -08:00
Wolfgang Denk 26f6a2b7f3 Merge branch 'master' of git://git.denx.de/u-boot-usb 2008-12-05 00:24:32 +01:00
Stefan Roese 5e46b1e541 OneNAND: Add missing mtd info struct before calling onenand_erase()
Without this patch "saveenv" crashes when MTD partitions are enabled (e.g.
for use in UBI) via CONFIG_MTD_PARTITIONS.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-12-02 13:48:15 -06:00
Michael Trimarchi bebfc6ef3e Remove obsolete command (apply afte USB style patch, 80 chars strict)
Remove USB obsolete commmand

Signed-off-by: Michael Trimarchi <trimarchi@gandalf.sssup.it>
Signed-off-by: Remy Böhmer <linux@bohmer.net>
2008-11-28 21:24:13 +01:00
Michael Trimarchi de39f8c19d USB style patch, 80 chars strict
USB Code style patch

Signed-off-by: Michael Trimarchi <trimarchi@gandalf.sssup.it>
Signed-off-by: Remy Böhmer <linux@bohmer.net>
2008-11-28 21:24:12 +01:00
Piotr Ziecik 25ea652e90 UBI: Add proof-of-concept CFI flash support
With this patch UBI can be used on CFI flash chips.

Signed-off-by: Piotr Ziecik <kosmo@semihalf.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-24 11:33:33 +01:00
Stefan Roese a5c4067017 UBI: Change parsing of size in commands to default to hex
Currently the size parameters of the UBI commands (e.g. "ubi write") are
decoded as decimal instead of hex as default. This patch now interprets
all these values consistantly as hex, as all other standard U-Boot commands
do.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-24 08:31:16 +01:00
Kyungmin Park 694a0b3f1c UBI: Add UBI command support
This patch adds these UBI commands:

ubi part [nand|onenand] [part] - Show or set current partition
ubi info [l[ayout]] -Display volume and UBI layout information
ubi create[vol] volume [size] [type] - Create volume name with size
ubi write[vol] address volume size - Write volume from address with size
ubi read[vol] address volume [size] - Read volume to address with size
ubi remove[vol] volume - Remove volume

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Jean-Christophe PLAGNIOL-VILLARD a80b21d512 common/Makefile: create others group for non core, environment and command files
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-11-02 16:33:07 +01:00
Andy Fleming 20d04774f4 Consolidate MAX/MIN definitions
There were several, now there is one (two if you count the lower-case
versions).

Signed-off-by: Andy Fleming <afleming@freescale.com>
2008-11-02 16:23:46 +01:00
Wolfgang Denk 3cbd823116 Coding Style cleanup, update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-11-02 16:14:22 +01:00
Peter Korsgaard f242a08871 fdt_resize(): ensure minimum padding
fdt_add_mem_rsv() requires space for a struct fdt_reserve_entry
(16 bytes), so make sure that fdt_resize at least adds that much
padding, no matter what the location or size of the fdt is.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Andy Fleming <afleming@freescale.com>
2008-10-30 20:37:57 -04:00
Scott Wood 695c130e4b NAND: Align right column of the shorthelp with other commands.
I accidentally broke this in when making consistent the partial
alignment of the longhelp.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-10-29 10:42:18 -05:00
Kumar Gala b1d0db1805 bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}
Added the ability to config out bootm support for Linux, NetBSD, RTEMS

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-29 01:00:20 +01:00
Kumar Gala 49c3a861d1 bootm: Add subcommands
Add the ability to break the steps of the bootm command into several
subcommands: start, loados, ramdisk, fdt, bdt, cmdline, prep, go.

This allows us to do things like manipulate device trees before
they are passed to a booting kernel or setup memory for a secondary
core in multicore situations.

Not all OS types support all subcommands (currently only start, loados,
ramdisk, fdt, and go are supported).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-29 00:59:50 +01:00
Kumar Gala be08315933 bootm: Move to using a function pointer table for the boot os function
This removes a bit of code and makes it easier for the upcoming sub bootm
command support to call into the proper OS specific handler.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-29 00:57:31 +01:00
Wolfgang Denk d35c451d6c Merge branch 'master' of git://git.denx.de/u-boot-video 2008-10-28 08:37:19 +01:00
Haavard Skinnemoen 6b59e03e02 lcd: Let the board code show board-specific info
The information displayed when CONFIG_LCD_INFO is set is inherently
board-specific, so it should be done by the board code. The current code
dealing with this only handles two cases, and is already a horrible mess
of #ifdeffery.

Yes, this duplicates some code, but it also allows boards to print more
board-specific information; this used to be very difficult.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-10-27 09:53:58 +01:00
Haavard Skinnemoen 6f93d2b8fc lcd: Set lcd_is_enabled before clearing the screen
This allows the logo/info rendering routines to use the regular
lcd_putc/lcd_puts/lcd_printf calls.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-10-25 22:59:41 +02:00
Haavard Skinnemoen 15b17ab52b lcd: Implement lcd_printf()
lcd_printf() has a prototype in include/lcd.h but no implementation. Fix
this by borrowing the lcd_printf() implementation from the cogent board
code (which appears to use its own LCD framework.)

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-10-25 22:58:51 +02:00
Kumar Gala 8ab451c46b fdt: Added helper to set PCI dma-ranges property
Added fdt_pci_dma_ranges() that parses the pci_region info from the
struct pci_controller and populates the dma-ranges based on it.

The max # of windws/dma-ranges we support is 3 since on embedded
PowerPC based systems this is the max number of windows.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
2008-10-24 17:34:57 -05:00
Kumar Gala 3bed2aaf2d fdt: Add fdt_getprop_u32_default helpers
Add helper functions to return find a node and return it's property
or a default value.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2008-10-24 17:34:52 -05:00
Markus Klotzbuecher 50bd0057ba Merge git://git.denx.de/u-boot into x1
Conflicts:

	drivers/usb/usb_ohci.c
2008-10-21 09:18:01 +02:00
Kumar Gala 76da19df5b Added arch_lmb_reserve to allow arch specific memory regions protection
Each architecture has different ways of determine what regions of memory
might not be valid to get overwritten when we boot.  This provides a
hook to allow them to reserve any regions they care about.  Currently
only ppc, m68k and sparc need/use this.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-18 21:54:04 +02:00
Jean-Christophe PLAGNIOL-VILLARD 6d0f6bcf33 rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18 21:54:03 +02:00
Kumar Gala b799cb4c0e Expose command table search for sub-commands
Sub-command can benefit from using the same table and search functions
that top level commands have.  Expose this functionality by refactoring
find_cmd() and introducing find_cmd_tbl() that sub-command processing
can call.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-18 21:54:02 +02:00
Heiko Schocher 81473f6781 hush: add showvar command for hush shell.
This new command shows the local variables defined in
the hush shell:

=> help showvar
showvar
    - print values of all hushshell variables
showvar name ...
    - print value of hushshell variable 'name'

Also make the set_local_var() and unset_local_var ()
no longer static, so it is possible to define local
hush shell variables at boot time. If CONFIG_HUSH_INIT_VAR
is defined, u-boot calls hush_init_var (), where
boardspecific code can define local hush shell
variables at boottime.

Signed-off-by: Heiko Schocher <hs@denx.de>
2008-10-18 21:54:02 +02:00
Heiko Schocher 67b23a3228 I2C: adding new "i2c bus" Command to the I2C Subsystem.
With this Command it is possible to add new I2C Busses,
which are behind 1 .. n I2C Muxes. Details see README.

Signed-off-by: Heiko Schocher <hs@denx.de>
2008-10-18 21:54:02 +02:00
Heiko Schocher e43a27c497 I2C: add new command i2c reset.
If I2C Bus is blocked (see doc/I2C_Edge_Conditions),
it is not possible to get out of this, until the
complete Hardware gets a reset. This new commando
calls again i2c_init (and that calls i2c_init_board
if defined), which will deblock the I2C Bus.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-18 21:54:01 +02:00
richardretanubun fbd85ad65d CONFIG_EFI_PARTITION: Added support for EFI partition in cmd_ext2fs.c
Added support for CONFIG_EFI_PARTITION to ext2 commands.
Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com>
2008-10-18 21:54:01 +02:00
Bartlomiej Sieka fbc87dc054 FIT: output image load address for type 'firmware', fix message while there
Now that the auto-update feature uses the 'firmware' type for updates, it is
useful to inspect the load address of such images.

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-10-18 21:54:00 +02:00
Bartlomiej Sieka 4bae90904b Automatic software update from TFTP server
The auto-update feature allows to automatically download software updates
from a TFTP server and store them in Flash memory during boot. Updates are
contained in a FIT file and protected with SHA-1 checksum.

More detailed description can be found in doc/README.update.

Signed-off-by: Rafal Czubak <rcz@semihalf.com>
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-10-18 21:54:00 +02:00
Bartlomiej Sieka 3f0cf51dab flash: factor out adjusting of Flash address to the end of sector
The upcoming automatic update feature needs the ability to adjust an
address within Flash to the end of its respective sector. Factor out
this functionality to a new function flash_sect_roundb().

Signed-off-by: Rafal Czubak <rcz@semihalf.com>
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-10-18 21:54:00 +02:00
richardretanubun c68a05feeb Adds two more ethernet interface to 83xx
Added as a convenience for other platforms that uses MPC8360 (has 8 UCC).
Six eth interface is chosen because the platform I am using combines
UCC1&2 and UCC3&4 as 1000 Eth and the other four UCCs as 10/100 Eth.

Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-10-18 21:54:00 +02:00
Peter Tyser 9bc2e4eee3 cmd_i2c: Fix help for CONFIG_I2C_CMD_TREE && !CONFIG_I2C_MULTI_BUS
Original code displayed:
 => help i2c
 i2c i2c speed [speed] - show or set I2C bus speed
 i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device
 ...

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-10-14 22:27:04 +02:00
Remy Bohmer 4886720844 fix USB initialisation procedure
The max packet size is encoded as 0,1,2,3 for 8,16,32,64 bytes.
At some places directly 8,16,32,64 was used instead of the encoded
value. Made a enum for the options to make this more clear and to help
preventing similar errors in the future.

After fixing this bug it became clear that another bug existed where
the 'pipe' is and-ed with PIPE_* flags, where it should have been
'usb_pipetype(pipe)', or even better usb_pipeint(pipe).

Also removed the triple 'get_device_descriptor' sequence, it has no use,
and Windows nor Linux behaves that way.
There is also a poll going on with a timeout when usb_control_msg() fails.
However, the poll is useless, because the flag will never be set on a error,
because there is no code that runs in a parallel that can set this flag.
Changed this to something more logical.

Tested on AT91SAM9261ek and compared the flow on the USB bus to what
Linux is doing. There is no difference anymore in the early initialisation
sequence.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
2008-10-14 16:42:44 +02:00
Mike Frysinger c46980f6d2 cmd_spi: remove broken signed casting for display
Since we're working with unsigned data, you can't apply a signed pointer
cast and then attempt to print the result.  Otherwise you get wrong output
when the sign bit is set like "0xFF" incorrectly extended to "0xFFFFFFFF".

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-10-14 14:19:34 +02:00
Mike Frysinger d5fd0b4921 strings cmd: drop old CONFIG_CFG_STRINGS define
We don't need CONFIG_CFG_STRINGS anymore now that we have the define
CONFIG_CMD_STRINGS and Makefile control.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-10-14 14:17:20 +02:00
Luigi 'Comio' Mantellini d977a57356 Fix lzma uncompress call (image_start wrongly used instead image_len)
Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
2008-10-13 14:46:15 +02:00
Remy Bohmer c9e8436b10 USB layer of U-Boot causes USB protocol errors while using USB memory sticks
There are several differences between Linux, Windows and U-boot for initialising the
USB devices. While analysing the behaviour of U-boot it turned out that U-boot does
things really different, and some are wrong (compared to the USB standard).

This patch fixes some errors:
* The NEW_init procedure that was already in the code is good, while the old procedure
  is wrong. See code comments for more info.
* On a Control request the data returned by the device can be more than 8 bytes, while
  the host limits it to 8 bytes. This caused the host to generate a DataOverrun error.
  This results in a lot of USB sticks not being recognised, and the transmission ended
  frequently with a CTL:TIMEOUT Error.
* Added a flag CONFIG_LEGACY_USB_INIT_SEQ to allow users to use the old init procedure.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
2008-09-17 15:41:21 +02:00
Remy Bohmer 6f5794a6f7 Refactoring parts of the common USB OHCI code
This patch refactors some large routines of the USB OHCI code by
making some routines smaller and more readable which helps
debugging and understanding the code. (Makes the code looks
somewhat more like the Linux implementation.)

Also made entire file compliant to Linux Coding Rules (checkpatch.pl compliant)

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
2008-09-17 15:41:16 +02:00
Remy Bohmer be19d324ed Fix for USB sticks not working on ARM while using GCC 4.x compilers
The GCC-compiler makes an optimisation error while optimising the routine
usb_set_maxpacket(). This should be fixed in the compiler in the first place,
but there lots of compilers out there that makes this error, that it is
probably wiser to workaround it in U-boot itself.

What happens is that the register r3 is used as loop-counter 'i', but gets
overwritten later on. From there it starts using register r3 for several other
things and the assembler code is becoming a big mess. This is clearly a compiler bug.

This error occurs on at least several versions of Code Sourcery Lite compilers
for ARM. Like the Edition 2008q1, and 2008q3, It has also been seen on other
compilers, while compiling for armv4t, or armv5te with Os, O1 and O2.

We work around it by splitting up this routine in 2 parts, and making sure that
the split out part is NOT inlined any longer. This will make GCC spit out assembler
that do not show this problem. Another possibility is to adapt the Makefile to stop
optimisation for the complete file. I think this solution is nicer.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
2008-09-17 15:41:05 +02:00
Heiko Schocher 56844a22b7 powerpc: Fix bootm to boot up again with a Ramdisk
Commit 2a1a2cb6 didnt remove the dummy mem reservation in fdt_chosen,
and this stopped Linux from booting with a Ramdisk. This patch fixes
this, by deleting the useless dummy mem reservation.

When booting with a Ramdisk, a fix offset FDT_RAMDISK_OVERHEAD is now
added to of_size, so we dont need anymore a dummy mem reservation.

I measured the value of FDT_RAMDISK_OVERHEAD on a MPC8270 based
system (=0x44 bytes) and rounded it up to 0x80).

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
2008-09-13 02:03:38 +02:00
Luigi 'Comio' Mantellini fc9c1727b5 Add support for LZMA uncompression algorithm.
Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-13 01:59:07 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0e8d158664 rename CFG_ENV macros to CONFIG_ENV
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD 1ede78710c nvedit: rename error comment to CONFIG_ENV_IS_IN_
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:05 +02:00
Jean-Christophe PLAGNIOL-VILLARD b64b775e75 cmd_mem: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:05 +02:00
Jean-Christophe PLAGNIOL-VILLARD 8a40fb148e move cmd_get_data_size to command.c
add CMD_DATA_SIZE macro to enable it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:05 +02:00
Jean-Christophe PLAGNIOL-VILLARD 507641d249 env_flash: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:04 +02:00
Jean-Christophe PLAGNIOL-VILLARD 5a1aceb068 rename CFG_ENV_IS_IN_FLASH in CONFIG_ENV_IS_IN_FLASH
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:04 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0cf4fd3cf8 rename environment.c in env_embedded.c to reflect is functionality
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:01 +02:00
Jean-Christophe PLAGNIOL-VILLARD c0878af6e3 env_nowhere: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:01 +02:00
Jean-Christophe PLAGNIOL-VILLARD 93f6d72544 rename CFG_ENV_IS_NOWHERE in CONFIG_ENV_IS_NOWHERE
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:00 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2556ef7811 env_sf: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:00 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0b5099a841 rename CFG_ENV_IS_IN_SPI_FLASH in CONFIG_ENV_IS_IN_SPI_FLASH
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:00 +02:00
Jean-Christophe PLAGNIOL-VILLARD 55c5f49910 env_onenand: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:00 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9656138ff1 rename CFG_ENV_IS_IN_ONENAND in CONFIG_ENV_IS_IN_ONENAND
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:47:59 +02:00
Jean-Christophe PLAGNIOL-VILLARD 957a0e6957 env_nvram: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:47:59 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9314cee691 rename CFG_ENV_IS_IN_NVRAM in CONFIG_ENV_IS_IN_NVRAM
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:47:59 +02:00
Jean-Christophe PLAGNIOL-VILLARD 06f6135439 env_nand: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:47:59 +02:00
Jean-Christophe PLAGNIOL-VILLARD 51bfee1920 rename CFG_ENV_IS_IN_NAND in CONFIG_ENV_IS_IN_NAND
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:47:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD d8cc04d0ac env_dataflash: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:47:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD 057c849c45 rename CFG_ENV_IS_IN_DATAFLASH in CONFIG_ENV_IS_IN_DATAFLASH
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:47:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD d1034bc8db cmd_eeprom: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:47:52 +02:00
Jean-Christophe PLAGNIOL-VILLARD bf5a7710ec env_eeprom: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD bb1f8b4f8b rename CFG_ENV_IS_IN_EEPROM in CONFIG_ENV_IS_IN_EEPROM
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD 32628c5008 cmd_mac: Move conditional compilation to Makefile
finish remaning CFG_ID_EEPROM in CONFIG_ID_EEPROM
start in commit ad8f8687b7

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD e5648acab1 cmd_fdc: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2d02d91d53 common/Makefile: add core command section
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0d92d4a699 cmd_vfd: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 21:09:37 +02:00
Petri Lehtinen 3591293509 autoscr: Fix one-character lines and non-newline terminated scripts
When not using hush, the autoscr command now executes lines that are
only one character long. It also runs the last line of scripts even if
it does not end in a newline.

Signed-off-by: Petri Lehtinen <petri.lehtinen@inoi.fi>
2008-09-10 11:09:39 +02:00
Wolfgang Denk f6808c48a5 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2008-09-10 11:07:35 +02:00
Andrew Klossner 5251469943 Fix printf errors under -DDEBUG
Fix printf format-string/arg mismatches under -DDEBUG.

These warnings occur with DEBUG defined for a platform using
cpu/mpc85xx.  Users of other architectures can unearth similar
problems by adding the line "CFLAGS += -DDEBUG=1" in config.mk right
after "CFLAGS += $(call cc-option,-fno-stack-protector)".

Signed-off-by: Andrew Klossner <andrew@cesa.opbu.xerox.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2008-09-09 17:02:41 -05:00
Jean-Christophe PLAGNIOL-VILLARD 54b4ab3c96 bootm_load_os: fix load_end debug message
print load_end value not pointer

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-09 23:38:15 +02:00
Jean-Christophe PLAGNIOL-VILLARD 1d9af0be76 bootm: enable fdt support only on ppc, m68k and sparc
...as done in image.c

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-09 23:37:50 +02:00
Markus Heidelberg 748b5274e7 common/cmd_mem.c: remove nested #if defined(CONFIG_CMD_MEMORY)
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
2008-09-09 23:35:53 +02:00
Ryan CHEN 3b20fd83c7 Correct drv_usb_kbd_init function
The patch is that check if usb_get_dev_index() function return valid
pointer. If valid, continue. Otherwise return -1.

Signed-off-by: Ryan Chen <ryan.chen@st.com>
Acked-by: Markus Klotzbuecher <mk@denx.de>
2008-09-09 17:02:59 +02:00
Remy Bohmer eba1f2fc75 Make usb-stop() safe to call multiple times in a row.
A recent commit (936897d4d1)
enabled the usb_stop() command in common/cmd_bootm.c which was
not enabled for some time, because no board did actually set the
CFG_CMD_USB flag. So, now the usb_stop() is executed before
loading the linux kernel.

However, the usb_ohci driver hangs up (at least on AT91SAM) if the
driver is stopped twice (e.g. the peripheral clock is stopped on AT91).
If some other piece of code calls usb_stop() before the bootm command,
this command will hangup the system during boot.
(usb start and stop is typically used while booting from usb memory stick)

But, stopping the usb stack twice is useless anyway, and a flag already
existed that kept track on the usb_init()/usb_stop() calls.
So, we now check if the usb stack is really started before we stop it.

This problem is now fixed in both the upper as low-level layer.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Acked-by: Markus Klotzbuecher <mk@denx.de>
2008-09-09 16:59:25 +02:00
Wolfgang Denk 2c8ccf2728 Makefile: fix bug introduced by commit 47ffd6c2 2008-09-09 16:55:47 +02:00
Bartlomiej Sieka a4f243452c FIT: make iminfo check hashes of all images in FIT, return 1 on failed check
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-09-09 15:58:57 +02:00
Bartlomiej Sieka 919f550dc1 FIT: add ability to check hashes of all images in FIT, improve output
- add function fit_all_image_check_hashes() that verifies if all
  hashes of all images in the FIT are valid
- improve output of fit_image_check_hashes() when the hash check fails

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-09-09 15:58:11 +02:00
Peter Tyser f5ed9e3908 Add support for booting of INTEGRITY operating system uImages
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-09-09 15:54:10 +02:00
Kumar Gala 9ba2e2c819 Remove support for booting ARTOS images
Pantelis Antoniou stated:
	AFAIK, it is still used but the products using PPC are long gone.
	Nuke it plz (from orbit).

So remove it since it cleans up a usage of env_get_char outside of
the environment code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-09-09 15:52:35 +02:00
Wolfgang Denk 47ffd6c2fc Makefile: compile and link each module just once
Several source files need to be compiled and linked when one or more
config options are selected. To allow for easy selection in the
Makefiles yet to avoild multiple compilation (which costs build time)
and especially multiple linking (which causes errors), we use
"COBJS = $(sort COBJS-y)" which eliminates duplicates.

By courtesy of Detlev Zundel who suggested this approach.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-09 15:45:18 +02:00
Wolfgang Denk 9863a15a98 common/cmd_bootm.c: fix printf() format warnings
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-08 22:39:23 +02:00
Jean-Christophe PLAGNIOL-VILLARD d1e2319414 rtc: allow rtc_set to return an error and use it in cmd_date
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-07 00:56:36 +02:00
Kumar Gala ea86b9e64b Prevent crash if random/invalid ramdisks are passed to bootm
Adds returning an error from the ramdisk detection code if
its not a real ramdisk (invalid).  There is no reason we can't
just return back to the console if we detect an invalid
ramdisk or CRC error.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-09-07 00:18:50 +02:00