oweals/u-boot.git
15 years agoBlackfin: add hack for crappy m25p80
Mike Frysinger [Sun, 12 Oct 2008 02:50:10 +0000 (22:50 -0400)]
Blackfin: add hack for crappy m25p80

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf537-stamp: increase monitor size
Mike Frysinger [Thu, 22 Jan 2009 01:47:12 +0000 (20:47 -0500)]
Blackfin: bf537-stamp: increase monitor size

The new jffs2 code pushed the code size just over the limit, so increase
the limit a bit more.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf537-stamp: bump default SCLK up to 125MHz
Mike Frysinger [Mon, 8 Dec 2008 21:16:11 +0000 (16:16 -0500)]
Blackfin: bf537-stamp: bump default SCLK up to 125MHz

Since all of the bf537-stamp and bf537-ezkit boards out there can handle it,
increase the speed of SCLK to 125MHz rather than 100MHz.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf537-stamp: rewrite MAC-in-flash handling
Mike Frysinger [Sun, 12 Oct 2008 02:44:14 +0000 (22:44 -0400)]
Blackfin: bf537-stamp: rewrite MAC-in-flash handling

Use the common net eth functions to setup the env/global data with the MAC
address, and properly handle the case where CONFIG_SYS_NO_FLASH is defined.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: add clkin_hz= to default kernel command line for ADI boards
Mike Frysinger [Tue, 9 Dec 2008 18:47:39 +0000 (13:47 -0500)]
Blackfin: add clkin_hz= to default kernel command line for ADI boards

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf533-stamp: bump up default clocks
Mike Frysinger [Mon, 13 Oct 2008 03:49:13 +0000 (23:49 -0400)]
Blackfin: bf533-stamp: bump up default clocks

Since the hardware can handle it, bump the default clocks from 80mhz SCLK
and 398mhz CCLK to 100mhz SCLK and 498mhz CCLK.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf533-stamp: rewrite startup LED notifications
Mike Frysinger [Sun, 12 Oct 2008 02:40:22 +0000 (22:40 -0400)]
Blackfin: bf533-stamp: rewrite startup LED notifications

Again, don't clobber pins that we aren't actually using, and use the common
LED framework rather than our own hob-job-but-not-really-working.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: unify common ADI board settings
Mike Frysinger [Sun, 1 Jun 2008 13:09:48 +0000 (09:09 -0400)]
Blackfin: unify common ADI board settings

Rather than duplicate the same ADI settings in every ADI board, create a
common ADI config header and have all ADI boards start using that.  This
will also make merging the ~10 boards I have to forward port a lot easier.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: put memory into self-refresh before/after programming clocks
Mike Frysinger [Sun, 12 Oct 2008 01:58:33 +0000 (21:58 -0400)]
Blackfin: put memory into self-refresh before/after programming clocks

When initializing the core clocks, stick external memory into self-refresh.
This gains us a few cool things:
 - support suspend-to-RAM with Linux
 - reprogram clocks automatically when doing "go" on u-boot.bin in RAM
 - make sure settings are stable before flashing new version
 - finally fully unify initialize startup code path between LDR/non-LDR

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: do not program voltage regulator on parts that do not have one
Mike Frysinger [Sun, 12 Oct 2008 01:56:08 +0000 (21:56 -0400)]
Blackfin: do not program voltage regulator on parts that do not have one

Some newer Blackfins (like the BF51x) do not have an on-chip voltage
regulator, so do not attempt to program the memory as if it does.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: setup a sane default EBIU_SDBCTL for SDRAM controllers
Mike Frysinger [Sun, 1 Jun 2008 05:28:24 +0000 (01:28 -0400)]
Blackfin: setup a sane default EBIU_SDBCTL for SDRAM controllers

If the board config does not specify an explicit EBIU_SDBCTL value, set it
up with sane values based on other configuration options.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: handle reboot anomaly 432
Mike Frysinger [Sat, 6 Dec 2008 23:06:58 +0000 (18:06 -0500)]
Blackfin: handle reboot anomaly 432

Workaround anomaly 432:
The bfrom_SysControl() firmware function does not clear the SIC_IWR1
register before executing the PLL programming sequence.  Therefore, any
interrupt enabled in the SIC_IWR1 register prior to the call to
bfrom_SysControl() can prematurely terminate the idle sequence required
for the PLL to relock properly. SIC_IWR0 is properly handled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: kill off LDR jump block
Mike Frysinger [Sat, 18 Oct 2008 08:04:49 +0000 (04:04 -0400)]
Blackfin: kill off LDR jump block

The Boot ROM uses EVT1 as the entry point so set that rather than having
to use a tiny jump block in the default EVT1 location.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: simplify symbol_lookup() a bit
Mike Frysinger [Tue, 6 Jan 2009 15:00:48 +0000 (10:00 -0500)]
Blackfin: simplify symbol_lookup() a bit

