Commit Graph

1331 Commits

Author SHA1 Message Date
Wolfgang Wegner
87d93a1ba2 move prototypes for gunzip() and zunzip() to common.h
Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus
repeated in every file using it. This patch moves the prototypes to
common.h and removes all prototypes distributed anywhere else.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
2009-12-21 21:39:59 +01:00
Mahavir Jain
127e10842b usb: write command for RAW partition.
This patch implements write support to usb device with raw partition.
It will be useful for filesystem write support to usb device from
u-boot in future.

Tested with writing kernel image to raw usb disk & booting with usb
read command into ram.

[Note:  run usb part to get info about start sector & number of
sectors on a partition for usb write operation.]

Signed-off-by: Mahavir Jain <mjain@marvell.com>
2009-12-20 12:53:00 +01:00
Tom Rix
8f8bd565f3 USB Consolidate descriptor definitions
The header files usb.h and usbdescriptors.h have the same nameed
structure definitions for

usb_config_descriptor
usb_interface_descriptor
usb_endpoint_descriptor
usb_device_descriptor
usb_string_descriptor

These are out right duplicates in usb.h

usb_device_descriptor
usb_string_descriptor

This one has extra unused elements

usb_endpoint_descriptor

	unsigned char	bRefresh
	unsigned char	bSynchAddress;

These in usb.h have extra elements at the end of the usb 2.0
specified descriptor and are used.

usb_config_descriptor
usb_interface_descriptor

The change is to consolidate the definition of the descriptors
to usbdescriptors.h.  The dublicates in usb.h are removed.
The extra element structure will have their name shorted by
removing the '_descriptor' suffix.

So

usb_config_descriptor -> usb_config
usb_interface_descriptor -> usb_interface

For these, the common descriptor elements are accessed now
by an element 'desc'.

As an example

-	if (iface->bInterfaceClass != USB_CLASS_HUB)
+	if (iface->desc.bInterfaceClass != USB_CLASS_HUB)

This has been compile tested on MAKEALL arm, ppc and mips.

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
2009-12-20 12:47:37 +01:00
Heiko Schocher
4b142febff common: delete CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL
There is more and more usage of printing 64bit values,
so enable this feature generally, and delete the
CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL
defines.

Signed-off-by: Heiko Schocher <hs@denx.de>
2009-12-08 22:14:07 +01:00
Wolfgang Denk
35e3717772 Merge branch 'master' of ../work into next 2009-12-07 23:42:33 +01:00
Heiko Schocher
df002fa6b9 i2c: fix dangling comment in do_i2c_mw()
commit bd3784df94 deleted some unused
code in do_i2c_mw(), but missed to also remove the respective
commment. This patch fixes this.

Signed-off-by: Heiko Schocher <hs@denx.de>
2009-12-07 22:58:46 +01:00
Wolfgang Denk
206c00f26f Merge branch 'master' into next
Conflicts:
	lib_generic/zlib.c

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-12-07 22:47:17 +01:00
Peter Tyser
224c90d106 bootm: Fix help message's sub-command ordering
The help message for the 'bootm' command listed the 'cmdline' and 'bdt'
sub-commands in the wrong order which resulted in the error below when
following the 'help' command's instructions:

  "Trying to execute a command out of order"

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-12-07 22:12:49 +01:00
Wolfgang Denk
2a49bf3149 Merge branch 'master' into next
Conflicts:
	board/esd/plu405/plu405.c
	drivers/rtc/ftrtc010.c

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-12-05 02:11:59 +01:00
Peter Korsgaard
20dde48bca add lzop decompression support
Add lzop decompression support to the existing lzo bitstream handling
(think gzip versus zlib), and support it for uImage decompression if
CONFIG_LZO is enabled.

Lzop doesn't compress as good as gzip (~10% worse), but decompression
is very fast (~0.7s faster here on a slow ppc). The lzop decompression
code is based on Albin Tonnerre's recent ARM Linux lzo support patch.

