oweals/u-boot.git
13 years agoomap3evm: Use GENERATED_GBL_DATA_SIZE
Sanjeev Premi [Mon, 29 Nov 2010 21:32:47 +0000 (16:32 -0500)]
omap3evm: Use GENERATED_GBL_DATA_SIZE

The macro CONFIG_SYS_GBL_DATA_SIZE has been replaced
with GENERATED_GBL_DATA_SIZE.

Also define macros: CONFIG_SYS_INIT_RAM_ADDR and
CONFIG_SYS_INIT_RAM_SIZE.

Based on changes for omap3_beagle in the commit:
 31bfcf1c5776df3d90286aa15104c45096d53dc6

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoARMV7: OMAP3: Fix build failure for igep0030 machine
Enric Balletbo i Serra [Mon, 29 Nov 2010 21:30:47 +0000 (16:30 -0500)]
ARMV7: OMAP3: Fix build failure for igep0030 machine

Seems that if CONFIG_CMD_NET is undefined we should also
undefine CONFIG_CMD_NFS, otherwise build fails with various
undefined reference like:

  net/libnet.o: In function `rpc_req':
  u-boot/net/nfs.c:193: undefined reference to `NetEthHdrSize'
  u-boot/net/nfs.c:202: undefined reference to `NetSendUDPPacket'
  u-boot/net/nfs.c:203: undefined reference to `NetTxPacket'
  u-boot/net/nfs.c:203: undefined reference to `NetServerEther'

This patch adds the undef CONFIG_CMD_NFS in configuration file.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoOMAP4: SDP4430: Disable CMD_NFS
Dirk Behme [Mon, 29 Nov 2010 01:00:12 +0000 (20:00 -0500)]
OMAP4: SDP4430: Disable CMD_NFS

This patch fixes the SDB4430 build after commit 6d8962e814c15807dd6ac5757904be2a02d187b8
by explicitly disabling CMD_NFS.

>From the commit message for "Switch from archive libraries to partial linking":

This commit reveals board configurations that exclude some features but
include source files that depend these disabled features in the build,
resulting in undefined symbols.  Known such cases include:

- disabling CMD_NET but not CMD_NFS;
- enabling CONFIG_OF_LIBFDT but not CONFIG_QE.

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoPrepare v2010.12-rc2 v2010.12-rc2
Wolfgang Denk [Sun, 28 Nov 2010 18:44:59 +0000 (19:44 +0100)]
Prepare v2010.12-rc2

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agocfi_flash: fix bug introduced while recent change to flash_get_size()
Anatolij Gustschin [Sun, 28 Nov 2010 01:13:33 +0000 (02:13 +0100)]
cfi_flash: fix bug introduced while recent change to flash_get_size()

commit ec50a8e389863ac35bfd9d9a2e8b30187318e59e
"cfi_flash: handle 'chip size exceeds address window' situation"
added 3rd argument to flash_get_size() but didn't fix all the
function calls from the board specific code. Many boards have
their own flash_get_size() definitions in the board code and
use them there, but some boards (e.g. tqm834x, tqm85xx, pdm360ng)
use flash_get_size() from the cfi_flash.c driver.

The bug shows up if the value of the "max_size" argument (which
is not defined when calling the function with two arguments)
happens to be less than "info->size". In this case on the
affected boards we end up with a bank of reduced size and
in the worst case might even be not able to update U-Boot or
to boot the kernel from flash:

=> fli

Bank # 1: CFI conformant FLASH (32 x 16)  Size: 0 kB in 1 Sectors
  AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E
  Erase timeout: 4096 ms, write timeout: 1 ms
  Buffer write timeout: 3 ms, buffer size: 64 bytes

  Sector Start Addresses:
  F0000000   RO

Bank # 2: CFI conformant FLASH (32 x 16)  Size: 128 MB in 512 Sectors
  AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E
  Erase timeout: 4096 ms, write timeout: 1 ms
  Buffer write timeout: 3 ms, buffer size: 64 bytes

  Sector Start Addresses:
  F8000000        F8040000        F8080000        F80C0000        F8100000
  F8140000        F8180000        F81C0000        F8200000        F8240000
  ...

E.g., updating U-Boot is not possible now:

=> protect off ${u-boot_addr} +${u-boot_size}
Error: end address (0xf007ffff) not in flash!
Bad address format
=> era ${u-boot_addr} +${u-boot_size}
Error: end address (0xf007ffff) not in flash!
Bad address format

This patch removes the 3rd argument of flash_get_size() again
and sets "max_size" in the function itself instead of passing
it as a function argument.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agoDaVinci: DM355 Leopard : Fix for ARM Relocation support
Sandeep Paulraj [Sat, 27 Nov 2010 23:50:11 +0000 (18:50 -0500)]
DaVinci: DM355 Leopard : Fix for ARM Relocation support

Fix for ARM Relocation support

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoDaVinci DM365: Fix for ARM Relocation support
Sandeep Paulraj [Sat, 27 Nov 2010 23:50:22 +0000 (18:50 -0500)]
DaVinci DM365: Fix for ARM Relocation support

Fix for ARM Relocation support

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoDaVinci DM355: Fix for ARM Relocation support
Sandeep Paulraj [Sat, 27 Nov 2010 23:49:49 +0000 (18:49 -0500)]
DaVinci DM355: Fix for ARM Relocation support

Fix for ARM Relocation support

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Wolfgang Denk [Sun, 28 Nov 2010 16:44:00 +0000 (17:44 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx

13 years agoFix compiler warning in fdt_support.c
Dirk Behme [Sun, 21 Nov 2010 19:19:34 +0000 (20:19 +0100)]
Fix compiler warning in fdt_support.c

Fix compiler warning

fdt_support.c: In function 'of_bus_default_count_cells':
fdt_support.c:957: warning: passing argument 1 of '__swab32p' discards qualifiers from pointer target type
fdt_support.c:965: warning: passing argument 1 of '__swab32p' discards qualifiers from pointer target type

be32_to_cpup() expects an 'u32 *' while prop is 'const u32 *'.

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
13 years agoDevkit8000: Fix build after introduction of GENERATED_GBL_DATA_SIZE
Thomas Weber [Thu, 18 Nov 2010 07:45:25 +0000 (08:45 +0100)]
Devkit8000: Fix build after introduction of GENERATED_GBL_DATA_SIZE

This patch fixes the issue by defining and using
CONFIG_SYS_INIT_RAM_SIZE and CONFIG_SYS_INIT_RAM_ADDR.

This patch adopts the
commit 31bfcf1c5776df3d90286aa15104c45096d53dc6
from Steve Sakoman and Sandeep Paulraj on Devkit8000.

Signed-off-by: Thomas Weber <weber@corscience.de>
13 years agoppc4xx: Flush complete dcache in relocate_code()
Stefan Roese [Fri, 26 Nov 2010 14:45:34 +0000 (15:45 +0100)]
ppc4xx: Flush complete dcache in relocate_code()

When the cache is enabled in SDRAM we need to flush not only the global
data area but also the bd_info struct in relocate_code. This patch now
flushed the complete dcache (all dcache lines) via flush_dcache() instead
of adding a flush_dcache_range() call for bd_info since this is faster.

Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx/POST: Handle cached SDRAM correctly in Denali (440EPx) ECC POST
Stefan Roese [Fri, 26 Nov 2010 14:45:22 +0000 (15:45 +0100)]
ppc4xx/POST: Handle cached SDRAM correctly in Denali (440EPx) ECC POST

This patch fixes a problem in the Denali (440EPx) SDRAM ECC POST test.
When cache is enabled in the SDRAM area, the values written to SDRAM
need to be flushed from cache to SDRAM using the dcfb instruction.

Without this patch the POST ECC test failed. Now its working again on
platforms with cache enabled in SDRAM.

Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoCoding Style (white space) cleanup
Wolfgang Denk [Sat, 27 Nov 2010 22:30:56 +0000 (23:30 +0100)]
Coding Style (white space) cleanup

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agopowerpc: cmd_ecctest: Use return value of cmd_usage
Thomas Weber [Thu, 25 Nov 2010 07:05:30 +0000 (08:05 +0100)]
powerpc: cmd_ecctest: Use return value of cmd_usage

Use the return value of cmd_usage instead of ignoring this
and returning a 1.

Signed-off-by: Thomas Weber <weber@corscience.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agogdsys: osd: Use return value of cmd_usage
Thomas Weber [Thu, 25 Nov 2010 07:05:29 +0000 (08:05 +0100)]
gdsys: osd: Use return value of cmd_usage

Use the return value of cmd_usage instead of ignoring this
and returning a 1.

Signed-off-by: Thomas Weber <weber@corscience.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agocommon/cmd_nvedit: Use return value of cmd_usage
Thomas Weber [Thu, 25 Nov 2010 07:05:28 +0000 (08:05 +0100)]
common/cmd_nvedit: Use return value of cmd_usage

Use the return value of cmd_usage instead of ignoring this
and returning a 1.

Signed-off-by: Thomas Weber <weber@corscience.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agoCommon/command: Guard strchr/strlen from NULL pointer
Thomas Weber [Wed, 24 Nov 2010 12:07:51 +0000 (13:07 +0100)]
Common/command: Guard strchr/strlen from NULL pointer

Guard strchr/strlen from being called with NULL pointer.
This line is crashing when command "env" is called without subcommand.

The cmd is NULL in this case because the calling function "do_env"
decremented the argc without checking if there are still arguments available.

Signed-off-by: Thomas Weber <weber@corscience.de>
13 years agoCommon/cmd_nvedit: Check for env subcommand
Thomas Weber [Wed, 24 Nov 2010 12:07:52 +0000 (13:07 +0100)]
Common/cmd_nvedit: Check for env subcommand

The env command needs one subcommand. If this is not available
print the usage help.

Signed-off-by: Thomas Weber <weber@corscience.de>
13 years agosort and reformat boards.cfg
Eric Cooper [Tue, 23 Nov 2010 19:19:15 +0000 (14:19 -0500)]
sort and reformat boards.cfg

update suggested sort command in comment to produce desired order
suggest use of "column -t" to reformat

Signed-off-by: Eric Cooper <ecc@cmu.edu>
13 years agoFix jornada memory init
Kristoffer Ericson [Sat, 6 Nov 2010 13:24:27 +0000 (14:24 +0100)]
Fix jornada memory init

* Fix memory initialization. This fixes the problem
  with kernel oopses during heavy load.

* Cleanup pinsetup, which for reference is among
  other things needed for proper flash erasing.

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
13 years ago74xx_7xx: Cleanup for partial linking and --gc-sections
Wolfgang Denk [Thu, 25 Nov 2010 11:14:07 +0000 (12:14 +0100)]
74xx_7xx: Cleanup for partial linking and --gc-sections

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years ago8260: Cleanup for partial linking and --gc-sections
Wolfgang Denk [Wed, 24 Nov 2010 18:19:08 +0000 (19:19 +0100)]
8260: Cleanup for partial linking and --gc-sections

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years ago824x: Cleanup for partial linking and --gc-sections
Wolfgang Denk [Tue, 23 Nov 2010 22:48:56 +0000 (23:48 +0100)]
824x: Cleanup for partial linking and --gc-sections

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years ago8220: Cleanup for partial linking and --gc-sections
Wolfgang Denk [Thu, 25 Nov 2010 11:15:31 +0000 (12:15 +0100)]
8220: Cleanup for partial linking and --gc-sections

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years ago5xxx: Cleanup for partial linking and --gc-sections
Wolfgang Denk [Tue, 23 Nov 2010 12:20:22 +0000 (13:20 +0100)]
5xxx: Cleanup for partial linking and --gc-sections

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years ago512x: Cleanup for partial linking and --gc-sections
Wolfgang Denk [Mon, 22 Nov 2010 22:36:42 +0000 (23:36 +0100)]
512x: Cleanup for partial linking and --gc-sections

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Timur Tabi <timur@freescale.com>
Acked-by: Stefan Roese <sr@denx.de>
13 years ago5xx: Cleanup for partial linking and --gc-sections
Wolfgang Denk [Mon, 22 Nov 2010 21:44:01 +0000 (22:44 +0100)]
5xx: Cleanup for partial linking and --gc-sections

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years ago8xx: Cleanup for partial linking and --gc-sections
Wolfgang Denk [Sat, 20 Nov 2010 14:07:45 +0000 (15:07 +0100)]
8xx: Cleanup for partial linking and --gc-sections

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years ago86xx: Cleanup for partial linking and --gc-sections
Wolfgang Denk [Mon, 22 Nov 2010 07:31:41 +0000 (08:31 +0100)]
86xx: Cleanup for partial linking and --gc-sections

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
13 years ago83xx: Cleanup for partial linking and --gc-sections
Wolfgang Denk [Thu, 25 Nov 2010 11:15:34 +0000 (12:15 +0100)]
83xx: Cleanup for partial linking and --gc-sections

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Haiying Wang <r54964@freescale.com>
13 years agoppc4xx/NAND: Reduce size of NAND SPL image
Stefan Roese [Tue, 23 Nov 2010 13:32:48 +0000 (14:32 +0100)]
ppc4xx/NAND: Reduce size of NAND SPL image

This is needed for the canyonlands_nand build target. Without it
the resulting image won't fit into 4k.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Acked-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Cleanup for partial linking and --gc-sections
Wolfgang Denk [Sun, 21 Nov 2010 19:55:42 +0000 (20:55 +0100)]
ppc4xx: Cleanup for partial linking and --gc-sections

This commit adapts 4xx boards for partial linking with --gc-sections.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Tirumala Marri <tmarri@apm.com>
Cc: David Updegraff <dave@cray.com>
Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: Larry Johnson <lrj@acm.org>
Cc: Peter De Schrijver <p2@mind.be>
Cc: Niklaus Giger <niklaus.giger@netstal.com>
Cc: Daniel Poirot <dan.poirot@windriver.com>
Acked-by: Stefan Roese <sr@denx.de>
13 years agoPOWERPC: enable --gc-sections and -ffunction-sections -fdata-sections
Wolfgang Denk [Sun, 21 Nov 2010 19:46:02 +0000 (20:46 +0100)]
POWERPC: enable --gc-sections and -ffunction-sections -fdata-sections

The switch from archive libraries to partial linking has introduced a
number of problems, that are non-trivial to solve.  For example, it is
no longer possible to include individual object files in the linker
script as we did before for example in the case of boards with
embedded environment to fill up the gap caused by the need to align
the environment on flash erase block boundaries.

The best (but unfortunately not easiest) approach to address this
problem is to enable -ffunction-sections (and -fdata-sections) so
we can again (and even in much finer granularity) place certain code
where we want it.  When doing this step, it seems only consequent to
also add --gc-sections which has the added benefit of reducing the
memory footprint of the U-Boot image (both in flash and in RAM).

Unfortunately, this requires changes to a lot of linker scripts.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
13 years ago83xx: Fix NAND_SPL link address
Scott Wood [Wed, 24 Nov 2010 13:28:40 +0000 (13:28 +0000)]
83xx: Fix NAND_SPL link address

Apply the same fix for 83xx as was done for 85xx in commit
96196a1f7546904563994d2d041804a816d7c139.

Without this, NAND SPLs are built with the text base intended for the main
image, resulting in a broken, very large u-boot-nand.bin.

The block of defines for NAND boot is moved closer to where
CONFIG_SYS_TEXT_BASE is defined.  We can't directly use
CONFIG_SYS_NAND_U_BOOT_DST in the definition of CONFIG_SYS_TEXT_BASE because
autoconf.mk will include the literal text "CONFIG_SYS_NAND_U_BOOT_DST",
but at least keep them close and point out that they're supposed to be
the same.

Signed-off-by: Scott Wood <scottwood@freescale.com>
13 years agoppc4xx: Fix build problems of IBM DDR2 NAND booting targets
Stefan Roese [Tue, 23 Nov 2010 13:32:06 +0000 (14:32 +0100)]
ppc4xx: Fix build problems of IBM DDR2 NAND booting targets

This change is needed to compile the PPC4xx NAND booting targets
equipped with the IBM DDR2 SDRAM controller.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years agoPPChameleonEVB and CATcenter need a custom linker script
Wolfgang Denk [Sun, 21 Nov 2010 16:04:17 +0000 (17:04 +0100)]
PPChameleonEVB and CATcenter need a custom linker script

These boards use an embedded environment, which is not supported by the
generic arch/powerpc/cpu/ppc4xx/u-boot.lds script.

The breakage was introduced by commit 2cd95a2 "ppc4xx: Remove board
specific linker scripts from most PPC4xx boards"

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Andrea Marson <andrea.marson@dave-tech.it>
Acked-by: Stefan Roese <sr@denx.de>
13 years agoarch/powerpc/*/config.mk: make CONFIG_SYS_LDSCRIPT settings work
Wolfgang Denk [Sun, 21 Nov 2010 15:34:05 +0000 (16:34 +0100)]
arch/powerpc/*/config.mk: make CONFIG_SYS_LDSCRIPT settings work

As we try to get rid of board specific config.mk files we must
provide a way for board specific settings of the LDSCRIPT variable
(path to the linker script) where needed.

We now implement the following hierarchy:

- Highest priority has a "#define CONFIG_SYS_LDCONFIG" in the board
  config file.
- If CONFIG_SYS_LDCONFIG is not set, and the system is booting from
  NAND (CONFIG_NAND_SPL is set), then a board specific linker
  script board/$(BOARDDIR)/u-boot-nand.lds gets used.
- If we are not booting from NAND, we test if a processor specific
  linker script arch/powerpc/cpu/$(CPU)/u-boot.lds exists; if so we
  use that.
- As default, arch/powerpc/config.mk gets used.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Kumar Gala <kumar.gala@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
13 years agocpu/ppc4xx/Makefile: build only needed object files
Wolfgang Denk [Sat, 20 Nov 2010 23:03:32 +0000 (00:03 +0100)]
cpu/ppc4xx/Makefile: build only needed object files

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years agocommon/Makefile: don't include env_embedded.o into libcommon
Wolfgang Denk [Sat, 20 Nov 2010 14:04:02 +0000 (15:04 +0100)]
common/Makefile: don't include env_embedded.o into libcommon

Some boards use an embedded environment, where env_embedded.o has to
be linked at a special position in the U-Boot image; to make this
possible, we do not include it into libcommon.o for such boards.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years agocam5200_niosflash: fix build warnings
Wolfgang Denk [Wed, 24 Nov 2010 21:27:08 +0000 (22:27 +0100)]
cam5200_niosflash: fix build warnings

Fix warnings:

cam5200_flash.c: In function 'write_word_32':
cam5200_flash.c:443: warning: dereferencing type-punned pointer will break strict-aliasing rules
cam5200_flash.c: In function 'write_word_16':
cam5200_flash.c:684: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years agoWINBOND_83C553: enable only on boards that actually use it.
Wolfgang Denk [Tue, 23 Nov 2010 22:17:18 +0000 (23:17 +0100)]
WINBOND_83C553: enable only on boards that actually use it.

So far, only the BAB7xx board would call the initialise_w83c553f()
function for the WINBOND 83C553 chip, even though some other boards
(HIDDEN_DRAGON, Sandpoint8240, Sandpoint8245) enabled it in their
board configuration.  These boards were also missing other config
settings needed for that, which resulted in build errors like this:

drivers/pci/libpci.o:(.got2+0x84): undefined reference to `ide_bus_offset'

