]> git.sur5r.net Git - u-boot/log
u-boot
13 years agoAdd mdio command for new PHY infrastructure
Andy Fleming [Mon, 21 Mar 2011 23:03:22 +0000 (18:03 -0500)]
Add mdio command for new PHY infrastructure

The new mdio command doesn't have all of the features of the mii
command, but it provides the necessary read/write primitives, and allows
users to interact with 10G PHYs, and other PHYs which use Clause 45 of
802.3.  This means that the mdio command requires a "Device Address"
argument, though for clause 22 PHYs, the argument can be "-".

Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agofsl: Change fsl_phy_enet_if to phy_interface_t
Andy Fleming [Wed, 13 Apr 2011 05:37:12 +0000 (00:37 -0500)]
fsl: Change fsl_phy_enet_if to phy_interface_t

The fsl_phy_enet_if enum was, essentially, the phy_interface_t enum.
This meant that drivers which used fsl_phy_enet_if to deal with
PHY interfaces would have to convert between the two (or we would have
to have them mirror each other, and deal with the ensuing maintenance
headache). Instead, we switch all clients of fsl_phy_enet_if over to
phy_interface_t, which should become the standard, anyway.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agotsec: Convert tsec to use PHY Lib
Andy Fleming [Fri, 8 Apr 2011 07:10:54 +0000 (02:10 -0500)]
tsec: Convert tsec to use PHY Lib

This converts tsec to use the new PHY Lib.  All of the old PHY support
is ripped out.  The old MDIO driver is split off, and placed in
fsl_mdio.c.  The initialization is modified to initialize the MDIO
driver as well.  The powerpc config file is modified to configure PHYLIB
if TSEC_ENET is configured.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agophylib: Add a bunch of PHY drivers from tsec
Andy Fleming [Fri, 8 Apr 2011 02:56:05 +0000 (21:56 -0500)]
phylib: Add a bunch of PHY drivers from tsec

The tsec driver had a bunch of PHY drivers already written. This
converts them all into PHY Lib drivers, and serves as the first
set of PHY drivers for PHY Lib.

While doing that, cleaned up a number of magic numbers (though
not all of them, as PHY vendors like to keep their numbers as
magical as possible).  Also, noticed that almost all of the
vitesse/cicada PHYs had the same config/parse/startup functions,
so those have been collapsed into one.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoCreate PHY Lib for U-Boot
Andy Fleming [Fri, 8 Apr 2011 07:10:27 +0000 (02:10 -0500)]
Create PHY Lib for U-Boot

Extends the mii_dev structure to participate in a full-blown MDIO and
PHY driver scheme.  The mii_dev structure and miiphy calls are modified
in such a way to allow the original mii command and miiphy
infrastructure to work as before, but also to support a new set of APIs
which allow (among other things) sharing of PHY driver code and 10G support

The mii command will continue to support normal PHY management functions
(Clause 22 of 802.3), but will not be changed to support 10G
(Clause 45).

The basic design is similar to PHY Lib from Linux, but simplified for
U-Boot's network and driver infrastructure.

We now have MDIO drivers and PHY drivers

An MDIO driver provides:
read
write
reset

A PHY driver provides:
(optionally): probe
config - initial setup, starting of auto-negotiation
startup - waiting for AN, and reading link state
shutdown - any cleanup needed

The ethernet drivers interact with the PHY Lib using these functions:
phy_connect()
phy_config()
phy_startup()
phy_shutdown()

Each PHY driver can be configured separately, or all at once using
config_phylib_all_drivers.h (added in the patch which adds the drivers)

We also provide generic drivers for Clause 22 (10/100/1000), and
Clause 45 (10G) PHYs.

We also implement phy_reset(), and call it in phy_connect(). Because
phy_reset() is essentially the same as miiphy_reset, but:
a) must support 10G PHYs, and
b) should use the phylib primitives,

we implement miiphy_reset, using phy_reset(), but only when
CONFIG_PHYLIB is set. Otherwise, we just use the old version. In this
way, we save on compile size, even if we don't manage to save code size.

Pulled ethtool.h and mdio.h from:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
782d640afd15af7a1faf01cfe566ca4ac511319d
With many, many deletions so as to enable compilation under u-boot

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agomiiphy: Fix some formatting issues
Andy Fleming [Thu, 7 Apr 2011 19:38:35 +0000 (14:38 -0500)]
miiphy: Fix some formatting issues

Mostly putting a space between function name and "(", and
doing return (foo)

Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoRemove instances of phy_read/write
Andy Fleming [Wed, 23 Mar 2011 03:49:13 +0000 (22:49 -0500)]
Remove instances of phy_read/write

There were a few files which were already using phy_read and phy_write
for their PHY function names.  It's only a few places, and the name
seems most appropriate for the high-level abstraction, so let's
rename the other versions to something more specific.

