oweals/u-boot.git
16 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-fdt
Wolfgang Denk [Wed, 11 Jun 2008 20:30:47 +0000 (22:30 +0200)]
Merge branch 'master' of git://denx.de/git/u-boot-fdt

16 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash
Wolfgang Denk [Wed, 11 Jun 2008 20:24:46 +0000 (22:24 +0200)]
Merge branch 'master' of git://denx.de/git/u-boot-cfi-flash

16 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-nand-flash
Wolfgang Denk [Wed, 11 Jun 2008 20:23:09 +0000 (22:23 +0200)]
Merge branch 'master' of git://denx.de/git/u-boot-nand-flash

16 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-net
Wolfgang Denk [Wed, 11 Jun 2008 20:17:42 +0000 (22:17 +0200)]
Merge branch 'master' of git://denx.de/git/u-boot-net

16 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx
Wolfgang Denk [Wed, 11 Jun 2008 20:13:07 +0000 (22:13 +0200)]
Merge branch 'master' of git://denx.de/git/u-boot-ppc4xx

16 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-mpc85xx
Wolfgang Denk [Wed, 11 Jun 2008 19:33:16 +0000 (21:33 +0200)]
Merge branch 'master' of git://denx.de/git/u-boot-mpc85xx

Conflicts:

include/asm-ppc/fsl_lbc.h

Signed-off-by: Wolfgang Denk <wd@denx.de>
16 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-mpc83xx
Wolfgang Denk [Wed, 11 Jun 2008 19:27:31 +0000 (21:27 +0200)]
Merge branch 'master' of git://denx.de/git/u-boot-mpc83xx

16 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-mpc86xx
Wolfgang Denk [Wed, 11 Jun 2008 19:23:16 +0000 (21:23 +0200)]
Merge branch 'master' of git://denx.de/git/u-boot-mpc86xx

16 years agoFSL LAW: Add new interface to use the last free LAW
Kumar Gala [Tue, 10 Jun 2008 21:16:02 +0000 (16:16 -0500)]
FSL LAW: Add new interface to use the last free LAW

LAWs have the concept of priority so its useful to be able to allocate
the lowest (highest number) priority.  We will end up using this with the
new DDR code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago85xx/86xx: Move to dynamic mgmt of LAWs
Kumar Gala [Wed, 11 Jun 2008 05:51:45 +0000 (00:51 -0500)]
85xx/86xx: Move to dynamic mgmt of LAWs

With the new LAW interface (set_next_law) we can move to letting the
system allocate which LAWs are used for what purpose.  This makes life
a bit easier going forward with the new DDR code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Jon Loeliger <jdl@freescale.com>
Acked-by: Becky Bruce <becky.bruce@freescale.com>
16 years agoFSL LAW: Keep track of LAW allocations
Kumar Gala [Wed, 11 Jun 2008 05:44:10 +0000 (00:44 -0500)]
FSL LAW: Keep track of LAW allocations

Make it so we keep track of which LAWs have allocated and provide
a function (set_next_law) which can allocate a LAW for us if one is
free.

In the future we will move to doing more "dynamic" LAW allocation
since the majority of users dont really care about what LAW number
they are at.

Also, add CONFIG_MPC8540 or CONFIG_MPC8560 to those boards which needed them

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
16 years ago85xx: remove dummy board_early_init_f
Kumar Gala [Tue, 10 Jun 2008 03:31:57 +0000 (22:31 -0500)]
85xx: remove dummy board_early_init_f

A number of board ports have empty version of board_early_init_f
for no reason since we control its via CONFIG_BOARD_EARLY_INIT_F.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoMPC8544DS: Update config.h
Kumar Gala [Mon, 9 Jun 2008 23:55:38 +0000 (18:55 -0500)]
MPC8544DS: Update config.h

* Enable flash progress
* remove CLEAR_LAW0 since we dont really use it

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago85xx: Remove unused and unconfigured memory test code.
Kumar Gala [Mon, 9 Jun 2008 18:37:24 +0000 (13:37 -0500)]
85xx: Remove unused and unconfigured memory test code.

Remove unused and unconfigured DDR test code from FSL 85xx boards.
Besides, other common code exists.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoSocrates: Added FPGA base address update in FDT.
Sergei Poselenov [Fri, 6 Jun 2008 13:42:45 +0000 (15:42 +0200)]
Socrates: Added FPGA base address update in FDT.

Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
16 years agoSocrates: NAND support added. Changed the U-Boot base address and
Sergei Poselenov [Fri, 6 Jun 2008 13:42:44 +0000 (15:42 +0200)]
Socrates: NAND support added. Changed the U-Boot base address and

Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
16 years agoNAND: Added support for 128-bit OOB, adapted
Sergei Poselenov [Fri, 6 Jun 2008 13:42:43 +0000 (15:42 +0200)]
NAND: Added support for 128-bit OOB, adapted

Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
16 years agoSocrates: added missed file with UPMA configuration data.
Sergei Poselenov [Fri, 6 Jun 2008 13:42:42 +0000 (15:42 +0200)]
Socrates: added missed file with UPMA configuration data.

Signed-of-by: Sergei Poselenov <sposelenov@emcraft.com>
16 years agoSocrates: Added FPGA mapping. LAWs and TLBs cleanup.
Sergei Poselenov [Fri, 6 Jun 2008 13:42:41 +0000 (15:42 +0200)]
Socrates: Added FPGA mapping. LAWs and TLBs cleanup.

Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
16 years agoAdded the upmconfig() function for 85xx.
Sergei Poselenov [Fri, 6 Jun 2008 13:42:40 +0000 (15:42 +0200)]
Added the upmconfig() function for 85xx.

Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
16 years agoSocrates: config file cleanup.
Sergei Poselenov [Fri, 6 Jun 2008 13:42:39 +0000 (15:42 +0200)]
Socrates: config file cleanup.

Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
16 years agoTQM85xx: Change memory map to support Flash memory > 128 MiB
Wolfgang Grandegger [Thu, 5 Jun 2008 11:12:10 +0000 (13:12 +0200)]
TQM85xx: Change memory map to support Flash memory > 128 MiB