No need to skip a byte as the symbol table handles this.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: fix SIC_RVECT definition: it is 16bits, not 32bits
Mike Frysinger [Sat, 7 Feb 2009 10:43:21 +0000 (05:43 -0500)]
Blackfin: fix SIC_RVECT definition: it is 16bits, not 32bits

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: drop SPORT_TX read helper macros
Mike Frysinger [Sat, 7 Feb 2009 10:41:17 +0000 (05:41 -0500)]
Blackfin: drop SPORT_TX read helper macros

The SPORT_TX registers cannot be read (the hardware will trigger an error),
so drop the read helper macros.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: unify duplicate CPU port definitions
Mike Frysinger [Sat, 7 Feb 2009 10:25:35 +0000 (05:25 -0500)]
Blackfin: unify duplicate CPU port definitions

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: drop now-unused CONFIG_SYS_BFIN_CMD_XXX
Mike Frysinger [Fri, 6 Feb 2009 05:59:50 +0000 (00:59 -0500)]
Blackfin: drop now-unused CONFIG_SYS_BFIN_CMD_XXX

With the new CONFIG_XXX system and CONFIG_CMD_XXX handling, these defines
are no longer used/needed.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: print out Flash: before checking it
Mike Frysinger [Mon, 6 Oct 2008 08:01:26 +0000 (04:01 -0400)]
Blackfin: print out Flash: before checking it

If there is some problem in the flash init/checking code, it's nicer to see
the message "Flash:" before crashing.  This way the source of the problem
is a bit more straightforward.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: safely flush data caches when in writeback mode
Mike Frysinger [Thu, 7 Aug 2008 19:33:09 +0000 (15:33 -0400)]
Blackfin: safely flush data caches when in writeback mode

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: update lockbox api according to latest documentation
Mike Frysinger [Thu, 7 Aug 2008 17:21:48 +0000 (13:21 -0400)]
Blackfin: update lockbox api according to latest documentation

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: mark bfin_reset static
Mike Frysinger [Sun, 12 Oct 2008 01:49:06 +0000 (21:49 -0400)]
Blackfin: mark bfin_reset static

The function is only used locally, so mark it static.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: spi: there is no PORTJ_FER MMR on BF537
Sonic Zhang [Fri, 20 Mar 2009 23:28:20 +0000 (19:28 -0400)]
Blackfin: spi: there is no PORTJ_FER MMR on BF537

Since the PORTJ on the BF537 is peripheral-only (no GPIO functionality),
then there is no PORTJ_FER register for us to worry about.

Signed-off-by: Sonic Zhang <Sonic.Zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: fix jtag console tstc
Mike Frysinger [Tue, 17 Mar 2009 17:58:23 +0000 (13:58 -0400)]
Blackfin: fix jtag console tstc

The jtag tstc operation was checking the hardware to see if data is
available from it (which is fine for the jtag getc operation), but the
higher layers need to know whether any data is available.  Since we have
to read up to 4 bytes at a time from the hardware, the higher layers need
to know they can consume the cached bytes as well.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: bf537-stamp: move CONFIG_POST handling to COBJS-$(...)
Mike Frysinger [Sun, 22 Feb 2009 21:23:41 +0000 (16:23 -0500)]
Blackfin: bf537-stamp: move CONFIG_POST handling to COBJS-$(...)

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: unify net-related init code
Mike Frysinger [Sun, 22 Feb 2009 21:02:27 +0000 (16:02 -0500)]
Blackfin: unify net-related init code

