Commit Graph

1466 Commits

Author SHA1 Message Date
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
Mark Jackson a303dfb0e9 Add 16bpp BMP support
This patch adds 16bpp BMP support to the common lcd code.

Use CONFIG_BMP_16BPP and set LCD_BPP to LCD_COLOR16 to enable the code.

At the moment it's only been tested on the MIMC200 AVR32 board, but extending
this to other platforms should be a simple task !!

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
2009-02-24 10:05:14 +01:00
Heiko Schocher 2f70c49e5b netloop: speed up NetLoop
NetLoop polls every cycle with getenv some environment variables.
This is horribly slow, especially when the environment is big.

This patch reads only the environment variables in NetLoop,
when they were changed.

Also moved the init part of the NetLoop function in a seperate
function.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-02-22 23:49:33 -08:00
Jean-Christophe PLAGNIOL-VILLARD 4f5728987f arm: add uart dcc support
Serial driver via the EmbeddedICE macrocell's DCC channel using
co-processor 14.

It does include a timeout to ensure that the system does not
totally freeze when there is nothing connected to read.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-02-22 15:49:28 +01:00
Minkyu Kang fca0cecff7 bootm: Reduce the unnecessary memmove
Although load address and image start address are same address,
bootm command always does memmove.
That is unnecessary memmove and can be taken few milliseconds
(about 500 msec to 1000 msec).
If skip this memmove, we can reduce the boot time.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Added printing of "cpufreq"

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

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

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

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

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

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

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

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

	device_t *dev;
	struct usb_device *usb_kbd_dev;

	<snip>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Now we can have the 4 following configurations :

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

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

Thanks to Michael Lawnick for pointing this out.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

By courtesy of Detlev Zundel who suggested this approach.

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

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-09-07 00:18:50 +02:00
Anatolij Gustschin 8e02494e8f Prevent crash if random DTB address is passed to bootm
This patch adds bootm_start() return value check. If
error status is returned, we do not proceed further to
prevent board reset or crash as we still can recover
at this point.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-09-07 00:17:32 +02:00
Kyungmin Park 1a7f8ccec9 Add JFFS2 command support on OneNAND
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-09-06 22:50:08 +02:00
Mark Jackson f5c3ba7978 Allow console input to be disabled
Added new CONFIG_DISABLE_CONSOLE define and GD_FLG_DISABLE_CONSOLE.

When CONFIG_DISABLE_CONSOLE is defined, setting
GD_FLG_DISABLE_CONSOLE disables all console input and output.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2008-09-06 22:36:54 +02:00
Ricardo Ribalda Delgado 2b22d608f3 loads: allow negative offsets
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
2008-09-06 01:57:18 +02:00
Stefan Roese 3e3c026ed7 devices: Use list_add_tail() instead of list_add() to register a device
This patch fixes a problem spotted on Glacier/Canyonlands (and most
likely lots of other board ports), that no serial output was seen
after console initialization in console_init_r(). This is because the
last added console device was used instead of the first added.

This patch fixes this problem by using list_add_tail() instead of
list_add() to register a device. This way the first added console
is used again.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-09-05 13:27:01 +02:00
Jean-Christophe PLAGNIOL-VILLARD 628ffd73bc device: make device_register() clone the device
This is expected by the callers, but this fact was hidden well within
the old list implementation.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-02 01:28:18 +02:00
Jean-Christophe PLAGNIOL-VILLARD c1de7a6daf devices: merge to list_head
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-31 04:24:55 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3de7bf0e6b cmd_terminal: remove no need ifdef
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 21:53:57 +02:00
Jean-Christophe PLAGNIOL-VILLARD 578118bdf1 common/Makefile: order by functionality
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 21:53:57 +02:00
Jean-Christophe PLAGNIOL-VILLARD ba7b5b2348 miiphyutil: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 21:53:56 +02:00
Jean-Christophe PLAGNIOL-VILLARD 81789c39db autoscript: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 21:53:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD bbf52df9aa crc16: move to lib_generic
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 12:25:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD 55195773ea miiphybb: move to drivers/net/phy
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 12:25:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD e831403599 soft_spi: move to drivers/spi
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 12:25:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4d75e0aa9c soft_i2c: move to drivers/i2c
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 12:25:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD 717a222229 gunzip: move to lib_generic
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-29 12:25:01 +02:00
Peter Tyser a1573db0c0 Standardize bootp, tftpboot, rarpboot, dhcp, and nfs command descriptions
cmd_net.c command descriptions were updated to describe the optional
hostIPaddr argument.  The dhcp command help message was also updated
to more closely reflect the other commands in cmd_net.c

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-08-26 22:46:23 -07:00
James Yang 0f2cbe3f5e Add proper SPD definitions for DDR1/2/3
Also adds helper functions for DDR1/2 to verify the checksum.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 02:05:53 +02:00
Gururaja Hebbar K R 322098bff3 common/cmd_load.c cleanup - remove unused variables
- Remove unused global variable os_data_count.
- Remove unused variable z.