Some TQM85xx boards could be equipped with up to 1 GiB (NOR) Flash
memory. The current memory map only supports up to 128 MiB Flash.
This patch adds the configuration option CONFIG_TQM_BIGFLASH. If
set, up to 1 GiB flash is supported. To achieve this, the memory
map has to be adjusted in great parts (for example the CCSRBAR is
moved from 0xE0000000 to 0xA0000000).

If you want to boot Linux with CONFIG_TQM_BIGFLASH set, the new
memory map also has to be considered in the kernel (changed
CCSRBAR address, changed PCI IO base address, ...). Please use
an appropriate Flat Device Tree blob (tqm8548.dtb).

Signed-off-by: Martin Krause <martin.krause@tqs.de>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years agoTQM85xx: NAND support via local bus UPMB
Wolfgang Grandegger [Thu, 5 Jun 2008 11:12:09 +0000 (13:12 +0200)]
TQM85xx: NAND support via local bus UPMB

This patch adds support for NAND FLASH on the TQM8548. It is disabled by
default and can be enabled for the TQM8548 modules. It is now based on
the re-written FSL NAND UPM driver. A patch has been posted earlier today
with the subject:

"NAND FSL UPM: driver re-write using the hwcontrol callback"

Note that the R/B pin is not supported by that module requiring to use
the specified maximum delay time.