Cc: albin.tonnerre@free-electrons.com
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-12-05 01:30:23 +01:00
Graeme Russ
b4feeb4e8a i386: Fix malloc initialization
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2009-12-05 01:02:10 +01:00
Robert P. J. Day
bcb324d68f Remove superfluous preprocessor tests from some cmd_*.c files.
A small number of common/cmd_*.c files contain preprocessor tests that
are apparently superfluous since those same tests are used in the
Makefile to control the compilation of those files.  Those tests are
clearly redundant as long as they surround the entirety of the source
in those files.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2009-12-02 23:46:45 +01:00
Pratap Chandu
bd3784df94 Removes dead code in the file common/cmd_i2c.c
There is some dead code enclosed by #if 0 .... #endif in the file
common/cmd_i2c.c
This patch removes the dead code.

Signed-off-by: Pratap Chandu <pratap.rrke@gmail.com>
2009-12-02 23:35:24 +01:00
Magnus Lilja
d52e3e0176 cmd_date: Fix spelling in error message.
Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
2009-12-02 23:28:10 +01:00
Peter Tyser
c253122395 Move do_irqinfo() to common/cmd_irq.c
cmd_irq.c is a much better home and it is already conditionally
compiled based on CONFIG_CMD_IRQ.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-12-02 23:23:20 +01:00
Peter Tyser
a5dd4dc64f cmd_license: Remove unneeded #ifdef CONFIG_CMD_LICENSE
cmd_license is already conditionally compiled at the Makefile-level.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-12-02 23:22:26 +01:00
Peter Tyser
9ef78511cd circbuf: Move to lib_generic and conditionally compile
circbuf could be used as a generic library and is only currently
needed when CONFIG_USB_TTY is defined.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-12-02 23:19:32 +01:00
Mike Frysinger
bf44f3f327 exports: rewrite jump table init
The current jump table init fails to initialize a bunch of exported
symbols (forceenv/do_reset/etc...).  Rather than fix just these few
missing pieces, rewrite the code to utilize the existing list of
exported symbols -- _exports.h.  Since every exported symbol has to
be listed in this header, it makes sense to use it so that we only
ever have one list that needs to be updated and things can't fall
out of sync again.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-02 22:53:51 +01:00
Mike Frysinger
0008555f4d bootm: mark local boot_os[] table static
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-24 23:40:03 +01:00
Remy Bohmer
b25e38fc36 Repair build fail in case CONFIG_PPC=n and CONFIG_FIT=y
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-11-24 22:40:20 +01:00
Peter Tyser
396fd17338 Add 'true' and 'false' commands
These commands are only enabled when the hush shell is enabled and can
be useful in scripts such as:

while true do
    echo "Booting OS...";
    run $bootcmd;
    echo "Booting OS failed";
    sleep 10;
done

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-11-23 00:06:13 +01:00
Peter Tyser
4e1ca93b6b cmd_help: General cleanup
Shorten the overly-verbose help message of 'help' and clean up some
redundant ifdefery while we're at it.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-11-23 00:06:12 +01:00
Peter Tyser
6b8f5ad10f command.c: Break commands out to appropriate cmd_*.c files
command.c should contain common code related to commands, not
miscellaneous command implementations.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-11-23 00:06:11 +01:00
Amul Kumar Saha
c758e947aa ENV Variable support for Flex-OneNAND
Define and use CONFIG_ENV_ADDR_FLEX and CONFIG_ENV_SIZE_FLEX
for storing environment variables.