Signed-off-by: Gururaja Hebbar <gururajakr@sanyo.co.in>
2008-08-27 00:57:17 +02:00
Kumar Gala 40d7e99d37 bootm: refactor do_reset and os boot function args
There is no need for each OS specific function to call do_reset() we
can just do it once in bootm. This means its feasible on an error for
the OS boot function to return.

Also, remove passing in cmd_tbl_t as its not needed by the OS boot
functions.  flag isn't currently used but might be in the future so
we left it alone.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:48:01 +02:00
Kumar Gala 40afac22a9 fdt: Added resize command
Resize the fdt to size + padding to 4k boundary

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:45:47 +02:00
Kumar Gala 2a1a2cb6e2 fdt: refactor initrd related code
Created a new fdt_initrd() to deal with setting the initrd properties
in the device tree and fixing up the mem reserve.  We can use this
both in the choosen node handling and lets us remove some duplicated
code when we fixup the initrd info in bootm on PPC.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:45:20 +02:00
Kumar Gala 3082d2348c fdt: refactor fdt resize code
Move the fdt resizing code out of ppc specific boot code and into
common fdt support code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:43:36 +02:00
Kumar Gala 396f635b8f bootm: refactor image detection and os load steps
Created a bootm_start() that handles the parsing and detection of all
the images that will be used by the bootm command (OS, ramdisk, fdt).
As part of this we now tract all the relevant image offsets in the
bootm_headers_t struct. This will allow us to have all the needed
state for future sub-commands and lets us reduce a bit of arch
specific code on SPARC.

Created a bootm_load_os() that deals with decompression and loading
the OS image.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:41:43 +02:00
Kumar Gala e906cfae08 bootm: move lmb into the bootm_headers_t structure
To allow for persistent state between future bootm subcommands we
need the lmb to exist in a global state.
Moving it into the bootm_headers_t allows us to do that.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:38:48 +02:00
Kumar Gala 54f9c86691 bootm: Set working fdt address as part of the bootm flow
Set the fdt working address so "fdt FOO" commands can be used as part
of the bootm flow.  Also set an the environment variable "fdtaddr"
with the value.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:37:54 +02:00
Kumar Gala 06a09918f3 bootm: refactor fdt locating and relocation code
Move the code that handles finding a device tree blob and relocating
it (if needed) into common code so all arch's have access to it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:37:12 +02:00
Kumar Gala c4f9419c6b bootm: refactor ramdisk locating code
Move determing if we have a ramdisk and where its located into the
common code. Keep track of the ramdisk start and end in the
bootm_headers_t image struct.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:35:24 +02:00
Kumar Gala c160a95447 bootm: refactor entry point code
Move entry point code out of each arch and into common code.
Keep the entry point in the bootm_headers_t images struct.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:31:33 +02:00
Wolfgang Denk c5d11e79a2 Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx 2008-08-26 23:14:58 +02:00
Wolfgang Denk 19f101412c cmd_mem.c: Fix help message alignment
Bug was introced by "Big white-space cleanup" (53677ef1)

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-26 13:14:34 +02:00
Kim Phillips ce0eb70333 Merge branch 'next' 2008-08-25 17:02:10 -05:00
Wolfgang Denk a49d10cf02 Minor coding style cleanup, updte CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-25 23:45:41 +02:00
Gerald Van Baren 109c30fb8e Add note on dereferencing /aliases pointers
Replace the "must quote special characters" note with a hint on
how to dereference /aliases pointers by omitting the leading "/".
This feature was introduced by Kumar Gala as a libfdt enhancement
in commit ed035708235332c3c117ee3bb1a426063f03cfcb.