Switch arch/powerpc/lib/board.c to call initialise_w83c553f() not on a
per-board base, but when a WINBOND_83C553 in enabled in a
configuration (like BAB7xx), and disable it in the boards that had
this set so far.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Yusdi Santoso <yusdi_santoso@adaptec.com>
Cc: Jim Thompson <jim@musenki.com>
Acked-by: Stefan Roese <sr@denx.de>
13 years agoIDS8247: remove redundant flash.c file
Wolfgang Denk [Tue, 23 Nov 2010 23:00:16 +0000 (00:00 +0100)]
IDS8247: remove redundant flash.c file

The IDS8247 board is configured to use the CFI flash driver, so drop
the now redundant custom flash.c file.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years agoe1000: fix compile warning
Wolfgang Denk [Mon, 22 Nov 2010 08:48:45 +0000 (09:48 +0100)]
e1000: fix compile warning

Get rid of compiler warning:
e1000.c: In function 'e1000_transmit':
e1000.c:5028: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years agobarco: drop unsupported board configuration
Wolfgang Denk [Tue, 23 Nov 2010 12:45:46 +0000 (13:45 +0100)]
barco: drop unsupported board configuration

The barco board appears to be unmaintained since it was added about 5
years ago. The environment location has probably never been correct.
Drop it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Marc Leeman <marc.leeman@barco.com>
Acked-by: Stefan Roese <sr@denx.de>
13 years agoERIC: drop unsupported board configuration
Wolfgang Denk [Sun, 21 Nov 2010 19:40:23 +0000 (20:40 +0100)]
ERIC: drop unsupported board configuration

