oweals/u-boot.git
15 years agotools/Makefile: Add libfdt/ to the include search path
Peter Tyser [Fri, 13 Mar 2009 23:54:44 +0000 (18:54 -0500)]
tools/Makefile: Add libfdt/ to the include search path

This change makes the process of symlinking libfdt_internal.h
unnecessary

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools: Remove unecessary symlinking of zlib.h
Peter Tyser [Fri, 13 Mar 2009 23:54:43 +0000 (18:54 -0500)]
tools: Remove unecessary symlinking of zlib.h

crc32.c uses the zlib.h header in include/u-boot/zlib.h.  The symlink
was previously necessary to give U-Boot's version of zlib.h precedence
over the host computer's version of zlib.h.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools/Makefile: Add tools/ to the include search path
Peter Tyser [Fri, 13 Mar 2009 23:54:42 +0000 (18:54 -0500)]
tools/Makefile: Add tools/ to the include search path

This change makes the process of symlinking mkimage.h and fdt_host.h
unnecessary

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools/Makefile: Compile ncb when CONFIG_NETCONSOLE
Peter Tyser [Fri, 13 Mar 2009 23:54:41 +0000 (18:54 -0500)]
tools/Makefile: Compile ncb when CONFIG_NETCONSOLE

Also conditionally add ncb.o to OBJ_FILES list

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET
Peter Tyser [Fri, 13 Mar 2009 23:54:40 +0000 (18:54 -0500)]
tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED
Peter Tyser [Fri, 13 Mar 2009 23:54:39 +0000 (18:54 -0500)]
tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP
Peter Tyser [Fri, 13 Mar 2009 23:54:38 +0000 (18:54 -0500)]
tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG
Peter Tyser [Fri, 13 Mar 2009 23:54:37 +0000 (18:54 -0500)]
tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS
Peter Tyser [Fri, 13 Mar 2009 23:54:36 +0000 (18:54 -0500)]
tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled
Peter Tyser [Fri, 13 Mar 2009 23:54:35 +0000 (18:54 -0500)]
tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools/Makefile: Split variable declarations into multiple lines
Peter Tyser [Fri, 13 Mar 2009 23:54:34 +0000 (18:54 -0500)]
tools/Makefile: Split variable declarations into multiple lines

Split variable declarations into multiple lines and use the standard
VAR-y convention.  Also move object and binary variable declarations to
after config.mk has been included to allow for these lists to utilize
the CONFIG_XXX variables.

These changes lay the groundwork for conditional compilation of files
in the tools directory.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools/Makefile: Remove inappropriate double-tabs
Peter Tyser [Fri, 13 Mar 2009 23:54:33 +0000 (18:54 -0500)]
tools/Makefile: Remove inappropriate double-tabs

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agotools/Makefile: Remove HOSTARCH HOSTOS defines
Peter Tyser [Fri, 13 Mar 2009 23:54:32 +0000 (18:54 -0500)]
tools/Makefile: Remove HOSTARCH HOSTOS defines

The values of HOSTARCH and HOSTOS which are exported from the top-level
Makefile should be used

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agogen_eth_addr: Use POSIX rand() and srand()
Peter Tyser [Fri, 13 Mar 2009 23:54:31 +0000 (18:54 -0500)]
gen_eth_addr: Use POSIX rand() and srand()

Replace random()/srandom() use with rand()/srand() to support
compilation with the mingw toolchain.  The rand()/srand() functions are
generally more common and are functionally equivalent to the original
random()/srandom() calls.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agoelf.h: Use stdint.h to provide standard typedefs for WIN32
Peter Tyser [Fri, 13 Mar 2009 23:54:28 +0000 (18:54 -0500)]
elf.h: Use stdint.h to provide standard typedefs for WIN32

