Commit Graph

1602 Commits

Author SHA1 Message Date
Trübenbach, Ralf 39f7aacf3f command.c: Enable auto tab for the editenv command
Enable the auto completion (with TAB) of the environment variable name
after the editenv command.

Signed-off-by: Ralf Trbenbach <ralf.truebenbach@men.de>
2010-05-06 00:37:50 +02:00
Graeme Russ bf16500f79 x86: Use CONFIG_SERIAL_MULTI
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:16:46 +02:00
Frans Meulenbroeks 8cd852824d cmd_onenand.c: moved to standard subcommand handling
On the fly also fixed the following things:
- write help talked about a parameter oob, but that one was not used, so
  removed it from the help message.
- the test command also allowed a force subcommand but didn't use it.
  eliminated the code.
- do_onenand made static
- do_onenand contained
	int blocksize;
	...
	mtd = &onenand_mtd;
	this = mtd->priv;
	blocksize = (1 << this->erase_shift);
  As blocksize was not used the last two statements were unneeded so
  removed them.
  The first statement (mtd = ....) assigns to a global. Not sure if it
  is needed, and since I could not test this, left the line for now

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-05-05 23:57:17 +02:00
Wolfgang Denk 900a1fe8c8 Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-05-04 22:49:15 +02:00
Minkyu Kang 46a3b5c8df SAMSUNG: serial: modify name from s5pc1xx to s5p
Because of other s5p series SoC will use these serial functions,
modify function's name and structure's name.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2010-04-30 05:23:23 -05:00
Wolfgang Denk e1d2950d0f mtdparts: get rid of custom DEBUG macro, use debug()
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-04-28 10:58:10 +02:00
Wolfgang Denk 2697eff1af mtdparts: fix write through NULL pointer
The "mtdparts add" command wrote through a NULL pointer - on many
systems this went unnoticed (PowerPC has writable RAM there, some ARM
systems have ROM where a write has no effect), but on arm1136
(i.MX31) it crashed the system.

Add appropriate checks.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-04-28 10:53:47 +02:00
Anatolij Gustschin e3b28e6732 mpc512x: add multi serial PSC support
Extend mpc512x serial driver to support multiple PSC ports.

Subsequent patches for PDM360NG board support make use of this
functionality by defining CONFIG_SERIAL_MULTI in the board config
file. Additionally the used PSC devices are specified by defining
e.g. CONFIG_SYS_PSC1, CONFIG_SYS_PSC4 and CONFIG_SYS_PSC6.

Support for PSC devices other than 1, 3, 4 and 6 is not added
by this patch because these aren't used currently. In the future
it can be easily added using DECLARE_PSC_SERIAL_FUNCTIONS(N) and
INIT_PSC_SERIAL_STRUCTURE(N) macros in cpu/mpc512x/serial.c.
Additionally you have to add code for registering added
devices in serial_initialize() in common/serial.c.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-04-24 22:56:30 +02:00
Stefan Roese a47a12becf Move arch/ppc to arch/powerpc
As discussed on the list, move "arch/ppc" to "arch/powerpc" to
better match the Linux directory structure.

Please note that this patch also changes the "ppc" target in
MAKEALL to "powerpc" to match this new infrastructure. But "ppc"
is kept as an alias for now, to not break compatibility with
scripts using this name.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Anatolij Gustschin <agust@denx.de>
2010-04-21 23:42:38 +02:00
Jens Scharsig 30dc165a76 FIX: watchdog timeout, while waiting for input
* add WATCHDOG_RESET to !tstc() loops
* prevents watchdog timeout, while waiting for input,
  if CONFIG_BOOT_RETRY_TIME or CONFIG_SHOW_ACTIVITY defined

Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
2010-04-10 23:31:31 +02:00
karl.beldan@gmail.com ae30b8c200 malloc: sbrk() should return MORECORE_FAILURE instead of NULL on failure
Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
2010-04-10 00:30:27 +02:00
Frans Meulenbroeks 9acd4f0e91 cmd_bmp.c: add standard subcommand handling
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Acked-by: Detlev Zundel <dzu@denx.de>
2010-04-09 23:37:06 +02:00
Wolfgang Denk 74b86d2d51 Merge branch 'master' of git://git.denx.de/u-boot-ubi 2010-04-09 21:49:42 +02:00
Peter Tyser 3b653fdb32 cmd_ubi: Fix uninitialized variable warning
gcc 3.4.6 previously reported the following error on many MIPS boards
which utilize UBI:
  cmd_ubi.c:193: warning: 'vol' might be used uninitialized in this function

The current code is structured such that 'vol' will never be used when
it is NULL anyway, but gcc isn't smart enough to figure this out.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2010-04-09 16:30:29 +02:00
Kim B. Heino fac71cc49f USB storage probe
While debugging one ill behaving USB device I found two bugs in USB
storage probe.

usb_stor_get_info() returns -1 (error), 0 (skip) or 1 (ok). First part
of this patch fixes error case.

Second part fixes usb_inquiry()'s retry counter handling. Original code
had retry = -1 on error case, not retry = 0 as checked in the next line.

Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
2010-04-08 21:40:00 +02:00
Kim B. Heino aaad108b88 USB storage count
Here's another USB storage patch. Currently U-Boot handles storage
devices #0 - #4 as valid devices, even if there is none connected. This
patch fixes usb_stor_get_dev() to check detected device count instead
of MAX-define.

This is very important for ill behaving devices. usb_dev_desc[] can be
partially initialized if device probe fails.

After fixing get_dev() it was easy to fix "usb part" etc commands.
Previously it outputed "Unknown partition table" five times, now it's
"no USB devices available".

Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
2010-04-08 21:40:00 +02:00
Kumar Gala 49b97d9c8e fdt: Add fdt_del_node_and_alias helper
Add a helper function that given an alias will delete both the node
the alias points to and the alias itself

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2010-04-07 00:08:18 -05:00
Wolfgang Denk ffa37fc98d Merge branch 'next' 2010-04-01 11:28:32 +02:00
Heiko Schocher 24de2f4be0 bootm, linux: fix booting Multi-File Image with "kernel+ramdisk+fdt"
Booting a "Multi-File Image" including a linux kernel, ramdisk and
fdt, generated with

mkimage -A ppc \
    -O linux \
    -T multi \
    -C gzip \
    -a 00000000 \
    -e 00000000 \
    -n "kernel-2.6+initrd+dtb" \
    -d "vmlinux.bin.gz:ramdisk_image.gz:board.dtb" \
    multi.bin

actually fails, because ramdisk start and end addresses
didn;t get initialized. This patch fixes this issue.

Tested on the KUP4K board.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-03-29 14:31:42 +02:00
Frans Meulenbroeks fd03ea8964 i2c: made unused function i2c_mux_add_device static
and removed it from the .h file

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-29 13:29:12 +02:00
Frans Meulenbroeks 2c0dc99020 cmd_i2c: introduced get_alen helper function
The code to parse alen appeared 6 times in the function.
Factored this out in a small helper function

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-29 13:28:57 +02:00
Frans Meulenbroeks a266fe955a cmd_i2c: moved a define to before the functions
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-29 13:28:49 +02:00
Frans Meulenbroeks 4a8cf3382a cmd_i2c: moved mispositioned comment for i2c md
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-29 13:28:40 +02:00
Frans Meulenbroeks 3a6dcb988e cmd_i2c.c: declared local functions as static
Declared all functions that were not called outside the file as static

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-29 13:25:43 +02:00
Wolfgang Denk 0020db3f0d Merge remote branch 'origin/master' into next 2010-03-29 12:33:43 +02:00
Wolfgang Denk 060f28532b cmd_usb.c: print debug messages only when DEBUG is defined
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-03-28 00:19:45 +01:00
Wolfgang Denk be1a91320c Merge branch 'next' of git://git.denx.de/u-boot-coldfire into next 2010-03-28 00:04:18 +01:00
Philippe De Muyter 116095eb1f fix cmd_bdinfo.c:354: warning: 'print_eth' defined but not used
This fixes the following warnings when running MAKEALL for coldfire :
cmd_bdinfo.c:354: warning: 'print_eth' defined but not used