Signed-off-by: Rohit Hagargundgi <h.rohit@samsung.com>
Signed-off-by: Amul Kumar Saha <amul.saha@samsung.com>
2009-11-13 16:56:18 -06:00
Peter Tyser
581d04f14d cmd_nand: Move conditional compilation to Makefile
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-11-13 16:56:14 -06:00
Peter Tyser
9574fd63a9 cmd_nand: Remove duplicate include
Also remove vague, unnecessary comment

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-11-13 16:56:13 -06:00
Peter Tyser
246c69225c Add 'editenv' command
The editenv command can be used to edit an environment variable.
Editing an environment variable is useful when one wants to tweak an
existing variable, for example fix a typo or change the baudrate in the
'bootargs' environment variable.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-10-27 20:58:25 +01:00
Peter Tyser
b0fa8e5063 setenv(): Delete 0-length environment variables
Previously setenv() would only delete an environment variable if it
was passed a NULL string pointer as a value.  It should also delete an
environment variable when it encounters a valid string pointer of
0-length.

This change/fix is generally useful and is necessary for the upcoming
"editenv" command.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-10-27 20:58:25 +01:00
Peter Tyser
ecc5500ee4 readline(): Add ability to modify a string buffer
If the 'buf' parameter is a non-0-length string, its contents will be
edited.  Previously, the initial contents of 'buf' were ignored and the
user entered its contents from scratch.

This change is necessary to support the upcoming "editenv" command but
could also be used for future commands which require a user to modify
an existing string.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-10-27 20:58:25 +01:00
Peter Tyser
f923943843 cread_line(): Remove unused variables
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-10-27 20:58:25 +01:00
Peter Tyser
e491a71e57 Check for NULL prompt in readline_into_buffer()
Previously, passing readline() or readline_into_buffer() a NULL 'prompt'
parameter would result in puts() printing garbage when
CONFIG_CMDLINE_EDITING was enabled.

Note that no board currently triggers this bug.  Enabling
CONFIG_CMDLINE_EDITING on some boards (eg bab7xx) would result in
the bug appearing.  This change is only intended to prevent someone
from running into this issue in the future.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-10-27 20:58:25 +01:00
Wolfgang Denk
98cecb610f Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2009-10-27 20:56:31 +01:00
Wolfgang Denk
a747a7f310 Revert "env: only build env_embedded and envcrc when needed"
Breaks building on many boards, and no really clean fix available yet.

This reverts commit 6dab6add2d.
2009-10-27 20:46:31 +01:00
Anton Vorontsov
3e303f748c fdt_support: Add multi-serial support for stdout fixup
Currently fdt_fixup_stdout() is using hard-coded CONFIG_CONS_INDEX
constant. With multi-serial support, the CONS_INDEX may no longer
represent actual console, so we should try to extract port number
from the current stdio device name instead of always hard-coding the
constant value.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-10-26 21:35:50 -05:00
Mike Frysinger
4166ee58d3 sf: add GPL-2 license info
Some of the new spi flash files were missing explicit license lines.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-10-24 22:44:18 +02:00
Kumar Gala
d535a49300 fdt: Fix fdt padding issue for initrd mem_rsv
Its possible that we end up with a device tree that happens to be a
particular size that after we call fdt_resize() we don't have any
space left for the initrd mem_rsv.

Fix this be adding a second mem_rsv into the size calculation.  We
had one to cover the fdt itself and we have the potential of adding
a second for the initrd.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2009-10-24 22:39:51 +02:00
Wolfgang Denk
922754cc82 Merge branch 'master-sync' of git://git.denx.de/u-boot-arm 2009-10-24 22:26:09 +02:00
Stefan Roese
30d45c0d3e fdt: Add fdt_fixup_nor_flash_size() to fixup NOR FLASH size in dtb
This function can be used to update the size in the "reg" property
of the NOR FLASH device nodes. This is necessary for boards with
non-fixed NOR FLASH sizes.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Acked-by: Wolfgang Denk <wd@denx.de>
2009-10-23 15:55:23 +02:00
Alessandro Rubini
8c0a92c8f4 lcd: remove '#if 0' 32-bit scroll, now memcpy does it
Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
2009-10-18 23:10:43 +02:00
Alessandro Rubini
9c5586aa19 setenv: do console redirection even if previously unset
If "stdout" is not previously set, doing "setenv stdout lcd" had no
effect, since console redirection only worked if the environment
variable was already set; the second time you run setenv it worked.
Most default environments lack stdin/out/err definitions, so I'm sure
I'm not alone with this problem.