The original code provided an incomplete set of typedefs for WIN32
compiles and replicated the standard typedefs that are already
provided by stdint.h

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agocommon/Makefile: Conditionally compile env_embedded.o
Peter Tyser [Fri, 13 Mar 2009 23:54:27 +0000 (18:54 -0500)]
common/Makefile: Conditionally compile env_embedded.o

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agoMakefile: Add removal of *.exe files to clean target
Peter Tyser [Fri, 13 Mar 2009 23:54:26 +0000 (18:54 -0500)]
Makefile: Add removal of *.exe files to clean target

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agoMakefile: Make autoconf.mk a dependency of the depend target
Peter Tyser [Fri, 13 Mar 2009 23:54:25 +0000 (18:54 -0500)]
Makefile: Make autoconf.mk a dependency of the depend target

The original code did not generate autoconf.mk until after some targets
dependencies had already been calculated, for example the directories in
the SUBDIRS variable

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
15 years agomflash: Initial mflash support
unsik Kim [Wed, 25 Feb 2009 02:31:24 +0000 (11:31 +0900)]
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>
15 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Wolfgang Denk [Fri, 3 Apr 2009 20:48:05 +0000 (22:48 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

15 years agoMerge branch 'sf' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Fri, 3 Apr 2009 20:42:44 +0000 (22:42 +0200)]
Merge branch 'sf' of git://git.denx.de/u-boot-blackfin

15 years agoMerge branch 'master' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Fri, 3 Apr 2009 20:38:36 +0000 (22:38 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-blackfin

15 years agoMerge branch 'master' of git://git.denx.de/u-boot-fdt
Wolfgang Denk [Fri, 3 Apr 2009 20:36:44 +0000 (22:36 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-fdt

15 years agoRename common ns16550 constants with UART_ prefix to prevent conflicts
Detlev Zundel [Fri, 3 Apr 2009 09:53:01 +0000 (11:53 +0200)]
Rename common ns16550 constants with UART_ prefix to prevent conflicts

Fix problems introduced in commit
7b5611cdd12ca0cc33f994f0d4a4454788fc3124 [inka4x0: Add hardware
diagnosis functions for inka4x0] which redefined MSR_RI which is
already used on PowerPC systems.

Also eliminate redundant definitions in ps2mult.h.  More cleanup will
be needed for other redundant occurrences though.

Signed-off-by: Detlev Zundel <dzu@denx.de>
15 years agoNoisily disable the legacy NAND subsystem.
Scott Wood [Wed, 1 Apr 2009 20:33:24 +0000 (15:33 -0500)]
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>
15 years agoFix OneNAND ipl to read CONFIG_SYS_MONITOR_LEN
apgmoorthy [Fri, 27 Mar 2009 09:15:23 +0000 (14:45 +0530)]
Fix OneNAND ipl to read CONFIG_SYS_MONITOR_LEN

Currently OneNAND initial program loader (ipl) reads only block 0 ie 128KB.
However, u-boot image for apollon board is 195KB making the board
unbootable with OneNAND.

Fix ipl to read CONFIG_SYS_MONITOR_LEN.
CONFIG_SYS_MONITOR_LEN macro holds the U-Boot image size.

Signed-off-by: Rohit Hagargundgi <h.rohit@samsung.com>
Signed-off-by: Gangheyamoorthy <moorthy.apg@samsung.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
15 years agoAdd "source" command; prepare removal of "autoscr" command
Wolfgang Denk [Wed, 1 Apr 2009 21:34:12 +0000 (23:34 +0200)]
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>
15 years agoAdd "GPL cleanup" task to feature-removal-schedule.txt
Wolfgang Denk [Thu, 2 Apr 2009 15:31:09 +0000 (17:31 +0200)]
Add "GPL cleanup" task to feature-removal-schedule.txt

Announce removal of all non-GPL or GPL-incompatible files
after August 2009.

Signed-off-by: Wolfgang Denk <wd@denx.de>
15 years agosf: stmicro: dont send 4 bytes when reading status register
Mike Frysinger [Thu, 2 Apr 2009 16:51:28 +0000 (12:51 -0400)]
sf: stmicro: dont send 4 bytes when reading status register

I can't find anywhere in the datasheet that says the status register needs
3 dummy bytes sent to it before being able to read back the first real
result.  Tests on a Blackfin board show that after writing the opcode, the
status register starts coming back immediately.  So only write out the
read status register opcode before polling the result.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Jason McMullan <mcmullan@netapp.com>
CC: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
15 years agosf: set common timeouts in seconds, not milliseconds
Mike Frysinger [Thu, 2 Apr 2009 12:11:31 +0000 (08:11 -0400)]
sf: set common timeouts in seconds, not milliseconds

Since timeouts are only hit when there is a problem in the system, we
don't want to prematurely timeout on a functioning setup.  Thus having
low timeouts (in milliseconds) doesn't gain us anything in the production
case, but rather increases likely hood of causing problems where none
otherwise exist.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
15 years agosf: stmicro: use common page timeout define
Mike Frysinger [Thu, 2 Apr 2009 10:51:49 +0000 (06:51 -0400)]
sf: stmicro: use common page timeout define

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
15 years agosf: always read 5 bytes for the idcode
Mike Frysinger [Sat, 28 Mar 2009 10:41:09 +0000 (06:41 -0400)]
sf: always read 5 bytes for the idcode

Some SPI flash drivers like to have extended id information available
(like the spansion flash), so rather than making it re-issue the ID cmd
to get at the last 2 bytes, have the common code read 5 bytes rather than
just 3.  This also matches the Linux behavior where it always reads 5 id
bytes from all flashes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
CC: Mingkai Hu <Mingkai.hu@freescale.com>
15 years agosf: stmicro: drop redundant id read
Mike Frysinger [Fri, 27 Mar 2009 20:34:21 +0000 (16:34 -0400)]
sf: stmicro: drop redundant id read

The common SPI flash code reads the idcode and passes it down to the SPI
flash driver, so there is no need to read it again ourselves.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
CC: Jason McMullan <mcmullan@netapp.com>
CC: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
15 years agosf: add driver for SST flashes
Mike Frysinger [Fri, 27 Mar 2009 23:27:58 +0000 (19:27 -0400)]
sf: add driver for SST flashes

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
15 years agosf: drop DEBUG defines
Mike Frysinger [Tue, 24 Mar 2009 03:03:58 +0000 (23:03 -0400)]
sf: drop DEBUG defines

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
15 years agomtd: add some at45 spi flash support
Jean-Christophe PLAGNIOL-VILLARD [Sun, 4 Jan 2009 06:44:07 +0000 (07:44 +0100)]
mtd: add some at45 spi flash support

 - AT45DB321D
 - AT45DB161D
 - AT45DB081D
 - AT45DB041D
 - AT45DB021D
 - AT45DB011D

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agomtd: SPI Flash: Support the Spansion Flash
Mingkai Hu [Tue, 31 Mar 2009 06:09:41 +0000 (14:09 +0800)]
mtd: SPI Flash: Support the Spansion Flash

Add MTD SPI Flash support for S25FL008A, S25FL016A,
S25FL032A, S25FL064A, S25FL128P.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: force all boards to HZ of 1000
Mike Frysinger [Tue, 31 Mar 2009 00:56:45 +0000 (20:56 -0400)]
Blackfin: force all boards to HZ of 1000

Since the Blackfin timer code requires HZ to be 1000, barf on any board
that tries to use a different value.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf533-stamp: drop old spi flash driver
Mike Frysinger [Sat, 28 Mar 2009 01:07:45 +0000 (21:07 -0400)]
Blackfin: bf533-stamp: drop old spi flash driver

Now that the common SPI flash code supports all the flashes, we can stop
using the old driver.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: add BF538/BF539 SPI portmux handling
Mike Frysinger [Thu, 26 Mar 2009 19:42:12 +0000 (15:42 -0400)]
Blackfin: add BF538/BF539 SPI portmux handling

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: do not delay on output bytes
Mike Frysinger [Tue, 24 Mar 2009 02:36:10 +0000 (22:36 -0400)]
Blackfin: do not delay on output bytes

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: drop newline from OTP help
Mike Frysinger [Tue, 24 Mar 2009 02:17:27 +0000 (22:17 -0400)]
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>
15 years agoBlackfin: convert bfin_sdh to legacy mmc
Mike Frysinger [Mon, 23 Mar 2009 03:43:31 +0000 (23:43 -0400)]
Blackfin: convert bfin_sdh to legacy mmc

The Blackfin SDH controller is still using the legacy framework, so update
the driver to use the renamed functions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf537-stamp: split CF/IDE code out into dedicated cf-ide.c
Mike Frysinger [Sun, 22 Feb 2009 21:30:38 +0000 (16:30 -0500)]
Blackfin: bf537-stamp: split CF/IDE code out into dedicated cf-ide.c

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: fix crash when booting from external memory
Mike Frysinger [Fri, 13 Feb 2009 22:10:58 +0000 (17:10 -0500)]
Blackfin: fix crash when booting from external memory

When testing a u-boot binary that hasn't been booted from the bootrom, we
have to make sure the bootstruct structure has sane storage space.  If we
don't, the initcode will crash when it tries to dereference an invalid
pointer.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf518f-ezbrd: new board port
Mike Frysinger [Mon, 13 Oct 2008 01:32:52 +0000 (21:32 -0400)]
Blackfin: bf518f-ezbrd: new board port

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf526-ezbrd: new board port
Mike Frysinger [Mon, 13 Oct 2008 01:30:48 +0000 (21:30 -0400)]
Blackfin: bf526-ezbrd: new board port

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf538f-ezkit: new board port
Mike Frysinger [Mon, 13 Oct 2008 01:25:33 +0000 (21:25 -0400)]
Blackfin: bf538f-ezkit: new board port

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf527-ezkit: new board port
Mike Frysinger [Mon, 13 Oct 2008 00:59:12 +0000 (20:59 -0400)]
Blackfin: bf527-ezkit: new board port

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf548-ezkit: new board port
Mike Frysinger [Sun, 12 Oct 2008 09:05:42 +0000 (05:05 -0400)]
Blackfin: bf548-ezkit: new board port

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agolibfdt: Fix C++ compile-time cast error on gnu 4.2.1
Laurent Gregoire [Tue, 3 Mar 2009 13:23:59 +0000 (14:23 +0100)]
libfdt: Fix C++ compile-time cast error on gnu 4.2.1

Allow the inclusion of libfdt.h in C++ source.

Signed-off-by: Laurent Gregoire <laurent.gregoire@tomtom.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
15 years agoFix a possible overflow case detected by gcc 4.3.2
Emil Medve [Mon, 23 Feb 2009 16:43:36 +0000 (10:43 -0600)]
Fix a possible overflow case detected by gcc 4.3.2

.../dtc/libfdt/fdt_sw.c: In function 'fdt_end_node':
.../dtc/libfdt/fdt_sw.c:81: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
15 years agolibfdt: Rework/cleanup fdt_next_tag()
David Gibson [Fri, 6 Feb 2009 03:03:24 +0000 (14:03 +1100)]
libfdt: Rework/cleanup fdt_next_tag()

Currently, callers of fdt_next_tag() must usually follow the call with
some sort of call to fdt_offset_ptr() to verify that the blob isn't
truncated in the middle of the tag data they're going to process.
This is a bit silly, since fdt_next_tag() generally has to call
fdt_offset_ptr() on at least some of the data following the tag for
its own operation.

This patch alters fdt_next_tag() to always use fdt_offset_ptr() to
verify the data between its starting offset and the offset it returns
in nextoffset.  This simplifies fdt_get_property() which no longer has
to verify itself that the property data is all present.

At the same time, I neaten and clarify the error handling for
fdt_next_tag().  Previously, fdt_next_tag() could return -1 instead of
a tag value in some circumstances - which almost none of the callers
checked for.  Also, fdt_next_tag() could return FDT_END either because
it encountered an FDT_END tag, or because it reached the end of the
structure block - no way was provided to tell between these cases.

With this patch, fdt_next_tag() always returns FDT_END with a negative
value in nextoffset for an error.  This means the several places which
loop looking for FDT_END will still work correctly - they only need to
check for errors at the end.  The errors which fdt_next_tag() can
report are:
- -FDT_ERR_TRUNCATED if it reached the end of the structure
   block instead of finding a tag.

- -FDT_BADSTRUCTURE if a bad tag was encountered, or if the
           tag data couldn't be verified with fdt_offset_ptr().

This patch also updates the callers of fdt_next_tag(), where
appropriate, to make use of the new error reporting.

Finally, the prototype for the long gone _fdt_next_tag() is removed
from libfdt_internal.h.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
15 years agolibfdt: Rework fdt_next_node()
David Gibson [Fri, 6 Feb 2009 03:01:56 +0000 (14:01 +1100)]
libfdt: Rework fdt_next_node()

Currently fdt_next_node() will find the next node in the blob
regardless of whether it is above, below or at the same level in the
tree as the starting node - the depth parameter is updated to indicate
which is the case.  When a depth parameter is supplied, this patch
makes it instead terminate immediately when it finds the END_NODE tag
for a node at depth 0.  In this case it returns the offset immediately
past the END_NODE tag.

This has a couple of advantages.  First, this slightly simplifies
fdt_subnode_offset(), which no longer needs to explicitly check that
fdt_next_node()'s iteration hasn't left the starting node.  Second,
this allows fdt_next_node() to be used to implement
_fdt_node_end_offset() considerably simplifying the latter function.

The other users of fdt_next_node() either don't need to iterate out of
the starting node, or don't pass a depth parameter at all.  Any
callers that really need to iterate out of the starting node, but keep
tracking depth can do so by biasing the initial depth value.

This is a semantic change, but I think it's very unlikely to break any
existing library users.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
15 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Wed, 1 Apr 2009 22:24:33 +0000 (00:24 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

15 years agompc83xx: Set guarded bit on BAT that covers the end of the address space
Scott Wood [Tue, 31 Mar 2009 22:49:36 +0000 (17:49 -0500)]
mpc83xx: Set guarded bit on BAT that covers the end of the address space

The mpc8313erdb board currently sets DBAT6 to cover all of the final 256MiB of
address space; however, not all of this space is covered by a device.  In
particular, flash sits at 0xfe000000-0xfe7fffff, and nothing is mapped
at the far end of the address space.

In zlib, there is a loop that references p[-1] if p is non-NULL.  Under
some circumstances, this leads to the CPU speculatively loading from
0xfffffff8 if p is NULL.  This leads to a machine check.

Signed-off-by: Scott Wood <scottwood@freescale.com>
continuation to the remaining mpc83xx boards that suffer from the same problem.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
15 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Wolfgang Denk [Wed, 1 Apr 2009 20:47:03 +0000 (22:47 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

15 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Wolfgang Denk [Wed, 1 Apr 2009 20:43:51 +0000 (22:43 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

15 years agortc: remove broken rtc_read and rtc_write declarations
Kim Phillips [Mon, 30 Mar 2009 19:28:05 +0000 (14:28 -0500)]
rtc: remove broken rtc_read and rtc_write declarations

commit 04e11cf3 "rtc: add support for 4543 RTC (manufactured by e.g.
EPSON)" introduces the following build error on boards configuring e.g,
the ds1374 rtc:

Configuring for MPC837XEMDS board...
ds1374.c:103: error: static declaration of 'rtc_read' follows non-static declaration
/home/r1aaha/git/u-boot/include/rtc.h:64: error: previous declaration of 'rtc_read' was here
ds1374.c:104: error: conflicting types for 'rtc_write'
/home/r1aaha/git/u-boot/include/rtc.h:65: error: previous declaration of 'rtc_write' was here

this reverts the erroneous chunk.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
CC: Detlev Zundel <dzu@denx.de>
CC: Andreas Pfefferle <ap@denx.de>
15 years ago85xx/86xx: Ensure MP boot page is not used
Kumar Gala [Tue, 31 Mar 2009 22:58:13 +0000 (17:58 -0500)]
85xx/86xx: Ensure MP boot page is not used

We had a bug on 86xx in which the boot page used to bring up secondary
cores was being overwritten and used for the malloc region in u-boot.

We need to reserve the region of memory that the boot page is going to
be put at so nothing uses it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Becky Bruce <beckyb@kernel.crashing.org>
15 years ago85xx: Introduce determine_mp_bootpg() helper.
Kumar Gala [Wed, 1 Apr 2009 04:11:05 +0000 (23:11 -0500)]
85xx: Introduce determine_mp_bootpg() helper.

Match determine_mp_bootpg() that was added for 86xx.  We need this to
address a bug introduced in v2009.03 with 86xx MP booting.  We have to
make sure to reserve the region of memory used for the MP bootpg() so
other u-boot code doesn't use it.

Also added a comment about how cpu_reset() is dealing w/an errata on
early 85xx MP HW.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years ago86xx: Cleanup MP support
Kumar Gala [Wed, 1 Apr 2009 04:02:38 +0000 (23:02 -0500)]
86xx: Cleanup MP support

* Use CONFIG_MP instead of CONFIG_NUM_CPUS to match 85xx
* Introduce determine_mp_bootpg() helper.  We'll need this to address a
  bug introduced in v2009.03 with 86xx MP booting.  We have to make sure
  to reserve the region of memory used for the MP bootpg() so other
  u-boot code doesn't use it.
* Added dummy versions of cpu_reset(), cpu_status() & cpu_release() to
  allow cmd_mp.c to build and work. In the future we should look at
  implementing all these functions. This could be common w/85xx if we
  use spin tables on 86xx.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agompc8641hpcn/sbc8641d: Add missing board_lmb_reserves
Becky Bruce [Tue, 31 Mar 2009 23:38:37 +0000 (18:38 -0500)]
mpc8641hpcn/sbc8641d: Add missing board_lmb_reserves

We're missing the board_lmb_reserve definitions that allow
cpu_mp_lmb_reserve to be called; this means that Linux
is free to reallocate reserved pages.  Linux currently boots
because we're getting lucky - the page we've reserved is
high enough in memory that it isn't allocated by Linux
while we still need it to be in existence.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agoNetStar: fix NAND
Ladislav Michl [Tue, 31 Mar 2009 11:43:10 +0000 (13:43 +0200)]
NetStar: fix NAND

Fix NAND support broken during new NAND code merge. Move those few lines of
code to board/netstar/netstar.c

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
15 years agosoft_i2c.c compiler/linker error
Jens Scharsig [Tue, 31 Mar 2009 06:18:29 +0000 (08:18 +0200)]
soft_i2c.c compiler/linker error

This patch fix the compiler/linker errors

common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'

if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not
uesd/undef (wrong define order)

and

removes additional empty lines

Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
15 years agoMPC85xx: Add MPC8569MDS board support
Haiying Wang [Fri, 27 Mar 2009 21:02:45 +0000 (17:02 -0400)]
MPC85xx: Add MPC8569MDS board support

This patch adds MPC8569MDS board support. The UART, QE UEC1 and UEC2, BRD
EEPROM on I2C2 bus, PCI express and DDR3 SPD are supported in this patch.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Hillel Avni <Hillel.Avni@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agoMPC85xx: Add MPC8569 CPU support
Haiying Wang [Fri, 27 Mar 2009 21:02:44 +0000 (17:02 -0400)]
MPC85xx: Add MPC8569 CPU support

There is a workaround for MPC8569 CPU Errata, which needs to set Bit 13 of
LBCR in 4K bootpage. We setup a temp TLB for eLBC controller in bootpage,
then invalidate it after LBCR bit 13 is set.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agoMPC85xx: Load and enable QE microcode patch in IRAM
Haiying Wang [Thu, 26 Mar 2009 21:01:49 +0000 (17:01 -0400)]
MPC85xx: Load and enable QE microcode patch in IRAM

For the silicon which doesn't have ROM support in QE, it always needs to load
a pre-built ucode binary to IRAM so that QE can work.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Hillel Avni <Hillel.Avni@freescale.com>
15 years ago85xx: Add support for additional e500mc features
Kumar Gala [Thu, 19 Mar 2009 14:16:10 +0000 (09:16 -0500)]
85xx: Add support for additional e500mc features

* Enable backside L2
* e500mc no longer has timebase enable in HID (moved to CCSR register)

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agofsl-ddr: add the DDR3 SPD infrastructure
Dave Liu [Sat, 14 Mar 2009 04:48:30 +0000 (12:48 +0800)]
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>
15 years agofsl-ddr: Fix two bugs in the ddr infrastructure
Dave Liu [Sat, 14 Mar 2009 04:48:19 +0000 (12:48 +0800)]
fsl-ddr: Fix two bugs in the ddr infrastructure

1. wr_lat
   UM said the total write latency for DDR2 is equal to
   WR_LAT + ADD_LAT, the write latency is CL + ADD_LAT - 1.
   so, the WR_LAT = CL - 1;
2. rd_to_pre
   we missed to add the ADD_LAT for DDR2 case.

Reported-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Dave Liu <daveliu@freescale.com>
15 years ago83xx: Use common LSDMR defines from asm/fsl_lbc.h
Kumar Gala [Thu, 26 Mar 2009 06:34:39 +0000 (01:34 -0500)]
83xx: Use common LSDMR defines from asm/fsl_lbc.h

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
15 years ago85xx: Use common LSDMR defines from asm/fsl_lbc.h
Kumar Gala [Thu, 26 Mar 2009 06:34:38 +0000 (01:34 -0500)]
85xx: Use common LSDMR defines from asm/fsl_lbc.h

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agoAdd LSDMR (SDRAM Mode Register) definition on localbus
Kumar Gala [Thu, 26 Mar 2009 06:34:37 +0000 (01:34 -0500)]
Add LSDMR (SDRAM Mode Register) definition on localbus

The masks for various bit defines of LSDMR are common and thus we can
define them in one place rather than replicating them in each config.h

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agoOMAP: use {read,write}l to access timer registers
Ladislav Michl [Mon, 30 Mar 2009 16:58:41 +0000 (18:58 +0200)]
OMAP: use {read,write}l to access timer registers

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
15 years agoOMAP: rename timer divisor
Ladislav Michl [Mon, 30 Mar 2009 16:58:41 +0000 (18:58 +0200)]
OMAP: rename timer divisor

Divisor field is called PTV not PVT.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agoOMAP: reindent timer code
Ladislav Michl [Mon, 30 Mar 2009 16:58:40 +0000 (18:58 +0200)]
OMAP: reindent timer code

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
15 years agos3c2410: move nand driver to drivers/mtd/nand
Jean-Christophe PLAGNIOL-VILLARD [Mon, 30 Mar 2009 16:58:40 +0000 (18:58 +0200)]
s3c2410: move nand driver to drivers/mtd/nand

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agos3c24x0: move i2c driver to drivers/i2c
Jean-Christophe PLAGNIOL-VILLARD [Mon, 30 Mar 2009 16:58:40 +0000 (18:58 +0200)]
s3c24x0: move i2c driver to drivers/i2c

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agos3c24x0: move serial driver to drivers/serial
Jean-Christophe PLAGNIOL-VILLARD [Mon, 30 Mar 2009 16:58:39 +0000 (18:58 +0200)]
s3c24x0: move serial driver to drivers/serial

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agodavinci: move i2c driver to drivers/i2c
Jean-Christophe PLAGNIOL-VILLARD [Mon, 30 Mar 2009 16:58:39 +0000 (18:58 +0200)]
davinci: move i2c driver to drivers/i2c

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agodavinci: move nand driver to drivers/mtd/nand
Jean-Christophe PLAGNIOL-VILLARD [Mon, 30 Mar 2009 16:58:39 +0000 (18:58 +0200)]
davinci: move nand driver to drivers/mtd/nand

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agoimx: move serial driver to drivers/serial
Jean-Christophe PLAGNIOL-VILLARD [Mon, 30 Mar 2009 16:58:38 +0000 (18:58 +0200)]
imx: move serial driver to drivers/serial

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agoinka4x0: Use proper accessor macros for memory mapped registers.
Detlev Zundel [Sun, 29 Mar 2009 22:31:36 +0000 (00:31 +0200)]
inka4x0: Use proper accessor macros for memory mapped registers.

Signed-off-by: Detlev Zundel <dzu@denx.de>
15 years agoinka4x0: Add hardware diagnosis and RTC in configuration.
Detlev Zundel [Sun, 29 Mar 2009 22:31:35 +0000 (00:31 +0200)]
inka4x0: Add hardware diagnosis and RTC in configuration.

This patch adds the board specific communication routines needed by
the external 4543 RTC.

Signed-off-by: Detlev Zundel <dzu@denx.de>
Signed-off-by: Andreas Pfefferle <ap@denx.de>
15 years agoinka4x0: Add hardware diagnosis functions for inka4x0
Detlev Zundel [Sun, 29 Mar 2009 22:31:34 +0000 (00:31 +0200)]
inka4x0: Add hardware diagnosis functions for inka4x0

This patch adds advanced diagnosis functions for the inka4x0 board.

Signed-off-by: Andreas Pfefferle <ap@denx.de>
Signed-off-by: Detlev Zundel <dzu@denx.de>
15 years agortc: add support for 4543 RTC (manufactured by e.g. EPSON)
Detlev Zundel [Sun, 29 Mar 2009 22:31:33 +0000 (00:31 +0200)]
rtc: add support for 4543 RTC (manufactured by e.g. EPSON)

Signed-off-by: Detlev Zundel <dzu@denx.de>
Signed-off-by: Andreas Pfefferle <ap@denx.de>
15 years agodrivers/twserial: Add protocol driver for "three wire serial" interface.
Detlev Zundel [Sun, 29 Mar 2009 22:31:32 +0000 (00:31 +0200)]
drivers/twserial: Add protocol driver for "three wire serial" interface.

This pretty unintelligent interface is used on some RTC chips.

Signed-off-by: Detlev Zundel <dzu@denx.de>
15 years agoarm720t/clps7111: move serial driver to drivers/serial
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:42 +0000 (23:01 +0200)]
arm720t/clps7111: move serial driver to drivers/serial

add CONFIG_CLPS7111_SERIAL to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agolpc2292: move serial driver to drivers/serial
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:42 +0000 (23:01 +0200)]
lpc2292: move serial driver to drivers/serial

add CONFIG_LPC2292_SERIAL to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agoks8695: move serial driver to drivers/serial
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:42 +0000 (23:01 +0200)]
ks8695: move serial driver to drivers/serial

add CONFIG_KS8695_SERIAL to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agos3c64xx: move usb driver to drivers/usb
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:42 +0000 (23:01 +0200)]
s3c64xx: move usb driver to drivers/usb

add CONFIG_USB_S3C64XX to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agoimx31: move serial driver to drivers/serial
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:41 +0000 (23:01 +0200)]
imx31: move serial driver to drivers/serial

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agonetarm: move serial driver to drivers/serial
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:41 +0000 (23:01 +0200)]
netarm: move serial driver to drivers/serial

add CONFIG_NETARM_SERIAL to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agosa1100: move serial driver to drivers/serial
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:41 +0000 (23:01 +0200)]
sa1100: move serial driver to drivers/serial

add CONFIG_SA1100_SERIAL to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agos3c44b0: extract cache from cpu.c
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:41 +0000 (23:01 +0200)]
s3c44b0: extract cache from cpu.c

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agos3c44b0: move serial driver to drivers/serial
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:41 +0000 (23:01 +0200)]
s3c44b0: move serial driver to drivers/serial

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agos3c44b0: move rtc driver to drivers/rtc
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:40 +0000 (23:01 +0200)]
s3c44b0: move rtc driver to drivers/rtc

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agos3c44b0: move i2c driver to drivers/i2c
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:40 +0000 (23:01 +0200)]
s3c44b0: move i2c driver to drivers/i2c

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
15 years agos3c4510b: move specific code to soc directory
Jean-Christophe PLAGNIOL-VILLARD [Sun, 29 Mar 2009 21:01:36 +0000 (23:01 +0200)]
s3c4510b: move specific code to soc directory

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