Example:

=> fdt print /aliases
aliases {
        ethernet0 = "/qe@e0100000/ucc@2000";
        ethernet1 = "/qe@e0100000/ucc@3000";
        serial0 = "/soc8360@e0000000/serial@4500";
        serial1 = "/soc8360@e0000000/serial@4600";
        pci0 = "/pci@e0008500";
};
=> fdt print ethernet0
ucc@2000 {
        device_type = "network";
        compatible = "ucc_geth";
        cell-index = <0x1>;
        reg = <0x2000 0x200>;
        interrupts = <0x20>;
        interrupt-parent = <0x2>;
        local-mac-address = [00 00 00 00 00 00];
        rx-clock-name = "none";
        tx-clock-name = "clk9";
        phy-handle = <0x3>;
        phy-connection-type = "rgmii-id";
        pio-handle = <0x4>;
};

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2008-08-24 22:23:13 -04:00
Kyungmin Park bfd7f38614 Fix OneNAND read_oob/write_oob functions compatability
Also sync with kernel OneNAND codes

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-21 13:50:20 -05:00
Kumar Gala ba37aa0328 fdt: rework fdt_fixup_ethernet() to use env instead of bd_t
Move to using the environment variables 'ethaddr', 'eth1addr', etc..
instead of bd->bi_enetaddr, bi_enet1addr, etc.

This makes the code a bit more flexible to the number of ethernet
interfaces.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-21 02:07:43 +02:00
Stefan Roese 4cacf7c646 hush: Fix printf debug macro in hush.c so that it usable in U-Boot
This patch changes the debug_printf() marco for U-Boot in hush.c and
moves the definition of DEBUG_SHELL to a place that is actually compiled
under U-Boot.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-08-21 02:05:03 +02:00
Peter Tyser 0800707b6d mod_i2c_mem() bugfix
The last used chip, address, and address length were not being
stored for the imm and imn commands.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-08-21 01:35:09 +02:00
Steven A. Falco 4afbef9672 Fix typo in spelling of ATAPI.
Correct a small spelling mistake.

Signed-off-by: Steven A. Falco <sfalco@harris.com>
2008-08-21 01:33:58 +02:00
Steven A. Falco 36c2d3062e Add a hook to allow board-specific PIO mode setting.
This patch adds a hook whereby a board-specific routine can be called to
configure hardware for a PIO mode.  The prototype for the board-specific
routine is:

	int inline ide_set_piomode(int pio_mode)

ide_set_piomode should be prepared to configure hardware for a pio_mode
between 0 and 6, inclusive.  It should return 0 on success or 1 on failure.

Signed-off-by: Steven A. Falco <sfalco@harris.com>
2008-08-21 01:31:04 +02:00
Kumar Gala 7dbc38ad91 fdt: fdt addr w/o any args reports back the current working address
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-21 00:55:02 +02:00
Kumar Gala f953d99fd5 fdt: added the ability to set initrd start/end via chosen command
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-21 00:54:52 +02:00
Kumar Gala ffa4bafaca Add command to enable/disable interrupts
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-21 00:53:02 +02:00
Kumar Gala fcd69a1a57 Clean up usage of icache_disable/dcache_disable
There is no point in disabling the icache on 7xx/74xx/86xx parts and not
also flushing the icache.  All callers of invalidate_l1_instruction_cache()
call icache_disable() right after.  Make it so icache_disable() calls
invalidate_l1_instruction_cache() for us.

Also, dcache_disable() already calls dcache_flush() so there is no point
in the explicit calls of dcache_flush().

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-19 00:57:28 +02:00
Harald Welte 0a823aa2a8 Add 'license' command to U-Boot command line
The 'license' command includes the U-Boot license (GPLv2) into the
actual bootloader binary. The license text can be shown interactively
at the U-Boot commandline.