This patch simply moves a block of code out of a conditional, to do
the same work even if the variable was previously unset.

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
2009-10-18 23:07:03 +02:00
Paul Gortmaker
87b22b7787 mem_mtest: fix error reporting, allow escape with ^C
The basic memtest function tries to watch for ^C after each
pattern pass as an escape mechanism, but if things are horribly
wrong, we'll be stuck in an inner loop flooding the console with
error messages and never check for ^C.  To make matters worse,
if the user waits for all the error messages to complete, we
then incorrectly report the test passed without errors.

Adding a check for ^C after any error is printed will give
the end user an escape mechanism from a console flood without
slowing down the overall test speed on a slow processor.

Also, the more extensive memtest quit after just a single error,
which is inconsistent with the normal memtest, and not useful if
if you are doing dynamic environmental impact testing, such as
heating/cooling etc.

Both tests now track the error count and report it properly
at test completion.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2009-10-18 22:57:06 +02:00
Mike Frysinger
6dab6add2d env: only build env_embedded and envcrc when needed
The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless.  Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled.  And now that
the env code is conditionally compiled, we can drop the source code checks.

For people who want to extract the environment manually, add a new option
CONFIG_BUILD_ENVCRC that only enables the envcrc utility.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-18 22:53:18 +02:00
Niklaus Giger
7936b51165 Cleanup: use constant
Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
2009-10-18 22:41:33 +02:00
Minkyu Kang
dd2c9e6a3b s5pc1xx: support serial driver
This patch includes the serial driver for s5pc1xx.
s5pc1xx uart driver needs own register setting and clock configuration.
So, need to special driver.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2009-10-13 21:13:55 -05:00
Wolfgang Denk
cd77dd109c Merge branch 'reloc' 2009-10-09 00:03:18 +02:00
Niklaus Giger
78d2a64137 ppc4xx: Rework cmd reginfo
The command "reginfo" got an overhaul for the ppc4xx. It dumps all the
relevant HW configuration registers (address, symbolic name, content).
This allows to easily detect errors in *.h files and changes in the HW
configuration.

Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-10-07 09:15:26 +02:00
Peter Tyser
0630535e2d arm/microblaze/nios/nios2/sh: Remove relocation fixups
These architectures don't need relocation fixups, so reduce their
codesize a bit by defining CONFIG_RELOC_FIXUP_WORKS.

Also remove the reloc_off field from their global data structures
as it is no longer needed.

Note that the location of the standalone application jump table pointer
in the global data structure is affected by this change, breaking
execution of standalone applications compiled for previous versions of
U-Boot. We will therefore increment XF_VERSION in the next commit,
which also touches this area.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-10-03 10:17:57 +02:00
Peter Tyser
521af04d85 Conditionally perform common relocation fixups
Add #ifdefs where necessary to not perform relocation fixups.  This
allows boards/architectures which support relocation to trim a decent
chunk of code.

Note that this patch doesn't add #ifdefs to architecture-specific code
which does not support relocation.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-10-03 10:17:57 +02:00
Wolfgang Denk
9ae7ae6b4d Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx 2009-09-30 23:26:59 +02:00
Stefan Roese
95b602bab5 ppc4xx: Convert PPC4xx SDRAM defines from lower case to upper case
The latest PPC4xx register cleanup patch missed some SDRAM defines.
This patch now changes lower case UIC defines to upper case. Also
some names are changed to match the naming in the IBM/AMCC users
manuals (e.g. mem_mcopt1 -> SDRAM0_CFG).

Signed-off-by: Stefan Roese <sr@denx.de>
2009-09-28 10:45:54 +02:00