Unify all of the net-related init code in the common Blackfin board init
code to clean up the ifdef mess a bit.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: fix SWRST/SYSCR register sizes
Mike Frysinger [Wed, 18 Feb 2009 17:51:48 +0000 (12:51 -0500)]
Blackfin: fix SWRST/SYSCR register sizes

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoBlackfin: update anomaly lists
Mike Frysinger [Wed, 18 Feb 2009 17:51:31 +0000 (12:51 -0500)]
Blackfin: update anomaly lists

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoMerge branch 'master' of git://git.denx.de/u-boot-avr32
Wolfgang Denk [Mon, 23 Mar 2009 09:41:46 +0000 (10:41 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-avr32

15 years agoMerge branch 'master' of git://git.denx.de/u-boot-cfi-flash
Wolfgang Denk [Mon, 23 Mar 2009 09:29:19 +0000 (10:29 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash

15 years agoMerge branch 'evk1100-prep'
Haavard Skinnemoen [Mon, 23 Mar 2009 09:22:47 +0000 (10:22 +0100)]
Merge branch 'evk1100-prep'

15 years agoMerge branch 'mimc200'
Haavard Skinnemoen [Mon, 23 Mar 2009 09:22:41 +0000 (10:22 +0100)]
Merge branch 'mimc200'

15 years agoavr32: fix cacheflush.h location introducted by d8f2aa3298610b
Jean-Christophe PLAGNIOL-VILLARD [Thu, 19 Mar 2009 17:31:38 +0000 (18:31 +0100)]
avr32: fix cacheflush.h location introducted by d8f2aa3298610b

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
15 years agoMake flash protection work, when the environment is in EEPROM
Eric Schumann [Sat, 21 Mar 2009 13:59:34 +0000 (09:59 -0400)]
Make flash protection work, when the environment is in EEPROM

On the pcm030 the environment is located in the onboard EEPROM. But we want
to handle flash sector protection in a safe manner. So we must read the
unlock environment variable from EEPROM instead from flash.

This patch is required as long the evironment is saved into the EEPROM.

Stefan: Additional change as suggested by Wolfgang, use bigger char array
(instead of 4).

Signed-off-by: Eric Schumann <E.Schumann@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoAdd define for mpc5200 CDM_CLK_ENA
Jon Smirl [Sat, 21 Mar 2009 15:17:56 +0000 (11:17 -0400)]
Add define for mpc5200 CDM_CLK_ENA

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
15 years agoMerge branch 'next' of ../next
Wolfgang Denk [Sat, 21 Mar 2009 21:15:49 +0000 (22:15 +0100)]
Merge branch 'next' of ../next

15 years agoPrepare 2009.03 v2009.03
Wolfgang Denk [Sat, 21 Mar 2009 21:04:41 +0000 (22:04 +0100)]
Prepare 2009.03

Update CHANGELOG

Signed-off-by: Wolfgang Denk <wd@denx.de>
15 years agoReplaced endpoint numbers with appropriate macros in usbtty.c.
Vivek Kutal [Mon, 23 Feb 2009 16:05:11 +0000 (21:35 +0530)]
Replaced endpoint numbers with appropriate macros in usbtty.c.

Signed-off-by: Vivek Kutal <vivek.kutal@azingo.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
15 years agoUBIFS: Missing offset relocation for compressor 'none'
Michael Lawnick [Thu, 19 Mar 2009 09:06:41 +0000 (10:06 +0100)]
UBIFS: Missing offset relocation for compressor 'none'

On systems where U-Boot is linked to another address than it really lays
(e.g. backup image), calls via function pointers must be fixed with a
'+= gd->reloc_off'.
This was not done for none_compr in ubifs_compressors_init() what leads
to system crash on ubifsmount command.

Signed-off-by: Michael Lawnick <ml.lawnick@gmx.de>
Acked-by: Stefan Roese <sr@denx.de>
15 years agoUBIFS: Add UBIFS commands
Stefan Roese [Thu, 19 Mar 2009 14:35:50 +0000 (15:35 +0100)]
UBIFS: Add UBIFS commands

This patchset adds these UBIFS related commands:

- ubifsmount
  Mount an UBIFS volume

- ubifsls
  List a directory of the mounted UBIFS volume

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

Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoUBIFS: Implement read-only UBIFS support in U-Boot
Stefan Roese [Thu, 19 Mar 2009 14:35:05 +0000 (15:35 +0100)]
UBIFS: Implement read-only UBIFS support in U-Boot

The U-Boot UBIFS implementation is largely a direct copy from the current
Linux version (2.6.29-rc6). As already done in the UBI version we have an
"abstraction layer" to redefine or remove some OS calls (e.g. mutex_lock()
...). This makes it possible to use the original Linux code with very
little changes. And by this we can better update to later Linux versions.

I removed some of the Linux features that are not used in the U-Boot
version (e.g. garbage-collection, write support).

Signed-off-by: Stefan Roese <sr@denx.de>
CC: Artem Bityutskiy <dedekind@infradead.org>
CC: Adrian Hunter <ext-Adrian.Hunter@nokia.com>
15 years agoAdd LZO decompressor support
Stefan Roese [Thu, 19 Mar 2009 14:34:56 +0000 (15:34 +0100)]
Add LZO decompressor support

This patch adds LZO decompression support to U-Boot. It is needed for
the upcoming UBIFS support, since UBIFS uses LZO as default compressor/
decompressor. Since we only support read-only in UBIFS, only the
decompressor is needed.

All this is copied with minor changes from the current Linux kernel
version (2.6.28-rc8).

This patch only implements this LZO decompressor support for PPC.
Other platforms using UBIFS will have to add the required
"include/asm/unaligned.h" as well. It should be fairly easy to copy this
from the Linux source tree as I have done it for PPC in this patch.

Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoSeparate mtdparts command from jffs2
Stefan Roese [Thu, 19 Mar 2009 12:30:36 +0000 (13:30 +0100)]
Separate mtdparts command from jffs2

Currently the mtdparts commands are included in the jffs2 command support.
This doesn't make sense anymore since other commands (e.g. UBI) use this
infrastructure as well now. This patch separates the mtdparts commands from
the jffs2 commands making it possible to only select mtdparts when no JFFS2
support is needed.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
15 years agopowerpc: Only use eth_getenv_enetaddr() if networking is enabled
Stefan Roese [Wed, 25 Feb 2009 11:11:15 +0000 (12:11 +0100)]
powerpc: Only use eth_getenv_enetaddr() if networking is enabled

Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoAdd support for the digsy MTC board.
Grzegorz Bernacki [Tue, 17 Mar 2009 09:06:40 +0000 (10:06 +0100)]
Add support for the digsy MTC board.

This is the InterControl custom device based on the MPC5200B chip.

Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
15 years agopowerpc: Fix compilation warning in board.c
Stefan Roese [Mon, 23 Feb 2009 15:52:36 +0000 (16:52 +0100)]
powerpc: Fix compilation warning in board.c

Fix this warning:

board.c: In function 'board_init_r':
board.c:653: warning: unused variable 'i'
board.c:651: warning: unused variable 'e'

Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoppc4xx: Don't write the MAC address into the internal SoC registers
Stefan Roese [Mon, 23 Feb 2009 15:42:51 +0000 (16:42 +0100)]
ppc4xx: Don't write the MAC address into the internal SoC registers

Remove this code. It's not needed. The 4xx EMAC driver stores the MAC
addresses into the SoC registers instead.

Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoppc4xx: Use correct io accessors for esd 405/440 boards
Matthias Fuchs [Fri, 20 Feb 2009 09:19:19 +0000 (10:19 +0100)]
ppc4xx: Use correct io accessors for esd 405/440 boards

This patch replaces in/out8/16/32 macros by in/out_8/_be16/_be32
macros. Also volatile pointer references are replaced by the
new accessors.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoppc4xx: Use correct io accessors for esd 405 boards
Matthias Fuchs [Fri, 20 Feb 2009 09:19:18 +0000 (10:19 +0100)]
ppc4xx: Use correct io accessors for esd 405 boards

This patch replaces in/out8/16/32 macros by in/out_8/_be16/_be32
macros. Also volatile pointer references are replaced by the
new accessors.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoppc4xx: Cleanup linker scripts of esd 4xx boards
Matthias Fuchs [Fri, 20 Feb 2009 09:19:17 +0000 (10:19 +0100)]
ppc4xx: Cleanup linker scripts of esd 4xx boards

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoppc4xx: Update TEXT_BASE for DASA_SIM boards
Matthias Fuchs [Fri, 20 Feb 2009 09:19:16 +0000 (10:19 +0100)]
ppc4xx: Update TEXT_BASE for DASA_SIM boards

Fix building DASA_SIM boards by increasing U-Boot's size in flash.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoppc4xx: DU405 maintenance fix
Matthias Fuchs [Fri, 20 Feb 2009 09:19:15 +0000 (10:19 +0100)]
ppc4xx: DU405 maintenance fix

-strip unused features
-fix resetting phy

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoppc4xx: Abort autoboot only by space key on CPCI405 boards
Matthias Fuchs [Fri, 20 Feb 2009 09:19:14 +0000 (10:19 +0100)]
ppc4xx: Abort autoboot only by space key on CPCI405 boards

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoAdd basic relocation to i386 port
Graeme Russ [Tue, 24 Feb 2009 10:14:56 +0000 (21:14 +1100)]
Add basic relocation to i386 port

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
15 years agoImplement SC520 timers
Graeme Russ [Tue, 24 Feb 2009 10:14:45 +0000 (21:14 +1100)]
Implement SC520 timers

Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
15 years agoFactor out SC520 sub-features
Graeme Russ [Tue, 24 Feb 2009 10:14:32 +0000 (21:14 +1100)]
Factor out SC520 sub-features

Moved sub-features of the SC520 code which is currently selectively compiled
using #ifdef out of sc520.c into individual files selectively compiled via
the makefile

Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
15 years agoRewrite i386 interrupt handling
Graeme Russ [Tue, 24 Feb 2009 10:13:40 +0000 (21:13 +1100)]
Rewrite i386 interrupt handling

Rewrite interrupt handling functionality for the i386 port. Separated
functionality into separate CPU and Architecture components.

It appears as if the i386 interrupt handler functionality was intended
to allow multiple handlers to be installed for a given interrupt.
Unfortunately, this functionality was not fully implemented and also
had the problem that irq_free_handler() does not allow the passing
of the handler function pointer and therefore could never be used to
free specific handlers that had been installed for a given IRQ.

There were also various issues with array bounds not being fully
tested.

I had two objectives in mind for the new implementation:

1) Keep the implementation as similar as possible to existing
   implementations. To that end, I have used the leon2/3
   implementations as the reference

2) Seperate CPU and Architecture specific elements. All specific i386
   interrupt functionality is now in cpu/i386/ with the high level
   API and architecture specific code in lib_i386. Functionality
   specific to the PC/AT architecture (i.e. cascaded i8259 PICs) has
   been further split out into an individual file to allow for the
   implementation of the PIC architecture of the SC520 CPU (supports
   more IRQs)

Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
15 years agoMove ali512x.h
Graeme Russ [Tue, 24 Feb 2009 10:12:35 +0000 (21:12 +1100)]
Move ali512x.h

Moved ali512x.h from include/asm-i386/ic/ to /include

Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
15 years agoRename SC520 Configuration Options
Graeme Russ [Tue, 24 Feb 2009 10:12:20 +0000 (21:12 +1100)]
Rename SC520 Configuration Options

Options are now all uniformly CONFIG_SYS_SC520_<option>

Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
15 years agoFix all linker script to handle all rodata sections
Trent Piepho [Wed, 18 Feb 2009 23:22:05 +0000 (15:22 -0800)]
Fix all linker script to handle all rodata sections

A recent gcc added a new unaligned rodata section called '.rodata.str1.1',
which needs to be added the the linker script.  Instead of just adding this
one section, we use a wildcard ".rodata*" to get all rodata linker section
gcc has now and might add in the future.

However, '*(.rodata*)' by itself will result in sub-optimal section
ordering.  The sections will be sorted by object file, which causes extra
padding between the unaligned rodata.str.1.1 of one object file and the
aligned rodata of the next object file.  This is easy to fix by using the
SORT_BY_ALIGNMENT command.

This patch has not be tested one most of the boards modified.  Some boards
have a linker script that looks something like this:

*(.text)
. = ALIGN(16);
*(.rodata)
*(.rodata.str1.4)
*(.eh_frame)

I change this to:

*(.text)
. = ALIGN(16);
*(.eh_frame)
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))