The ERIC board appears to be unmaintained for more than 9 years. The
environment location has probably never been correct, and has been
definitely broken since for at least a year.  Drop it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Swen Anderson <sand@peppercon.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years agoMerge branch 'master' of /home/wd/git/u-boot/custodians
Wolfgang Denk [Fri, 26 Nov 2010 20:52:52 +0000 (21:52 +0100)]
Merge branch 'master' of /home/wd/git/u-boot/custodians

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Wolfgang Denk [Fri, 26 Nov 2010 20:52:30 +0000 (21:52 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Fri, 26 Nov 2010 20:33:14 +0000 (21:33 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

13 years agousb: Remove usb_dev_init() from ehci-ppc4xx.c
Stefan Roese [Fri, 26 Nov 2010 14:43:44 +0000 (15:43 +0100)]
usb: Remove usb_dev_init() from ehci-ppc4xx.c

Calling usb_dev_init() from within the EHCI host driver is wrong.
The EHCI host driver should have no dependency/interconnection to the
USB device driver.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
13 years agousb: Clear CMD_RUN while issuing CMD_RESET in ehci_reset()
Stefan Roese [Fri, 26 Nov 2010 14:44:00 +0000 (15:44 +0100)]
usb: Clear CMD_RUN while issuing CMD_RESET in ehci_reset()

This patch fixes a problem noticed on lwmon5 (PPC440EPx) using the
common EHCI driver, when "usb reset" is issued multiple times.
Upon the 2nd (and further) "usb reset" command, the command fails
with the following messages:

=> usb reset
(Re)start USB...
USB:   Register 1111 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 5 USB Device(s) found
       scanning bus for storage devices... 2 Storage Device(s) found
=> usb reset
(Re)start USB...
USB:   EHCI fail to reset
Error, couldn't init Lowlevel part

This patch fixes this problem. Now "usb reset" can be called multiple
times.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
13 years agoarm1176: bugfix: fix start.S for ELF relocation
Albert Aribaud [Fri, 26 Nov 2010 18:42:10 +0000 (19:42 +0100)]
arm1176: bugfix: fix start.S for ELF relocation

The start.S file was only half-rewritten for ELF relocations.
This bugfix completes the rewrite.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
13 years agoarm: add ELF relocation support to rest of cpus
Albert Aribaud [Thu, 25 Nov 2010 21:45:02 +0000 (22:45 +0100)]
arm: add ELF relocation support to rest of cpus

bulk addition of ELF relocation support to ARM cpus
arm946es, arm720t,arm920t, arm925t, arm_intcm, ixp,
lh7a40x, s3c44b0, and sa1100.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
13 years agousb: Add WATCHDOG_RESET call to polling loop
Stefan Roese [Fri, 26 Nov 2010 14:43:28 +0000 (15:43 +0100)]
usb: Add WATCHDOG_RESET call to polling loop

This watchdog reset call is needed here, otherwise the lwmon5 board
(PPC440EPx based) will reset upon the "usb reset" command.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
13 years agousb: fix for USB_ST_STALLED status reporting in ehci_submit_async()
Anatolij Gustschin [Tue, 2 Nov 2010 10:47:29 +0000 (11:47 +0100)]
usb: fix for USB_ST_STALLED status reporting in ehci_submit_async()

Checking the status field of the qTD token in the current code
do not take into acount cases where endpoint stall (halted) bit
is set together with XactErr status bit. As a result clearing
stall on an endpoint won't be done if this status bit was also
set. Check for halted bit and report USB_ST_STALLED status
if the host controller also indicates endpoit stall condition.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agoSeagate FreeAgent DockStar support
Eric Cooper [Wed, 24 Nov 2010 11:41:32 +0000 (17:11 +0530)]
Seagate FreeAgent DockStar support

start with sheevaplug configuration
add modifications by Alexander Holler <holler@ahsoftware.de>
    change RAM definitions to one bank (128 MB)
    change ident string and prompt
define MTD partitions and default environment variables
add support for LEDs

Signed-off-by: Eric Cooper <ecc@cmu.edu>
13 years agoFix NAND booting make target
Stefan Roese [Wed, 24 Nov 2010 06:12:55 +0000 (07:12 +0100)]
Fix NAND booting make target

Without this fix, the NAND_SPL target (in nand_spl/) is not built
at all for those boards defining NAND_U_BOOT=y in boards.cfg.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
14 years agoBlackfin: tweak objects specified before embedded environment
Mike Frysinger [Sat, 20 Nov 2010 00:28:56 +0000 (19:28 -0500)]
Blackfin: tweak objects specified before embedded environment

The partial linking patch changes how objects are specified to the linker
and breaks boards with an embedded environment.  So we need to tweak the
list of objects we specify via the linker script that go in the gap before
the embedded env to work with this new behavior.  This fixes linker errors
for all the boards in question.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: drop initcode.o from combined object
Mike Frysinger [Sat, 20 Nov 2010 00:17:53 +0000 (19:17 -0500)]
Blackfin: drop initcode.o from combined object

We explicitly link in the initcode.o in the Blackfin linker script, so
there is no need to merge it into the main common object for the linker
to pull in itself.  This also fixes duplicate symbol errors with the new
partial linking logic.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoDaVinci: remove bogus DEF_BOOTM definition
Wolfgang Denk [Fri, 19 Nov 2010 20:24:45 +0000 (15:24 -0500)]
DaVinci: remove bogus DEF_BOOTM definition

Some boar config files defined DEF_BOOTM but this was not used
anywhere in the code.  Remove this bogus define.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
14 years agoDA850 EVM: passing maximum clock rate information to kernel
Sekhar Nori [Fri, 19 Nov 2010 16:39:48 +0000 (11:39 -0500)]
DA850 EVM: passing maximum clock rate information to kernel

The TI DA850/OMAP-L138/AM18x EVM can be populated with devices
having different maximum allowed CPU clock rating.

The maximum clock the chip can support can only be determined from
the label on the package (not software readable).

Introduce a method to pass the maximum allowed clock rate information
to kernel using ATAG_REVISION. The kernel uses this information to
determine the maximum cpu clock rate reachable using cpufreq.

Note that U-Boot itself does not set the CPU clock rate. The CPU
clock is setup by a primary bootloader ("UBL"). The rate setup by
UBL could be different from the maximum clock rate supported by the
device.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
14 years agoDA850 EVM: add information regarding DA850 in README.davinci
Sekhar Nori [Fri, 19 Nov 2010 16:39:46 +0000 (11:39 -0500)]
DA850 EVM: add information regarding DA850 in README.davinci

The README.davinci in documentation folder is missing information
regarding DA850 which is a supported DaVinci device.

Add this information.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
14 years agoOMAP4: Panda: Disable CMD_NFS
Steve Sakoman [Fri, 19 Nov 2010 16:29:16 +0000 (11:29 -0500)]
OMAP4: Panda: Disable CMD_NFS

This patch fixes the Panda build after commit 6d8962e814c15807dd6ac5757904be2a02d187b8
by explicitly disabling CMD_NFS

>From the commit message for "Switch from archive libraries to partial linking":

This commit reveals board configurations that exclude some features but
include source files that depend these disabled features in the build,
resulting in undefined symbols.  Known such cases include:

- disabling CMD_NET but not CMD_NFS;
- enabling CONFIG_OF_LIBFDT but not CONFIG_QE.

Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
14 years agoOMAP3: pandora: update config for production
Grazvydas Ignotas [Fri, 19 Nov 2010 16:25:36 +0000 (11:25 -0500)]
OMAP3: pandora: update config for production

Update pandora's config so that it can boot production kernels from NAND.
This enables UBI, USB, sets up NAND layout and default boot command.
It also expands malloc area so that UBI works.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
14 years agoOMAP3: remove unused config macros
Grazvydas Ignotas [Thu, 29 Apr 2010 14:19:13 +0000 (17:19 +0300)]
OMAP3: remove unused config macros

Most OMAP3 boards have various flash related macros in their configs
that are either not referenced anywhere in the code or are used by
drivers that are not enabled. Remove them.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
14 years agoOMAP3: pandora: fix relocation and init memory
Grazvydas Ignotas [Fri, 19 Nov 2010 16:25:31 +0000 (11:25 -0500)]
OMAP3: pandora: fix relocation and init memory

map

Fix the build breakage introduced by the recent relocation
and memory layout changes for ARM.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
14 years agoomap4: board: change global data pointer to file scope
Nishanth Menon [Fri, 19 Nov 2010 16:19:40 +0000 (11:19 -0500)]
omap4: board: change global data pointer to file scope

DECLARE_GLOBAL_DATA_PTR is currently defined within the scope
of function while it is a global pointer. Change the scope of
definition to replicate it's global scope. This seems to help
gcc 4.5 optimizations as well.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
14 years agommc: omap: timeout counter fix
Nishanth Menon [Fri, 19 Nov 2010 16:18:12 +0000 (11:18 -0500)]
mmc: omap: timeout counter fix

Having a loop with a counter is no timing guarentee for timing
accuracy or compiler optimizations. For e.g. the same loop counter
which runs when the MPU is running at 600MHz will timeout in around
half the time when running at 1GHz. or the example where GCC 4.5
compiles with different optimization compared to GCC 4.4. use timer
to keep track of time elapse and we use an emperical number - 1sec
for a worst case timeout.  This should never happen, and is adequate
imaginary condition for us to fail with timeout.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
14 years agoda830: fixup ARM relocation support
Nick Thompson [Fri, 19 Nov 2010 16:14:50 +0000 (11:14 -0500)]
da830: fixup ARM relocation support

Fixes build breakage in da830evm after commit
97003756249bd790910417eb66f0039bbf06a02c "da8xx: fixup ARM
relocation support"

The da8xx fixup commit changed da830/da850 common code to make
relocation work in da850, but didn't add the required defines
to da830evm_config.h resulting in build failure in the common code.

This patch adds those defines for da830, but makes no sense without
also referring to the commit mentioned above.

Signed-off-by: Nick Thompson <nick.thompson@ge.com>
Reviewed-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
14 years agoMerge branch 'master' of /home/wd/git/u-boot/custodians
Wolfgang Denk [Fri, 19 Nov 2010 21:02:48 +0000 (22:02 +0100)]
Merge branch 'master' of /home/wd/git/u-boot/custodians

14 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Wolfgang Denk [Fri, 19 Nov 2010 21:02:40 +0000 (22:02 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

14 years agoMerge branch 'master' of /home/wd/git/u-boot/custodians
Wolfgang Denk [Fri, 19 Nov 2010 21:00:31 +0000 (22:00 +0100)]
Merge branch 'master' of /home/wd/git/u-boot/custodians

14 years agoMerge branch 'master' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Fri, 19 Nov 2010 21:00:28 +0000 (22:00 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-blackfin

14 years agoMerge branch 'master' of /home/wd/git/u-boot/custodians
Wolfgang Denk [Fri, 19 Nov 2010 20:57:17 +0000 (21:57 +0100)]
Merge branch 'master' of /home/wd/git/u-boot/custodians

14 years agoMerge branch 'net' of git://git.denx.de/u-boot-sparc
Wolfgang Denk [Fri, 19 Nov 2010 20:56:56 +0000 (21:56 +0100)]
Merge branch 'net' of git://git.denx.de/u-boot-sparc

14 years agoExclude drivers/qe/fdt.c without CONFIG_QE
Sebastien Carlier [Thu, 18 Nov 2010 11:06:46 +0000 (12:06 +0100)]
Exclude drivers/qe/fdt.c without CONFIG_QE

Previously with archive libraries fdt.o was compiled and included in
qe.a and then discarded by the linker.  With partial linking this
results in unresolved symbols, which this commit fixes.

This commit also cleans up a now-useless conditional in fdt.c.

Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
Tested-by: Wolfgang Denk <wd@denx.de>
14 years agoBlackfin: make sure bss len is multiple of 4 bytes
Mike Frysinger [Mon, 15 Nov 2010 13:16:19 +0000 (08:16 -0500)]
Blackfin: make sure bss len is multiple of 4 bytes

The Blackfin on-chip BootROM requires that fill operations (which is
used for the bss) be aligned to 4 bytes (base addr and total len).
Plus, the Blackfin early init asm code assumes the same thing.  So
rather than making things work for no real gain, make sure the bss
len is padded to 4 bytes in the linker script.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: stick ins/outs funcs into their own .text section
Mike Frysinger [Mon, 15 Nov 2010 11:42:42 +0000 (06:42 -0500)]
Blackfin: stick ins/outs funcs into their own .text section

This lets the linker garbage collect these functions when they aren't
actually used by placing them into the standard .text.<func> section.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoMakefile: Fix build with USE_PRIVATE_LIBGCC
Matthias Weisser [Thu, 18 Nov 2010 08:35:09 +0000 (09:35 +0100)]
Makefile: Fix build with USE_PRIVATE_LIBGCC

If USE_PRIVATE_LIBGCC is set the yes building fails with a missing
libgcc.a As we use partial linking now it is libgcc.o now.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
14 years agoGRETH: removed space in network driver device name.
Daniel Hellstrom [Thu, 21 Oct 2010 13:08:11 +0000 (15:08 +0200)]
GRETH: removed space in network driver device name.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
14 years agoGRETH: fixed 2 decriptor table typos
Daniel Hellstrom [Fri, 22 Oct 2010 09:36:39 +0000 (11:36 +0200)]
GRETH: fixed 2 decriptor table typos

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
14 years agoGRETH: Added extra RESET, this is needed if GRETH was stopped during an ethernet...
Daniel Hellstrom [Fri, 22 Oct 2010 09:34:01 +0000 (11:34 +0200)]
GRETH: Added extra RESET, this is needed if GRETH was stopped during an ethernet frame reception.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
14 years agoGRETH: Added autodetection of PHY address, or let BSP hardcode it.
Daniel Hellstrom [Fri, 22 Oct 2010 09:26:49 +0000 (11:26 +0200)]
GRETH: Added autodetection of PHY address, or let BSP hardcode it.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
14 years agoGRETH: made debug printouts use common debug() macro.
Daniel Hellstrom [Wed, 27 Oct 2010 07:24:13 +0000 (09:24 +0200)]
GRETH: made debug printouts use common debug() macro.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
14 years agoGRETH: removed unneccesary register write and one clean up.
Daniel Hellstrom [Wed, 27 Oct 2010 07:39:46 +0000 (09:39 +0200)]
GRETH: removed unneccesary register write and one clean up.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
14 years agomalloc: Fix issue with calloc memory possibly being non-zero
Kumar Gala [Tue, 16 Nov 2010 00:41:43 +0000 (18:41 -0600)]
malloc: Fix issue with calloc memory possibly being non-zero

Since we set #define MORECORE_CLEARS 1, the code assumes 'sbrk' always
returns zero'd out memory.  However since its possible that free()
returns memory back to sbrk() via malloc_trim we could possible get
non-zero'd memory from sbrk().  This is a problem for when code might
call calloc() and expect the memory to have been zero'd out.

There are two possible solutions to this problem.
1. change #define MORECORE_CLEARS 0
2. memset to zero memory returned to sbrk.

We go with the second since the sbrk being called to free up memory
should be pretty rare.

The following code problems an example test to show the issue.  This
test code was inserted right after the call to mem_malloc_init().

...
       u8 *p2;
       int i;

       printf("MALLOC TEST\n");
       p1 = malloc(135176);
       printf("P1 = %p\n", p1);
       memset(p1, 0xab, 135176);

       free(p1);
       p2 = calloc(4097, 1);
       printf("P2 = %p %p\n", p2, p2 + 4097);

       for (i = 0; i < 4097; i++) {
       if (p2[i] != 0)
       printf("miscompare at byte %d got %x\n", i, p2[i]);

       free(p2);
       printf("END MALLOC TEST\n\n");
...

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Tested-by: Wolfgang Denk <wd@denx.de>
14 years agonet: e1000: typo using wrong argument to sizeof
Matthew McClintock [Tue, 16 Nov 2010 00:02:53 +0000 (18:02 -0600)]
net: e1000: typo using wrong argument to sizeof

Typo from 4b29bdb0ed08412d225a8be94f61fc6c37a59dd5

Signed-off-by: Matthew McClintock <msm@freescale.com>
14 years agoSwitch from archive libraries to partial linking
Sebastien Carlier [Fri, 5 Nov 2010 14:48:07 +0000 (15:48 +0100)]
Switch from archive libraries to partial linking

Before this commit, weak symbols were not overridden by non-weak symbols
found in archive libraries when linking with recent versions of
binutils.  As stated in the System V ABI, "the link editor does not
extract archive members to resolve undefined weak symbols".

This commit changes all Makefiles to use partial linking (ld -r) instead
of creating library archives, which forces all symbols to participate in
linking, allowing non-weak symbols to override weak symbols as intended.
This approach is also used by Linux, from which the gmake function
cmd_link_o_target (defined in config.mk and used in all Makefiles) is
inspired.

The name of each former library archive is preserved except for
extensions which change from ".a" to ".o".  This commit updates
references accordingly where needed, in particular in some linker
scripts.

This commit reveals board configurations that exclude some features but
include source files that depend these disabled features in the build,
resulting in undefined symbols.  Known such cases include:
- disabling CMD_NET but not CMD_NFS;
- enabling CONFIG_OF_LIBFDT but not CONFIG_QE.

Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
14 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Wed, 17 Nov 2010 19:54:39 +0000 (20:54 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

14 years agotx25: fix linker file for newer ld support
Albert Aribaud [Mon, 15 Nov 2010 20:46:04 +0000 (21:46 +0100)]
tx25: fix linker file for newer ld support

older ld emitted all ELF relocations in input sections named
.rel.dyn, whereas newer ld uses names of the form .rel*. The
linker script only collected .rel.dyn input sections. Rewrite
to collect all .rel* input sections.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
14 years agoARM: fix linker file for newer ld support
Albert Aribaud [Mon, 15 Nov 2010 20:46:03 +0000 (21:46 +0100)]
ARM: fix linker file for newer ld support

older ld emitted all ELF relocations in input sections named
.rel.dyn, whereas newer ld uses names of the form .rel*. The
linker script only collected .rel.dyn input sections. Rewrite
to collect all .rel* input sections.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
14 years agopost, i2c: add missing curly bracket in i2c_post_test
Heiko Schocher [Mon, 15 Nov 2010 07:20:39 +0000 (08:20 +0100)]
post, i2c: add missing curly bracket in i2c_post_test

If CONFIG_SYS_POST_I2C_ADDRS is not defined and CONFIG_SYS_POST_I2C
is activated, i2c_probe() is not called in the for statement,
because missing curly bracket.

Signed-off-by: Heiko Schocher <hs@denx.de>
14 years agoi2c, mpc5xxx: add multibus support
Heiko Schocher [Wed, 10 Nov 2010 07:57:55 +0000 (08:57 +0100)]
i2c, mpc5xxx: add multibus support

Tested on upcoming hydra (mpc5200 based) board.

Signed-off-by: Heiko Schocher <hs@denx.de>
14 years agoNet: clarify board/cpu_eth_init calls
Ben Warren [Wed, 1 Sep 2010 06:05:04 +0000 (23:05 -0700)]
Net: clarify board/cpu_eth_init calls

This has always been confusing, and the idea of these functions returning the
number of interfaces initialized was half-baked and ultimately pointless.
Instead, act more like regular functions and return < 0 on failure, >= 0 on
success.

This change shouldn't break anything.

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
14 years agoMakefile: move include for config.mk up
François Revol [Sat, 30 Oct 2010 15:42:00 +0000 (17:42 +0200)]
Makefile: move include for config.mk up

Reorder including config.mk before the HOSTCC check, so HOSTCC is
actually defined when checking for it.

Signed-off-by: François Revol <revol@free.fr>
Cleaned up commit message
Signed-off-by: Wolfgang Denk <wd@denx.de>
14 years agoMAKEALL: Do a sanity check on user-supplied arguments
Peter Tyser [Fri, 29 Oct 2010 22:59:06 +0000 (17:59 -0500)]
MAKEALL: Do a sanity check on user-supplied arguments

Add a check to make sure that the user's arguments actually find a board
in boards.cfg.  Previously, if a user misspelled an argument the
argument would be discarded without warning.  For example, running
'MAKEALL -c 85xx' with the intention of compiling all Freescale 85xx
boards would instead silently discard the '-c 85xx' argument since the
proper cpu name is 'mpc85xx' and then proceed to compile all PowerPC
boards (MAKEALL's default).

Also fix an unrelated typo.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
14 years agopci: Use intelligent indentation for CONFIG_PCI_SCAN_SHOW
Peter Tyser [Fri, 29 Oct 2010 22:59:29 +0000 (17:59 -0500)]
pci: Use intelligent indentation for CONFIG_PCI_SCAN_SHOW

When CONFIG_PCI_SCAN_SHOW is defined U-Boot prints out PCI devices as
they are found during bootup, eg:
  PCIE1: connected as Root Complex
        01:00.0 - 10b5:8518 - Bridge device
        02:01.0 - 10b5:8518 - Bridge device
        03:00.0 - 10b5:8112 - Bridge device
        04:01.0 - 8086:1010 - Network controller
        04:01.1 - 8086:1010 - Network controller
        02:02.0 - 10b5:8518 - Bridge device
        02:03.0 - 10b5:8518 - Bridge device
        06:00.0 - 10b5:8518 - Bridge device
        07:00.0 - 10b5:8518 - Bridge device
        08:00.0 - 1957:0040 - Processor
        07:01.0 - 10b5:8518 - Bridge device
        09:00.0 - 10b5:8112 - Bridge device
        07:02.0 - 10b5:8518 - Bridge device
  PCIE1: Bus 00 - 0b
  PCIE2: connected as Root Complex
        0d:00.0 - 1957:0040 - Processor
  PCIE2: Bus 0c - 0d

This information is useful, but its difficult to determine the PCI bus
topology.  To things clearer, we can use indention to make it more
obvious how the PCI bus is organized.  For the example above, the
updated output with this change is:

  PCIE1: connected as Root Complex
    01:00.0     - 10b5:8518 - Bridge device
     02:01.0    - 10b5:8518 - Bridge device
      03:00.0   - 10b5:8112 - Bridge device
       04:01.0  - 8086:1010 - Network controller
       04:01.1  - 8086:1010 - Network controller
     02:02.0    - 10b5:8518 - Bridge device
     02:03.0    - 10b5:8518 - Bridge device
      06:00.0   - 10b5:8518 - Bridge device
       07:00.0  - 10b5:8518 - Bridge device
        08:00.0 - 1957:0040 - Processor
       07:01.0  - 10b5:8518 - Bridge device
        09:00.0 - 10b5:8112 - Bridge device
       07:02.0  - 10b5:8518 - Bridge device
  PCIE1: Bus 00 - 0b
  PCIE2: connected as Root Complex
    0d:00.0     - 1957:0040 - Processor
  PCIE2: Bus 0c - 0d

In the examples above, an MPC8640 is connected to a PEX8518 PCIe switch
(01:00 and 02:0x), which is connected to another PEX8518 PCIe switch
(06:00 and 07:0x), which then connects to a MPC8572 processor (08:00).
Also, the MPC8640's PEX8518 PCIe switch is connected to a PCI ethernet
card (04:01) via a PEX8112 PCIe-to-PCI bridge (03:00).

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
14 years agopci: Fix ordering of devices when CONFIG_PCI_SCAN_SHOW
Peter Tyser [Fri, 29 Oct 2010 22:59:28 +0000 (17:59 -0500)]
pci: Fix ordering of devices when CONFIG_PCI_SCAN_SHOW

Move the printing of PCI device information to before the PCI device is
configured.  This prevents the case where recursive scanning results in
the deepest devices being printed first.

This change also makes PCI lockups during enumeration easier to
diagnose since the device that is being configured is printed out prior
to configuration.  Previously, it was not possible to determine which
device caused the PCI lockup.

Original example:
  PCIE1: connected as Root Complex
        04:01.0 - 8086:1010 - Network controller
        04:01.1 - 8086:1010 - Network controller
        03:00.0 - 10b5:8112 - Bridge device
        02:01.0 - 10b5:8518 - Bridge device
        02:02.0 - 10b5:8518 - Bridge device
        08:00.0 - 1957:0040 - Processor
        07:00.0 - 10b5:8518 - Bridge device
        09:00.0 - 10b5:8112 - Bridge device
        07:01.0 - 10b5:8518 - Bridge device
        07:02.0 - 10b5:8518 - Bridge device
        06:00.0 - 10b5:8518 - Bridge device
        02:03.0 - 10b5:8518 - Bridge device
        01:00.0 - 10b5:8518 - Bridge device
  PCIE1: Bus 00 - 0b

Updated example:
  PCIE1: connected as Root Complex
        01:00.0 - 10b5:8518 - Bridge device
        02:01.0 - 10b5:8518 - Bridge device
        03:00.0 - 10b5:8112 - Bridge device
        04:01.0 - 8086:1010 - Network controller
        04:01.1 - 8086:1010 - Network controller
        02:02.0 - 10b5:8518 - Bridge device
        02:03.0 - 10b5:8518 - Bridge device
        06:00.0 - 10b5:8518 - Bridge device
        07:00.0 - 10b5:8518 - Bridge device
        08:00.0 - 1957:0040 - Processor
        07:01.0 - 10b5:8518 - Bridge device
        09:00.0 - 10b5:8112 - Bridge device
        07:02.0 - 10b5:8518 - Bridge device
  PCIE1: Bus 00 - 0b

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
14 years agopci: Clean up PCI info when CONFIG_PCI_SCAN_SHOW
Peter Tyser [Fri, 29 Oct 2010 22:59:27 +0000 (17:59 -0500)]
pci: Clean up PCI info when CONFIG_PCI_SCAN_SHOW

This change does the following:
- Removes the printing of the PCI interrupt line value.  This is
  normally set to 0 by U-Boot on bootup and is rarely used during
  everyday operation.

- Prints out the PCI function number of a device.  Previously a device
  with multiple functions would be printed identically 2 times, which is
  generally confusing.  For example, on an Intel 2 port gigabit Ethernet
  card the following was displayed:
    ...
    04  01  8086  1010  0200  00
    04  01  8086  1010  0200  00
    ...

- Prints a text description of each device's PCI class instead of the
  raw PCI class code.  The textual description makes it much easier to
  determine what devices are installed on a PCI bus.

- Changes the general formatting of the PCI device output.

Previous output:
  PCIE1: connected as Root Complex
          04  01  8086  1010  0200  00
          04  01  8086  1010  0200  00
          03  00  10b5  8112  0604  00
          02  01  10b5  8518  0604  00
          02  02  10b5  8518  0604  00
          08  00  1957  0040  0b20  00
          07  00  10b5  8518  0604  00
          09  00  10b5  8112  0604  00
          07  01  10b5  8518  0604  00
          07  02  10b5  8518  0604  00
          06  00  10b5  8518  0604  00
          02  03  10b5  8518  0604  00
          01  00  10b5  8518  0604  00
  PCIE1: Bus 00 - 0b
  PCIE2: connected as Root Complex
          0d  00  1957  0040  0b20  00
  PCIE2: Bus 0c - 0d

Updated output:
  PCIE1: connected as Root Complex
          04:01.0 - 8086:1010 - Network controller
          04:01.1 - 8086:1010 - Network controller
          03:00.0 - 10b5:8112 - Bridge device
          02:01.0 - 10b5:8518 - Bridge device
          02:02.0 - 10b5:8518 - Bridge device
          08:00.0 - 1957:0040 - Processor
          07:00.0 - 10b5:8518 - Bridge device
          09:00.0 - 10b5:8112 - Bridge device
          07:01.0 - 10b5:8518 - Bridge device
          07:02.0 - 10b5:8518 - Bridge device
          06:00.0 - 10b5:8518 - Bridge device
          02:03.0 - 10b5:8518 - Bridge device
          01:00.0 - 10b5:8518 - Bridge device
  PCIE1: Bus 00 - 0b
  PCIE2: connected as Root Complex
          0d:00.0 - 1957:0040 - Processor
  PCIE2: Bus 0c - 0d

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
14 years agofsl_pci_init: Quiet scanning printf()
Peter Tyser [Fri, 29 Oct 2010 22:59:26 +0000 (17:59 -0500)]
fsl_pci_init: Quiet scanning printf()

The "Scanning PCI bus X" message doesn't provide any real useful
information, so remove it.

Original output:
  PCIE1: connected as Root Complex
             Scanning PCI bus 01
          04  01  8086  1010  0200  00
          04  01  8086  1010  0200  00
          03  00  10b5  8112  0604  00
          02  01  10b5  8518  0604  00
          02  02  10b5  8518  0604  00
          08  00  1957  0040  0b20  00
          07  00  10b5  8518  0604  00
          09  00  10b5  8112  0604  00
          07  01  10b5  8518  0604  00
          07  02  10b5  8518  0604  00
          06  00  10b5  8518  0604  00
          02  03  10b5  8518  0604  00
          01  00  10b5  8518  0604  00
  PCIE1: Bus 00 - 0b
  PCIE2: connected as Root Complex
             Scanning PCI bus 0d
          0d  00  1957  0040  0b20  00
  PCIE2: Bus 0c - 0d

Updated output:
  PCIE1: connected as Root Complex
          04  01  8086  1010  0200  00
          04  01  8086  1010  0200  00
          03  00  10b5  8112  0604  00
          02  01  10b5  8518  0604  00
          02  02  10b5  8518  0604  00
          08  00  1957  0040  0b20  00
          07  00  10b5  8518  0604  00
          09  00  10b5  8112  0604  00
          07  01  10b5  8518  0604  00
          07  02  10b5  8518  0604  00
          06  00  10b5  8518  0604  00
          02  03  10b5  8518  0604  00
          01  00  10b5  8518  0604  00
  PCIE1: Bus 00 - 0b
  PCIE2: connected as Root Complex
          0d  00  1957  0040  0b20  00
  PCIE2: Bus 0c - 0d

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
CC: galak@kernel.crashing.org