platform/kernel/u-boot.git
13 years agoFix variable flavor in examples/standalone/Makefile
Che-liang Chiou [Mon, 21 Feb 2011 21:07:00 +0000 (21:07 +0000)]
Fix variable flavor in examples/standalone/Makefile

GNU Makefile have two flavors of variables, recursively expanded that is
defined by using '=', and simply expanded that is defined by using ':='.

The bug is caused by using recursively expanded flavor for BIN and SREC.
As you can see below, they are prepended by $(obj) twice.

We can reproduce this bug with a simplified version of this Makefile:
$ cat >Makefile <<\EOF
obj := /path/to/obj/
ELF := hello_world

BIN_rec = $(addsuffix .bin,$(ELF))      # recursively expanded
BIN_sim := $(addsuffix .bin,$(ELF))     # simply expanded

ELF := $(addprefix $(obj),$(ELF))
BIN_rec := $(addprefix $(obj),$(BIN_rec))
BIN_sim := $(addprefix $(obj),$(BIN_sim))

show:
@echo BIN_rec=$(BIN_rec)
@echo BIN_sim=$(BIN_sim)

.PHONY: show
EOF
$ make show
BIN_rec=/path/to/obj//path/to/obj/hello_world.bin
BIN_sim=/path/to/obj/hello_world.bin

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
13 years agonet/net.c: cosmetic: do not use assignment in if condition
Luca Ceresoli [Wed, 4 May 2011 02:40:47 +0000 (02:40 +0000)]
net/net.c: cosmetic: do not use assignment in if condition

This removes the following checkpatch issue:
 - ERROR: do not use assignment in if condition

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
13 years agonet/net.c: cosmetic: fix indentation
Luca Ceresoli [Wed, 4 May 2011 02:40:46 +0000 (02:40 +0000)]
net/net.c: cosmetic: fix indentation

This removes the following checkpatch issues:
 - ERROR: switch and case should be at the same indent
 - WARNING: suspect code indent for conditional statements
 - WARNING: labels should not be indented

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
13 years agonet/net.c: cosmetic: parentheses not required for return
Luca Ceresoli [Wed, 4 May 2011 02:40:45 +0000 (02:40 +0000)]
net/net.c: cosmetic: parentheses not required for return

This removes the following checkpatch issue:
 - ERROR: return is not a function, parentheses are not required

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
13 years agonet/net.c: cosmetic: fix pointer syntax issues
Luca Ceresoli [Wed, 4 May 2011 02:40:44 +0000 (02:40 +0000)]
net/net.c: cosmetic: fix pointer syntax issues

This removes the following checkpatch issues:
 - ERROR: "foo * bar" should be "foo *bar"
 - ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
13 years agonet/net.c: cosmetic: fix brace issues
Luca Ceresoli [Wed, 4 May 2011 02:40:43 +0000 (02:40 +0000)]
net/net.c: cosmetic: fix brace issues

This removes the following checkpatch issues:
 - WARNING: braces {} are not necessary for single statement blocks
 - WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
13 years agonet/net.c: cosmetic: fix whitespace issues
Luca Ceresoli [Wed, 11 May 2011 03:59:56 +0000 (03:59 +0000)]
net/net.c: cosmetic: fix whitespace issues

This removes the following checkpatch issues:
 - ERROR: space prohibited after that open parenthesis '('
 - ERROR: space prohibited before that close parenthesis ')'
 - ERROR: space prohibited after that open square bracket '['
 - ERROR: space prohibited after that '&' (ctx:WxW)
 - ERROR: spaces required around that '=' (ctx:VxW)
 - ERROR: space required before the open parenthesis '('
 - ERROR: space required after that ',' (ctx:VxV)
 - ERROR: need consistent spacing around '+' (ctx:WxV)
 - WARNING: unnecessary whitespace before a quoted newline
 - WARNING: please, no spaces at the start of a line
 - WARNING: space prohibited between function name and open
   parenthesis '('

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Mike Frysinger <vapier@gentoo.org>
13 years agonet/net.c: cosmetic: variable initializations
Luca Ceresoli [Wed, 11 May 2011 03:59:55 +0000 (03:59 +0000)]
net/net.c: cosmetic: variable initializations