This means the start of rodata will no longer be 16 bytes aligned.
However, the boundary between text and rodata/eh_frame is still aligned to
16 bytes, which is what I think the real purpose of the ALIGN call is.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
15 years agoremove bi_enet*addr from global data for all arches
Mike Frysinger [Wed, 11 Feb 2009 23:26:08 +0000 (18:26 -0500)]
remove bi_enet*addr from global data for all arches

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Daniel Hellstrom <daniel@gaisler.com>
CC: Michal Simek <monstr@seznam.cz>
CC: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
CC: Scott McNutt <smcnutt@psyent.com>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
15 years agoppc: mark global bi_enet*addr as legacy
Mike Frysinger [Thu, 12 Feb 2009 01:07:19 +0000 (20:07 -0500)]
ppc: mark global bi_enet*addr as legacy

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

In the ppc case, these things are part of the legacy ABI, so keep them
around but mark them as legacy so no new code will touch them.

Also stop calling load_sernum_ethaddr() since all boards now implement
this as a stub.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agoboards: get mac address from env and move load_sernum_ethaddr() to board init
Mike Frysinger [Thu, 12 Feb 2009 01:09:52 +0000 (20:09 -0500)]
boards: get mac address from env and move load_sernum_ethaddr() to board init

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

Rather than have common ppc code call a board-specific function like
load_sernum_ethaddr(), have each board call it in its own board-specific
misc_init_r() function.