Also, uec_phy.c had a marvell_init function which I renamed to not
conflict with the one in marvell.c

Lastly, uec_phy.c was putting a space between the phy writing
function names, and the open paren, so I fixed that

Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agotsec: arrange the code to avoid useless function declaration
Mingkai Hu [Thu, 27 Jan 2011 04:52:46 +0000 (12:52 +0800)]
tsec: arrange the code to avoid useless function declaration

This is merely a rearrangement.  No changes to the code, except
to remove now-useless declarations.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agotsec: use IO accessors for IO accesses
Mingkai Hu [Thu, 27 Jan 2011 04:52:45 +0000 (12:52 +0800)]
tsec: use IO accessors for IO accesses

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoMAINTAINERS: fix email address case
Fabio Estevam [Mon, 21 Feb 2011 18:02:07 +0000 (15:02 -0300)]
MAINTAINERS: fix email address case

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoFix bad padding of bootp request packet
Simon Glass [Wed, 2 Feb 2011 23:03:28 +0000 (15:03 -0800)]
Fix bad padding of bootp request packet

This seems to pad to one byte longer than required

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoMerge branch 'sf' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Wed, 13 Apr 2011 20:04:11 +0000 (22:04 +0200)]
Merge branch 'sf' of git://git.denx.de/u-boot-blackfin

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Wolfgang Denk [Wed, 13 Apr 2011 19:53:09 +0000 (21:53 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

13 years agocfi_flash: Fix CONFIG_SYS_FLASH_AUTOPROTECT_LIST usage
Peter Tyser [Wed, 13 Apr 2011 16:46:56 +0000 (11:46 -0500)]
cfi_flash: Fix CONFIG_SYS_FLASH_AUTOPROTECT_LIST usage

Commit 6ee1416e8184b4d9ebe6087d396a60bcecf3551c (mtd, cfi: introduce
void flash_protect_default(void)) introduced a bug which resulted in
boards that define CONFIG_SYS_FLASH_AUTOPROTECT_LIST not compiling with
the the following errors and warning:
  ptyser@petert u-boot $ make -s xpedite520x
  Configuring for xpedite520x board...
  cfi_flash.c: In function 'flash_protect_default':
  cfi_flash.c:2118: error: 'i' undeclared (first use in this function)
  cfi_flash.c:2118: error: (Each undeclared identifier is reported only once
  cfi_flash.c:2118: error: for each function it appears in.)
  cfi_flash.c:2118: error: 'apl' undeclared (first use in this function)
  cfi_flash.c:2118: error: invalid application of 'sizeof' to incomplete type 'struct apl_s'
  cfi_flash.c: In function 'flash_init':
  cfi_flash.c:2137: warning: unused variable 'apl'

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Reported-by: Kumar Gala <galak@kernel.crashing.org>
Cc: Heiko Schocher <hs@denx.de>
13 years agosf: sst: add support for SST25VF064C
James Kosin [Wed, 13 Apr 2011 19:12:18 +0000 (15:12 -0400)]
sf: sst: add support for SST25VF064C

Signed-off-by: James Kosin <jkosin@intcomgrp.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Graeme Russ [Wed, 13 Apr 2011 09:56:23 +0000 (19:56 +1000)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

13 years agox86: Update MAINTAINERS and delete README files
Graeme Russ [Wed, 13 Apr 2011 09:43:30 +0000 (19:43 +1000)]
x86: Update MAINTAINERS and delete README files

The README files are totally out-of-date to the point where they do more
harm than good

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
13 years agosc520: Move reset to stand-alone file
Graeme Russ [Wed, 13 Apr 2011 09:43:29 +0000 (19:43 +1000)]
sc520: Move reset to stand-alone file

Partial linking allows weak functions to be overridden in files containing
only one function. Moving the sc520 override of reset_cpu gets rid of an
ugly #ifdef

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
13 years agox86: Rename i386 to x86
Graeme Russ [Wed, 13 Apr 2011 09:43:28 +0000 (19:43 +1000)]
x86: Rename i386 to x86

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
13 years agox86: Code cleanup
Graeme Russ [Wed, 13 Apr 2011 09:43:26 +0000 (19:43 +1000)]
x86: Code cleanup

Make the copyright notices in the x86 files consistent and update them with
proper attributions for recent updates

Also fix a few comment style/accuracy and whitespace/blank line issues

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
13 years agoeNET: Remove config.mk
Graeme Russ [Wed, 13 Apr 2011 09:43:25 +0000 (19:43 +1000)]
eNET: Remove config.mk

By including <config.h> in the ld script, CONFIG_SYS_MONITOR_LEN (defined
in the boards config file) can be used in lieu of FLASH_SIZE (defined in
the board specific config.mk)

As this is the last remaining entry in the board specific config.mk, this
file can now be removed

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
13 years agoeNET: Fix saveenv crash
Graeme Russ [Wed, 13 Apr 2011 09:43:24 +0000 (19:43 +1000)]
eNET: Fix saveenv crash

CONFIG_ENV_SIZE = CONFIG_ENV_SECT_SIZE = 128kB but CONFIG_SYS_STACK_SIZE
is only 32kB resulting in saveenv causing a stack overflow and crashing
U-Boot. Resolve by reducing CONFIG_ENV_SIZE to 4kB

Also fix up CONFIG_SYS_MALLOC_LEN to correctly use environment sector
size and add some comments to the memory organisation configuration

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
13 years agodisk/part.c: fix potential stack overflow bug
Lei Wen [Tue, 15 Feb 2011 08:56:40 +0000 (16:56 +0800)]
disk/part.c: fix potential stack overflow bug

If the param pass to get_dev is not the one defined in the block_drvr,
it could make uboot becomes unstable, for it would continue run after
search complete the block_drvr table.

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agoAdd support for dataflash to U-boot environment settings tool.
Remy Bohmer [Sat, 12 Feb 2011 18:06:26 +0000 (19:06 +0100)]
Add support for dataflash to U-boot environment settings tool.

* The sector size for SPI-dataflash (like AT45 flashes) are not always
  a power-of-2. So, the sector calculations are rewritten such that it
  works for either power-of-2 as any size sectors.
* Make the flash sector size optional in case it is the same value as
  the environment size.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
13 years agomkimage: add "-V" option to print version information
Wolfgang Denk [Sat, 12 Feb 2011 09:37:11 +0000 (10:37 +0100)]
mkimage: add "-V" option to print version information

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoftwdt010_wdt: move header to include/faraday and enhance
Macpaul Lin [Tue, 12 Apr 2011 05:04:02 +0000 (13:04 +0800)]
ftwdt010_wdt: move header to include/faraday and enhance

1. Move header to include/faraday
2. Fix include path in ftwdt010_wdt.c
3. Fix function prototype and declaration to
  - ftwdt010_wdt_settimeout
  - ftwdt010_wdt_reset
  - ftwdt010_wdt_disable
4. Add "#if definde (CONFIG_HW_WATCHDOG)" let user have flexibilty
  to choose which better to his product.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
13 years agocommon/cmd_bdinfo.c: fix do_bdinfo() for AVR32
Andreas Bießmann [Wed, 9 Feb 2011 14:10:31 +0000 (15:10 +0100)]
common/cmd_bdinfo.c: fix do_bdinfo() for AVR32

This patch fixes following warning message:

---8<---
cmd_bdinfo.c:458: warning: initialization from incompatible pointer type
--->8---

There was a prototype change in 54841ab50c20d6fa6c9cc3eb826989da3a22d934 for
argv[] pointer type to const. This change was not made for AVR32 cause this
code came in later by a merge.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
13 years agocmd_nvedit: use explicit typecast for printf
Andreas Bießmann [Wed, 9 Feb 2011 14:10:29 +0000 (15:10 +0100)]
cmd_nvedit: use explicit typecast for printf

This patch fixes warnings in MAKEALL for avr32:

---8<---
cmd_nvedit.c: In function 'do_env_export':
cmd_nvedit.c:663: warning: format '%zX' expects type 'size_t', but argument 3 has type 'ssize_t'
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
13 years agoMake STANDALONE_LOAD_ADDR configurable per board
Wolfgang Denk [Fri, 4 Feb 2011 13:25:17 +0000 (14:25 +0100)]
Make STANDALONE_LOAD_ADDR configurable per board

Rename STANDALONE_LOAD_ADDR into CONFIG_STANDALONE_LOAD_ADDR
and allow that the architecture-specific default value gets
overwritten by defining the value in the board header file.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Cc: Tsi Chung Liew <tsi-chung.liew@freescale.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
13 years agoDrop config.h include in tools/imximage.h
Loïc Minier [Thu, 3 Feb 2011 14:07:01 +0000 (15:07 +0100)]
Drop config.h include in tools/imximage.h

"make tools-all" should allow building tools such as mkimage and the new
imximage without any config, but imximage.c currently fails to build
with:
imximage.h:27:20: error: config.h: No such file or directory

config.h is not needed in imximage.h nor in imximage.c, and imximage.h
is only included from imximage.c, so drop this include to fix the build.

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
13 years agoFix misc spelling errors found by lintian
Loïc Minier [Thu, 3 Feb 2011 21:04:26 +0000 (22:04 +0100)]
Fix misc spelling errors found by lintian

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
13 years agoFix gunzip to work for any gziped uImage size
Catalin Radu [Fri, 4 Feb 2011 12:35:47 +0000 (14:35 +0200)]
Fix gunzip to work for any gziped uImage size

Signed-off-by: Catalin Radu <Catalin@VirtualMetrix.com>
13 years agoFix min/max macros in include/common.h
Aaron Williams [Tue, 1 Feb 2011 03:55:50 +0000 (19:55 -0800)]
Fix min/max macros in include/common.h

There is a bug in the min and max macros in common.h which occurs if
Y is a larger type than X. For example, if Y is a 64-bit value and X
is a 32-bit value then Y will be truncated to 32-bits.  This fix
matches what is done in the Linux kernel but without the additional
type checking present in the kernel version.

Signed-off-by: Aaron Williams <aaron.williams@caviumnetworks.com>
13 years agocmd_sf: use cmd_usage() in more places
Mike Frysinger [Tue, 12 Apr 2011 06:21:31 +0000 (02:21 -0400)]
cmd_sf: use cmd_usage() in more places

Requires a little reworking of the code flow with sub-functions, but
not a big deal.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agocmd_sf: drop device status message when probing
Mike Frysinger [Tue, 12 Apr 2011 06:10:19 +0000 (02:10 -0400)]
cmd_sf: drop device status message when probing

The common spi flash layer displays useful info when probing, so no
need for us to duplicate that.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: use print_size() for sector_size output
Mike Frysinger [Tue, 12 Apr 2011 06:09:28 +0000 (02:09 -0400)]
sf: use print_size() for sector_size output

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agocmd_sf: add handler for +len arg for erase command
Richard Retanubun [Wed, 16 Feb 2011 21:39:44 +0000 (16:39 -0500)]
cmd_sf: add handler for +len arg for erase command

This patch adds [+]len handler for the erase command that will
automatically round up the requested erase length to the flash's
sector_size.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: localize erase funcs
Mike Frysinger [Tue, 12 Apr 2011 05:51:29 +0000 (01:51 -0400)]
sf: localize erase funcs

No need for these to be exported as they are only accessed indirectly
via function pointers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: sst: setup read func
Mike Frysinger [Tue, 12 Apr 2011 05:34:55 +0000 (01:34 -0400)]
sf: sst: setup read func

The previous unification patch missed setting up the sst read func.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: add struct spi_flash.sector_size parameter
Richard Retanubun [Wed, 16 Feb 2011 21:37:22 +0000 (16:37 -0500)]
sf: add struct spi_flash.sector_size parameter

This patch adds a new member to struct spi_flash (u16 sector_size)
and updates the spi flash drivers to start populating it.

This parameter can be used by spi flash commands that need to round
up units of operation to the flash's sector_size.

Having this number in one place also allows duplicated code to be
further collapsed into one common location (such as erase parameter
and the detected message).

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: atmel: undo unification of status polling
Mike Frysinger [Tue, 12 Apr 2011 03:39:28 +0000 (23:39 -0400)]
sf: atmel: undo unification of status polling

The AT45 flashes are completely different (at the command set and
status register level) from all other SPI flashes, so we can't unify
their logic with common code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: punt unused spi_flash_region struct
Mike Frysinger [Mon, 27 Dec 2010 03:31:18 +0000 (22:31 -0500)]
sf: punt unused spi_flash_region struct

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoftwdt010_wdt: support faraday ftwdt010 watchdog
Macpaul Lin [Wed, 26 Jan 2011 10:46:28 +0000 (18:46 +0800)]
ftwdt010_wdt: support faraday ftwdt010 watchdog

Faraday ftwdt010 watchdog is an architecture independant
watchdog. It is usually used in SoC chip design.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agomp2usb: remove board support
Eric Bénard [Tue, 25 Jan 2011 22:31:23 +0000 (23:31 +0100)]
mp2usb: remove board support

this board was cancelled long time ago so remove it as it won't
be maintained anymore

Signed-off-by: Eric Bénard <eric@eukrea.com>
13 years agoppc, mgcoge: add DIP switch detection
Andreas Huber [Tue, 25 Jan 2011 10:26:15 +0000 (11:26 +0100)]
ppc, mgcoge: add DIP switch detection

This reads the DIP switch on mgcoge. The DIP switch is connected to
the BFTICU (0x40000089) FPGA. If the DIP switch is set the environment
variable 'actual_bank' is set to 0 and starts the SW in bank0.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
13 years agoarm, keymile: remove unneeded code
Holger Brunck [Tue, 25 Jan 2011 08:57:19 +0000 (09:57 +0100)]
arm, keymile: remove unneeded code

On first HW versions the BOCO FPGA was behind a MUX device. These
HW versions are not supported anymore. And therefore this code can
be removed, it is already unused.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
13 years agoNet: Add Intel E1000 82574L PCIe card support
Roy Zang [Fri, 21 Jan 2011 03:29:38 +0000 (11:29 +0800)]
Net: Add Intel E1000 82574L PCIe card support

Add Intel E1000 82574L PCIe card support. Test on MPC8544DS
and MPC8572 board.
Add the missing contact information for future support.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
13 years agoPowerPC: Add support for -msingle-pic-base
Joakim Tjernlund [Mon, 6 Dec 2010 17:35:37 +0000 (18:35 +0100)]
PowerPC: Add support for -msingle-pic-base

-msingle-pic-base is a new gcc option for ppc and
it reduces the size of my u-boot with 6-8 KB.
While at it, add -fno-jump-tables too to save a
few more bytes.

-msingle-pic-base will be in gcc 4.6, however
backported patches are available at
http://bugs.gentoo.org/show_bug.cgi?id=347281

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
13 years agoPowerPC: Move -fPIC flag to common place
Joakim Tjernlund [Mon, 6 Dec 2010 13:36:46 +0000 (14:36 +0100)]
PowerPC: Move -fPIC flag to common place

The -fPIC flag belongs with -mrelocatable, move it there.
Also change -fPIC to -fpic as this produces smaller
binaries.
However, currently -mrelocatable promotes -fpic to -fPIC, a
fix for this is in upcoming gcc 4.6 or you can apply this small
patch to gcc:

diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 8da8410..e4b8280 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -227,7 +227,8 @@ do { \
     } \
  \
   else if (TARGET_RELOCATABLE) \
-    flag_pic = 2; \
+    if (!flag_pic) \
+      flag_pic = 2; \
 } while (0)

 #ifndef RS6000_BI_ARCH
--

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
13 years agoea20: fix undefined PHY_* errors
Ben Gardiner [Tue, 11 Jan 2011 19:48:17 +0000 (14:48 -0500)]
ea20: fix undefined PHY_* errors

This patch fixes ea20 after 8ef583a0351590a91394499eb5ca2ab8a703d959 where
the u-boot custom PHY_ macros were replaced with those of linux/mii.h MII_
definitions except in the RMII support for davinci_emac. Probably also due to
the merge path of changes in 2010.12.

Signed-off-by: Ben Gardiner<bengardiner@nanometrics.ca>
CC: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agoea20: fix libea20.o not found
Ben Gardiner [Tue, 11 Jan 2011 19:48:16 +0000 (14:48 -0500)]
ea20: fix libea20.o not found

This patch fixes ea20 after commit 6d8962e814c15807dd6ac5757904be2a02d187b8
where $(obj)lib$(BOARD).a was changed to $(obj)lib$(BOARD).o in almost all the
Makefiles except ea20, probably due to merge path of the changes in 2010.12.

Signed-off-by: Ben Gardiner<bengardiner@nanometrics.ca>
CC: Sebastien Carlier <sebastien.carlier@gmail.com>
Acked-by : Stefano Babic <sbabic@denx.de>

13 years agobootm: replace blob_start with image_start
Lei Wen [Mon, 10 Jan 2011 10:21:15 +0000 (18:21 +0800)]
bootm: replace blob_start with image_start

For uImage always has a 64 bytes header, we couldn't expect to do
the xip from the header but should xip from the image start.

The latter logic in that section is also move the image from image_start
to the load address, so sync this logic to the xip operation.

Signed-off-by: Lei Wen <leiwen@marvell.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: unify read functions
Mike Frysinger [Mon, 10 Jan 2011 07:20:14 +0000 (02:20 -0500)]
sf: unify read functions

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: unify erase functions
Mike Frysinger [Mon, 10 Jan 2011 07:20:13 +0000 (02:20 -0500)]
sf: unify erase functions

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: unify status polling for ready bit
Mike Frysinger [Mon, 10 Jan 2011 07:20:12 +0000 (02:20 -0500)]
sf: unify status polling for ready bit

All of the spi flash drivers implement the status register polling for
detecting the device ready state, so unify them all in a new helper
function -- spi_flash_wait_ready.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: unify read/write helpers
Mike Frysinger [Mon, 10 Jan 2011 07:20:11 +0000 (02:20 -0500)]
sf: unify read/write helpers

These functions largely do the same exact thing, so unify them all
into one basic function.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Wolfgang Denk [Sun, 10 Apr 2011 19:24:40 +0000 (21:24 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

13 years agoMerge branch 'next' of git://git.denx.de/u-boot-nios
Wolfgang Denk [Sun, 10 Apr 2011 19:20:28 +0000 (21:20 +0200)]
Merge branch 'next' of git://git.denx.de/u-boot-nios

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Sun, 10 Apr 2011 19:06:27 +0000 (21:06 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-blackfin

13 years agopowerpc/85xx: Removed clearing of L2-as-SRAM
Fabian Cenedese [Mon, 14 Feb 2011 11:59:33 +0000 (12:59 +0100)]
powerpc/85xx: Removed clearing of L2-as-SRAM

Removed clearing of L2 cache as SRAM as it is not necessary without ECC.
This also speeds up the booting process.

Signed-off-by: Fabian Cenedese <cenedese@indel.ch>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agofsl_esdhc: Deal with watermark level register related changes
Priyanka Jain [Wed, 9 Feb 2011 03:54:10 +0000 (09:24 +0530)]
fsl_esdhc: Deal with watermark level register related changes

P1010 and P1014 has v2.3 version of FSL eSDHC controller in which watermark
level register description has been changed:

9-15 bits represent WR_WML[0:6], Max value = 128 represented by 0x00
25-31 bits represent RD_WML[0:6], Max value = 128 represented by 0x00

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Poonam Aggrwal <Poonam.Aggrwal@freescale.com>
Tested-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Add PBL boot from SPI flash support on P4080DS
Shaohui Xie [Wed, 16 Mar 2011 02:10:32 +0000 (10:10 +0800)]
powerpc/85xx: Add PBL boot from SPI flash support on P4080DS

PBL(pre-boot loader): SPI flash used as RCW(Reset Configuration Word) and
PBI(pre-boot initialization) source, CPC(CoreNet Platform Cache) used as
1M SRAM where PBL will copy whole U-BOOT image to, U-boot can boot from
CPC after PBL completes RCW and PBI phases.

Signed-off-by: Chunhe Lan <b25806@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Shaohui Xie <b21989@freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Update default hwconfig on P1022DS
Jiang Yutang [Thu, 24 Feb 2011 08:11:55 +0000 (16:11 +0800)]
powerpc/85xx: Update default hwconfig on P1022DS

Set default configuration to have SDHC controller enabled,
AUDIO enabled(codec clock sources is 12MHz) and disable TDM.

Signed-off-by: Jiang Yutang <b14898@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Add support usb2/etsec and tdm/audio pin multiplex on P1022DS
Jiang Yutang [Fri, 4 Mar 2011 02:25:54 +0000 (10:25 +0800)]
powerpc/85xx: Add support usb2/etsec and tdm/audio pin multiplex on P1022DS

For soc which have pin multiplex relation, some of them can't enable
simultaneously. This patch add environment var 'hwconfig' content
defination for them. you can enable some one function by setting
environment var 'hwconfig' content and reset board. Detail setting
please refer doc/README.p1022ds

Signed-off-by: Jiang Yutang <b14898@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Enable support for ATI graphics cards on P1022DS
Jiang Yutang [Mon, 24 Jan 2011 10:21:19 +0000 (18:21 +0800)]
powerpc/85xx: Enable support for ATI graphics cards on P1022DS

Make the support for ATI graphics cards mutually exclusive with DIU.

Signed-off-by: Jiang Yutang <b14898@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agop4080ds: remove rev1-specific code for the SERDES8 erratum
Timur Tabi [Fri, 25 Mar 2011 20:10:00 +0000 (15:10 -0500)]
p4080ds: remove rev1-specific code for the SERDES8 erratum

Remove the SERDES8 erratum work-around code that only applied to P4080
rev1, which is not supported by this version of U-Boot.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agop4080ds: add README.p4080ds which documents the "serdes" hwconfig option
Timur Tabi [Fri, 25 Mar 2011 19:11:48 +0000 (14:11 -0500)]
p4080ds: add README.p4080ds which documents the "serdes" hwconfig option

Add documentation for the "serdes" hwconfig option, which is used to
specify the status of SerDes banks two and three for the SERDES8 erratum
work-around.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Drop CONFIG_VIDEO support on corenet_ds boards
Kumar Gala [Fri, 8 Apr 2011 07:46:39 +0000 (02:46 -0500)]
powerpc/85xx: Drop CONFIG_VIDEO support on corenet_ds boards

We don't really ever use Video cards on corenet_ds style boards and its
bloating our image which is close the its max size.  Drop support and
also kill some defines for non-PNP PCI which we never use.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agonios2: reset cfi flash before reading env
Thomas Chou [Tue, 18 Jan 2011 03:13:56 +0000 (11:13 +0800)]
nios2: reset cfi flash before reading env

Flash might be in unknown state when u-boot is started with jtag.
And got wrong env data. So reset it in board early init.

We cannot use generic cfi flash routines, because flash_init() is
not run yet.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
13 years agopowerpc/85xx: rename NAND prefixes to CONFIG_SYS
Matthew McClintock [Tue, 5 Apr 2011 19:39:33 +0000 (14:39 -0500)]
powerpc/85xx: rename NAND prefixes to CONFIG_SYS

renaming 85xx define CONFIG_NAND_OR_PRELIM to CONFIG_SYS_NAND_OR_PRELIM
and CONFIG_NAND_BR_PRELIM to CONFIG_SYS_NAND_BR_PRELIM to use the more
appropriate CONFIG_SYS prefix as well as be consistent with 83xx.

Signed-off-by: Matthew McClintock <msm@freescale.com>
cc: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agoeNET: Fix undefined reference to `monitor_flash_len'
Graeme Russ [Mon, 4 Apr 2011 05:18:59 +0000 (15:18 +1000)]
eNET: Fix undefined reference to `monitor_flash_len'

commit cfbe861506e2dc3250ac99dc45bb3d1ac60f4857 removed the definition of
monitor_flash_len from the eNET which was not picked up due to extensive
use of the SRAM configuration target for testing

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
13 years agoBlackfin: bf526-ezbrd: get MAC from flash
Mike Frysinger [Thu, 17 Mar 2011 21:32:51 +0000 (17:32 -0400)]
Blackfin: bf526-ezbrd: get MAC from flash

The MAC address is stored in the last flash sector rather than OTP.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf518f-ezbrd: get MAC from flash
Mike Frysinger [Thu, 17 Mar 2011 21:14:14 +0000 (17:14 -0400)]
Blackfin: bf518f-ezbrd: get MAC from flash

The MAC address is stored in the last flash sector rather than OTP.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf548-ezkit: move env sector
Mike Frysinger [Thu, 17 Mar 2011 21:07:47 +0000 (17:07 -0400)]
Blackfin: bf548-ezkit: move env sector

U-Boot itself takes up more than 0x40000 bytes, so we can't use that
sector for the environment.  Move it down a page.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: replace "bfin_reset_or_hang()" with "panic()"
Kyle Moffett [Mon, 7 Mar 2011 17:37:30 +0000 (12:37 -0500)]
Blackfin: replace "bfin_reset_or_hang()" with "panic()"

The bfin_reset_or_hang function unnecessarily duplicates the panic()
logic based on CONFIG_PANIC_HANG.

This patch deletes 20 lines of code and just calls panic() instead.
This also makes the following generic-restart conversion patch simpler.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: adi boards: enable CONFIG_MONITOR_IS_IN_RAM
Mike Frysinger [Mon, 10 Jan 2011 05:19:47 +0000 (00:19 -0500)]
Blackfin: adi boards: enable CONFIG_MONITOR_IS_IN_RAM

Our monitor is always in RAM, so enable this define for the CFI layer.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bfin_sdh: add support for multiblock operations
Sonic Zhang [Thu, 30 Dec 2010 08:38:00 +0000 (08:38 +0000)]
Blackfin: bfin_sdh: add support for multiblock operations

Don't forget to count full data size for the multiblock operation request.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bfin_sdh: set all timer bits before transfer
Cliff Cai [Mon, 7 Dec 2009 06:12:11 +0000 (06:12 +0000)]
Blackfin: bfin_sdh: set all timer bits before transfer

The timer register is 32bits, not 16bit, so 0xFFFF won't fill it.
Write out -1 to make sure to fill the whole thing.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: adi boards: enable ldrinfo
Mike Frysinger [Sun, 26 Dec 2010 17:35:21 +0000 (12:35 -0500)]
Blackfin: adi boards: enable ldrinfo

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: ldrinfo: new command
Mike Frysinger [Sun, 26 Dec 2010 17:34:49 +0000 (12:34 -0500)]
Blackfin: ldrinfo: new command

Simple command to decode/check an LDR image before we try to boot it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bootldr: use common defines
Mike Frysinger [Sun, 26 Dec 2010 17:34:08 +0000 (12:34 -0500)]
Blackfin: bootldr: use common defines

Now that the common bootrom.h sets up defines for us, switch to them
rather than our own local set.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bootrom.h: sync with toolchain
Mike Frysinger [Sun, 26 Dec 2010 17:33:35 +0000 (12:33 -0500)]
Blackfin: bootrom.h: sync with toolchain

We need the updated LDR bit defines for our LDR utils.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: adi boards: drop old ELF define
Mike Frysinger [Sun, 26 Dec 2010 17:26:09 +0000 (12:26 -0500)]
Blackfin: adi boards: drop old ELF define

This define isn't used anywhere anymore, so punt it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf506f-ezkit: new board port
Mike Frysinger [Fri, 17 Dec 2010 20:28:43 +0000 (15:28 -0500)]
Blackfin: bf506f-ezkit: new board port

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: default to L1 bank A when L1 bank B does not exist
Mike Frysinger [Sat, 25 Dec 2010 00:31:55 +0000 (19:31 -0500)]
Blackfin: default to L1 bank A when L1 bank B does not exist

Some parts lack Bank B in L1 data, so have the linker script fall back to
Bank A when that happens.  This way we can still leverage L1 data.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: turn off caches when self initializing
Mike Frysinger [Fri, 24 Dec 2010 19:46:12 +0000 (14:46 -0500)]
Blackfin: turn off caches when self initializing

When bootstrapping ourselves on the fly at runtime (via "go"), we need to
turn off the caches to avoid taking software exceptions.  Since caches
need CPLBs and CPLBs need exception handlers, but we're about to rewrite
the code in memory where those exception handlers live, we need to turn
off caches first.

This new code also encourages a slight code optimization by storing the
MMR bases in dedicated registers so we don't have to fully load up the
pointer regs multiple times.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: only check for os log when we have external memory
Mike Frysinger [Fri, 24 Dec 2010 18:19:25 +0000 (13:19 -0500)]
Blackfin: only check for os log when we have external memory

If the part has no external memory configured, then there will be no os
log for us to check, and any attempt to access that memory will trigger
hardware errors.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: BF537: unify duplicated headers
Mike Frysinger [Fri, 24 Dec 2010 23:28:31 +0000 (18:28 -0500)]
Blackfin: BF537: unify duplicated headers

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: BF52x: unify duplicated headers
Mike Frysinger [Fri, 24 Dec 2010 23:28:27 +0000 (18:28 -0500)]
Blackfin: BF52x: unify duplicated headers

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: drop duplicate system mmr and L1 scratch defines
Mike Frysinger [Fri, 24 Dec 2010 23:21:53 +0000 (18:21 -0500)]
Blackfin: drop duplicate system mmr and L1 scratch defines

Common code already takes care of setting up these defines when a port
hasn't specified them, so punt the duplicate values.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: BF50x: new processor port
Mike Frysinger [Fri, 17 Dec 2010 20:25:09 +0000 (15:25 -0500)]
Blackfin: BF50x: new processor port

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: fix bd_t handling
Mike Frysinger [Fri, 24 Dec 2010 17:48:16 +0000 (12:48 -0500)]
Blackfin: fix bd_t handling

The recent global data changes (making the size autogenerated) broke the
board info handling on Blackfin ports as we were lying and lumping the
bd_t size in with the gd_t size.  So use the new dedicated bd_t size to
setup its own address in memory.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf561-ezkit/ibf-dsp561: invert env offset/addr logic
Mike Frysinger [Thu, 23 Dec 2010 23:07:01 +0000 (18:07 -0500)]
Blackfin: bf561-ezkit/ibf-dsp561: invert env offset/addr logic

Have CONFIG_ENV_ADDR be based on CONFIG_ENV_OFFSET rather than the other
way around so that we can use CONFIG_ENV_OFFSET during build.  It also
avoids a little address duplication.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf537: fix L1 data defines
Mike Frysinger [Thu, 23 Dec 2010 20:30:14 +0000 (15:30 -0500)]
Blackfin: bf537: fix L1 data defines

The __BFIN_DEF_ADSP_BF537_proc__ define isn't setup anymore, so use
the one coming from the compiler.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf537-minotaur/bf537-srv1: undefine nfs when net is disabled
Mike Frysinger [Thu, 23 Dec 2010 04:26:08 +0000 (23:26 -0500)]
Blackfin: bf537-minotaur/bf537-srv1: undefine nfs when net is disabled

Fixes a build error due to new partial linking logic.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: serial: clean up muxing a bit
Mike Frysinger [Fri, 17 Dec 2010 21:23:59 +0000 (16:23 -0500)]
Blackfin: serial: clean up muxing a bit

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf525-ucr2: new board port
Chong Huang [Tue, 30 Nov 2010 08:36:23 +0000 (03:36 -0500)]
Blackfin: bf525-ucr2: new board port

Signed-off-by: Chong Huang <chuang@ucrobotics.com>
Signed-off-by: Haitao Zhang <minipanda@linuxrobot.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: dnp5370: new board port
Andreas Schallenberg [Wed, 17 Nov 2010 18:51:33 +0000 (13:51 -0500)]
Blackfin: dnp5370: new board port

Info about the hardware can be found here:
http://www.dilnetpc.com/dnp0086.htm

Signed-off-by: Andreas Schallenberg <Andreas.Schallenberg@3alitydigital.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf537-pnav/blackstamp/blackvme: drop empty config.mk files
Mike Frysinger [Thu, 23 Dec 2010 20:04:55 +0000 (15:04 -0500)]
Blackfin: bf537-pnav/blackstamp/blackvme: drop empty config.mk files

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf527-sdp: update custom CFLAGS paths
Mike Frysinger [Thu, 23 Dec 2010 20:03:53 +0000 (15:03 -0500)]
Blackfin: bf527-sdp: update custom CFLAGS paths

Looks like the filesystem shuffling missed the SDP board.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>