Signed-off-by: Philippe De Muyter <phdm at macqel.be>
2010-03-24 11:08:53 -05:00
Alessandro Rubini acb1386893 lcd: make 16bpp work
Support for 16bpp was supposed to be in the code but was not working.
This makes it work and has been tested in the nhk8815 board.

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-03-24 11:23:15 +01:00
Florian Fainelli 6b94b49622 cmd_nand: show nand scrub confirmation character
When issuing a nand scrub command, the entered character is not displayed
this may be confusing. This patch makes the input character being
displayed if it is a 'y' so that an user knows he is about to scrub his
nand.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2010-03-23 14:29:10 -05:00
Wolfgang Denk b46b353b90 Merge remote branch 'origin/master' into next 2010-03-21 22:45:36 +01:00
Anatolij Gustschin 3c950e2ebf fdt_support: add partitions fixup in mtd node
Allow overwriting defined partitions in the device tree blob
using partition info defined in the 'mtdparts' environment
variable.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Gerald Van Baren <vanbaren@cideas.com>
2010-03-21 22:44:59 +01:00
John Schmoller d611295032 cmd history: Match history buffer size to console buffer
Match history buffer size to console buffer size. History buffer size
was hard coded to 256, artificially limiting the command buffer size.
The history buffer now tracks CONFIG_SYS_CBSIZE.

Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
2010-03-21 22:44:59 +01:00
John Schmoller 6475b9f91b console: Fix console buffer overrun
When CONFIG_SYS_CBSIZE equals MAX_CMDBUF_SIZE, a command string of
maximum length will overwrite part of the history buffer, causing the
board to die. Expand the console_buffer and hist_lines buffer by one
character each to hold the missing NULL char.

Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
2010-03-21 22:44:58 +01:00
Frans Meulenbroeks 47ab5ad145 cmd_setexpr: allow memory addresses in expressions
This patch add functionality to use memory addresses in expressions.
This increases the power of expressions substantially

It adheres to the standard convemtions: memory addresses can be given
in the format *address (e.g. *1000)

Rationale for this change is that it allows masking off bits from a
byte that is obtained by reading data from e.g. i2c.

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>

Fix warning: control reaches end of non-void function
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-03-21 22:44:43 +01:00
Frans Meulenbroeks 652e53546b cmd_i2c.c: added i2c read to memory function
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-21 22:44:43 +01:00
Frans Meulenbroeks fb0070e910 cmd_i2c.c: sorted commands alphabetically
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-21 22:44:43 +01:00
Frans Meulenbroeks bfc3b77ebe cmd_i2c.c: reworked subcommand handling
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-21 22:44:43 +01:00
Frans Meulenbroeks f74d9bd2a2 cmd_bootm.c: made subcommand array static
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-21 22:44:43 +01:00
Frans Meulenbroeks faffe14f01 cmd_i2c.c: reduced subaddress length to 3 bytes
according to some of the comments the subaddress length is 1 or 2, but we are being
prepared for the case it becomes 3. However the code also accepted 4.
This repairs this by changing the constand 4 to 3.

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-21 22:44:42 +01:00
Anatolij Gustschin a74908161a console.c: fix problem with splashimage
If a board uses cfb_console driver and splash image
and also defines CONFIG_SILENT_CONSOLE, the user is
locked out even if "silent" is not set. It is not
possible to get any output, neither on vga console
device nor on serial console after redirecting the
output to the serial console, since the GD_FLG_SILENT
flag remains set.

Fix the problem by redirecting the output from frame
buffer to serial console if splashimage is used.
Only suppress the output if "silent" environment
variable was set and don't set the GD_FLG_SILENT
flag arbitrarily.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-03-21 22:22:53 +01:00
Frans Meulenbroeks 9d90a93d36 cmd_mmc remove \n
This patch removes the \n after the help message for mmcinfo.
This resulted in an empty line being displayed after the mmcinfo line
when the help command was given.

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-03-21 16:44:04 +01:00
Wolfgang Denk 93910edb59 Prepare v2010.03-rc1
Coding style cleanup, update CHANGELOG.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-03-12 23:06:04 +01:00
Michael Zaidman 5f8419597f Cosmetic change - indentation correction.
Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
2010-03-12 00:19:11 +01:00
Anatolij Gustschin a693447cea cmd_mtdparts.c: prevent printbuffer overflows
The length of configured MTDPARTS_DEFAULT string
could be greater than console printbuffer size.
Replace printf() by puts() to avoid potential buffer
overflows.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-03-12 00:18:08 +01:00
Wolfgang Denk 143cd21fe2 Move CONFIG_UPDATE_TFTP code after CONFIG_PREBOOT
The auto-update feature (CONFIG_UPDATE_TFTP) requires that the env
variable serverip be set for the TFTP access. If DHCP is to be used
to get the serverip env variable, this doesn't work as DHCP happens
after the auto-update attempt has run. A solution is to run DHCP in
PREBOOT, but even this is too late.

To solve this, we move update_tftp() below the PREBOOT stuff.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-03-11 23:56:03 +01:00
Richard Retanubun 4b99327a41 PPC: Record U-Boot's relocated address in RAM and show in bdinfo.
This patch uses gd->relocaddr variable to store uboot's relocated
address in RAM and shows it in bdinfo command.

This patch moves CONFIG_AMIGAONEG3SE style copying of the address
in board_init_f to just before relocation is actually done.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Tested-by: Detlev Zundel <dzu@denx.de>
2010-03-11 23:49:16 +01:00
Frans Meulenbroeks f3651764e5 cmd_itest.c: fix pointer dereferencing
fix pointer dereferencing
if the size is .b and .w an 8 or 16 bit access is done.

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Acked-by: Detlev Zundel <dzu@denx.de>
2010-02-24 00:09:45 +01:00
Stefan Roese ab5a0dcb9c net: Use 0.5 sec timeout in miiphy_reset() instead of counting loop
This patch fixes a problem I've notived on a buggy PPC4xx system. This
system has problems with the PHY MDIO communication and seemed to be
stuck/crashed in miiphy_reset(). But degugging revealed, that the CPU
didn't crash, but "only" hung in this counting loop for about 2 minutes.

This patch now uses a real timeout of 0.5 seconds (as mentioned in the
comment in miiphy_reset).

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-02-06 22:52:21 -08:00
Remy Bohmer 84d36b3018 USB: usb_control_msg wait for driver ISR to set status.
This patch changes usb_control_msg back to the state prior to commit
4886720844.

The USB driver ISR routine may update the status.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2010-02-03 22:06:59 +01:00
Wolfgang Denk 5c1a1a3069 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2010-02-03 20:05:27 +01:00
Wolfgang Denk 0ae016f1ff Merge branch 'master' of git://git.denx.de/u-boot-video 2010-02-03 20:03:46 +01:00
Wolfgang Denk 5f566f4547 cmd_ximg.c: fix error: 'i' undeclared
Fix compile error:

	cmd_ximg.c: In function 'do_imgextract':
	cmd_ximg.c:234: error: 'i' undeclared (first use in this function)
	cmd_ximg.c:234: error: (Each undeclared identifier is reported only once
	cmd_ximg.c:234: error: for each function it appears in.)

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-01-31 21:51:43 +01:00
Anatolij Gustschin a6e42ed097 lcd: remove CONFIG_ATMEL_LCD ifdefs from lcd_setfgcolor
Not all boards defining LCD_COLOR16 are able to set
lcd_color_fg/lcd_color_bg correctly. The issue seems to
be caused by CONFIG_ATMEL_LCD ifdefs in lcd_setfgcolor()
and lcd_setbgcolor(). Actually, the color values passed
to these functions are already correct, we don't need
to fix them. So remove ifdefs here.

Reported-by: Alessandro Rubini <rubini@unipv.it>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-01-27 21:23:30 +01:00
Wolfgang Denk 15b86c3d6c env_nand.c: print error message and fail gracefully
env_nand.c would crash silently if a malloc() for the environment
buffers failed; make it print an error message and fail gracefully,
i. e. use the default environment then.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: John Rigby <jcrigby@gmail.com>
2010-01-27 14:22:41 -06:00
Kumar Gala 4194b3668a Add support to disable cpu's in multicore processors
Add a disable sub-command to the cpu command that allows for disabling
cores in multicore processors.  This can be useful for systems that are
using multicore chips but aren't utilizing all the cores as a way to
reduce power and possibly improve performance.