The boards that get converted here are:
- kup4k/kup4x
- pcs440ep
- tqm8xx

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Stefan Roese <sr@denx.de>
15 years agocmc_pu2: get mac address from environment
Mike Frysinger [Thu, 12 Feb 2009 00:55:01 +0000 (19:55 -0500)]
cmc_pu2: get mac address from environment

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

Also rename load_sernum_ethaddr() to misc_init_r() so we don't need to
handle this board specially in common ARM code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agoboards: move board_get_enetaddr() into board-specific init
Mike Frysinger [Mon, 16 Feb 2009 23:03:14 +0000 (18:03 -0500)]
boards: move board_get_enetaddr() into board-specific init

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

Rather than have the common ppc code have board-specific hooks, move the
board_get_enetaddr() function into the board-specific init functions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agoarm: get mac address from environment
Mike Frysinger [Thu, 12 Feb 2009 00:39:55 +0000 (19:39 -0500)]
arm: get mac address from environment

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

Some warts are remaining and should be killed off (by moving the func to
the appropriate board init code):
- davinci_eth_set_mac_addr
- cs8900_get_enetaddr
- smc_set_mac_addr

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agonx823: get mac address from environment
Mike Frysinger [Thu, 12 Feb 2009 00:36:20 +0000 (19:36 -0500)]
nx823: get mac address from environment

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