For products where the commandline can actually be accessed by the
end user, this helps to prevent inadvertent GPL violations, since the
GPLv2 license text can no longer be 'forgotten' to be included into
the product.

The 'license' command can be enabled by CONFIG_CMD_LICENSE.

Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-08-18 23:21:49 +02:00
Harald Welte fe2ce5500e add 'unzip' command to u-boot commandline
[PATCH] add new 'unzip' command to u-boot commandline

common/cmd_mem.c: new command "unzip srcaddr dstaddr [dstsize]" to unzip from
memory to memory, and option CONFIG_CMD_UNZIP to enable it

Signed-off-by: Werner Almesberger <werner@openmoko.org>
Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-08-18 22:59:00 +02:00
TsiChung Liew 07efc9e321 Change CFG_ENV_SIZE to CFG_ENV_SECT_SIZE for SPI sector erase
The CFG_ENV_SIZE is not suitable used for SPI flash erase
sector size if CFG_ENV_SIZE is less than CFG_ENV_SECT_SIZE.
Add condition check if CFG_ENV_SIZE is larger than
CFG_ENV_SECT_SIZE, calculate the right number of sectors for
erasing.

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:56 -06:00
Wolfgang Denk 4b0708093e Coding Style cleanup, update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-14 14:41:06 +02:00
Wolfgang Denk 28ac671910 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2008-08-14 11:26:22 +02:00
Wolfgang Denk 2fd0aad443 Merge branch 'Makefile' of git://git.denx.de/u-boot-arm 2008-08-13 23:23:13 +02:00
Kyungmin Park d438d50848 Fix OneNAND build break
Since page size field is changed from oobblock to writesize. But OneNAND is not updated.
- fix bufferram management at erase operation
This patch includes the NAND/OneNAND state filed too.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-13 11:00:19 -05:00
Stefan Roese 5a7ddf4e1f Merge branch 'master' of /home/stefan/git/u-boot/u-boot 2008-08-13 06:47:12 +02:00
Jean-Christophe PLAGNIOL-VILLARD cc4a0ceeac drivers/mtd/nand: Move conditional compilation to Makefile
rename CFG_NAND_LEGACY to CONFIG_NAND_LEGACY

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-13 01:40:43 +02:00
Jean-Christophe PLAGNIOL-VILLARD d6e9ee92e8 common: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-13 01:40:38 +02:00
Stefan Roese 9939ffd5fb Merge branch 'master' of /home/stefan/git/u-boot/u-boot into next 2008-08-12 20:39:27 +02:00
Fathi BOUDRA 195ccfc599 OneNAND: Fill in MTD function pointers for OneNAND.
onenand_print_device_info():
 - Now returns a string to be placed in mtd->name,
   rather than calling printf.
 - Remove verbose parameter as it becomes useless.

Signed-off-by: Fathi Boudra <fabo@debian.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:32 -05:00
Guennadi Liakhovetski c3db8c649c NAND: Do not write or read a whole block if it is larger than the environment
Environment can be smaller than NAND block size, do not need to read a whole
block and minimum for writing is one page. Also remove an unused variable.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:29 -05:00
Scott Wood dfbf617ff0 NAND read/write fix
Implement block-skipping read/write, based on a patch from
Morten Ebbell Hestens <morten.hestnes@tandberg.com>.