This removes the following checkpatch errors:
 - ERROR: do not initialise globals to 0 or NULL
 - ERROR: spaces required around that '=' (ctx:VxV)
 - ERROR: that open brace { should be on the previous line

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Mike Frysinger <vapier@gentoo.org>
13 years agonet/net.c: cosmetic: fix lines over 80 characters
Luca Ceresoli [Wed, 11 May 2011 03:59:54 +0000 (03:59 +0000)]
net/net.c: cosmetic: fix lines over 80 characters

This removes the following checkpatch warning:
 - WARNING: line over 80 characters

There are three such warnings left.

The first is hard to fix with cosmetic-only changes without compromising code
readability, so I'm leaving it as it is for now:
  WARNING: line over 80 characters
  #1537: FILE: net.c:1537:
  + [4 tabs] memcpy(((Ethernet_t *)NetArpWaitTxPacket)->et_dest, ...

The other two cannot be fixed without splitting string literals, so it is
preferred to keep them longer than 80 characters.

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Mike Frysinger <vapier@gentoo.org>
13 years agolib, vsprintf: introduce strict_strtoul
Heiko Schocher [Mon, 2 May 2011 21:33:49 +0000 (21:33 +0000)]
lib, vsprintf: introduce strict_strtoul

as checkpatch proposes to use strict_strtoul instead of
simple_strtoul, introduce it.

Ported this function from Linux 2.6.38 commit ID:
521cb40b0c44418a4fd36dc633f575813d59a43d

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
13 years agoFix incorrect use of getenv() before relocation
Wolfgang Denk [Wed, 4 May 2011 10:32:28 +0000 (10:32 +0000)]
Fix incorrect use of getenv() before relocation

A large number of boards incorrectly used getenv() in their board init
code running before relocation.  In some cases this caused U-Boot to
hang when certain environment variables grew too long.
Fix the code to use getenv_r().

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: The LEOX team <team@leox.org>
Cc: Michael Schwingen <michael@schwingen.org>
Cc: Georg Schardt <schardt@team-ctech.de>
Cc: Werner Pfister <Pfister_Werner@intercontrol.de>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: Peter De Schrijver <p2@mind.be>
Cc: John Zhan <zhanz@sinovee.com>
Cc: Rishi Bhattacharya <rishi@ti.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
13 years agocmd_nvedit.c: make error message more helpful
Wolfgang Denk [Wed, 4 May 2011 10:29:49 +0000 (10:29 +0000)]
cmd_nvedit.c: make error message more helpful

When calling getenv_f() with a too small buffer, it would print an
error message like this:

env_buf too small [32]

This is not really helpful as it does not give any indication which of
the calls might have failed.  Change this into:

env_buf [32 bytes] too small for value of "hwconfig"

so we know at least which variable caused the overflow; this usually
allows to quickly find the related code as well.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoNET: pass source IP address to packet handlers
Luca Ceresoli [Mon, 18 Apr 2011 06:19:50 +0000 (06:19 +0000)]
NET: pass source IP address to packet handlers

This is needed for the upcoming TFTP server implementation.

This also simplifies PingHandler() and fixes rxhand_f documentation.

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoREADME: remove spurious line
Luca Ceresoli [Thu, 14 Apr 2011 05:52:52 +0000 (05:52 +0000)]
README: remove spurious line

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoMPC8260: Fix compile problems with "hymod" board
Wolfgang Denk [Sun, 1 May 2011 04:35:06 +0000 (04:35 +0000)]
MPC8260: Fix compile problems with "hymod" board

Commit 9d8fbd1 "powerpc, 8xx: Fixup all 8xx u-boot.lds scripts" broke
building of the MPC8260 based "hymod" board.  Fix this.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Murray Jensen <Murray.Jensen@csiro.au>
Cc: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
13 years agozlib: fix DEBUG build
Mike Frysinger [Sun, 1 May 2011 12:31:02 +0000 (12:31 +0000)]
zlib: fix DEBUG build

The previous commit imported a little too much from upstream.  We need
to disable stdio.h when using U-Boot.

Reported-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Wolfgang Denk [Thu, 12 May 2011 17:27:42 +0000 (19:27 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Thu, 12 May 2011 17:26:45 +0000 (19:26 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

13 years agonetconsole: remove `serverip' check
Simon Guinot [Sun, 1 May 2011 23:38:40 +0000 (23:38 +0000)]
netconsole: remove `serverip' check

Netconsole use the environment variable `ncip' to configure the
destination IP. `serverip' don't need to be defined.

Signed-off-by: Simon Guinot <sguinot@lacie.com>
13 years agoSerial: p1011: new vendor init options
John Rigby [Tue, 19 Apr 2011 10:42:39 +0000 (10:42 +0000)]
Serial: p1011: new vendor init options

Two new options:

CONFIG_PL011_SERIAL_RLCR

Some vendor versions of PL011 serial ports (e.g. ST-Ericsson U8500)
have separate receive and transmit line control registers.  Set
this variable to initialize the extra register.

CONFIG_PL011_SERIAL_FLUSH_ON_INIT

On some platforms (e.g. U8500) U-Boot is loaded by a second stage
boot loader that has already initialized the UART.  Define this
variable to flush the UART at init time.
empty fifo on init

Signed-off-by: John Rigby <john.rigby@linaro.org>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
13 years agoPPC405EX CHIP_21 erratum
Steven A. Falco [Thu, 5 May 2011 14:08:35 +0000 (10:08 -0400)]
PPC405EX CHIP_21 erratum

APM errata CHIP_21 for the 405EX/EXr (from the rev 1.09 document dated
4/27/11) states that rev D processors may wake up with the wrong feature
set.  This patch implements the APM-proposed workaround.

To enable this patch for your board, add the appropriate define for your
CPU to your board header file.  See kilauea.h for more information.  The
following variants are supported:

#define CONFIG_SYS_4xx_CHIP_21_405EX_NO_SECURITY
#define CONFIG_SYS_4xx_CHIP_21_405EX_SECURITY
#define CONFIG_SYS_4xx_CHIP_21_405EXr_NO_SECURITY
#define CONFIG_SYS_4xx_CHIP_21_405EXr_SECURITY

Please note that if you select the wrong define, your board will not
boot, and JTAG will be required to recover.

Tested on custom boards using:

CONFIG_SYS_4xx_CHIP_21_405EX_NO_SECURITY  <sfalco@harris.com>
CONFIG_SYS_4xx_CHIP_21_405EX_SECURITY     <eibach@gdsys.de>

Signed-off-by: Steve Falco <sfalco@harris.com>
Acked-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoEnable multiple fs options for Marvell SoC family on OpenRD boards
Clint Adams [Fri, 6 May 2011 16:36:47 +0000 (22:06 +0530)]
Enable multiple fs options for Marvell SoC family on OpenRD boards

Signed-off-by: Clint Adams <clint@debian.org>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Julian Pidancet <julian.pidancet@citrix.com>
13 years agoInitialize second PHY on OpenRD-Client and OpenRD-Ultimate
Clint Adams [Fri, 6 May 2011 16:36:47 +0000 (22:06 +0530)]
Initialize second PHY on OpenRD-Client and OpenRD-Ultimate

Though the OpenRD-Base only has one gigabit Ethernet port,
both the OpenRD-Client and OpenRD-Ultimate each have two.

On the Ultimate, the PHY addresses are consecutive, but
on the Client they are not.

(based on
<62a0952ce368acc725063a00a5ec680a639d6c27.1301040318.git.julian.pidancet@citrix.com>
<ad0a2dc1e422698b005d6f0ceb6dd6f75a87e00a.1301040318.git.julian.pidancet@citrix.com>
)

Signed-off-by: Clint Adams <clint@debian.org>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Julian Pidancet <julian.pidancet@citrix.com>
13 years agoAdd definitions for OpenRD-Client and OpenRD-Ultimate
Clint Adams [Fri, 6 May 2011 16:36:47 +0000 (22:06 +0530)]
Add definitions for OpenRD-Client and OpenRD-Ultimate

Signed-off-by: Clint Adams <clint@debian.org>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Julian Pidancet <julian.pidancet@citrix.com>
13 years agoRename openrd_base files to openrd
Clint Adams [Fri, 6 May 2011 16:36:47 +0000 (22:06 +0530)]
Rename openrd_base files to openrd

Signed-off-by: Clint Adams <clint@debian.org>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Julian Pidancet <julian.pidancet@citrix.com>
13 years agomv-common.h: fix DRAM banks configuration
Simon Guinot [Tue, 3 May 2011 15:47:34 +0000 (21:17 +0530)]
mv-common.h: fix DRAM banks configuration

The asm/arch/config.h header define CONFIG_NR_DRAM_BANKS_MAX, which is
needed to configure DRAM banks.

This patch move the asm/arch/config.h header inclusion above the DRAM
banks configuration.

Additionally this patch fix a typo.

Signed-off-by: Simon Guinot <sguinot@lacie.com>
13 years agoKirkwood: allow to override CONFIG_SYS_TCLK
Simon Guinot [Tue, 3 May 2011 15:47:34 +0000 (21:17 +0530)]
Kirkwood: allow to override CONFIG_SYS_TCLK

This patch allow to override CONFIG_SYS_TCLK from board configuration
files. This is needed for the Network Space v2 which use a non standard
core clock frequency (166MHz instead of 200MHz for a 6281 SoC).

As a possible enhancement for 6281 and 6282 devices, TCLK could be
dynamically detected by checking the Sample at Reset register bit 21.

Additionally this patch fix a typo.

Signed-off-by: Simon Guinot <sguinot@lacie.com>
Acked-by: Prafulla Wadaskar <Prafulla@marvell.com>
13 years agoMX31: change return value of get_cpu_rev
Stefano Babic [Fri, 29 Apr 2011 06:56:27 +0000 (08:56 +0200)]
MX31: change return value of get_cpu_rev

Drop warnings in get_cpu_rev and changes the return value
(a u32 instead of char * is returned) of the function
to be coherent with other processors.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Detlev Zundel <dzu@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoMX31: removed warning due to missing prototype
Stefano Babic [Tue, 26 Apr 2011 05:40:19 +0000 (07:40 +0200)]
MX31: removed warning due to missing prototype

Drop warning caused by missing prototype for
mxc_hw_watchdog_reset().

Signed-off-by: Stefano Babic <sbabic@denx.de>
13 years agogpio: imx: Fix return value on error
Fabio Estevam [Sat, 9 Apr 2011 10:43:24 +0000 (10:43 +0000)]
gpio: imx: Fix return value on error

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoMX31: mx31pdk: Add watchdog support
Fabio Estevam [Sun, 10 Apr 2011 08:17:50 +0000 (08:17 +0000)]
MX31: mx31pdk: Add watchdog support

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoda850evm: fix NAND WSTROBE and TA timings
Ben Gardiner [Wed, 20 Apr 2011 20:25:06 +0000 (16:25 -0400)]
da850evm: fix NAND WSTROBE and TA timings

The current NAND timings, introduced in commit
a3f88293ddd13facd734769c1664d35ab4ed681f da850evm: setup the NAND flash
timings , incorrectly set WSTROBE and TA to 0. A more recent inspection of the
values set by the Linux kernel indicates that these should be set to 1.

Set the WSTROBE and TA field of the EMIFA cycle-count timings configuration to
1 to match the values set by linux.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Stefano Babic <sbabic@denx.de>
CC: Sandeep Paulraj <s-paulraj@ti.com>
CC: Scott Wood <scottwood@freescale.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agokeymile boards: move keymile specific header in subdir
Valentin Longchamp [Wed, 4 May 2011 01:47:33 +0000 (01:47 +0000)]
keymile boards: move keymile specific header in subdir

Collect all keymile specific common headers in include/configs/km.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Holger Brunck <holger.brunck@keymile.com>

13 years agokm/common: fix coding style issues in generic header
Holger Brunck [Fri, 8 Apr 2011 02:47:46 +0000 (02:47 +0000)]
km/common: fix coding style issues in generic header

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
13 years agokm/common: implement setboardid command
Holger Brunck [Wed, 4 May 2011 01:47:30 +0000 (01:47 +0000)]
km/common: implement setboardid command

Read out board id and HW key from the IVM eeprom and set
these values as an environment variable.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

13 years agocommon/hush: make get_local_var visible for other users
Holger Brunck [Fri, 8 Apr 2011 02:47:42 +0000 (02:47 +0000)]
common/hush: make get_local_var visible for other users

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
13 years agokm/common: fix initial_boot_bank for bootpackages
Thomas Herzmann [Fri, 8 Apr 2011 02:47:41 +0000 (02:47 +0000)]
km/common: fix initial_boot_bank for bootpackages

The initial_boot_bank can be set when more than one application is
used in a bootpackage. But a value n <> 0 never led to booting from
bank n. Instead, bank 0 was booted. This patch fixes this.

Signed-off-by: Thomas Herzmann <thomas.herzmann@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
13 years agopowerpc/km82xx: fix compile issue for mgcoge2ne
Holger Brunck [Fri, 6 May 2011 00:41:55 +0000 (00:41 +0000)]
powerpc/km82xx: fix compile issue for mgcoge2ne

commit 91a3c14c (ppc, mgcoge: add DIP switch detection)
introduces an compile error due to an missing define in the
mgcoge2ne.h. DIP switch detection is valid for both boards.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Heiko Schocher <hs@denx.de>

13 years agopoweprc/km82xx: add board specific environment variable
Holger Brunck [Fri, 8 Apr 2011 02:47:30 +0000 (02:47 +0000)]
poweprc/km82xx: add board specific environment variable

On mgcoge3ne a new environment variable bobcatreset is used.
So this patch adds a possibility to add board specific
environment variables in general and this specific variable
for mgcoge3ne.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
13 years agopowerpc/km82xx: adapt CONFIG_SYSSYPCR to manual
Holger Brunck [Fri, 8 Apr 2011 02:47:28 +0000 (02:47 +0000)]
powerpc/km82xx: adapt CONFIG_SYSSYPCR to manual

Reserved bit was changed according to the processors manual.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
13 years agopowerpc/km82xx: add mgcoge3ne and remove mgcoge2ne support
Holger Brunck [Mon, 2 May 2011 22:56:55 +0000 (22:56 +0000)]
powerpc/km82xx: add mgcoge3ne and remove mgcoge2ne support

This patch adds support for the MPC8247 based board mgcoge3ne.
Additionaly mgcoge2ne board supprot was removed, because due
to the mgcoge3ne, this board is obsolete and not longer
maintained.
The board is similar to mgcoge. The difference is that
a NUMONYX flash is used and a different SDRAM (256MB).
Also introduce CONFIG_KM_82XX to collect ppc82xx common
settings and remove staticness from the common set_pin function.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>

13 years agopowerpc/km82xx: rework DIP switch detection
Huber, Andreas [Mon, 2 May 2011 22:56:54 +0000 (22:56 +0000)]
powerpc/km82xx: rework DIP switch detection

Introduce a struct for the BFTICU FPGA to increase the readability of
the code. And the define CONFIG_SYS_BFTICU_BASE was removed because
the CONFIG_SYS_FPGA_BASE is already the base value for BFTICU registers.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>

13 years agopowerpc/km82xx: rename mgcoge files to km82xx
Holger Brunck [Fri, 8 Apr 2011 04:23:55 +0000 (04:23 +0000)]
powerpc/km82xx: rename mgcoge files to km82xx

The directory and file mgcoge was renamed to km82xx.
Because other keymile 82xx will follow and will use the
same platform code.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
13 years agopowerpc/km82xx: cleanup coding style for mgcoge.c
Holger Brunck [Fri, 8 Apr 2011 02:47:25 +0000 (02:47 +0000)]
powerpc/km82xx: cleanup coding style for mgcoge.c

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
13 years agokm/common: remove hdlc_enet implementation
Holger Brunck [Fri, 8 Apr 2011 02:47:24 +0000 (02:47 +0000)]
km/common: remove hdlc_enet implementation

The hdlc implementation for mgcoge was initially developed,
but later on not used. Remove the C files, the references
in mgcoge.c and the Makefile to decrease maintenance effort.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
13 years agocramfs: make cramfs usable without a NOR flash
Heiko Schocher [Tue, 3 May 2011 02:15:15 +0000 (02:15 +0000)]
cramfs: make cramfs usable without a NOR flash

cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
13 years agocramfs: fix bug in using CONFIG_CRAMFS_CMDLINE
Heiko Schocher [Tue, 3 May 2011 02:15:01 +0000 (02:15 +0000)]
cramfs: fix bug in using CONFIG_CRAMFS_CMDLINE

do not define own flash_info variable, instead use
the flash_info variable defined in your flash driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Wolfgang Denk [Tue, 10 May 2011 20:34:24 +0000 (22:34 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc83xx
Wolfgang Denk [Tue, 10 May 2011 20:30:07 +0000 (22:30 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx

13 years agoMIPS: Move timer code to arch/mips/cpu/$(CPU)/
Shinya Kuribayashi [Fri, 6 May 2011 15:18:13 +0000 (00:18 +0900)]
MIPS: Move timer code to arch/mips/cpu/$(CPU)/

Current timer routines (arch/mips/lib/timer.c) are implemented assuming
that MIPS32 coprocessor (CP0) resources, Counter and Compare registers
in this case, are available.  But this doesn't always work.

We need to make sure that all MIPS-based systems don't necessarily use
CP0 counter/compare registers as time keeping resources.  And some MIPS
variant processors might come with different hardware specs with genuine
MIPS32 CP0 registers.

With this change, each $(CPU)/ directory can have its own timer code.

Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>
13 years agoMIPS: Introduce --gc-sections for MIPS
Daniel Schwierzeck [Fri, 15 Apr 2011 15:16:44 +0000 (17:16 +0200)]
MIPS: Introduce --gc-sections for MIPS

All architectures but MIPS are using --gc-sections on final linking.
This patch introduces that feature for MIPS to reduce the memory and
flash footprint.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Thomas Lange <thomas@corelatus.se>
Cc: Vlad Lungu <vlad.lungu@windriver.com>
Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>
13 years agoMIPS: Coding style cleanups on common assembly files
Shinya Kuribayashi [Fri, 6 May 2011 15:18:13 +0000 (00:18 +0900)]
MIPS: Coding style cleanups on common assembly files

Fix style issues and alignments globally.  No logical changes.
- Replace C comments with AS line comments where possible
- Use ifndef where possible, rather than if !defined for simplicity
- An instruction executed in a delay slot is now indicated by a leading
  space, not by C comment

Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>
13 years agoMIPS: Remove mips_cache_lock() feature
Shinya Kuribayashi [Fri, 6 May 2011 15:18:13 +0000 (00:18 +0900)]
MIPS: Remove mips_cache_lock() feature

As requested in commit e1390801a3c1a2b6d12fa90be368efc19f5b9bfd ([MIPS]
Request for the 'mips_cache_lock()' removal), such feature is no longer
needed for current MIPS implementation of U-Boot, and no one in the tree
uses it for years.

Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>
13 years agoIDE: fix compiler warnings
Wolfgang Denk [Sat, 30 Apr 2011 21:29:55 +0000 (23:29 +0200)]
IDE: fix compiler warnings

The changes introduced by commit 0abddf8 ``cmd_ide: enhance new
feature "CONFIG_IDE_AHB"'' caused compiler warnings like

cmd_ide.c: In function 'ide_init':
cmd_ide.c:716: warning: assignment from incompatible pointer type

Constify the respective function arguments to fix this.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agocommon/cmd_mdio.c: fix compile warning
Anatolij Gustschin [Sat, 30 Apr 2011 02:39:29 +0000 (02:39 +0000)]
common/cmd_mdio.c: fix compile warning

cmd_mdio.c: In function 'mdio_read_ranges':
cmd_mdio.c:97: warning: comparison is always false due to limited range of data type

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Andy Fleming <afleming@freescale.com>
13 years agomiiphy: miiphyutil.c: fix compile warning
Anatolij Gustschin [Sat, 30 Apr 2011 02:17:44 +0000 (02:17 +0000)]
miiphy: miiphyutil.c: fix compile warning

Fix warning introduced while recent PHY Lib changes:

miiphyutil.c: In function 'miiphy_read':
miiphyutil.c:304: warning: comparison is always false due to limited range of data type

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Andy Fleming <afleming@freescale.com>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Wolfgang Denk [Sat, 30 Apr 2011 20:45:55 +0000 (22:45 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

13 years agocmd_nvedit.c: clean up with checkpatch
Macpaul Lin [Tue, 26 Apr 2011 16:16:45 +0000 (16:16 +0000)]
cmd_nvedit.c: clean up with checkpatch

Code clean up of cmd_nvedit.c by using checkpatch.pl.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agocmd_ide: enhance new feature "CONFIG_IDE_AHB"
Macpaul Lin [Mon, 11 Apr 2011 20:45:32 +0000 (20:45 +0000)]
cmd_ide: enhance new feature "CONFIG_IDE_AHB"

Although most IDE controller is designed to be connected to PCI bridge,
there are still some IDE controller support AHB interface for SoC design.

The driver implementation of these IDE-AHB controllers differ from other
IDE-PCI controller, some additional registers and commands access is required
during CMD/DATA I/O. Hence a configuration "CONFIG_IDE_AHB" in cmd_ide.c is
required to be defined to support these kinds of SoC controllers. Such as
Faraday's FTIDE020 series and Global Unichip's UINF-0301.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
13 years agospi: add new driver for OpenCores tiny_spi
Thomas Chou [Mon, 11 Apr 2011 19:48:47 +0000 (19:48 +0000)]
spi: add new driver for OpenCores tiny_spi

This patch adds support for OpenCores tiny_spi.

http://opencores.org/project,tiny_spi

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
13 years agozlib: split up to match original source tree
Mike Frysinger [Fri, 8 Apr 2011 12:23:30 +0000 (12:23 +0000)]
zlib: split up to match original source tree

While looking to upgrade to zlib-1.2.5, the current mondo merge of
multiple files into a single was making things way more difficult
than it should have been.  Hard to pick out what has been changed
to port it to U-Boot, been removed as useless, and bug fixes added
after the fact.

So split the single file up into the original file names, and merge
non-essential changes back from the original tree (for some reason,
style in code in a bunch of places was changed to U-Boot style even
though this isn't "U-Boot" code).

The original build style is retained -- we have a single zlib.c that
includes all the other files, and that is the only file we compile.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agotools/env: document current cross-compilation issues and workaround
Luca Ceresoli [Thu, 7 Apr 2011 22:11:20 +0000 (22:11 +0000)]
tools/env: document current cross-compilation issues and workaround

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
13 years agoHandle most LDSCRIPT setting centrally
Scott Wood [Wed, 6 Apr 2011 13:31:37 +0000 (13:31 +0000)]
Handle most LDSCRIPT setting centrally

Currently, some linker scripts are found by common code in config.mk.
Some are found using CONFIG_SYS_LDSCRIPT, but the code for that is
sometimes in arch config.mk and sometimes in board config.mk.  Some
are found using an arch-specific rule for looking in CPUDIR, etc.

Further, the powerpc config.mk rule relied on CONFIG_NAND_SPL
when it really wanted CONFIG_NAND_U_BOOT -- which covered up the fact
that not all NAND_U_BOOT builds actually wanted CPUDIR/u-boot-nand.lds.

Replace all of this -- except for a handful of boards that are actually
selecting a linker script in a unique way -- with centralized ldscript
finding.

If board code specifies LDSCRIPT, that will be used.
Otherwise, if CONFIG_SYS_LDSCRIPT is specified, that will be used.

If neither of these are specified, then the central config.mk will
check for the existence of the following, in order:

$(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT)
$(TOPDIR)/$(CPUDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT)
$(TOPDIR)/board/$(BOARDDIR)/u-boot.lds
$(TOPDIR)/$(CPUDIR)/u-boot.lds

Some boards (sc3, cm5200, munices) provided their own u-boot.lds that
were dead code, because they were overridden by a CPUDIR u-boot.lds under
the old powerpc rules.  These boards' own u-boot.lds have bitrotted and
no longer work -- these lds files have been removed.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Tested-by: Graeme Russ <graeme.russ@gmail.com>
13 years agokeymile-common.h: remove IO mux stuff
Holger Brunck [Fri, 4 Mar 2011 09:16:00 +0000 (10:16 +0100)]
keymile-common.h: remove IO mux stuff

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>

13 years agokeymile boards: support of boardId / hwkey lists
Thomas Herzmann [Thu, 9 Dec 2010 10:02:09 +0000 (11:02 +0100)]
keymile boards: support of boardId / hwkey lists

In order to support boardId / hwkey lists, the u-boot default
environment has been updated: Added a script checkboardidlist
which checks the list of boardId / hwkey if the boadrId / hwkey
of the IVM is included in that list. This feature is used if you
got different HW variants but you only want to create one boot
package. E.g. supx5 board series.

Signed-off-by: Thomas Herzmann <thomas.herzmann@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>

13 years agoppc, arm: rework and enhance keymile-common.h
Holger Brunck [Fri, 4 Mar 2011 13:56:27 +0000 (14:56 +0100)]
ppc, arm: rework and enhance keymile-common.h

Add:
  - introduce "bootrunner" environment variable
    This allows to execute consecutive different commands
    specified in the list "subbootcmd". If one command fails
    the command serie will stop.
  - introduce environment variable "develop", "ramfs" and "release"
    Each variable is one way to boot our linux. "develop" is for
    development purpose and boots the SW via NFS. "release" is for
    booting the linux image from flash, "ramfs" allows to load an SW
    image via tftp into ram and executes from there
  - introduce "addmem" variable, this command adds the used memory
    for linux to the bootargs
  - introduce "addvar" variable, this command adress for the /var
    directory to the kernel command line
  - introduce "setramfspram" and "setrootfsaddr" these calculation
    were done if "ramfs" was used (only for debugging)
  - introduce "tftpramfs" used for "ramfs" to load the image into
    RAM (only for debugging)
Remove unneeded stuff:
   - CONFIG_IO_MUXING is obsolete for keymile boards
   - CONFIG_KM_DEF_ENV_PRIVATE is also obsolete
   - define CONFIG_SYS_TEXT_BASE in board configs only

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>

13 years agokeymile, common: add setting of some environment variables
Heiko Schocher [Mon, 26 Apr 2010 11:07:28 +0000 (13:07 +0200)]
keymile, common: add setting of some environment variables

This patch adds last_stage_init to all keymile boards. And
in the last stage init some environment variables for u-boot
were set. Currently these are pnvramaddr, pram and var address.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Kim Phillips <kim.phillips@freescale.com>

13 years agokeymile boards: add CONFIG_PIGGY_MAC_ADRESS_OFFSET
Heiko Schocher [Thu, 6 Jan 2011 09:25:26 +0000 (10:25 +0100)]
keymile boards: add CONFIG_PIGGY_MAC_ADRESS_OFFSET

Normaly the PIGGY_MAC_ADRESS can be read directly from the
IVM on keymile boards. On mgcoge3 it differs. Because there
are two piggy boards deployed the second MAC adress must be
calculated with the IVM mac adress and an offset. This patch
allows to set such a offset in the board config.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>

13 years agoarm, keymile: updates for the arm based boards from keymile
Heiko Schocher [Tue, 8 Mar 2011 09:53:51 +0000 (10:53 +0100)]
arm, keymile: updates for the arm based boards from keymile

define KM_IVM_BUS and KM_ENV_BUS macros
 KM_IVM_BUS is used to define the EEprom_ivm environment variable.
 These macros allow the reuse of these I2C addresses in other code
 locations.

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.

added LED initialization for SUEN3
  The bootstat LED required to be initialized so to have a green
  colour after start-up.

define CONFIG_SYS_TEXT_BASE
  This is needed by the relocation code and is not the same for
  our ARM BEC and thus needs to be defined.

remove memsize variable
  An environment variable for memsize is not needed.
  this can be get via the board info struct.

remove unneeded double access to bi_dram[i].size field

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Luca Haab <luca.haab@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>

13 years agokeymile, common; fix i2c deblocking support
Heiko Schocher [Tue, 8 Mar 2011 09:51:15 +0000 (10:51 +0100)]
keymile, common; fix i2c deblocking support

This patch fix the i2c deblocking facility with the i2c HW-Controller.
The required delays for byte reading, the enhanced criteria for stop
the dummy read and required 5 start/stop sequences are added.

Add i2c deblocking before ivm eeprom read.

Improve i2c deblocking sequence by respecting stop hold time.

Cleaned function for deblocking. Have now one function i2c_make_abort()
available for bitbang, mpc82xx and mpc83xx harware controller.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

13 years agoppc, 8321: cleanup tuxa1, tuda1 and suvd3 support
Heiko Schocher [Tue, 8 Mar 2011 09:47:39 +0000 (10:47 +0100)]
ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support

For the kmsupx5 a new header file was introduced km8321-common.h.
Now the common stuff from tuxa1, tuda1 and suvd3 was removed and
the new header file included.

The defines CONFIG_SYS_PIGGY_BASE and CONFIG_SYS_PIGGY_SIZE are
confusing. Because they actually describe the KMBEC FPGA values.
The KMBEC FPGA can be PRIO on kmeter1 or upio on mgcoge. Therefore
all the defines were renamed.

remove unneeded variable CONFIG_KM_DEF_NETDEV, as it is
already declared in keymile-common.h

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

13 years agokm_arm: change some register values for SDRAM initialization
Heiko Schocher [Tue, 22 Feb 2011 08:34:33 +0000 (09:34 +0100)]
km_arm: change some register values for SDRAM initialization

These new values are:
- enables UART0 and UART1 pins in MPP
- define some L2 cache settings
- changes a SDRAM timing to better fit the hardware
- removed three writes that were the same as the reset values

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>

13 years agokm-arm: i2c support for suenx based boards
Heiko Schocher [Tue, 22 Feb 2011 08:13:00 +0000 (09:13 +0100)]
km-arm: i2c support for suenx based boards

This patch renames the suen3 defines and functions to KM_KIRKWOOD
which is more generic and more precise, because these values
and functions where used by all suenX boards and not only suen3.

Signed-off-by: Lukas Roggli <lukas.roggli@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>

13 years agopowerpc, 83xx: add kmsupx5 board support
Heiko Schocher [Tue, 22 Feb 2011 08:08:28 +0000 (09:08 +0100)]
powerpc, 83xx: add kmsupx5 board support

The Keymile SUPx5 board series is based on a PBEC8321 but
contains an additional PBUS FPGA (LPXF) on local bus CS2.

Signed-off-by: Thomas Reufer <thomas.reufer@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>

13 years agokeymile, 8321 boards: move common definitions to km8321-common.h
Thomas Reufer [Wed, 17 Nov 2010 15:08:18 +0000 (16:08 +0100)]
keymile, 8321 boards: move common definitions to km8321-common.h

First step for a cleanup of all header files for km8321 boards.

Signed-off-by: Thomas Reufer <thomas.reufer@keymile.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Heiko Schocher <hs@denx.de>

13 years agoppc: add support for ppc based board mgcoge2ne
Heiko Schocher [Tue, 22 Feb 2011 07:58:19 +0000 (08:58 +0100)]
ppc: add support for ppc based board mgcoge2ne

The mgcoge2 board from keymile deploys two different processors.
An ARM based Kirkwood for the "unit" part of the SW and a PPC for
the "ne" part of the SW. Therefore in Linux and U-Boot the names
for the board are mgcoge2un and mgcoge2ne. This patch adds the
mgcoge2ne part of the board. The ppc part of mgboge2 is quite
similar to mgcoge, therefore a generic header km82xx-common.h
was introduced to collect all similiarities. Currently the only
difference is that mgcoge2ne has a 64 MB numonyx NOR flash with
a single die. The mgcoge has a dual die flash 2*32MB from spansion.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

13 years agoarm: add support of Kirkwood based board SUEN8
Heiko Schocher [Tue, 22 Feb 2011 07:36:20 +0000 (08:36 +0100)]
arm: add support of Kirkwood based board SUEN8

The Kirwood based SUEN8 board from Keymile is at this stage
the same than the suen3 board. This patch adds the board
support for the suen8.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>

13 years agoarm: add support for kirkwood based mgcoge2un board
Heiko Schocher [Tue, 22 Feb 2011 07:30:46 +0000 (08:30 +0100)]
arm: add support for kirkwood based mgcoge2un board

This board is similar to keymile suen3.

Signed-off-by: Clive Stubbings <clive.stubbings@xentech.co.uk>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>

13 years agompc832x: add support for mpc8321 based tuda1 board
Heiko Schocher [Thu, 1 Apr 2010 10:10:30 +0000 (12:10 +0200)]
mpc832x: add support for mpc8321 based tuda1 board

This board is similar to suvd3 board. So most initialisation topics
are taken from suvd3 (UART1, Ethernet, piggy PHY, flash, ram) only the
application specific chip selects differ.

Signed-off-by: Lukas Roggli <lukas.roggli@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

13 years agompc832x: add support for mpc8321 based tuxa1 board
Heiko Schocher [Thu, 1 Apr 2010 10:07:25 +0000 (12:07 +0200)]
mpc832x: add support for mpc8321 based tuxa1 board

This board is similar to suvd3 board. So most initialisation topics
are taken from suvd3 (UART1, Ethernet, piggy PHY, flash, ram) only the
application specific chip selects differ.

Signed-off-by: Lukas Roggli <lukas.roggli@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

13 years agompc832x: add support for the mpc8321 based suvd3 board
Heiko Schocher [Thu, 18 Feb 2010 07:08:25 +0000 (08:08 +0100)]
mpc832x: add support for the mpc8321 based suvd3 board

- serial console on UART1
- Ethernet RMII over UCC4
- PHY SMSC LAN8700
- 64MB Flash
- 128 MB DDR2 RAM
- I2C
- bootcount

This board is similiar to the kmeter1 (8360) board,
so common config options are extracted into the
include/configs/km83xx-common.h file.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

13 years agoarm, ppc: rework environment variables for keymile boards
Holger Brunck [Mon, 14 Mar 2011 15:01:04 +0000 (16:01 +0100)]
arm, ppc: rework environment variables for keymile boards

This patch reworks all headerfiles for keymile boards. Furthermore
the environment variables are refactored.

Changes:
  - introduce km-powerpc.h file and extract ppc specific parts to it
  - move ARM specific options and vaiables to km_arm.h
  - sort the environment variables to logical groups
  - enhance the description of the environment variables
  - remove KM specific HW key and board id from kernel command line

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

13 years agoppc, arm: adapt keymile header
Holger Brunck [Mon, 14 Mar 2011 14:49:05 +0000 (15:49 +0100)]
ppc, arm: adapt keymile header

- adapt copyright string
- change bootdelay to 2 seconds
- set max number of command args to 32
- set I/O buffer size to 512

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

13 years agokeymile: Fix Coding style issues for keymile boards.
Heiko Schocher [Tue, 15 Mar 2011 15:52:29 +0000 (16:52 +0100)]
keymile: Fix Coding style issues for keymile boards.

- use I/O accessors
  -> For accessing the FPGA therefore a struct km_bec_fpga
     is introduced.
- no longer externs needed
- to defines, that only select functions, don;t assign a
  numeric value
- Codingstyle changes to prevent checkpatch errors/warnings

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>

13 years agoarm, keymile: rename MACH_SUEN3 to MACH_KM_KIRKWOOD
Holger Brunck [Mon, 14 Mar 2011 14:31:19 +0000 (15:31 +0100)]
arm, keymile: rename MACH_SUEN3 to MACH_KM_KIRKWOOD

The MACH_TYPE SUEN3 is now to specific for keymile boards, because
other boards similar to suen3 will follow. So the MACH_SUEN3 was renamed
to MACH_KM_KIRKWOOD.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>

13 years agopowerpc, mpc83xx: add missing functions to include/common.h
Heiko Schocher [Tue, 15 Mar 2011 11:30:47 +0000 (12:30 +0100)]
powerpc, mpc83xx: add missing functions to include/common.h

add following functions to common.h, to prevent
extern declarations:

void disable_addr_trans(void);
void enable_addr_trans(void);
void ddr_enable_ecc(unsigned int dram_size);

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-mmc
Wolfgang Denk [Fri, 29 Apr 2011 20:45:50 +0000 (22:45 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mmc

13 years agofsl-ddr: Fix mixed-case macro names
Kyle Moffett [Thu, 14 Apr 2011 17:39:30 +0000 (13:39 -0400)]
fsl-ddr: Fix mixed-case macro names

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Bump up the CONFIG_SYS_BOOTM_LEN to 64M on FSL 85xx boards
Kumar Gala [Thu, 28 Apr 2011 15:13:41 +0000 (10:13 -0500)]
powerpc/85xx: Bump up the CONFIG_SYS_BOOTM_LEN to 64M on FSL 85xx boards

CONFIG_SYS_BOOTMAPSZ has been 64M on these boards for some time so we
should also allow the kernel image to be up to 64M decompressed.  This
also matches what we pass to the OS based on the ePAPR specification.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Enable eSPI support on P1022DS
Jiang Yutang [Thu, 24 Feb 2011 08:11:56 +0000 (16:11 +0800)]
powerpc/85xx: Enable eSPI support on P1022DS

Signed-off-by: Jiang Yutang <b14898@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Enable eSPI support for p1_p2_rdb
Priyanka Jain [Tue, 8 Feb 2011 07:47:35 +0000 (13:17 +0530)]
powerpc/85xx: Enable eSPI support for p1_p2_rdb

Also added support to save env to spi flash in case of SPIBOOT.

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Enable eSPI controller & SPI boot support on P2020DS
Jerry Huang [Mon, 24 Jan 2011 17:09:56 +0000 (17:09 +0000)]
powerpc/85xx: Enable eSPI controller & SPI boot support on P2020DS

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Zhao Chenhui <b35336@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc: eSPI and eSPI controller support
Mingkai Hu [Tue, 26 Apr 2011 08:31:16 +0000 (16:31 +0800)]
powerpc: eSPI and eSPI controller support

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Singed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Shaohui Xie <b21989@freescale.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agotsec: Fix MDIO on devices with eTSEC2
Andy Fleming [Fri, 29 Apr 2011 07:26:52 +0000 (02:26 -0500)]
tsec: Fix MDIO on devices with eTSEC2

The tsec driver was defining the default MDIO address as
the TSEC_BASE + 0x520, but on eTSEC2 controllers, the first
TSEC's registers are separated from the MDIO registers. Use
the existing MDIO_BASE_ADDR, instead.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agommc: coding style fix and tabify of mmc.h
Thomas Chou [Tue, 19 Apr 2011 03:48:31 +0000 (03:48 +0000)]
mmc: coding style fix and tabify of mmc.h

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
13 years agofsl_esdhc: Fix multi-block read restriction on i.MX53 eSDHCv2
Jason Liu [Tue, 22 Mar 2011 01:32:31 +0000 (01:32 +0000)]
fsl_esdhc: Fix multi-block read restriction on i.MX53 eSDHCv2

For freescale i.MX53 eSDHCv2, when using CMD12, cmdtype need
to be set to ABORT, otherwise, next read command will hang.

This is a software Software Restrictions in i.MX53 reference manual:

29.7.8 Multi-block Read
For pre-defined multi-block read operation, that is,the number of blocks
to read has been defined by previous CMD23 for MMC, or pre-defined number
of blocks in CMD53 for SDIO/SDCombo,or whatever multi-block read without
abort command at card side, an abort command, either automatic or manual
CMD12/CMD52, is still required by ESDHC after the pre-defined number of
blocks are done, to drive the internal state machine to idle mode. In this
case, the card may not respond to this extra abort command and ESDHC will
get Response Timeout.  It is recommended to manually send an abort command
with RSPTYP[1:0] both bits cleared.

Signed-off-by: Jason Liu <jason.hui@linaro.org>
13 years agoMMC: omap_hsmmc.c: disable multiblock rw on old rev omap34xx silicon
John Rigby [Tue, 19 Apr 2011 05:48:14 +0000 (05:48 +0000)]
MMC: omap_hsmmc.c: disable multiblock rw on old rev omap34xx silicon

Signed-off-by: John Rigby <john.rigby@linaro.org>
13 years agoMMC: make b_max unconditional
John Rigby [Mon, 18 Apr 2011 05:50:08 +0000 (05:50 +0000)]
MMC: make b_max unconditional

Make existing field b_max field in struct mmc unconditional
and use it instead of CONFIG_SYS_MMC_MAX_BLK_COUNT in mmc_bread
and mmc_bwrite.

Initialize b_max to CONFIG_SYS_MMC_MAX_BLK_COUNT in mmc_register
if it has not been initialized by the hw driver.

Initialize b_max to 0 in all callers to mmc_register.

Signed-off-by: John Rigby <john.rigby@linaro.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agommc_spi: add mmc_init call
Thomas Chou [Sun, 17 Apr 2011 21:00:46 +0000 (21:00 +0000)]
mmc_spi: add mmc_init call

As Andy Fleming suggested, we can call mmc_init() in mmc_spi command.
So that we don't need to run mmcinfo command next.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
13 years agoARMV7: Vexpress: Add MMC support
Matt Waddel [Sat, 16 Apr 2011 11:54:08 +0000 (11:54 +0000)]
ARMV7: Vexpress: Add MMC support

Added the board specific definitions to use the MMCI device.

Signed-off-by: Matt Waddel <matt.waddel@linaro.org>