For the nx823, the serial number is moved out of load_sernum_ethaddr() and
into misc_init_r() as is the env setup.  This lets us kill off the former
function in the process.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agolib_*/board.c: do not initialize bi_enet*addr in global data
Mike Frysinger [Wed, 11 Feb 2009 23:27:18 +0000 (18:27 -0500)]
lib_*/board.c: do not initialize bi_enet*addr in global data

Since everyone is using the environment for mac address storage, there is
no point in seeding the global data.

The arches that are converted here:
i386
m68k
microblaze
mips
nios
nios2
sh
sparc

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Daniel Hellstrom <daniel@gaisler.com>
CC: Michal Simek <monstr@seznam.cz>
CC: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
CC: Scott McNutt <smcnutt@psyent.com>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
15 years agonpe: get mac address from environment
Mike Frysinger [Thu, 12 Feb 2009 00:19:54 +0000 (19:19 -0500)]
npe: get mac address from environment

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

The resulting code can also be simplified even further.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Stefan Roese <sr@denx.de>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agocpu/: get mac address from environment
Mike Frysinger [Thu, 12 Feb 2009 00:18:41 +0000 (19:18 -0500)]
cpu/: get mac address from environment

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

The cpus that get converted here:
at91rm9200
mpc512x
mpc5xxx
mpc8260
mpc8xx
ppc4xx

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: John Rigby <jrigby@freescale.com>
CC: Stefan Roese <sr@denx.de>
15 years agolan91c96/smc91111/smc911x: get mac address from environment
Mike Frysinger [Thu, 12 Feb 2009 00:09:54 +0000 (19:09 -0500)]
lan91c96/smc91111/smc911x: get mac address from environment

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

Also, do not bother checking the EEPROM if the env is setup.  This
simplifies the code greatly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Wolfgang Dnek <wd@denx.de>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Rolf Offermanns <rof@sysgo.de>
CC: Erik Stahlman <erik@vt.edu>
CC: Daris A Nevil <dnevil@snmc.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
15 years agosh_eth: get mac address from environment
Mike Frysinger [Thu, 12 Feb 2009 00:14:09 +0000 (19:14 -0500)]
sh_eth: get mac address from environment

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

The sh_eth driver can also be simplified a bit by using enetaddr member of
the eth_device structure.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Carlos Munoz <carlos@kenati.com>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agocs8900: get mac address from environment
Mike Frysinger [Thu, 12 Feb 2009 00:06:09 +0000 (19:06 -0500)]
cs8900: get mac address from environment

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

The cs8900 driver also changes slightly in that the hardware is not
consulted if the mac address in the env is sane.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Marius Groeger <mgroeger@sysgo.de>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agobcm570x: get mac address from environment
Mike Frysinger [Thu, 12 Feb 2009 00:04:25 +0000 (19:04 -0500)]
bcm570x: get mac address from environment

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

Since the address is in the PLM_DEVICE_BLOCK structure already, there is
no need to pass the NodeAddress as a second parameter.  So drop the second
argument to the LM_SetMacAddress() function (and update the tigon3 driver
accordingly).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agodrivers/net/: get mac address from environment
Mike Frysinger [Thu, 12 Feb 2009 00:01:26 +0000 (19:01 -0500)]
drivers/net/: get mac address from environment

The environment is the canonical storage location of the mac address, so
we're killing off the global data location and moving everything to
querying the env directly.

The drivers that get converted here:
3c589
4xx_enet
dc2114x
dm9000x
enc28j60
fsl_mcdmafec
ks8695eth
mcffec
rtl8019
rtl8169
s3c4510b_eth
xilinx_emac
xilinx_emaclite

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Rolf Offermanns <rof@sysgo.de>
CC: Stefan Roese <sr@denx.de>
CC: Sascha Hauer <saschahauer@web.de>
CC: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
CC: Greg Ungerer <greg.ungerer@opengear.com>
CC: Xue Ligong <lgxue@hotmail.com>
CC: Masami Komiya <mkomiya@sonare.it>
CC: Curt Brune <curt@cucy.com>
CC: Michal SIMEK <monstr@monstr.eu>
15 years agoboards: get mac address from environment
Mike Frysinger [Wed, 11 Feb 2009 23:38:38 +0000 (18:38 -0500)]
boards: get mac address from environment

The boards that get converted here to use the environment for the mac
address rather than global data:
debris
mgcoge
mgsuvd
muas3001
netstal
pn62
sixnet
vcma9
xilinx (the ones that use xilinx_enet)

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Sangmoon Kim <dogoil@etinsys.com>
CC: Heiko Schocher <hs@denx.de>
CC: David Mueller <d.mueller@elsoft.ch>
CC: Niklaus Giger <niklaus.giger@netstal.com>
CC: Wolfgang Grandegger <wg@denx.de>
CC: Dave Ellis <DGE@sixnetio.com>
CC: Ricardo Ribalda <ricardo.ribalda@uam.es>
15 years agoAmigaOneG3SE/enet: get mac address from environment
Mike Frysinger [Wed, 11 Feb 2009 23:36:45 +0000 (18:36 -0500)]
AmigaOneG3SE/enet: get mac address from environment