Also updated an added missing copyright.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-01-26 23:17:49 -06:00
Wolfgang Wegner 5912d36507 add ability to handle compressed images to imxtract
imxtract currently can not handle compressed images. This patch adds
handling for bzip2 and zip compression. In both cases, a destination
address has to be specified for extraction.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
2010-01-26 19:36:07 +01:00
Mike Frysinger 2903ad33a7 jffs2: fix hangs/crashs when not using CONFIG_JFFS2_PART_SIZE
Commit b5b004ad8a caused the sector_size to
be calculated incorrectly when the part size was not hardcoded.  This is
because the new code relied on part->size but tried to do the calculation
before it was initialized properly, and it did not take into consideration
the magic SIZE_REMAINING define.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-26 00:07:50 +01:00
Mike Frysinger 44431cabbb gzip/zlib: make features optional
If you really want to slim down U-Boot and you would rather use a higher
compression scheme (like LZMA), it'd be nice to disable gzip/zlib since
these code bases take up a significant amount of space.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-26 00:04:57 +01:00
Stefano Babic 8edcde5e4e mkimage: Add Freescale imx Boot Image support (imximage)
This patch adds support for "imximage" (MX Boot Image)
to the mkimage utility. The imximage is used on the Freescales's
MX.25, MX.35 and MX.51 processors.

Further details under doc/README.imximage.

This patch was tested on a Freescale mx51evk board.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-01-25 23:58:29 +01:00
Mike Frysinger a16028da63 lmb: only force on arches that use it
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-21 22:26:00 +01:00
Heiko Schocher 88ffb2665c CRAMFS: support cramfs in RAM
cramfsls and cramfsload are added to the command list.
A cramfs placed at 'cramfs_addr' can the be listed with 'cramfsls' and files
can be loaded with 'cramfsload'. 'cramfs_addr' is an environment variable
specifying the address the cramfs is located.
This works for powerpc and for ARM.

Use CONFIG_CMD_CRAMFS.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
2010-01-18 00:44:13 +01:00
Heiko Schocher 1567b596d9 env, eeprom: add redundant environment support
Add redundant environment support for environment lying on a EEPROM.

Tested on uppcoming suen3 support

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
2010-01-18 00:43:16 +01:00
Heiko Schocher 548738b4d4 cmd_eeprom: I2C updates
- CONFIG_ENV_EEPROM_IS_ON_I2C
  define this, if you have I2C and SPI activated, and your
  EEPROM, which holds the environment, is on the I2C bus.

- CONFIG_I2C_ENV_EEPROM_BUS
  if you have an Environment on an EEPROM reached over
  I2C muxes, you can now define, how to reach this
  EEPROM.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-01-18 00:42:37 +01:00
Detlev Zundel c3d7eec6d8 cmd_bootm.c: Change interpretation of standalone image parameters.
Current code uses the second argument to bootm for standalone images to
override the load address specified in the image instead of passing all
parameters as is to the application.  This behaviour is not documented
and not in line with how the go command works for standalone applications,
so we simply drop it.

Signed-off-by: Detlev Zundel <dzu@denx.de>
2010-01-18 00:26:36 +01:00
Detlev Zundel 8b828a8f44 cmd_bootm.c: Do not load a ramdisk when not booting a kernel.
In case we boot an image marked as 'standalone' and 'linux', the current
code erroneously tried to load a ramdisk.

Signed-off-by: Detlev Zundel <dzu@denx.de>
2010-01-18 00:26:34 +01:00
Robin Getz 16035bcd8c kgdb: update mem2hex/hex2mem funcs
Convert the funcs to do the conversion inline so that we can do the copy
all at once with memcpy.  This let's us push out an weird arch-specific
issue with accessing different regions of memory to the memcpy function
like the MMRs on Blackfin systems, and it should be a bit faster.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-18 00:24:21 +01:00
Robin Getz 0c909551f8 kgdb: add default generic stubs
The default kgdb functions can be implemented with common U-Boot functions,
so rather than force everyone to copy & paste these things, create a set of
weak stubs.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-18 00:23:00 +01:00
Mike Frysinger 10c32ff59f config_defaults.h: new header for common u-boot config defaults
There are a bunch of features in U-Boot that we want to enable by default,
and it's best if we centralize them in one place rather than updating all
the board files out there.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-18 00:04:42 +01:00
Wolfgang Denk 2740544881 malloc: return NULL if not initialized yet
When malloc() was called before it was properly initialized
(as would happen if when used before relocation to RAM) it returned
random, non-NULL values, which called all kinds of difficult to debug
subsequent errors.

Make sure to return NULL when initialization was not done yet.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-01-15 13:26:20 +01:00
Sanjeev Premi b821cead7d onenand: Fix compile errors due to FlexOneNAND
This patch fixes the compile error while trying to
compile for omap3evm.

env_onenand.c: In function 'env_relocate_spec':
env_onenand.c:70: error: 'CONFIG_ENV_ADDR_FLEX' undeclared
 (first use in this function)
env_onenand.c:70: error: (Each undeclared identifier is re
ported only once
env_onenand.c:70: error: for each function it appears in.)
env_onenand.c: In function 'saveenv':
env_onenand.c:106: error: 'CONFIG_ENV_ADDR_FLEX' undeclare
d (first use in this function)
env_onenand.c:107: error: 'CONFIG_ENV_SIZE_FLEX' undeclare
d (first use in this function)

Signed-off-by: Sanjeev Premi <premi@ti.com>
Acked-by: Tom Rix <Tom.Rix@windriver.com>
2010-01-06 16:28:00 -06:00
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
Stefan Roese 952e7760bf ppc4xx: Convert PPC4xx UIC defines from lower case to upper case
The latest PPC4xx register cleanup patch missed the UIC defines.
This patch now changes lower case UIC defines to upper case.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-09-28 10:45:42 +02:00
Ken MacLeod 6e748ea004 cmd_fdt.c: fix parse of byte streams and strings
Commit 4abd844d8e extended the fdt command parser to handle property
strings which are split across multiple arguments but it was broken for
byte streams and strings.

Byte stream parsing:

 * Fixes where it would terminate early or go into an endless loop.

 * Fixes a 0x00 being inserted into the data if there is a space after
   '[' or a separate argument.

 * Fixes dereferencing the argument pointer after the last argument.

 * Checks for bad characters.

String parsing:

 * Treat multiple arguments as a string list.  This fixes an issue where
   only the last argument was stored.

Signed-off-by: Ken MacLeod <ken@bitsko.slc.ut.us>
2009-09-24 21:57:30 -04:00
Heiko Schocher 3887c3fbdb mucmc52, uc101: delete ata@3a00 node, if no CF card is detected
U-Boot can detect if an IDE device is present or not.
If not, and this new config option is activated, U-Boot
removes the ATA node from the DTS before booting Linux,
so the Linux IDE driver does not probe the device and
crash. This is needed for buggy hardware (uc101) where
no pull down resistor is connected to the signal IDE5V_DD7.

Signed-off-by: Heiko Schocher <hs@denx.de>
2009-09-25 01:22:13 +02:00
Peter Tyser 3202d33169 Remove deprecated 'autoscr' command/variables
The more standard 'source' command provides identical functionality to
the autoscr command.

Environment variable names/values on the MVBC_P, MVBML7, kmeter1,
mgcoge, and km8xx boards are updated to no longer refernce 'autoscr'.

The 'autoscript' and 'autoscript_uname' environment variables are
also removed.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Acked-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Acked-by: Heiko Schocher <hs@denx.de>
2009-09-22 23:03:24 +02:00
Stefan Roese d1c3b27525 ppc4xx: Big cleanup of PPC4xx defines
This patch cleans up multiple issues of the 4xx register (mostly
DCR, SDR, CPR, etc) definitions:

- Change lower case defines to upper case (plb4_acr -> PLB4_ACR)
- Change the defines to better match the names from the
  user's manuals (e.g. cprpllc -> CPR0_PLLC)
- Removal of some unused defines

Please test this patch intensive on your PPC4xx platform. Even though
I tried not to break anything and tested successfully on multiple
4xx AMCC platforms, testing on custom platforms is recommended.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-09-11 10:35:58 +02:00
Prafulla Wadaskar aa0c7a86cd mkimage: Add Kirkwood Boot Image support (kwbimage)
This patch adds support for "kwbimage" (Kirkwood Boot Image)
image types to the mkimage code.

For details refer to docs/README.kwbimage

This patch is tested with Sheevaplug board

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Ron Lee <ron@debian.org>

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-09-10 22:58:48 +02:00
Prafulla Wadaskar b029dddc9a mkimage: Make table_entry code global
- make get_table_entry_id() global
- make get_table_entry_name() global
- move struct table_entry to image.h

Currently this code is used by image.c only.

This patch makes this API global so it can be used by other parts of
code, too.

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Ron Lee <ron.debian.org>