Signed-off-by: Morten Ebbell Hestnes <morten.hestnes@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:28 -05:00
Scott Wood 984e03cdf1 NAND: Always skip blocks on read/write/boot.
Use of the non-skipping versions was almost always (if not always)
an error, and no valid use case has been identified.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:27 -05:00
Stefan Roese deac913eff NAND: Fix compilation warning and small coding style issue
Signed-off-by: Stefan Roese <sr@denx.de>
2008-08-12 11:31:23 -05:00
William Juul 9ad754fef5 make nand dump and nand dump.oob work
Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:22 -05:00
William Juul 90ef117b68 Incorporate yaffs2 into U-boot
To use YAFFS2 define CONFIG_YAFFS2

Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:19 -05:00
William Juul 3043c045d5 Whitespace cleanup and marking broken code.
Changes requested by maintainer Stefan Roese after
posting patch to U-boot mailing list.

Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:17 -05:00
William Juul 5e1dae5c3d Fixing coding style issues
- Fixing leading white spaces
 - Fixing indentation where 4 spaces are used instead of tab
 - Removing C++ comments (//), wherever I introduced them

Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:17 -05:00
William Juul 4cbb651b29 Remove white space at end.
Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:16 -05:00
William Juul cfa460adfd Update MTD to that of Linux 2.6.22.1
A lot changed in the Linux MTD code, since it was last ported from
Linux to U-Boot. This patch takes U-Boot NAND support to the level
of Linux 2.6.22.1 and will enable support for very large NAND devices
(4KB pages) and ease the compatibility between U-Boot and Linux
filesystems.

This patch is tested on two custom boards with PPC and ARM
processors running YAFFS in U-Boot and Linux using gcc-4.1.2
cross compilers.

MAKEALL ppc/arm has some issues:
 * DOC/OneNand/nand_spl is not building (I have not tried porting
   these parts, and since I do not have any HW and I am not familiar
   with this code/HW I think its best left to someone else.)

Except for the issues mentioned above, I have ported all drivers
necessary to run MAKEALL ppc/arm without errors and warnings. Many
drivers were trivial to port, but some were not so trivial. The
following drivers must be examined carefully and maybe rewritten to
some degree:
 cpu/ppc4xx/ndfc.c
 cpu/arm926ejs/davinci/nand.c
 board/delta/nand.c
 board/zylonite/nand.c

Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Stig Olsen <stig.olsen@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:15 -05:00
Kumar Gala 902ca09246 85xx: Rename CONFIG_NR_CPUS to CONFIG_NUM_CPUS
Use CONFIG_NUM_CPUS to match existing define used by 86xx.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Jon Loeliger <jdl@freescale.com>
2008-08-12 00:09:29 +02:00
Kumar Gala 3216ca9692 Fix fallout from autostart revert
The autostart revert caused a bit of duplicated code as well as
code that was using images->autostart that needs to get removed so
we can build again.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-12 00:06:34 +02:00
Gururaja Hebbar K R a9fe0c3e7c common/cmd_load.c - Minor code & Coding Style cleanup
- os_data_header Variable is a carry over feature
   & unused. So removed all instance of this variable
 - Minor Code Style Update

Signed-off-by: Gururaja Hebbar <gururajakr@sanyo.co.in>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-11 00:13:27 +02:00
dirk.behme@googlemail.com aa5ffa16d7 OneNAND: Remove base address offset usage
While locally preparing some U-Boot patches for ARM based OMAP3 boards, some
using OneNAND and some using NAND, we found some differences in OneNAND and
NAND command address handling.

As this might confuse users (it already confused us), we like to align OneNAND
and NAND address handling.

The issue is that cmd_onenand.c subtracts the onenand base address from the
addresses you type into the u-boot command line so, unlike nand, you can't
use addresses relative to the start of the onenand part e.g. this won't work:

onenand read 82000000 280000 400000

you have to use:

onenand read 82000000 20280000 400000

Looking at recent git, the only board currently using OneNAND is Apollon, and
for this the OneNAND base address is 0 (apollon.h)

#define	CFG_ONENAND_BASE	0x00000000

so patch below won't break any existing boards and will align OneNAND and NAND
handling on boards where OneNAND base address is != 0.

Signed-off-by: Steve Sakoman <sakoman@gmail.com>
Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
2008-08-10 22:45:04 +02:00
Wolfgang Denk 0bf202ec58 Revert "[new uImage] Add autostart flag to bootm_headers structure"
This reverts commit f5614e7926.

The commit was based on a misunderstanding of the (documented)
meaning of the 'autostart' environment variable. It might cause
boards to hang if 'autostart' was used, with the potential to brick
them. Go back to the documented behaviour.

Conflicts:

	common/cmd_bootm.c
	common/image.c
	include/image.h

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-10 01:26:26 +02:00
Peter Tyser 41266c9b5a FIT: Fix handling of images without ramdisks
boot_get_ramdisk() should not treat the case when a FIT image does
not contain a ramdisk as an error.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Acked-by: Michal Simek <monstr@monstr.eu>
2008-08-09 17:36:06 +02:00
Wolfgang Denk 21f971ec26 TQM823L: re-enable logo support; update LCD_INFO text
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-08 16:43:01 +02:00
Stefan Roese f2302d4430 Fix merge problems
Signed-off-by: Stefan Roese <sr@denx.de>
2008-08-06 14:05:38 +02:00
Mark Jackson 1464eff77e Fix bitmap display for atmel lcd controller
The current lcd_display_bitmap() function does not work properly
for the Atmel LCD controller.

2 fixes need to be done:-

(a) when setting the colour map, use the lcd_setcolreg() function
    as provided by the Atmel driver
(b) the data is never actually written to the lcd framebuffer !!

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2008-08-01 12:42:50 +02:00
Wolfgang Denk 2bb6a1044f Merge branch 'master' of ssh://10.10.0.7/home/wd/git/u-boot/master 2008-07-31 17:50:37 +02:00
Mark Jackson a48311557d Add gzipped logo support
The README file states that CONFIG_VIDEO_BMP_GZIP behaves as follows:

  If this option is set, additionally to standard BMP
  images, gzipped BMP images can be displayed via the
  splashscreen support or the bmp command.

However, the splashscreen function *only* supports standard BMP images.

This patch adds the documented gzip support.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2008-07-31 17:48:50 +02:00
Guennadi Liakhovetski 2e752be39d Uncompressed images loaded to their start address shall set load_end too
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Acked-by: Bartlomiej Sieka <tur@semihalf.com>
2008-07-31 17:41:00 +02:00
Wolfgang Denk c37207d7f5 Fix printf() format problems with configurable prompts
U-Boot allows for configurable prompt strings using the
CONFIG_AUTOBOOT_PROMPT resp. CONFIG_MENUPROMPT definitions. So far,
the assumption was that any such user defined problts would contain
exactly one "%d" format specifier. But some boards did not.

To allow for flexible boot prompts without adding too complex code we
now allow to specify the whole list of printf() arguments in the user
definition. This is powerful, but requires a responsible user who
really understands what he is doing, as he needs to know for exanple
which variables are available in the respective context.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-31 17:08:27 +02:00
Kumar Gala 57c219ad5d Fix compile warnings in dlmalloc
The origional code was using on odd reference to get to the first
real element in av_[].  The first two elements of the array are
not used for actual bins, but for house keeping.  If we are more
explicit about how use the first few elements we can get rid of the
warnings:

dlmalloc.c: In function 'malloc_extend_top':
dlmalloc.c:1971: warning: dereferencing type-punned pointer will break strict-aliasing rules
dlmalloc.c:1999: warning: dereferencing type-punned pointer will break strict-aliasing rules
dlmalloc.c:2029: warning: dereferencing type-punned pointer will break strict-aliasing rules
...

The logic of how this code came to be is:
	bin_at(0) = (char*)&(av_[2]) - 2*SIZE_SZ

SIZE_SZ is the size of pointer, and av_ is arry of pointers so:
	bin_at(0) = &(av_[0])

Going from there to bin_at(0)->fd or bin_at(0)->size should be straight forward.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-07-31 11:21:15 +02:00
Stefan Roese ebb86c4ecd cmd_bootm.c: Fix problem with '#if (CONFIG_CMD_USB)'
A recent patch used '#if (CONFIG_CMD_USB)' instead of
'#if defined(CONFIG_CMD_USB)'. This patch fixes this problem and makes
common/bootm.c compile again.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Markus Klotzbuecher <mk@denx.de>
2008-07-31 10:44:26 +02:00
Jean-Christophe PLAGNIOL-VILLARD c14eefcc48 Fix more printf() format warnings
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-07-30 00:54:25 +02:00
Jean-Christophe PLAGNIOL-VILLARD 936897d4d1 Fix remaining CFG_CMD_ define, ifdef and comments
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-07-30 00:48:07 +02:00