Always use the MAC address that is stored in the environment first before
falling back to the ROM.  This also cuts out any comparison steps: if the
mac in the env is sane, the ROM is never consulted.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Thomas Frieden <ThomasF@hyperion-entertainment.com>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agonvedit: do not update global bi_enetaddr and do not call eth_set_enetaddr()
Mike Frysinger [Wed, 11 Feb 2009 23:52:38 +0000 (18:52 -0500)]
nvedit: do not update global bi_enetaddr and do not call eth_set_enetaddr()

Since the ethernet layer handles updating of device addresses itself from
the environment, there is no point in calling eth_set_enetaddr().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agolynxkdi: get mac address from environment
Mike Frysinger [Wed, 11 Feb 2009 23:54:07 +0000 (18:54 -0500)]
lynxkdi: get mac address from environment

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agobootvx: get mac address from environment
Mike Frysinger [Wed, 11 Feb 2009 23:51:43 +0000 (18:51 -0500)]
bootvx: get mac address from environment

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Niklaus Giger <niklaus.giger@member.fsf.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agobdinfo: get mac address from environment
Mike Frysinger [Wed, 11 Feb 2009 23:50:10 +0000 (18:50 -0500)]
bdinfo: get mac address from environment

Add a new print_eth() function to automate the eth*addr env var acquisition
and display.  Affects all arches.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Scott McNutt <smcnutt@psyent.com>
CC: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
CC: Michal Simek <monstr@seznam.cz>
CC: Daniel Hellstrom <daniel@gaisler.com>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agonet: get mac address from environment and use eth util funcs
Mike Frysinger [Wed, 11 Feb 2009 23:23:48 +0000 (18:23 -0500)]
net: get mac address from environment and use eth util funcs

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agoBlackfin: bfin_mac: force boards to setup the MAC themselves
Mike Frysinger [Mon, 13 Oct 2008 19:06:25 +0000 (15:06 -0400)]
Blackfin: bfin_mac: force boards to setup the MAC themselves

Since the on-chip MAC does not have an eeprom or similar interface, force
all Blackfin boards that use this driver to setup the board data with a
proper MAC.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agodoc/README.enetaddr: document proper MAC usage
Mike Frysinger [Wed, 11 Feb 2009 19:12:34 +0000 (14:12 -0500)]
doc/README.enetaddr: document proper MAC usage

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agonet: new utility functions for working with enetaddr's
Mike Frysinger [Fri, 30 Jan 2009 00:43:44 +0000 (19:43 -0500)]
net: new utility functions for working with enetaddr's

Declare new utility functions for converting between the environment
variables (eth*addr) and the binary MAC address representation.  This way
we can unify all the random places that already do this kind of thing.

The functions in question:
eth_parse_enetaddr - "..." -> {...}
eth_getenv_enetaddr - env -> {...}
eth_setenv_enetaddr - {...} -> env

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agoconvert print_IPaddr() to %pI4
Mike Frysinger [Tue, 17 Feb 2009 05:00:53 +0000 (00:00 -0500)]
convert print_IPaddr() to %pI4

Now that our printf functions support the %pI4 modifier like the kernel,
let's drop the inflexible print_IPaddr() function and covert over to the
%pI4 modifier.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agovsprintf: pull updates from Linux kernel
Mike Frysinger [Tue, 17 Feb 2009 04:21:36 +0000 (23:21 -0500)]
vsprintf: pull updates from Linux kernel

This brings in support for the %p modifier which allows us to easily print
out things like ip addresses, mac addresses, and pointers.

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

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

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years ago.gitignore for generated files in api_examples directory
Jon Smirl [Fri, 20 Mar 2009 03:04:18 +0000 (23:04 -0400)]
.gitignore for generated files in api_examples directory

Add .gitignore for generated files in api_examples directory

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
15 years agonet: sh_eth: Remove sh_eth_reset() from halt function
Nobuhiro Iwamatsu [Wed, 18 Mar 2009 03:27:04 +0000 (12:27 +0900)]
net: sh_eth: Remove sh_eth_reset() from halt function

sh_eth_reset is function to reset Ether IP.
The MAC address is stored in IP, but it is initialized by this function.
OS (e.g. Linux Kernel) can not use this device when initialized.
This revises this problem.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
15 years agoppc4xx: Fix bug in PCI outbound map configuration for canyonlands
Anatolij Gustschin [Fri, 20 Mar 2009 11:45:50 +0000 (12:45 +0100)]
ppc4xx: Fix bug in PCI outbound map configuration for canyonlands