Note: With NAND support enabled the size of the U-Boot image exceeds
256 KB and TEXT_BASE must therefore be set to 0xfff80000 in config.mk,
doubling the image size :-(.

Signed-off-by: Thomas Waehner <thomas.waehner@tqs.de>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years agoTQM8548: PCI express support
Wolfgang Grandegger [Thu, 5 Jun 2008 11:12:08 +0000 (13:12 +0200)]
TQM8548: PCI express support

This patch adds support for PCI express cards. The board support
now uses common FSL PCI init code, for both, PCI and PCIe on all
TQM85xx modules.

Signed-off-by: Thomas Waehner <thomas.waehner@tqs.de>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years agoTQM8548: Basic support for the TQM8548 modules
Wolfgang Grandegger [Thu, 5 Jun 2008 11:12:07 +0000 (13:12 +0200)]
TQM8548: Basic support for the TQM8548 modules

This patch adds basic support for the TQM8548 module from TQ-Components
(http://www.tqc.de/) including DDR2 SDRAM initialisation and support for
eTSEC 3 and 4

Furthermore Flash buffer write has been enabled to speed up output to
the Flash by approx. a factor of 10.

Signed-off-by: Thomas Waehner <thomas.waehner@tqs.de>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years agoTQM85xx: Support for Flat Device Tree
Wolfgang Grandegger [Thu, 5 Jun 2008 11:12:06 +0000 (13:12 +0200)]
TQM85xx: Support for Flat Device Tree

This patch adds support for Linux kernels using the Flat Device Tree.
It also re-defines the default environment settings for booting Linux
with the FDT blob.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years agoTQM85xx: Support for Intel 82527 compatible CAN controller
Wolfgang Grandegger [Thu, 5 Jun 2008 11:12:05 +0000 (13:12 +0200)]
TQM85xx: Support for Intel 82527 compatible CAN controller

This patch adds initialization of the UPMC RAM to support up to two
Intel 82527 compatible CAN controller on the TQM85xx modules.

Signed-off-by: Thomas Waehner <thomas.waehner@tqs.de>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years agoTQM85xx: Bugfix in the SDRAM initialisation
Wolfgang Grandegger [Thu, 5 Jun 2008 11:12:04 +0000 (13:12 +0200)]
TQM85xx: Bugfix in the SDRAM initialisation

The CS0_BNDS register is now set according to the detected
memory size.

Signed-off-by Martin Krause <martin.krause@tqs.de>

16 years agoTQM85xx: Fix chip select configuration for second FLASH bank
Wolfgang Grandegger [Thu, 5 Jun 2008 11:12:03 +0000 (13:12 +0200)]
TQM85xx: Fix chip select configuration for second FLASH bank

This patch fixes the re-calculation of the automatic chip select
configuration for boards with two populated FLASH banks.

Signed-off-by: Martin Krause <martin.krause@tqs.de>
16 years agoTQM85xx: Support for Spansion 'N' type flashes added
Wolfgang Grandegger [Thu, 5 Jun 2008 11:12:02 +0000 (13:12 +0200)]
TQM85xx: Support for Spansion 'N' type flashes added

The 'N' type Spansion flashes (S29GLxxxN series) have bigger sectors,
than the formerly used 'M' types (S29GLxxxM series), so the flash layout
needs to be changed -> new start address of the environment. The macro
definition CONFIG_TQM_FLASH_N_TYPE is undefined by default and must be
defined for boards with 'N' type flashes.

Signed-off-by: Martin Krause <martin.krause@tqs.de>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years agoTQM85xx: Fix CPM port pin configuration
Wolfgang Grandegger [Thu, 5 Jun 2008 11:12:01 +0000 (13:12 +0200)]
TQM85xx: Fix CPM port pin configuration

Do not configure port pins PD30/PD31 as SCC1 TxD/RxD except for the TQM8560
board. On the other TQM85xx boards (TQM8541 and TQM8555) SCC1 is not used
as serial interface anyway. Worse, on some board variants configuring the
pins for SCC1 leads to short circuits (for example on the TQM8541-BG).

Signed-off-by: Martin Krause <martin.krause@tqs.de>
16 years agoTQM85xx: Various coding style fixes
Wolfgang Grandegger [Thu, 5 Jun 2008 11:12:00 +0000 (13:12 +0200)]
TQM85xx: Various coding style fixes

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years agolibfdt: Move the working_fdt pointer to cmd_fdt.c
Gerald Van Baren [Wed, 11 Jun 2008 02:15:58 +0000 (22:15 -0400)]
libfdt: Move the working_fdt pointer to cmd_fdt.c

The working_fdt pointer was declared in common/fdt_support.c but was
not used there.  Move it to common/cmd_fdt.c where it is used (it is
also used in lib_ppc/bootm.c).

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
16 years agofdt: unshadow global working fdt variable
Kim Phillips [Tue, 10 Jun 2008 16:06:17 +0000 (11:06 -0500)]
fdt: unshadow global working fdt variable

differentiate with local variables of the same name by renaming the
global 'fdt' variable 'working_fdt'.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
16 years agosocrates: Fix PCI clk fix patch
Andy Fleming [Tue, 10 Jun 2008 23:49:34 +0000 (18:49 -0500)]
socrates: Fix PCI clk fix patch

The submitted patch seems to have been more up-to-date, but an older patch was
already in the repository.  This patch encompasses the differences

Taken entirely from Sergei Poselenov <sposelenov@emcraft.com>

Signed-off-by: Andy Fleming <afleming@freescale.com>
16 years agoNAND FSL UPM: driver re-write using the hwcontrol callback
Wolfgang Grandegger [Thu, 5 Jun 2008 11:02:29 +0000 (13:02 +0200)]
NAND FSL UPM: driver re-write using the hwcontrol callback

This is a re-write of the NAND FSL UPM driver using the more universal
hwcontrol callback (instead of the cmdfunc callback). Here is a brief
list of furher modifications:

- For the time being, the UPM setup writing the UPM array has been
  removed from the driver and must now be done by the board specific
  code.

- The bus width definition in "struct fsl_upm_nand" is now in bits to
  comply with the corresponding Linux driver and 8, 16 and 32 bit
  accesses are supported.

- chip->dev_read is only set if fun->dev_ready != NULL, which is
  required for boards not connecting the R/B pin.

- A few issue have been fixed with MxMR bit manipulation like in the
  corresponding Linux driver.

Note: I think the "io_addr" field of "struct fsl_upm" could be removed
      as well, because the address is already determined by
      "nand->IO_ADDR_[RW]", but I'm not 100% sure.

This patch has been tested on a TQM8548 modules with the NAND chip
Micron MT29F8G08FABWP.

This patch is based on the following patches posted to this list a few
minutes ago:

  PPC: add accessor macros to clear and set bits in one shot
  83xx/85xx/86xx: add more MxMR local bus definitions

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com>
16 years agoMPC85xx: Beautify boot output of L2 cache configuration
Wolfgang Grandegger [Thu, 5 Jun 2008 11:11:59 +0000 (13:11 +0200)]
MPC85xx: Beautify boot output of L2 cache configuration

The boot output is now aligned poperly with other boot output
lines, e.g.:

  FLASH: 128 MB
  L2:    512 KB enabled

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years agoPPC: add accessor macros to clear and set bits in one shot
Wolfgang Grandegger [Wed, 4 Jun 2008 10:45:22 +0000 (12:45 +0200)]
PPC: add accessor macros to clear and set bits in one shot

PPC: add accessor macros to clear and set bits in one shot

This patch adds macros from linux/include/asm-powerpc/io.h to clear and
set bits in one shot using the in_be32, out_be32, etc. accessor functions.
They are very handy to manipulate bits it I/O registers.

This patch is required for my forthcoming FSL NAND UPM driver re-write and
the support for the TQM8548 module.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years agoTQM: move TQM boards to board/tqc
Wolfgang Grandegger [Wed, 4 Jun 2008 11:52:17 +0000 (13:52 +0200)]
TQM: move TQM boards to board/tqc

Move all TQM board directories to the vendor specific directory "tqc"
for modules from TQ-Components GmbH (http://www.tqc.de).

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years ago83xx/85xx/86xx: add more MxMR local bus definitions
Wolfgang Grandegger [Mon, 2 Jun 2008 10:09:30 +0000 (12:09 +0200)]
83xx/85xx/86xx: add more MxMR local bus definitions

83xx/85xx/86xx: add more MxMR local bus definitions

This patch adds more macro definitions for the UPM Machine Mode Registers
They are copied from "include/mpc82xx.h" to simplify the merge of all 8xxx
common local bus definitions into include/asm-ppc/fsl_lbc.h. They are
required for my forthcoming FSL NAND UPM driver re-write and the support
for the TQM8548 module.

This patch is based on the following two patches from Anton Vorontsov:

http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg06511.html
http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg06587.html

I leave coding style violation fixes, code beautification and name
corrections to somebody else ;-(.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
16 years ago83xx/85xx: further localbus cleanups
Anton Vorontsov [Thu, 29 May 2008 14:14:56 +0000 (18:14 +0400)]
83xx/85xx: further localbus cleanups

Merge mpc85xx.h's LBC defines to fsl_lbc.h. Also, adopt ACS names
from mpc85xx.h, so ACS_0b10 renamed to ACS_DIV4, ACS_0b11 to ACS_DIV2.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
16 years ago83xx/85xx/86xx: factor out Freescale Localbus defines out of mpc83xx.h
Anton Vorontsov [Wed, 28 May 2008 14:20:15 +0000 (18:20 +0400)]
83xx/85xx/86xx: factor out Freescale Localbus defines out of mpc83xx.h

This patch moves Freescale Localbus defines out of mpc83xx.h, so we could
use it on MPC85xx and MPC86xx processors.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
16 years ago85xx: Add setting of cache props in the device tree.
Kumar Gala [Thu, 29 May 2008 16:22:06 +0000 (11:22 -0500)]
85xx: Add setting of cache props in the device tree.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago85xx: expose cpu identification
Kumar Gala [Tue, 10 Jun 2008 21:53:46 +0000 (16:53 -0500)]
85xx: expose cpu identification

The current cpu identification code is used just to return the name
of the processor at boot.  There are some other locations that the name
is useful (device tree setup).  Expose the functionality to other bits
of code.

Also, drop the 'E' suffix and add it on by looking at the SVR version
when we print this out.  This is mainly to allow the most flexible use
of the name.  The device tree code tends to not care about the 'E' suffix.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agompc83xx: MVBLM7: minor build fixups
Kim Phillips [Tue, 10 Jun 2008 18:25:24 +0000 (13:25 -0500)]
mpc83xx: MVBLM7: minor build fixups

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
16 years agoadd MPC8343 based board mvBlueLYNX-M7 (board+make files)
Andre Schwarz [Tue, 10 Jun 2008 07:14:05 +0000 (09:14 +0200)]
add MPC8343 based board mvBlueLYNX-M7 (board+make files)

Add MPC8343 based board mvBlueLYNX-M7.
It's a single board stereo camera system.
Please read doc/README.mvblm7 for details.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
16 years agoadd MPC8343 based board mvBlueLYNX-M7 (doc+config)
Andre Schwarz [Tue, 10 Jun 2008 07:13:16 +0000 (09:13 +0200)]
add MPC8343 based board mvBlueLYNX-M7 (doc+config)

Add MPC8343 based board mvBlueLYNX-M7.
It's a single board stereo camera system.
Please read doc/README.mvblm7 for details.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
16 years ago83xx/85xx: further localbus cleanups
Anton Vorontsov [Thu, 29 May 2008 14:14:56 +0000 (18:14 +0400)]
83xx/85xx: further localbus cleanups

move the BRx_* and ORx_* left behind in mpc85xx.h

The same is needed for mpc8xx.h and mpc8260.h (defines are almost
the same, just few differences which needs some attention though).

But the bad news for mpc8xx and mpc8260 is that there are a lot of users
of these defines. So this cleanup I'll leave for the "better times".

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
16 years ago83xx/85xx/86xx: factor out Freescale Localbus defines out of mpc83xx.h
Anton Vorontsov [Wed, 28 May 2008 14:20:15 +0000 (18:20 +0400)]
83xx/85xx/86xx: factor out Freescale Localbus defines out of mpc83xx.h

This patch moves Freescale Localbus defines out of mpc83xx.h, so we could
use it on MPC85xx and MPC86xx processors.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
16 years agoAdd missing CSCONFIG_BANK_BIT_3 define to mpc83xx.h
Tor Krill [Mon, 2 Jun 2008 13:09:30 +0000 (15:09 +0200)]
Add missing CSCONFIG_BANK_BIT_3 define to mpc83xx.h

Signed-off-by: Tor Krill <tor@excito.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
16 years agonet: Conditional COBJS inclusion of network drivers
Shinya Kuribayashi [Mon, 9 Jun 2008 14:37:44 +0000 (23:37 +0900)]
net: Conditional COBJS inclusion of network drivers

Replace COBJS-y with appropriate driver config names.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
16 years agoUse strncmp() for the fdt command
Gerald Van Baren [Tue, 10 Jun 2008 01:02:17 +0000 (21:02 -0400)]
Use strncmp() for the fdt command

Cleaner than doing multiple conditionals on characters.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
16 years agoThe fdt boardsetup command criteria was not unique
Gerald Van Baren [Sat, 7 Jun 2008 16:25:05 +0000 (12:25 -0400)]
The fdt boardsetup command criteria was not unique

It was checking just for "b", which is not unique with respect to the
"boot" command.  Change to check for "boa"[rdsetup].

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
16 years agolibfdt: Several cleanups to parameter checking
David Gibson [Tue, 20 May 2008 07:19:11 +0000 (17:19 +1000)]
libfdt: Several cleanups to parameter checking

This patch makes a couple of small cleanups to parameter checking of
libfdt functions.

- In several functions which take a node offset, we use an
idiom involving fdt_next_tag() first to check that we have indeed been
given a node offset.  This patch adds a helper function
_fdt_check_node_offset() to encapsulate this usage of fdt_next_tag().

- In fdt_rw.c in several places we have the expanded version
of the RW_CHECK_HEADER() macro for no particular reason.  This patch
replaces those instances with an invocation of the macro; that's what
it's for.

- In fdt_sw.c we rename the check_header_sw() function to
sw_check_header() to match the analgous function in fdt_rw.c, and we
provide an SW_CHECK_HEADER() wrapper macro as RW_CHECK_HEADER()
functions in fdt_rw.c

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
16 years agoRemove the deprecated CONFIG_OF_FLAT_TREE
Gerald Van Baren [Wed, 4 Jun 2008 00:34:45 +0000 (20:34 -0400)]
Remove the deprecated CONFIG_OF_FLAT_TREE

Use CONFIG_OF_LIBFDT instead to support flattened device trees.  It is
cleaner, has better functionality, and is better supported.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
16 years agoChange the stxxst to CONFIG_OF_LIBFDT
Gerald Van Baren [Wed, 4 Jun 2008 00:26:29 +0000 (20:26 -0400)]
Change the stxxst to CONFIG_OF_LIBFDT

This was configured to use the deprecated CONFIG_OF_FLAT_TREE, change
to CONFIG_OF_LIBFDT.

WARNING: It appears that this board lost its ability to boot via a
flattened device tree prior to this changeset.

WARNING: This conversion was untested because I do not have a board to
test it on.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
16 years agoConvert mpc7448hpc2 to CONFIG_OF_LIBFDT
Gerald Van Baren [Wed, 4 Jun 2008 00:24:58 +0000 (20:24 -0400)]
Convert mpc7448hpc2 to CONFIG_OF_LIBFDT

This was configured to use the deprecated CONFIG_OF_FLAT_TREE, change
to CONFIG_OF_LIBFDT.

WARNING: This conversion is untested because I do not have a board to
test it on.

NOTE: The FDT blob (DTS) must have an /aliases/ethernet0 and (optionally)
/aliases/ethernet1 property for the ethernet to work.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
16 years ago85xx: Only use PORPLLSR[DDR_Ratio] on platforms that define it
Kumar Gala [Thu, 29 May 2008 06:21:24 +0000 (01:21 -0500)]
85xx: Only use PORPLLSR[DDR_Ratio] on platforms that define it

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoMPC85xx: Change traps.c to not reference non-addressable memory
Becky Bruce [Wed, 14 May 2008 18:10:04 +0000 (13:10 -0500)]
MPC85xx: Change traps.c to not reference non-addressable memory

Currently, END_OF_RAM is used by the trap code to determine if
we should attempt to access the stack pointer or not. However,
on systems with a lot of RAM, only a subset of the RAM is
guaranteed to be mapped in and accessible.  Change END_OF_RAM
to use get_effective_memsize() instead of using the raw ram
size out of the bd.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
16 years agoMerge branch 'master' of git://git.denx.de/u-boot
Ben Warren [Mon, 9 Jun 2008 05:04:22 +0000 (22:04 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot

16 years agoenv_nand.c: Added bad block management for environment variables
Stuart Wood [Fri, 30 May 2008 20:05:28 +0000 (16:05 -0400)]
env_nand.c: Added bad block management for environment variables

Modified to check for bad blocks and to skipping over them when
CFG_ENV_RANGE has been defined.
CFG_ENV_RANGE must be larger than CFG_ENV_SIZE and aligned to the NAND
flash block size.

Signed-off-by: Stuart Wood <stuart.wood@labxtechnologies.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
16 years agoMPC86xx: Change traps.c to not reference non-addressable memory
Becky Bruce [Wed, 14 May 2008 18:09:58 +0000 (13:09 -0500)]
MPC86xx: Change traps.c to not reference non-addressable memory

Currently, END_OF_RAM is used by the trap code to determine if
we should attempt to access the stack pointer or not. However,
on systems with a lot of RAM, only a subset of the RAM is
guaranteed to be mapped in and accessible.  Change END_OF_RAM
to use get_effective_memsize() instead of using the raw ram
size out of the bd to prevent us from trying to access
non-mapped memory.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
16 years agoMerge commit 'wd/master'
Jon Loeliger [Fri, 6 Jun 2008 15:48:31 +0000 (10:48 -0500)]
Merge commit 'wd/master'

16 years agotools/mkimage: fix compiler warnings on some systems.
Wolfgang Denk [Fri, 6 Jun 2008 12:28:14 +0000 (14:28 +0200)]
tools/mkimage: fix compiler warnings on some systems.

Signed-off-by: Wolfgang Denk <wd@denx.de>
16 years agoppc4xx: Fix misspelled CONFIG_440SPE/440EPX/GRX config options
Stefan Roese [Fri, 6 Jun 2008 14:10:41 +0000 (16:10 +0200)]
ppc4xx: Fix misspelled CONFIG_440SPE/440EPX/GRX config options

We use upper case letters for the AMCC processor defines (like
CONFIG_440SPE) in U-Boot. So the 440SPe is labeled CONFIG_440SPE and
not CONFIG_440SPe. This patch fixes the last misspelled config options.

Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Unify AMCC's board config files (part 3/3)
Stefan Roese [Fri, 6 Jun 2008 13:55:21 +0000 (15:55 +0200)]
ppc4xx: Unify AMCC's board config files (part 3/3)

This patch series unifies the AMCC eval board ports by introducing
a common include header for all AMCC eval boards:

include/configs/amcc-common.h

This header now includes all common configuration options/defines which
are removed from the board specific headers.

The reason for this is ease of maintenance and unified look and feel
of all AMCC boards.

Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Unify AMCC's board config files (part 2/3)
Stefan Roese [Fri, 6 Jun 2008 13:55:03 +0000 (15:55 +0200)]
ppc4xx: Unify AMCC's board config files (part 2/3)

This patch series unifies the AMCC eval board ports by introducing
a common include header for all AMCC eval boards:

include/configs/amcc-common.h

This header now includes all common configuration options/defines which
are removed from the board specific headers.

The reason for this is ease of maintenance and unified look and feel
of all AMCC boards.

Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Unify AMCC's board config files (part 1/3)
Stefan Roese [Fri, 6 Jun 2008 13:54:31 +0000 (15:54 +0200)]
ppc4xx: Unify AMCC's board config files (part 1/3)

This patch series unifies the AMCC eval board ports by introducing
a common include header for all AMCC eval boards:

include/configs/amcc-common.h

This header now includes all common configuration options/defines which
are removed from the board specific headers.

The reason for this is ease of maintenance and unified look and feel
of all AMCC boards.

Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoDM9000 fix status check fail 0x6d error for trizeps board
Remy Bohmer [Thu, 5 Jun 2008 11:03:36 +0000 (13:03 +0200)]
DM9000 fix status check fail 0x6d error for trizeps board

According to the Application Notes of the DM9000, only the 2 bits 0:1 of
the status byte need to be checked to identify a valid packet in the fifo

But, The several different Application Notes do not all speak the same
language on these bits. They do not disagree, but only 1 Application Note
noted explicitly that only these 2 bits need to be checked.
Even the datasheets do not mention anything about these 2 bits.

Because the old code, and the kernel check the whole byte, I left this piece
untouched.

However, I tested all board/DM9000[A|E|EP] devices with this 2 bit check, so
it should work.

Notice, that the 2nd iteration through this receive loop (when a 2nd packet is
in the fifo) is much shorter now, compared to the older U-boot driver code,
so that we can maybe run into a hardware condition now that was never seen
before, or maybe was seen very unfrequently.

Additionaly added a cleanup of a stack variable.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
16 years agoGet rid of annoying/superfluous bad-checksum warning message
Remy Bohmer [Tue, 3 Jun 2008 13:48:17 +0000 (15:48 +0200)]
Get rid of annoying/superfluous bad-checksum warning message

U-boot can complain a lot about 'checksum bad' when it is attached to the network.
It is annoying for ordinary users who start to doubt the network connection
in general when they see messages like this.

This is caused by the routine NetCksumOk() which cannot handle IP-headers longer
than 20 bytes. Those packages can be ignored anyway by U-boot, so we trash them
now before checking the checksum.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
16 years agoFix order for reading rx-status registers in 32bit mode of DM9000
Remy Bohmer [Wed, 4 Jun 2008 08:47:25 +0000 (10:47 +0200)]
Fix order for reading rx-status registers in 32bit mode of DM9000

A last minute cleanup before submitting the DM9000A patch series yesterday introduced
a bug in reading the rx-status registers in 32bit mode only.
This patch repairs this.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
16 years agoDM9000: Some minor code cleanups
Remy Bohmer [Tue, 3 Jun 2008 13:26:26 +0000 (15:26 +0200)]
DM9000: Some minor code cleanups

Some lines of the U-boot DM9000x driver are longer than 80 characters, or
need some other minor cleanup.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
16 years agoDM9000: Make driver work properly for DM9000A
Remy Bohmer [Tue, 3 Jun 2008 13:26:25 +0000 (15:26 +0200)]
DM9000: Make driver work properly for DM9000A

The DM9000A network controller does not work with the U-boot DM9000x driver.
Analysis showed that many incoming packets are lost.

The DM9000A Application Notes V1.20 (section 5.6.1) recommend that the poll to
check for a valid rx packet be done on the interrupt status register, not
directly by performing the dummy read and the rx status check as is currently
the case in the u-boot driver.

When the recommended poll is done as suggested the driver starts working
correctly on 10Mbit/HD, but on 100MBit/FD packets come in faster so that there
can be more than 1 package in the fifo at the same time.

The driver must perform the rx-status check in a loop and read and handle all
packages until there is no more left _after_ the interrupt RX flag is set.

This change has been tested with DM9000A, DM9000E, DM9000EP.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
16 years agoDM9000: Improve eth_reset() routine
Remy Bohmer [Tue, 3 Jun 2008 13:26:24 +0000 (15:26 +0200)]
DM9000: Improve eth_reset() routine

According to the application notes of the DM9000 v1.22 chapter 5.2 bullet 2, the
reset procedure must be done twice to properly reset the DM9000 by means of software.
This errata is not needed anymore for the DM9000A, but it does not bother it.

This change has been tested with DM9000A, DM9000E, DM9000EP.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
16 years agoDM9000: improve eth_send() routine
Remy Bohmer [Tue, 3 Jun 2008 13:26:23 +0000 (15:26 +0200)]
DM9000: improve eth_send() routine

The eth_send routine of the U-boot DM9000x driver does not match the
DM9000 or DM9000A application notes/programming guides.

This change improves the stability of the DM9000A network controller.

This change has been tested with DM9000A, DM9000E, DM9000EP.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
16 years agoDM9000: repair debug logging
Remy Bohmer [Tue, 3 Jun 2008 13:26:22 +0000 (15:26 +0200)]
DM9000: repair debug logging

It seems that the debugging code of the DM9000x driver in U-boot has not been
compiled for a long time, because it cannot compile...

Also rearranged some loglines to get more useful info while debugging.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
16 years agoDM9000: Add data bus-width auto detection.
Remy Bohmer [Tue, 3 Jun 2008 13:26:21 +0000 (15:26 +0200)]
DM9000: Add data bus-width auto detection.

The U-boot DM9000x driver contains a compile time bus-width definition for
the databus connected to the network controller.

This compile check makes the code unclear, inflexible and is unneccessary.
It can be asked to the network controller what its bus-width is by reading bits
6 and 7 of the interrupt status register.

The linux kernel already uses a runtime mechanism to determine this bus-width,
so the implementation below looks somewhat like that implementation.

This change has been tested with DM9000A, DM9000E, DM9000EP.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
16 years agoMerge branch 'master' of ssh://mercury/home/wd/git/u-boot/master
Wolfgang Denk [Wed, 4 Jun 2008 23:12:30 +0000 (01:12 +0200)]
Merge branch 'master' of ssh://mercury/home/wd/git/u-boot/master

16 years agoppc4xx: Fix problem with SDRAM init in bamboo NAND booting port
Stefan Roese [Wed, 4 Jun 2008 17:19:20 +0000 (19:19 +0200)]
ppc4xx: Fix problem with SDRAM init in bamboo NAND booting port

This patch fixes a problem spotted by Eugene O'Brian (thanks Eugene)
introduced by the commit:

ppc4xx/NAND_SPL: Consolidate 405 and 440 NAND booting code in start.S

With this patch SDRAM will get initialized again and booting from NAND
is working again.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Eugene O'Brien <eugene.obrien@advantechamt.com>
16 years agoSocrates: Fix PCI bus frequency report
Wolfgang Denk [Tue, 27 May 2008 12:19:30 +0000 (14:19 +0200)]
Socrates: Fix PCI bus frequency report

Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
16 years agoFix incorrect switch for IF_TYPE in part.c
Tor Krill [Thu, 29 May 2008 09:10:30 +0000 (11:10 +0200)]
Fix incorrect switch for IF_TYPE in part.c

Use correct field in block_dev_desc_t when writing interface type in
dev_print. Error introduced in 574b3195.

Also added fix from Martin Krause

Signed-off-by: Tor Krill <tor@excito.com>
16 years agoAdd size #defines for Altera Cyclone-II EP2C8 and EP2C20.
Andre Schwarz [Tue, 27 May 2008 08:25:39 +0000 (10:25 +0200)]
Add size #defines for Altera Cyclone-II EP2C8 and EP2C20.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
16 years agoAdditional fix to readline_into_buffer() with CONFIG_CMDLINE_EDITING before relocating
Peter Tyser [Thu, 22 May 2008 23:56:52 +0000 (18:56 -0500)]
Additional fix to readline_into_buffer() with CONFIG_CMDLINE_EDITING before relocating

Removed unneeded command line history initialization.  Also, the original
code would access the 'initted' variable before relocation to SDRAM
which resulted in erratic behavior since the bss is not initialized when
executing from flash.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
16 years agoPPC4xx: Simplified post_word_{load, store}
Grant Erickson [Wed, 21 May 2008 20:28:30 +0000 (13:28 -0700)]
PPC4xx: Simplified post_word_{load, store}

This patch simplifies post_word_{load,store} by using the preprocessor
to eliminate redundant, copy-and-pasted code.

Signed-off-by: Grant Erickson <gerickson@nuovations.com>
16 years agocfi_flash: enable M18 flash chips family support.
Vasiliy Leoenenko [Wed, 7 May 2008 17:25:33 +0000 (21:25 +0400)]
cfi_flash: enable M18 flash chips family support.

Added new command set ID. Buffered write command processing is changed
in order to support M18 flash chips family.

Signed-off-by: Alexey Korolev <akorolev@infradead.org>
Signed-off-by: Vasiliy Leonenko <vasiliy.leonenko@mail.ru>
16 years agocfi_flash: support of long cmd in U-boot.
Vasiliy Leoenenko [Wed, 7 May 2008 17:24:44 +0000 (21:24 +0400)]
cfi_flash: support of long cmd in U-boot.

Some NOR flash chips needs support of commands with length grether than max
value size of uchar. For example all M18 family chips use 0x1ff command in
buffered write mode as value of program loops count.

Signed-off-by: Alexey Korolev <akorolev@infradead.org>
Signed-off-by: Vasiliy Leonenko <vasiliy.leonenko@mail.ru>
16 years agoDTT: Issue one-shot command on AD7414 (LM75 code) to read temp
Stefan Roese [Fri, 16 May 2008 09:06:06 +0000 (11:06 +0200)]
DTT: Issue one-shot command on AD7414 (LM75 code) to read temp

On AD7414 the first value upon bootup is not read correctly.
This is most likely because of the 800ms update time of the
temp register in normal update mode. To get current values
each time we issue the "dtt" command including upon powerup
we switch into one-short mode.

This patch fixes the problem on AD7414 equipped boards (Sequoia,
Canyonlands etc), that temp value printed in the bootup log was
incorrect.

Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Cleanup CPCI405 variant's config file
Matthias Fuchs [Fri, 30 May 2008 14:55:06 +0000 (16:55 +0200)]
ppc4xx: Cleanup CPCI405 variant's config file

This patch removes some dead code from CPCI405 board's
config files. JFFS2 support is also removed. It's not used and
CPCI4052 does not build anymore without some size reduction.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
16 years agoRemove shell variable UNDEF_SYM.
Kenneth Johansson [Thu, 29 May 2008 14:32:33 +0000 (16:32 +0200)]
Remove shell variable UNDEF_SYM.

UNDEF_SYM is a shell variable in the main Makefile used to force the
linker to add all u-boot commands to the final image. It has no use here.

Signed-off-by: Kenneth Johansson <kenneth@southpole.se>
16 years agoAdd support for environment in SPI flash
Haavard Skinnemoen [Fri, 16 May 2008 09:10:35 +0000 (11:10 +0200)]
Add support for environment in SPI flash

This is pretty incomplete...it doesn't handle reading the environment
before relocation, it doesn't support redundant environment, and it
doesn't support embedded environment. But apart from that, it does
seem to work.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoSPI Flash: Add "sf" command
Haavard Skinnemoen [Fri, 16 May 2008 09:10:34 +0000 (11:10 +0200)]
SPI Flash: Add "sf" command

This adds a new command, "sf" which can be used to manipulate SPI
flash. Currently, initialization, reading, writing and erasing is
supported.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoSPI Flash subsystem
Haavard Skinnemoen [Fri, 16 May 2008 09:10:33 +0000 (11:10 +0200)]
SPI Flash subsystem

This adds a new SPI flash subsystem.

Currently, only AT45 DataFlash in non-power-of-two mode is supported,
but some preliminary support for other flash types is in place as
well.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoatmel_spi: Driver for the Atmel SPI controller
Hans-Christian Egtvedt [Fri, 16 May 2008 09:10:32 +0000 (11:10 +0200)]
atmel_spi: Driver for the Atmel SPI controller

This adds a driver for the SPI controller found on most AT91 and AVR32
chips, implementing the new SPI API.

Changed in v4:
  - Update to new API
  - Handle zero-length transfers appropriately. The user may send a
    zero-length SPI transfer with SPI_XFER_END set in order to
    deactivate the chip select after a series of transfers with chip
    select active. This is useful e.g. when polling the status
    register of DataFlash.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
16 years agoSPI API improvements
Haavard Skinnemoen [Fri, 16 May 2008 09:10:31 +0000 (11:10 +0200)]
SPI API improvements

This patch gets rid of the spi_chipsel table and adds a handful of new
functions that makes the SPI layer cleaner and more flexible.

Instead of the spi_chipsel table, each board that wants to use SPI
gets to implement three hooks:
  * spi_cs_activate(): Activates the chipselect for a given slave
  * spi_cs_deactivate(): Deactivates the chipselect for a given slave
  * spi_cs_is_valid(): Determines if the given bus/chipselect
    combination can be activated.

Not all drivers may need those extra functions however. If that's the
case, the board code may just leave them out (assuming they know what
the driver needs) or rely on the linker to strip them out (assuming
--gc-sections is being used.)

To set up communication parameters for a given slave, the driver needs
to call spi_setup_slave(). This returns a pointer to an opaque
spi_slave struct which must be passed as a parameter to subsequent SPI
calls. This struct can be freed by calling spi_free_slave(), but most
driver probably don't want to do this.

Before starting one or more SPI transfers, the driver must call
spi_claim_bus() to gain exclusive access to the SPI bus and initialize
the hardware. When all transfers are done, the driver must call
spi_release_bus() to make the bus available to others, and possibly
shut down the SPI controller hardware.

spi_xfer() behaves mostly the same as before, but it now takes a
spi_slave parameter instead of a spi_chipsel function pointer. It also
got a new parameter, flags, which is used to specify chip select
behaviour. This may be extended with other flags in the future.

This patch has been build-tested on all powerpc and arm boards
involved. I have not tested NIOS since I don't have a toolchain for it
installed, so I expect some breakage there even though I've tried
fixing up everything I could find by visual inspection.

I have run-time tested this on AVR32 ATNGW100 using the atmel_spi and
DataFlash drivers posted as a follow-up. I'd like some help testing
other boards that use the existing SPI API.

But most of all, I'd like some comments on the new API. Is this stuff
usable for everyone? If not, why?

Changed in v4:
  - Build fixes for various boards, drivers and commands
  - Provide common struct spi_slave definition that can be extended by
    drivers
  - Pass a struct spi_slave * to spi_cs_activate and spi_cs_deactivate
  - Make default bus and mode build-time configurable
  - Override default SPI bus ID and mode on mx32ads and imx31_litekit.

Changed in v3:
  - Add opaque struct spi_slave for controller-specific data associated
    with a slave.
  - Add spi_claim_bus() and spi_release_bus()
  - Add spi_free_slave()
  - spi_setup() is now called spi_setup_slave() and returns a
    struct spi_slave
  - soft_spi now supports four SPI modes (CPOL|CPHA)
  - Add bus parameter to spi_setup_slave()
  - Convert the new i.MX32 SPI driver
  - Convert the new MC13783 RTC driver

Changed in v2:
  - Convert the mpc8xxx_spi driver and the mpc8349emds board to the
    new API.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Tested-by: Guennadi Liakhovetski <lg@denx.de>
16 years agoMove definition of container_of() to common.h
Haavard Skinnemoen [Fri, 16 May 2008 09:10:30 +0000 (11:10 +0200)]
Move definition of container_of() to common.h

AVR32 and AT91SAM9 both have their own identical definitions of
container_of() taken from the Linux kernel. Move it to common.h so
that all architectures can use it.

container_of() is already used by some drivers, and will be used
extensively by the new and improved SPI API.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agosoft_i2c: Pull SDA high before reading
Haavard Skinnemoen [Fri, 16 May 2008 09:08:11 +0000 (11:08 +0200)]
soft_i2c: Pull SDA high before reading

Spotted by Dean Capindale.

Systems that support open-drain GPIO properly are allowed provide an
empty I2C_TRISTATE define. However, this means that we need to be
careful not to drive SDA low when the slave is expected to respond.

This patch adds a missing I2C_SDA(1) to read_byte() required to
tristate the SDA line on systems that support open-drain GPIO.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoppc4xx: Remove implementations of testdram()
Stefan Roese [Mon, 19 May 2008 09:34:53 +0000 (11:34 +0200)]
ppc4xx: Remove implementations of testdram()

This patch removes the used testdram() implementations of the board
that are maintained by myself.

Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Remove superfluous dram_init() call or replace it by initdram()
Stefan Roese [Mon, 2 Jun 2008 15:37:28 +0000 (17:37 +0200)]
ppc4xx: Remove superfluous dram_init() call or replace it by initdram()

Historically the 405 U-Boot port had a dram_init() call in early init
stage. This function was still called from start.S and most of the time
coded in assembler. This is not needed anymore (since a long time) and
boards should implement the common initdram() function in C instead.

This patch now removed the dram_init() call from start.S and removes the
empty implementations that are scattered through most of the 405 board
ports. Some older board ports really implement this dram_init() though.
These are:

csb272
csb472
ERIC
EXBITGEN
W7OLMC
W7OLMG

I changed those boards to call this assembler dram_init() function now
from their board specific initdram() instead. This *should* work, but please
test again on those platforms. And it is perhaps a good idea that those
boards use some common 405 SDRAM initialization code from cpu/ppc4xx at
some time. So further patches welcome here.

Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Use new 4xx SDRAM controller enable defines in common ECC code
Stefan Roese [Mon, 2 Jun 2008 15:22:11 +0000 (17:22 +0200)]
ppc4xx: Use new 4xx SDRAM controller enable defines in common ECC code

Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Fix common ECC generation code for 440GP style platforms
Stefan Roese [Mon, 2 Jun 2008 15:20:03 +0000 (17:20 +0200)]
ppc4xx: Fix common ECC generation code for 440GP style platforms

This patch makes the common 4xx ECC code really usable on 440GP style
platforms.

Since the IBM DDR controller used on 440GP/GX/EP/GR is not register
compatible to the IBM DDR/2 controller used on 405EX/440SP/SPe/460EX/GT
we need to make some processor dependant defines used later on by the
driver.

Signed-off-by: Stefan Roese <sr@denx.de>