Edit comments and commit message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10 22:58:48 +02:00
Prafulla Wadaskar f666dea8ab mkimage: Make genimg_print_size() global
Currently it is used by image.c only, but the the function can be
used to support additional mkimage types like for example kwbimage,
so make this function globally visible.

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>

Edited commit message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10 22:58:48 +02:00
Wolfgang Denk 3a2003f61e tools/mkimage: fix compiler warnings, use "const"
This fixes some compiler warnings:
tools/default_image.c:141: warning: initialization from incompatible pointer type
tools/fit_image.c:202: warning: initialization from incompatible pointer type
and changes to code to use "const" attributes in a few places where
it's appropriate.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10 22:58:48 +02:00
Wolfgang Denk 37daa77f3c cmd_mtdparts.c: fix compiler warning in debug code
Fix warning messages:
cmd_mtdparts.c:1429: warning: format '%08lx' expects type 'long
unsigned int', but argument 6 has type 'u32'
cmd_mtdparts.c:1429: warning: format '%08lx' expects type 'long
unsigned int', but argument 7 has type 'u32'

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-04 22:58:57 +02:00
Kumar Gala 3dfad40a04 Add ability for arch code to make changes before we boot
Added a arch_preboot_os() function that cpu specific code can implement to
allow for various modifications to the state of the machine right before
we boot.  This can be useful to setup register state to a specific
configuration.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-09-04 22:11:23 +02:00
Peter Tyser d4e8ada0f6 Consolidate arch-specific mem_malloc_init() implementations
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-09-04 21:47:07 +02:00
Peter Tyser 5e93bd1c9a Consolidate arch-specific sbrk() implementations
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-09-04 21:45:39 +02:00
Wolfgang Denk 3aa8b68d80 Merge branch 'next' of ../next 2009-08-31 22:21:47 +02:00
David Brownell 52f6c34c85 bugfix CONFIG_SYS_CONSOLE_INFO_QUIET
The "console: unify printing current devices" patch goofed:
CONFIG_SYS_CONSOLE_INFO_QUIET is supposed to *REMOVE* boot
time noise, not add it.  Said patch changed the #ifndefs
to #ifdef; this one restores them to the proper sense.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-08-30 21:00:21 +02:00
Poonam Aggrwal 0e870980a6 8xxx: Removed CONFIG_NUM_CPUS from 85xx/86xx
The number of CPUs are getting detected dynamically by checking the
processor SVR value.  Also removed CONFIG_NUM_CPUS references from all
the platforms with 85xx/86xx processors.

This can help to use the same u-boot image across the platforms.

Also revamped and corrected few Freescale Copyright messages.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-28 17:12:38 -05:00
Robin Getz 02c9aa1d41 Add md5sum and sha1 commands...
Now that we have sha1 and md5 in lib_generic, allow people to use
them on the command line, for checking downloaded files.

Signed-off-by: Robin Getz <rgetz@analog.com>
2009-08-25 12:57:54 +02:00
Kumar Gala cfd700be9f fdt: Fix fdt_pci_dma_ranges handling of 64-bit ranges
If the size of a region equal to 4G it can't be represnted in a 32-bit
BAR so we should have marked that case as MEM64.

Additionally bump the number of inbound windows up to 4 to handle the
fact that Freescale PPCs that have an implicit window for CCSRBAR.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-09 23:13:56 +02:00
Peter Tyser 197324d7d9 hush: Fix bogus free() call
An off-by-one error in hush.c resulted in an unintentional free() call
every time a command was executed

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-08-09 23:02:42 +02:00
Mike Frysinger 18304f7675 env: kill off default_environment_size
The only environment type that uses this variable is spi flash, and that is
only because it is reimplementing the common set_default_env() function.
So fix the spi flash code and kill off the default_environment_size in the
process.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-09 22:41:42 +02:00
Mike Frysinger bedd8403f7 export SPI functions to standalone apps
While we're here, fix the broken #ifdef handling in _exports.h.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-09 22:34:51 +02:00
Wolfgang Denk cb32ed1fc2 Merge branch 'next' of git://git.denx.de/u-boot-coldfire 2009-08-04 21:54:11 +02:00
Wolfgang Denk 4b7511478b Fix ext2load return code
Make the ext2load command return 0 on success (instead of the file
length).

Also fix output format (get rid of random newlines) and some coding
style issues (long lines etc.).

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-28 22:38:53 +02:00
Niklaus Giger 3c972849f2 Less verbose output when loading vxworks 6.x images
Loading vxWorks 5.x images resulted just into 3 or 4 lines of output.
With vxWorks 6.x and the new GCC it emits about 30 lines, which is
far too noisy in my opinion.

Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
2009-07-27 00:15:53 +02:00
Kyungmin Park 4828779238 Fix compiler warnings after loff_t change
Now 'env_addr' type is loff_t so use correct field type.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2009-07-27 00:08:50 +02:00
Alessandro Rubini 6111722a92 video: move extern declarations from C to headers
This moves some extern declaration from lcd.c to lcd.h, removing
unneeded ifdef around a pair of them.  Additionally, since
gunzip_bmp() was declared static in cmd_bmp.c but extern in lcd.c, I
removed the static.  The extra "#include <lcd.h>" in cmd_bmp.c is
added to ensure the header is consistent with the source.

This has been compile-tested on both ARM (at91 boards) and PowerPC
(HH405_config, TQM823L_LCD_config, mcc200_config), to test all use
combinations.

Signed-off-by: Alessandro Rubini <rubini@gnudd.it>
[agust@denx.de: removed gunzip_bmp() fixes as commit c01171ea did it]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-07-25 23:13:51 +02:00
Wolfgang Denk 28958b8bea Coding Style cleanup; update CHANGELOG.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-23 22:23:23 +02:00
Mark Jackson c01171eaec Remove static declaration from gunzip_bmp()
This patch removes the static declaration from gunzip_bmp()

Without it, the gunzip_bmp() function is not visible to
common/lcd.c and fails to compile with an error.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2009-07-23 21:34:01 +02:00
Peter Tyser 2d4a43e230 cmd_tsi148: General cleanup
- Fix command help message
- Disable DEBUG by default
- Fix whitespace issues
- Fix lines > 80 characters

Signed-off-by: Peter Tyser <ptyser@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
2009-07-23 21:33:02 +02:00
Detlev Zundel f97ec30bb3 Re-add support for image type 'Standalone Program'
Support for this type was lost during the bootm refactoring.

Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-07-23 21:02:09 +02:00
Detlev Zundel ca95c9df02 Add error checking for unsupported OS types.
Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-07-23 21:02:07 +02:00
Robin Getz 1a32bf4188 Add DNS support
On 04 Oct 2008 Pieter posted a dns implementation for U-Boot.

http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg10216.html
>
> DNS can be enabled by setting CFG_CMD_DNS. After performing a query,
> the serverip environment var is updated.
>
> Probably there are some cosmetic issues with the patch. Unfortunatly I
> do not have the time to correct these. So if anybody else likes DNS
> support in U-Boot and has the time, feel free to patch it in the main tree.