PCI outbound address map configuration doesn't match the
PCI memory address range covered by appropriate TLB entry
configuration for canyonlands causing machine check
exceptions while accessing PCI memory regions. This patch
provides a fix for this issue.

Kazuaki Ichinohe observed and reported this issue while
testing display output with PCI ATI video card on canyonlands.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
15 years agoCFI: geometry reversal for STMicro M29W320DT
Richard Retanubun [Fri, 6 Mar 2009 15:09:37 +0000 (10:09 -0500)]
CFI: geometry reversal for STMicro M29W320DT

Follow up to the flash_fixup_stm to fix geometry reversal
on STMicro M29W320ET flash chip. The M29W320DT has 4 erase region.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Stefan Roese <sr@denx.de>
15 years agosmc911x_eeprom: update register API
Mike Frysinger [Wed, 25 Feb 2009 22:29:40 +0000 (17:29 -0500)]
smc911x_eeprom: update register API

The smc911x driver changed the naming convention for its register funcs,
so update the eeprom code accordingly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
15 years agompc52xx: Get rid of board-specific #ifdef's in cpu/mpc5xxx/ide.c
Grzegorz Bernacki [Tue, 17 Mar 2009 09:06:39 +0000 (10:06 +0100)]
mpc52xx: Get rid of board-specific #ifdef's in cpu/mpc5xxx/ide.c

Total5200 and digsy MTC use I2C port 2 pins as a ATA chip select.
To avoid adding board-specific ifdefs to cpu/mpc5xxx/ide.c new
define CONFIG_SYS_ATA_CS_ON_I2C2 was introduced. It is used by
Total5200 and will be used by digsy MTC and other boards with
ATA CS on I2C pins.

Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
15 years ago8xx: add support for new keymile kmsupx4 board.
Heiko Schocher [Thu, 12 Mar 2009 06:37:34 +0000 (07:37 +0100)]
8xx: add support for new keymile kmsupx4 board.

This patch adds support for the kmsupx4 board from Keymile,
based on a Freescale MPC852T CPU

- serial console on SMC1
- 32 MB SDRAM
- 32 MB NOR Flash
- Ethernet over SCC3
- I2C Bitbang

Signed-off-by: Heiko Schocher <hs@denx.de>
15 years ago8xx, mgsuvd: rename board to a more generic name
Heiko Schocher [Thu, 12 Mar 2009 06:37:28 +0000 (07:37 +0100)]
8xx, mgsuvd: rename board to a more generic name

renaming the "mgsuvd" board port into "km8xx", because
there come more similar boards from keymile.
Compiling the mgsuvd board with "make mgsuvd_config"
remains.

Signed-off-by: Heiko Schocher <hs@denx.de>
15 years ago8xx, mgsuvd: Coding Style cleanup config file
Heiko Schocher [Thu, 12 Mar 2009 06:37:23 +0000 (07:37 +0100)]
8xx, mgsuvd: Coding Style cleanup config file

Signed-off-by: Heiko Schocher <hs@denx.de>
15 years agopowerpc: common updates for keymile boards
Heiko Schocher [Thu, 12 Mar 2009 06:37:18 +0000 (07:37 +0100)]
powerpc: common updates for keymile boards

- added to keymile-common.h:
  - bootcount support
  - COMMAND HISTORY
  - CONFIG_AUTO_COMPLETE
  - CONFIG_SYS_FLASH_PROTECTION
  - JFFS2 support
  - CONFIG_VERSION_VARIABLE
- extracted common I2C settings for all boards
- common default environment settings summarized

Signed-off-by: Heiko Schocher <hs@denx.de>
15 years ago8xx, icache: enabling ICache not before running from RAM
Heiko Schocher [Thu, 12 Mar 2009 06:37:15 +0000 (07:37 +0100)]
8xx, icache: enabling ICache not before running from RAM

with the new CONFIG_SYS_DELAYED_ICACHE config option, ICache
is not enabled before code runs from RAM.

Signed-off-by: Heiko Schocher <hs@denx.de>
15 years ago82xx, mgcoge: fix environment sector size
Heiko Schocher [Thu, 12 Mar 2009 06:37:11 +0000 (07:37 +0100)]
82xx, mgcoge: fix environment sector size

Size of one environment sector is 0x20000.

Signed-off-by: Heiko Schocher <hs@denx.de>
15 years agoNetStar: config reindentation
Ladislav Michl [Mon, 16 Mar 2009 22:27:31 +0000 (23:27 +0100)]
NetStar: config reindentation

Fix indentation broken by symbol renames. "Sort" driver related definitons.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>