Here it is again - slightly modified & smaller:
  - update to 2009-06 (Pieter's patch was for U-Boot 1.2.0)
  - README.dns is added
  - syntax is changed (now takes a third option, the env var to store
    the result in)
  - add a random port() function in net.c
  - sort Makefile in ./net/Makefile
  - dns just returns unless a env var is given
  - run through checkpatch, and clean up style issues
  - remove packet from stack
  - cleaned up some comments
  - failure returns much faster (if server responds, don't wait for
    timeout)
  - use built in functions (memcpy) rather than byte copy.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Pieter Voorthuijsen <pieter.voorthuijsen@prodrive.nl>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:44 -07:00
Luigi 'Comio' Mantellini caf72ff329 Refresh LZMA-lib to v4.65
Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
2009-07-22 09:43:27 +02:00
Andrzej Wolski f6ca3b7094 ubi: help message correction
Fix incorrect information about size units and correct typo.

Signed-off-by: Andrzej Wolski <awolski@poczta.fm>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-20 23:54:57 +02:00
Kim Phillips 2a2ed845c0 common: fix 'dummy' is used uninitialized in this function warning
fix this gcc 4.4 warning:

xyzModem.c: In function 'xyzModem_stream_open':
xyzModem.c:564: warning: 'dummy' is used uninitialized in this function

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-07-19 21:37:02 +02:00
Wolfgang Denk 1a4664b53a cmd_flash.c: fix fix compile error for boards with DataFlash
Commit 5669ed45 ("cmd_flash.c: fix warning: unused variable
'addr_first'/'addr_last'") changed the #ifdef logic areound the
declaration of these variables and missed a combination of settings
of HAS_DATAFLASH with SYS_NO_FLASH; this patch fixes this.

Also spotted by Alessandro Rubini <rubini@gnudd.com>

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-19 19:36:14 +02:00
Reinhard Arlt 52a0e2dee9 Add support for the Tundra TSI148 VME-bridge
From: Reinhard Arlt <reinhard.arlt@esd-electronics.com>

This patch adds support for the Tundra TSI148 VME-bridge. It's used on
the upcoming esd VME8349 board.

Signed-off-by: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-19 11:21:08 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7e3be7cf3b console: unify printing current devices
Create stdio_print_current_devices() for this purpose

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-07-19 01:02:46 +02:00
Wolfgang Denk a694610d33 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2009-07-19 00:38:23 +02:00
Wolfgang Denk 5669ed4557 cmd_flash.c: fix warning: unused variable 'addr_first'/'addr_last'
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-18 23:18:14 +02:00
Wolfgang Denk 462b103873 Merge branch 'master' of /home/wd/git/u-boot/custodians 2009-07-18 14:59:40 +02:00
Wolfgang Denk 0f1b3a2424 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2009-07-18 14:59:05 +02:00
Alessandro Rubini 6aee304834 cmd_i2c: bugfix: add missing brace
The sub-command parser missed a brace, so "return 0;" is always
taken and no error message is diplayed if you say "i2c scan"
instead of "i2c probe", for example.

Proper brace is added. Also, a misleading and unneeded else
is removed.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com.it>
2009-07-18 10:17:53 +02:00
Jean-Christophe PLAGNIOL-VILLARD 52cb4d4fb3 stdio/device: rework function naming convention
So far the console API uses the following naming convention:

	======Extract======
	typedef struct device_t;

	int	device_register (device_t * dev);
	int	devices_init (void);
	int	device_deregister(char *devname);
	struct list_head* device_get_list(void);
	device_t* device_get_by_name(char* name);
	device_t* device_clone(device_t *dev);
	=======

which is too generic and confusing.

Instead of using device_XX and device_t we change this
into stdio_XX and stdio_dev

This will also allow to add later a generic device mechanism in order
to have support for multiple devices and driver instances.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Edited commit message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-18 00:27:46 +02:00
Wolfgang Denk dcf728a6af Merge branch 'master' of git://git.denx.de/u-boot-video 2009-07-17 23:05:41 +02:00
Mike Frysinger 569460ebf1 sata: namespace curr_device variable
The curr_device variable really should be namespaced with a "sata_" prefix
since it is only used by the sata code.  It also avoids random conflicts
with other pieces of code (like cmd_mmc):
common/libcommon.a(cmd_sata.o):(.data.curr_device+0x0):
	multiple definition of `curr_device'
common/libcommon.a(cmd_mmc.o):(.data.curr_device+0x0): first defined here

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-17 22:15:27 +02:00
Mike Frysinger 02e22c2de1 cmd_mmc: make curr_device static
The curr_device variable isn't used outside of cmd_mmc, so mark it static
to avoid conflicts with other pieces of code (like sata which also exports
a curr_device).  Otherwise we end up with stuff like:
common/libcommon.a(cmd_sata.o):(.data.curr_device+0x0):
	multiple definition of `curr_device'
common/libcommon.a(cmd_mmc.o):(.data.curr_device+0x0): first defined here

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-17 22:14:41 +02:00
Matthias Weisser 1ca298ced0 Added support for splash screen positioning
This patch adds support splash image positioning by adding an
additional variable "splashpos" to the environment. Please see
README for details.

Signed-off-by: Matthias Weisser <matthias.weisser@graf-syteco.de>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-07-17 15:23:41 +02:00
Scott Wood be33b046b5 Remove legacy NAND and disk on chip code.
Legacy NAND had been scheduled for removal.  Any boards that use this
were already not building in the previous release due to an #error.

The disk on chip code in common/cmd_doc.c relies on legacy NAND,
and it has also been removed.  There is newer disk on chip code
in drivers/mtd/nand; someone with access to hardware and sufficient
time and motivation can try to get that working, but for now disk
on chip is not supported.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-16 19:07:47 -05:00
Kyungmin Park 937076f84c MTD: OneNAND: Increase the environment size to 4KiB
Also use mtd operation instead of onenand functions

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-16 17:52:00 -05:00
Anton Vorontsov 93f9dcf9e8 Add simple hwconfig infrastructure
This patch implements simple hwconfig infrastructure: an
interface for software knobs to control a hardware.

This is very simple implementation, i.e. it is implemented
via `hwconfig' environment variable. Later we could write
some "hwconfig <enable|disable|list>" commands, ncurses
interface for Award BIOS-like interface, and frame-buffer
interface for AMI GUI[1] BIOS-like interface with mouse
support[2].

Current implementation details/limitations:

1. Doesn't support options dependencies and mutual exclusion.
   We can implement this by integrating apt-get[3] into the
   u-boot. But I didn't bother yet.

2. Since we don't implement hwconfig command, i.e. we're working
   with the environement directly, there is no way to tell that
   toggling a particular option will need a reboot to take
   an effect. So, for now it's advised to always reboot the
   target after modifying hwconfig variable.

3. We support hwconfig options with arguments. For example,

   set hwconfig dr_usb:mode=peripheral,phy_type=ulpi

   That means:
   - dr_usb - enable Dual-Role USB controller;
   - dr_usb:mode=peripheral - USB in Function mode;
   - dr_usb:phy_type=ulpi - USB should work with ULPI PHYs;

The purpose of this simple implementation is to define some
internal API and then we can continue improving user experience
by adding more mature interface, like hwconfig command with
bells and whistles. Or not adding, if we feel that current
interface fits its needs.

[1] http://en.wikipedia.org/wiki/American_Megatrends
[2] Regarding ncurses and GUI with mouse support -- I'm just
    kidding.
[3] The comment regarding apt-get is also a joke, meaning that
    dependency tracking could be non-trivial. For example, for
    enabling HW feature X we may need to disable Y, and turn Z
    into reduced mode (like RMII-only interface for ethernet,
    no MII).

    It's quite trivial to implement simple cases though.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
2009-07-16 22:23:53 +02:00
TsiChung Liew 6e8d58d366 Command for accessing serial flash update
Change strtoul number base of argv 3 from 0 to 16

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:46:39 -05:00
Simon Kagstrom 2896b5851f Command improvements for ubifs
Check that an argument is passed to ubifsmount and that addresses and
sizes are actually numbers for ubifsload. Also improve the instructions
a bit.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-09 13:04:25 +02:00
Simon Kagstrom 25c8f40059 Handle VID header offset in ubi part command
The VID header offset is sometimes needed to initialize the UBI
partition. This patch adds it (optionally) to the command line
for the ubi part command.

(Lines have been properly wrapped since last version)

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-09 09:57:54 +02:00
HeungJun Kim 2e8a6f551c env_onenand: change env_address type from unsigned long to loff_t
If use the onenand boot, the env_relocate_spec() calls mtd->read(),
and the type of the argument #2 of mtd->read() was changed to loff_t.
But, the "env_addr" type is still unsigned long, thus this patch change
the type from unsigned long to loff_t.

Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: HeungJun, Kim <riverful.kim@samsung.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:11 -05:00
Guennadi Liakhovetski b74ab73736 nand_spl: read environment early, when booting from NAND using nand_spl
Currently, when booting from NAND using nand_spl, in the beginning the default
environment is used until later in boot process the dynamic environment is read
out. This way environment variables that must be interpreted early, like the
baudrate or "silent", cannot be modified dynamically and remain at their
default values. Fix this problem by reading out main and redundand (if used)
copies of the environment in the nand_spl code.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:07 -05:00
Wolfgang Denk 8360b66bac nand/onenand: Fix missing argument checking for "markbad" command
The "nand markbad" and "onenand markbad" commands did not check if an
argument was passed; if this was forgotten, no error was raised but
block 0 was marked as bad.

While fixing this bug, clean up the code a bit and allow to pass more
than one block address, thus allowing to mark several blocks as bad
in a single command invocation.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:05 -05:00
Guennadi Liakhovetski d27bc728cf env_nand: remove unused variable.
Remove an unused "total" variable in multiple functions.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:03 -05:00
Poonam Aggrwal 039594a430 8xxx: Second UART port added for MPC85xx, MPC83xx, MPC86xx processors
Defining the next two configs allows to switch the serial port from the
console using the setenv stdin and stdout
  1. #define CONFIG_SERIAL_MULTI 1 /* Enable both serial ports */
  2. #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* determine from environment */

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-02 08:34:13 -05:00
Mike Frysinger dd14af7640 Blackfin: new spibootldr command
Newer Blackfin parts can an on-chip ROM that can boot LDRs over SPI flashes,
so add a new 'spibootldr' command to take advantage of it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-14 20:01:04 -04:00
Peter Tyser 0f89860494 83xx: Replace CONFIG_MPC83XX with CONFIG_MPC83xx
Use the standard lowercase "xx" capitalization that other Freescale
architectures use for CPU defines to prevent confusion and errors

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-06-12 20:47:17 +02:00
Wolfgang Denk 3b74e7ec58 MPC512x: remove include/mpc512x.h
Move needed definitions (register descriptions etc.) from
include/mpc512x.h  into  include/asm-ppc/immap_512x.h.

Instead of using a #define'd register offset, use a function that
provides the PATA controller's base address.

All the rest of include/mpc512x.h are register offset definitions
which can be eliminated by proper use of C structures.

There are only a few register offsets remaining that are needed in
cpu/mpc512x/start.S; for these we provide cpu/mpc512x/asm-offsets.h
which is intended as a temporary workaround only. In a later patch
this file will be removed, too, and then auto-generated from the
respective C structs.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk a89c33db96 General help message cleanup
Many of the help messages were not really helpful; for example, many
commands that take no arguments would not print a correct synopsis
line, but "No additional help available." which is not exactly wrong,
but not helpful either.

Commit ``Make "usage" messages more helpful.'' changed this
partially. But it also became clear that lots of "Usage" and "Help"
messages (fields "usage" and "help" in struct cmd_tbl_s respective)
were actually redundant.

This patch cleans this up - for example:

Before:
	=> help dtt
	dtt - Digital Thermometer and Thermostat

	Usage:
	dtt         - Read temperature from digital thermometer and thermostat.

After:
	=> help dtt
	dtt - Read temperature from Digital Thermometer and Thermostat

	Usage:
	dtt

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:47:16 +02:00
Wolfgang Denk 94796d8544 Make "usage" messages more helpful.
In case of incorrect command invocations U-Boot used to print pretty
useless "usage" messages, for example:

	=> nand markbad
	Usage:
	nand - NAND sub-system

In the result, the user would have to run the "help" command to get
the (available) information about correct command usage. Change this,
so that this information gets always printed.

Note that this changes the user interface of all commands, but
hopefully to the better.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:45:48 +02:00
Mike Frysinger 4c94f6c54b nvedit: speed up printing of environment
The printing code would check the same environment byte multiple times and
write to the console one byte at a time.  For some devices (such as the
Blackfin JTAG console which operates in 8 bytes at a time), this is pretty
damned slow.  So create a small 16 byte buffer to fill up and send to puts
as needed.  In the process, unify the different print functions, shrink
the resulting code (source and compiled), and avoid excess env reads as
those too can be somewhat expensive depending on the board.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12 20:45:48 +02:00
Mike Frysinger ecb1dc8922 Add support for Linux-like kallsysms
The kernel stores address<->symbol names in it so things can be decoded at
runtime.  Do it in U-Boot, and we get nice symbol decoding when crashing.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12 20:45:48 +02:00
Wolfgang Denk 36c9169aa6 cmd_mtdparts.c: allow to omit definitions for default settings
There is actually no good reason to enforce that all board
configuations must define default settings for "mtdids" and
"mtdparts".  Actually this may be difficult to handle, especially on
boards where different sizes of flash chips can be fit, so there is no
real "default" partition map for all boards.

Lift this arbitrary limitation.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:45:48 +02:00
Stefan Roese 864aa034f3 cmd_mtdparts: Move to common handling of FLASH devices via MTD layer
This patch removes all references to the direct CFI FLASH interface
(via flash_info[]). Now that all FLASH types currently handled in
mtdparts are available (if selected, see below) via the MTD infrastructure.
This is NOR, NAND and OneNAND right now. This can be achieved by defining
the following options:

CONFIG_MTD_DEVICE (for all FLASH types)

plus

CONFIG_FLASH_CFI_MTD (for NOR FLASH)

So we need to add those defines to the board config headers currently
using the mtdparts commands. This is done via another patch, so
we shouldn't break mtdparts compatibility.

One big advantage from this solution is that the cmd_mtdparts.c is
*much* cleaner now. Lot's of #ifdef's are removed and the code itself
is smaller. Additionally the newly added MDT concatenation feature
can new be used via the mtdparts infrastructure and therefor via
UBI etc.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Ladislav Michl <ladis@linux-mips.org>
Cc: Scott Wood <scottwood@freescale.com>
2009-06-12 20:45:48 +02:00
Stefan Roese 8d2effea23 mtd: Update MTD infrastructure to support 64bit device size
This patch brings the U-Boot MTD infrastructure in sync with the current
Linux MTD version (2.6.30-rc3). Biggest change is the 64bit device size
support and a resync of the mtdpart.c file which has seen multiple fixes
meanwhile.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Kyungmin Park <kmpark@infradead.org>
2009-06-12 20:45:47 +02:00
Jean-Christophe PLAGNIOL-VILLARD 55e0ed6078 make MODEM SUPPORT generic instead of duplicate it
and fix comment

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Adjusted Copyright message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:45:47 +02:00
Tom Rix 660888b7fb ZOOM2 Add serial support.
Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board.
The default serial is from the USB connector on left side of the debug board.
The USB connector will produce 2 of the 4 UARTS.  On your host pick the first
enumeration.

The details of the setting of the serial gpmc setup are not available.
The values were provided by another party.

The serial port set up is the same with Zoom1.
Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow.

The kernel bootargs are
console=ttyS3,115200n8

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
2009-06-12 20:39:53 +02:00
Peter Tyser 9166b77635 cmd_i2c: Fix i2c help command output when CONFIG_I2C_MUX
When CONFIG_I2C_MUX was defined the output of 'help i2c' was not
correct, eg:

=> help i2c
i2c bus [muxtype:muxaddr:muxchannel] - add a new bus reached over muxes.
speed [speed] - show or set I2C bus speed
i2c dev [dev] - show or set current I2C bus
...

It has been changed to:
i2c speed [speed] - show or set I2C bus speed
i2c bus [muxtype:muxaddr:muxchannel] - add a new bus reached over muxes
i2c dev [dev] - show or set current I2C bus
...

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:46 +02:00
Peter Tyser 0a45a6357b cmd_i2c: Clean up trivial helper functions
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:46 +02:00
Peter Tyser e96ad5d3ab cmd_i2c: Clean up i2c command argument parsing
argc and argv should only be modified once instead of once for
every i2c sub-command

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:46 +02:00
Peter Tyser 0f89c54be9 i2c: Update references to individual i2c commands
The individual i2c commands imd, imm, inm, imw, icrc32, iprobe, iloop,
and isdram are no longer available so all references to them have been
updated to the new form of "i2c <cmd>".

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:46 +02:00
Peter Tyser d48eb5131d i2c: Remove deprecated individual i2c commands
The following individual I2C commands have been removed: imd, imm, inm,
imw, icrc32, iprobe, iloop, isdram.

The functionality of the individual commands is still available via
the 'i2c' command.

This change only has an impact on those boards which did not have
CONFIG_I2C_CMD_TREE defined.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:46 +02:00
Peter Tyser 655b34a78a i2c: Create common default i2c_[set|get]_bus_speed() functions
New default, weak i2c_get_bus_speed() and i2c_set_bus_speed() functions
replace a number of architecture-specific implementations.

Also, providing default functions will allow all boards to enable
CONFIG_I2C_CMD_TREE.  This was previously not possible since the
tree-form of the i2c command provides the ability to display and modify
the i2c bus speed which requires i2c_[set|get]_bus_speed() to be
present.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:45 +02:00
Peter Tyser 9c90a2c8e8 i2c.h: Provide a default CONFIG_SYS_I2C_SLAVE value
Many boards/controllers/drivers don't support an I2C slave interface,
however CONFIG_SYS_I2C_SLAVE is used in common code so provide a
default

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:45 +02:00
Rabin Vincent e85649c7e6 mmc: check find_mmc_device return value
find_mmc_device returns NULL if an invalid device number is specified.
Check for this to avoid dereferencing NULL pointers.

Signed-off-by: Rabin Vincent <rabin@rab.in>
2009-06-02 17:18:56 -05:00
Rabin Vincent ac0865ff33 mmc: clean up help texts
Remove some repeated words and superfluous newlines in the mmc command
help entries.

Signed-off-by: Rabin Vincent <rabin@rab.in>
2009-06-02 17:18:56 -05:00
Stefan Roese 76b5883da2 jffs2/mtdparts: Fix problem with usage from JFFS2 and MTDPARTS together
Currently using JFFS2 with MTDPARTS enabled doesn't work. This is because
mtdparts_init() is available in both files, cmd_mtdparts.c and
cmd_jffs2.c. Please note that in the original cmd_jffs2.c file (before
the jffs2/mtdparts command/file split those 2 different versions
already existed. So this is nothing new. The main problem is that the
variables "current_dev" and "current_partnum" are declared in both
files now. This doesn't work.

This patch now changes the names of those variable to more specific
names: "current_mtd_dev" and "current_mtd_partnum". This is because
this patch also changes the declaration from static to global, so
that they can be used from both files.

Please note that my first tests were not successful. The MTD devices
selected via mtdparts are now accessed but I'm failing to see the
directory listed via the "ls" command. Nothing is displayed. Perhaps
I didn't generate the JFFS2 image correctly (I never used JFFS2 in
U-Boot before). Not sure. Perhaps somebody else could take a look at
this as well. I'll continue looking into this on Monday.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Ilya Yanok <yanok@emcraft.com>
Cc: Renaud barbier <renaud.barbier@ge.com>
2009-05-28 21:26:00 +02:00
Wolfgang Denk 5af210c2ed Merge branch 'master' of git://git.denx.de/u-boot-ubi 2009-05-20 22:42:04 +02:00
Kim Phillips 2df72b82bc common: fix inline--weak error spotted by gcc 4.4
cmd_ide.c:547: error: inline function 'ide_inb' cannot be declared weak

removing the inline attribute fixes it.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-05-20 22:36:28 +02:00
Andreas Huber 0850301747 UBI: fix return code in ubi_volume_read
Return -ENODEV instead of 0 when trying to read from a non existing volume.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-05-20 13:01:58 +02:00
Detlev Zundel 792a09eb9d Fix e-mail address of Gary Jennejohn.
Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-05-15 22:11:59 +02:00
Emil Medve 5e2c08c3ac Remove inline qualifier from show_boot_progress()
The 'inline' is conflicting with the semantic of 'weak' attribute and with the
way the show_boot_progress() function is used.

Also gcc 4.4 is complaining about it:

main.c:51: error: inline function 'show_boot_progress' cannot be declared weak

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
2009-05-15 22:04:04 +02:00
Heiko Schocher da95427ce4 netloop: updates for NetLoop
Fix some issues introduced from commit:
2f70c49e5b
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-05-15 21:19:02 +02:00
Wolfgang Denk 4d9eab89b3 cmd_ext2.c: fix compile warnings
Get rid of these warnings:

cmd_ext2.c:247: warning: format '%ld' expects type 'long int', but argument 2 has type 'int'
cmd_ext2.c:248: warning: format '%lX' expects type 'long unsigned int', but argument 3 has type 'int'

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-28 08:50:31 +02:00
Stefan Roese 2d579e5060 ubi: Remove flash selection parameter (nor|nand|onenand) from "ubi part"
This patch removes the now unnecessary flash type parameter from the
"ubi part" command. Currently the user has to define the type of flash
he will be using UBI on. Example:

=> ubi part nor partition1

With this patch this type parameter is not needed anymore. The user can
now select the partition directly without the flash type paramter.
Example:

=> ubi part partition1

This breaks backward compatibility right now because of the change in the
command syntax. But UBI support is still quite fresh and the advantage of
this new command is syntax big enough for this change. Additionally the
code is much cleaner now.

Signed-off-by: Stefan Roese <sr@denx.de>
CC: Kyungmin Park <kyungmin.park@samsung.com>
2009-04-28 01:15:35 +02:00
Ladislav Michl 0c8a84916c Separate mtdparts command from jffs2
On Thu, Mar 19, 2009 at 01:30:36PM +0100, Stefan Roese wrote:
> Currently the mtdparts commands are included in the jffs2 command support.
> This doesn't make sense anymore since other commands (e.g. UBI) use this
> infrastructure as well now. This patch separates the mtdparts commands from
> the jffs2 commands making it possible to only select mtdparts when no JFFS2
> support is needed.

One more leftover... Let nboot command know about partitions even if JFFS2
support is not enabled.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Stefan Roese <sr@denx.de>
2009-04-28 01:06:24 +02:00
Peter Tyser 67c2e57c08 cmd_ide: Remove unused AmigaOneG3SE code
The output_data_short() and input_data_short() functions for the
AmigaOneG3SE are unused and result in compiler warnings.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-28 01:03:13 +02:00
David Brownell 08f077da92 mtdpart command: align output columns
Make the headers in the "mtdparts" command output line up
with their columns ... strike the extra TAB character.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-04-28 00:57:12 +02:00
Gao Guanhua 351f40caf2 fs: Fix the wrong type of var
The filelen should be signed type, not unsigned type.
otherwise, The condition as below never take.
	if (filelen < 0)

Signed-off-by: Gao Guanhua <B22826@freescale.com>
Signed-off-by: Dave Liu <daveliu@freescale.com>
2009-04-28 00:35:27 +02:00
Mike Frysinger dfc99e143f cmd_nand: drop duplicate NULL ptr check
The first if statement checks for NULL ptrs, so there is no need to check
it again in later else cases (such as .oob).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Scott Wood <scottwood@freescale.com>
2009-04-16 23:03:44 +02:00
Wolfgang Denk f63728c804 One more fix for building env_embedded.o
In addition to the changes for CONFIG_ENV_IS_IN_FLASH as done in
commit afcbce07, we also need to do the same for
CONFIG_ENV_IS_IN_EEPROM and CONFIG_ENV_IS_IN_NVRAM.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-05 00:18:44 +02:00
Scott Wood e3d1ac7bb1 common/image.c: Relocate strings in tables.
Without this, u-boot can crash or print garbage if the original link
address no longer points to a valid string.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-04-04 23:33:12 +02:00
Andreas Huber c203ef5db0 UBI/cfi-mtd: Fix mtd name for multiple chips
On platforms with multiple NOR chips, currently only the first one
can be selected using the "ubi part" command. This patch fixes this
problem by using different names for the NOR "mtd devices".

It also changes the name of the NOR MTD device from "cfi-mtd" to
"norX" (X indexing the device numer) to better match the mtdparts
defaults.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
2009-04-04 23:25:40 +02:00
Minkyu Kang 869f6bf4de cmd_mmc: add support for device command for selecting mmc device
This patch improves device command for selecting mmc device

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2009-04-04 23:07:19 +02:00
Mike Frysinger 852dbfdd56 more command usage cleanup
Fix up a few dangling commands like in "Command usage cleanup" commit.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-04-04 22:42:54 +02:00
Ladislav Michl b93b24bf76 Separate mtdparts command from jffs2
On Thu, Mar 19, 2009 at 01:30:36PM +0100, Stefan Roese wrote:
> Currently the mtdparts commands are included in the jffs2 command support.
> This doesn't make sense anymore since other commands (e.g. UBI) use this
> infrastructure as well now. This patch separates the mtdparts commands from
> the jffs2 commands making it possible to only select mtdparts when no JFFS2
> support is needed.

... and to make it useful for NAND chips as well, we should also remove now
unrelated CONFIG_JFFS2_NAND. Note that struct part_info etc is in
jffs2/load_kernel.h which is a bit misleading filename for that purpose,
but that can be fixed later (tm).

Signed-off-by:  Ladislav Michl <ladis@linux-mips.org>
2009-04-04 22:42:05 +02:00
Jean-Christophe PLAGNIOL-VILLARD b9c0e4c29e add dataflash mmc mux missing support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-04-04 20:42:20 +02:00
Wolfgang Denk 83863df04b Fix quoting bug introduced by commit 74de7aef
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-04 17:58:26 +02:00
Wolfgang Denk afcbce07e9 Fix building of env_embedded.o
Since commit a706bfc7 common/env_embedded.o and tools/envcrc were
only built when CONFIG_ENV_IS_EMBEDDED was set, but this breaks
building for many boards.

We always have to build these files when CONFIG_ENV_IS_IN_FLASH is
set.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-04 16:10:40 +02:00
Jean-Christophe PLAGNIOL-VILLARD a31e091ad7 rename include/zlib.h to include/u-boot/zlib.h
Some systems have zlib.h installed in /usr/include/. This isn't the
desired file for u-boot code - we want the one in include/zlib.h.
This rename will avoid the conflict.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-04-04 15:37:54 +02:00
Peter Tyser a706bfc7d0 common/Makefile: Conditionally compile env_embedded.o
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:06:10 +02:00
unsik Kim 75eb82ec7c mflash: Initial mflash support
Mflash is fusion memory device mainly targeted consumer eletronic and
mobile phone.
Internally, it have nand flash and other hardware logics and supports
some different operation (ATA, IO, XIP) modes.

IO mode is custom mode for the host that doesn't have IDE interface.
(Many mobile targeted SoC doesn't have IDE bus)

This driver support mflash IO mode.

Followings are brief descriptions about IO mode.

1. IO mode based on ATA protocol and uses some custom command. (read
   confirm, write confirm)
2. IO mode uses SRAM bus interface.

Signed-off-by: unsik Kim <donari75@gmail.com>
2009-04-03 23:47:06 +02:00
Wolfgang Denk 8ddfe804c4 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2009-04-03 22:48:05 +02:00
Wolfgang Denk 0d8cb9c04f Merge branch 'master' of git://git.denx.de/u-boot-blackfin 2009-04-03 22:38:36 +02:00
Scott Wood 99067b08f4 Noisily disable the legacy NAND subsystem.
Legacy NAND is marked for feature removal after April 2009 (i.e. this
upcoming release).  There are still several boards that reference it
(though many do so only for disk-on-chip support which has been silently
disabled for a while now).  These boards will now fail to build
with #error, though the code is still there if the user removes #error.

The plan is to remove the code outright in the next release, along with
any board code that refers to it (such as board/esd/common/auto_update.c).

Also, remove the legacy NAND API description from README.nand.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-04-03 15:27:26 -05:00
Wolfgang Denk 74de7aefd7 Add "source" command; prepare removal of "autoscr" command
According to the doc/feature-removal-schedule.txt, the "autoscr"
command will be replaced by the "source" command in approximately 6
months from now.

This patch prepares this change and starts a 6 month transition
period as follows:

- The new "source" command has been added, which implements exactly
  the same functionlaity as the old "autoscr" command before
- The old "autoscr" command name is kept as an alias for compatibility
- Command sequences, script files atc. have been adapted to use the
  new "source" command
- Related environment variables ("autoscript", "autoscript_uname")
  have *not* been adapted yet; these will be renamed resp. removed in
  a separate patch when the support for the "autoscr" command get's
  finally dropped.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-03 22:01:42 +02:00
Mike Frysinger dbc6ab9f75 Blackfin: drop newline from OTP help
Looks like I accidentally added a newline to the OTP help when merging and
older change.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-04-02 06:42:08 -04:00
Dave Liu c360ceac02 fsl-ddr: add the DDR3 SPD infrastructure
- support mirrored DIMMs, not support register DIMMs
- test passed on P2020DS board with MT9JSF12872AY-1G1D1
- test passed on MPC8569MDS board with MT8JSF12864HY-1G1D1

Signed-off-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Travis Wheatley <travis.wheatley@freescale.com>
2009-03-30 13:33:50 -05:00
Wolfgang Denk 26e42cbd78 ARM: fix warning: 'print_eth' defined but not used
This warning got issued for all ARM systems that don't have
CONFIG_CMD_NET enabled.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-03-29 00:54:21 +01:00
Wolfgang Denk d2567be915 Fix implicit declaration of function 'eth_[gs]etenv_enetaddr'
...and some other compile warnings.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-03-28 20:16:16 +01:00
Detlev Zundel 2dce551e10 command.c: Expose the core of do_help as _do_help to the rest of u-boot.
Other commands implementing subcommands can reuse this code nicely.

Signed-off-by: Detlev Zundel <dzu@denx.de>
Signed-off-by: Andreas Pfefferle <ap@denx.de>
2009-03-27 21:06:30 +01:00
Heiko Schocher 76756e41cd ppc: cleanup compiler errors/warnings
Current u-boot top of tree builds with warnings/errors for
the following boards:

ads5121 cpci5200 mecp5200 v38b IAD210 MBX MBX860T NX823
RPXClassic debris PN62

following patch solves this.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2009-03-27 20:23:32 +01:00
Wolfgang Grandegger 672ed2aee9 Enable multi chip support in the NAND layer
This patch adds support for NAND_MAX_CHIPS to the MTD NAND layer.
Multi-chips devices are displayed as shown:

  Device 0: 2x NAND 512MiB 3,3V 8-bit, sector size 128 KiB

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-03-23 15:53:37 -05:00
Stefan Roese ce6d0c8de0 UBIFS: Add UBIFS commands
This patchset adds these UBIFS related commands:

- ubifsmount
  Mount an UBIFS volume

- ubifsls
  List a directory of the mounted UBIFS volume

- ubifsload
  Load a file from the mounted UBIFS volume to memory

Signed-off-by: Stefan Roese <sr@denx.de>
2009-03-20 22:39:15 +01:00
Stefan Roese 68d7d65100 Separate mtdparts command from jffs2
Currently the mtdparts commands are included in the jffs2 command support.
This doesn't make sense anymore since other commands (e.g. UBI) use this
infrastructure as well now. This patch separates the mtdparts commands from
the jffs2 commands making it possible to only select mtdparts when no JFFS2
support is needed.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2009-03-20 22:39:14 +01:00
Mike Frysinger 56b555a644 nvedit: do not update global bi_enetaddr and do not call eth_set_enetaddr()
Since the ethernet layer handles updating of device addresses itself from
the environment, there is no point in calling eth_set_enetaddr().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:10 +01:00
Mike Frysinger 5013533467 lynxkdi: get mac address from environment
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:10 +01:00
Mike Frysinger 62c93d92f1 bootvx: get mac address from environment
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Niklaus Giger <niklaus.giger@member.fsf.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:10 +01:00
Mike Frysinger de2dff6ff8 bdinfo: get mac address from environment
Add a new print_eth() function to automate the eth*addr env var acquisition
and display.  Affects all arches.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Scott McNutt <smcnutt@psyent.com>
CC: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
CC: Michal Simek <monstr@seznam.cz>
CC: Daniel Hellstrom <daniel@gaisler.com>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:10 +01:00
Mike Frysinger b6446b6775 convert print_IPaddr() to %pI4
Now that our printf functions support the %pI4 modifier like the kernel,
let's drop the inflexible print_IPaddr() function and covert over to the
%pI4 modifier.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
2009-03-20 22:39:09 +01:00
Mike Frysinger 6c6166f529 vsprintf: pull updates from Linux kernel
This brings in support for the %p modifier which allows us to easily print
out things like ip addresses, mac addresses, and pointers.

It also converts the rarely used 'q' length modifier to the common 'L'
modifier when dealing with quad types.

While this new code is a bit larger (~1k .text), most of it should be made
up by converting the existing ip/mac address code to use format modifiers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-03-20 22:39:09 +01:00
Scott Wood 65d8bc94d8 NAND: Have nboot accept .e and .i as legacy no-ops.
This was intended to happen before, but a trivial bug prevented it.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-03-17 12:06:04 -05:00
Ladislav Michl 0987505540 NAND: Make nboot skip bad blocks
nboot command currently does not skip bad blocks and gives read error when
loading image stored over bad block. With patch applied, nboot works as
expected:

Device 0 bad blocks:
  00780000
  014a0000
  02000000
  02cc0000
  04aa0000

Loading from NAND 128MiB 3,3V 8-bit, offset 0x2c00000
   Image Name:   Linux-2.6.22-omap1
   Created:      2008-11-20  23:44:32 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1052520 Bytes =  1 MB
   Load Address: 10008000
   Entry Point:  10008000
Skipping bad block 0x02cc0000
Automatic boot of image at addr 0x10400000 ...
...

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-03-17 12:04:22 -05:00
Anatolij Gustschin 00cc5595a7 lcd: Fix compilation warning in common/lcd.c
Fix following warning while compilation for mcc200 board:

lcd.c: In function 'lcd_display_bitmap':
lcd.c:625: warning: unused variable 'cmap'

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-02-25 20:28:13 +01:00
Guennadi Liakhovetski b245e65ee3 LCD: support 8bpp BMPs on 16bpp displays
This patch also simplifies some ifdefs in lcd.c, introduces a generic
vidinfo_t, which new drivers are encouraged to use and old drivers to switch
over to.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
2009-02-24 10:19:00 +01:00