project/bcm63xx/u-boot.git
12 years agobootstage: Create an initial header for boot progress integers
Simon Glass [Sat, 14 Jan 2012 15:24:44 +0000 (15:24 +0000)]
bootstage: Create an initial header for boot progress integers

At present boot_stage_progress() is called with various magic numbers. The
new bootstage.h header will be used to turn these into symbolic names
throughout the code.

The intent is not that these numbers are passed to Linux. In fact by using
an enum to track them we should eventually be able to remove the explict
numbers and just have the stages count up from 0.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootvx: Clear and disable data cache, and call vxWorks with parameter.
Reinhard Arlt [Fri, 18 Nov 2011 09:06:52 +0000 (09:06 +0000)]
bootvx: Clear and disable data cache, and call vxWorks with parameter.

This patch clear and disable the data cache for vxWorks.

The entry point sysInit(int) intended by Windriver to be called from
the vxWorks bootrom, a very small vxWorks system.
The routine is called by the go() handler in the bootrom, that clears
the cache from start of image to end of usable memory.

The PowerPC implementations only invalidates and disable the cache,
the ARM implementations also flush it.

U-Boot will be on the safe side, if it disables the data cache before
calling vxWorks sysInit(int).

Signed-off-by: Reinhard Arlt <reinhard.arlt@esd.eu>
12 years agonet/miiphy/serial: drop duplicate "NAMESIZE" define
Mike Frysinger [Thu, 10 Nov 2011 14:11:04 +0000 (14:11 +0000)]
net/miiphy/serial: drop duplicate "NAMESIZE" define

A few subsystems are using the same define "NAMESIZE".  This has been
working so far because they define it to the same number.  However, I
want to change the size of eth_device's NAMESIZE, so rather than tweak
the define names, simply drop references to it.  Almost no one does,
and the handful that do can easily be changed to a sizeof().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoCPCI750: Add CPCI-HD/2 support
Reinhard Arlt [Thu, 10 Nov 2011 08:51:57 +0000 (08:51 +0000)]
CPCI750: Add CPCI-HD/2 support

This patch adds support for the esd CPCI-HD/2 board to u-boot for CPCI-CPU/750.
As the primary devices on the CPCI-HD/2 board are connected to device 1 and 3,
the device must be swapped.

Signed-off-by: Reinhard Arlt <reinhard.arlt@esd.eu>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-avr32
Wolfgang Denk [Sat, 17 Mar 2012 20:50:59 +0000 (21:50 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-avr32

* 'master' of git://git.denx.de/u-boot-avr32:
  atmel_mci.h: remove outdated register macros
  doc/git-mailrc: add <me> to avr32 alias
  ATMEL: remove old atmel_mci driver
  ATMEL: use generic mmc framework

12 years agoMerge branch 'sandbox' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Sat, 17 Mar 2012 20:46:33 +0000 (21:46 +0100)]
Merge branch 'sandbox' of git://git.denx.de/u-boot-blackfin

* 'sandbox' of git://git.denx.de/u-boot-blackfin:
  sandbox: mark os_exit as noreturn
  sandbox: add getopt support
  sandbox: allow processing before main loop
  sandbox: add concept of sandbox state
  sandbox: disable fortification
  sandbox: u-boot.lds: tweak style
  sandbox: add get_{tbclk,ticks}
  sandbox: enable GPIO driver
  sandbox: gpio: add basic driver for simulating GPIOs
  sandbox: add flags for open() call
  sandbox: config: enable fdt and snprintf() options
  sandbox: fdt: add support for CONFIG_OF_CONTROL
  sandbox: add lseek helper
  sandbox: add ifdef protection to os.h
  sandbox: add required header to os.c
  sandbox: sort header files in os.c

12 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Wolfgang Denk [Sat, 17 Mar 2012 20:44:35 +0000 (21:44 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

* 'master' of git://git.denx.de/u-boot-sh:
  sh: timer: Remove unnecessary variable 'ticks'
  sh: Fix sh7264 clock speed and related serial setting
  net: sh_eth: Remove unnecessary return
  net: sh_eth: Collect up EDMR_INIT_CNT to TIMEOUT_CNT
  net: sh_eth: Remove SH_ETH_PHY_DELAY
  sh: ecovec: Add support PHY of SMSC
  sh: sh_eth: Add support SH7724

12 years agomxsboot: fix tool name in usage message
Otavio Salvador [Sat, 17 Mar 2012 09:16:50 +0000 (09:16 +0000)]
mxsboot: fix tool name in usage message

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
12 years agoatmel_mci.h: remove outdated register macros
Andreas Bießmann [Tue, 13 Mar 2012 11:43:51 +0000 (12:43 +0100)]
atmel_mci.h: remove outdated register macros

New gen_atmel_mci driver does not use the outated register access macros. Since
the old atmel_mci driver is deleted these macros are no longer necessary.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
12 years agodoc/git-mailrc: add <me> to avr32 alias
Andreas Bießmann [Sat, 10 Mar 2012 12:31:35 +0000 (13:31 +0100)]
doc/git-mailrc: add <me> to avr32 alias

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoATMEL: remove old atmel_mci driver
Sven Schnelle [Fri, 21 Oct 2011 12:49:26 +0000 (14:49 +0200)]
ATMEL: remove old atmel_mci driver

All boards are using the gen_atmel_mci driver now, so no need
to carry the old driver around.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoATMEL: use generic mmc framework
Sven Schnelle [Fri, 21 Oct 2011 12:49:25 +0000 (14:49 +0200)]
ATMEL: use generic mmc framework

gen_atmel_mci works on AVR32 as well, so no need to use the legacy
mmc driver. This also has the nice side effect of being able to use
SDHC cards an those boards.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agosandbox: mark os_exit as noreturn
Mike Frysinger [Sun, 26 Feb 2012 22:46:30 +0000 (17:46 -0500)]
sandbox: mark os_exit as noreturn

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add getopt support
Simon Glass [Wed, 15 Feb 2012 23:51:16 +0000 (15:51 -0800)]
sandbox: add getopt support

This adds simple command-line parsing to sandbox. The idea is that it
sets up the state with options provided, and this state can then be
queried later, as needed.

New flags are declared with the SB_CMDLINE_OPT_SHORT helper macro,
pointers are automatically gathered up in a special section, and
then the core code takes care of gathering them up and processing
at runtime.  This way there is no central place where we have to
store a list of flags with ifdefs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: allow processing before main loop
Simon Glass [Sun, 26 Feb 2012 22:38:50 +0000 (17:38 -0500)]
sandbox: allow processing before main loop

In order to pass command line arguments to sandbox we need to be able
to act on them. So take control back at the end of board_init_r() from
where we can call the main loop or do something else.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add concept of sandbox state
Simon Glass [Wed, 15 Feb 2012 23:51:15 +0000 (15:51 -0800)]
sandbox: add concept of sandbox state

The state exists through the life of U-Boot. It can be adjusted by command
line options and perhaps later through a config file.  It is available to
U-Boot through state_...() calls (within sandbox code).

The primary purpose of this is to contain the "hardware" state.  It should
only be used by sandbox internal code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: disable fortification
Mike Frysinger [Sun, 26 Feb 2012 21:00:26 +0000 (16:00 -0500)]
sandbox: disable fortification

Since we provide all our own library calls, the fortification from
glibc just gets in our way (which some distros enable by default).

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: u-boot.lds: tweak style
Mike Frysinger [Sun, 26 Feb 2012 19:13:31 +0000 (14:13 -0500)]
sandbox: u-boot.lds: tweak style

We use tabs for indentation, not spaces.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add get_{tbclk,ticks}
Mike Frysinger [Tue, 21 Feb 2012 05:21:17 +0000 (00:21 -0500)]
sandbox: add get_{tbclk,ticks}

Fixes building after recent readline updates with timeouts.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: enable GPIO driver
Simon Glass [Wed, 15 Feb 2012 23:51:14 +0000 (15:51 -0800)]
sandbox: enable GPIO driver

Enable the new GPIO driver for sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: gpio: add basic driver for simulating GPIOs
Simon Glass [Wed, 15 Feb 2012 23:51:13 +0000 (15:51 -0800)]
sandbox: gpio: add basic driver for simulating GPIOs

This provides a way of simulating GPIOs by setting values which are seen
by the normal gpio_get/set_value() calls.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add flags for open() call
Simon Glass [Tue, 21 Feb 2012 04:56:58 +0000 (23:56 -0500)]
sandbox: add flags for open() call

This provides a way for callers to create files for writing. The flags
are translated at runtime, for the ones we support.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: config: enable fdt and snprintf() options
Simon Glass [Wed, 15 Feb 2012 23:51:12 +0000 (15:51 -0800)]
sandbox: config: enable fdt and snprintf() options

Enable fdt code and safe snprintf() options for sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: fdt: add support for CONFIG_OF_CONTROL
Simon Glass [Wed, 15 Feb 2012 23:51:11 +0000 (15:51 -0800)]
sandbox: fdt: add support for CONFIG_OF_CONTROL

This adds support for a controlling fdt, mirroring the ARM implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add lseek helper
Mike Frysinger [Tue, 25 Oct 2011 11:02:58 +0000 (13:02 +0200)]
sandbox: add lseek helper

Follow up patches want to be able to seek fd's.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add ifdef protection to os.h
Mike Frysinger [Fri, 20 Jan 2012 03:57:29 +0000 (22:57 -0500)]
sandbox: add ifdef protection to os.h

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add required header to os.c
Simon Glass [Tue, 10 Jan 2012 23:54:06 +0000 (15:54 -0800)]
sandbox: add required header to os.c

We should include the sys/time.h header to avoid warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: sort header files in os.c
Simon Glass [Tue, 10 Jan 2012 23:54:05 +0000 (15:54 -0800)]
sandbox: sort header files in os.c

Tidy this up as the list is long and likely to get longer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoRevert "post/Makefile: Only build FP post tests if enabled via CONFIG_SYS_POST_FPU"
Wolfgang Denk [Mon, 12 Mar 2012 14:00:23 +0000 (15:00 +0100)]
Revert "post/Makefile: Only build FP post tests if enabled via CONFIG_SYS_POST_FPU"

This reverts commit 3e16abe0e468c568b30acb7d8583e3dbed6f177b.

The logic of this patch is broken - testing for CONFIG_SYS_POST_FPU in
the Makefile cannot work, as this is only a bit that may (or may not)
be set in the CONFIG_POST variable.

The patch cases build errors on a number of boards, so we revert it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agosh: timer: Remove unnecessary variable 'ticks'
Nobuhiro Iwamatsu [Thu, 1 Mar 2012 04:29:38 +0000 (13:29 +0900)]
sh: timer: Remove unnecessary variable 'ticks'

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agosh: Fix sh7264 clock speed and related serial setting
Phil Edworthy [Mon, 13 Feb 2012 02:03:50 +0000 (02:03 +0000)]
sh: Fix sh7264 clock speed and related serial setting

The generalised calculation of the serial bit rate reg also applies
to sh7264, it was just the clock speed that was set incorrectly.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agonet: sh_eth: Remove unnecessary return
Nobuhiro Iwamatsu [Wed, 11 Jan 2012 01:32:54 +0000 (10:32 +0900)]
net: sh_eth: Remove unnecessary return

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agonet: sh_eth: Collect up EDMR_INIT_CNT to TIMEOUT_CNT
Nobuhiro Iwamatsu [Wed, 11 Jan 2012 01:23:51 +0000 (10:23 +0900)]
net: sh_eth: Collect up EDMR_INIT_CNT to TIMEOUT_CNT

EDMR_INIT_CNT holds the check count of initialization.
Since there were more same values (1000), this collected as TIMEOUT_CNT.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agonet: sh_eth: Remove SH_ETH_PHY_DELAY
Nobuhiro Iwamatsu [Wed, 11 Jan 2012 01:12:08 +0000 (10:12 +0900)]
net: sh_eth: Remove SH_ETH_PHY_DELAY

SH_ETH_PHY_DELAY is not used.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agosh: ecovec: Add support PHY of SMSC
Nobuhiro Iwamatsu [Thu, 1 Dec 2011 18:48:38 +0000 (18:48 +0000)]
sh: ecovec: Add support PHY of SMSC

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agosh: sh_eth: Add support SH7724
Nobuhiro Iwamatsu [Mon, 14 Nov 2011 07:56:59 +0000 (16:56 +0900)]
sh: sh_eth: Add support SH7724

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agoimage: Support FDTs already loaded at their load address
Stephen Warren [Tue, 1 Nov 2011 06:28:21 +0000 (06:28 +0000)]
image: Support FDTs already loaded at their load address

boot_get_fdt() expects a uImage-wrapped FDT to be loaded to a staging
location, and then memmove()s it to the load address specified in the
header. This change enhances boot_get_fdt() to detect when the image has
already been loaded to the correct address, and skip this memmove(). The
detection algorithm was written to match the equivalent for the kernel;
see bootm_load_os()'s IH_COMP_NONE case.

v2: New patch

Signed-off-by: Stephen Warren <swarren@nvidia.com>
12 years agocmd_cache: use cache/invalidate functions available in common.h
Stefan Kristiansson [Mon, 31 Oct 2011 18:21:12 +0000 (18:21 +0000)]
cmd_cache: use cache/invalidate functions available in common.h

flush_dcache()/flush_icache() aren't defined in common.h,
flush_dcache_all()/invalidate_icache_all() however are.

Let the icache and dcache commands use those instead.

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agotools: checkstack.pl from Linux added to tools
Tom Rini [Thu, 2 Feb 2012 14:07:05 +0000 (14:07 +0000)]
tools: checkstack.pl from Linux added to tools

Added from Linux - commit 62aa2b537c6f5957afd98e29f96897419ed5ebab

Signed-off-by: Tom Rini <trini@ti.com>
12 years agoMakefile: Remove mmc_spl related enteries
Chander Kashyap [Mon, 7 Nov 2011 18:43:14 +0000 (18:43 +0000)]
Makefile: Remove mmc_spl related enteries

As mmc_spl now follows SPL infrastructure, removed unwanted
entries in Makefile for mmc_spl related compilation.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Wolfgang Denk [Tue, 6 Mar 2012 20:28:45 +0000 (21:28 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

* 'master' of git://git.denx.de/u-boot-x86:
  sc520: fix build warning about unused temp var

12 years agoPPC: Drop mv6446x_eth_initialize() from net/eth.c
Marek Vasut [Fri, 2 Mar 2012 22:39:32 +0000 (22:39 +0000)]
PPC: Drop mv6446x_eth_initialize() from net/eth.c

This function was defined as an extern in net/eth.c, drop that and use
standard means of calling it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
12 years agoPPC: Drop mv6436x_eth_initialize() from net/eth.c
Marek Vasut [Fri, 2 Mar 2012 22:39:31 +0000 (22:39 +0000)]
PPC: Drop mv6436x_eth_initialize() from net/eth.c

This function was defined as an extern in net/eth.c, drop that and use
standard means of calling it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
12 years agoConvert cmd_usage() calls in common to use a return value
Simon Glass [Sat, 10 Dec 2011 08:44:01 +0000 (08:44 +0000)]
Convert cmd_usage() calls in common to use a return value

Change all files in common/ to use CMD_RET_USAGE instead of calling
cmd_usage() directly. I'm not completely sure about this patch since
the code since impact is small (100 byte or so on ARM) and it might
need splitting into smaller patches. But for now here it is.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoAdd cmd_process() to process commands in one place
Simon Glass [Tue, 14 Feb 2012 19:59:25 +0000 (19:59 +0000)]
Add cmd_process() to process commands in one place

We currently have the same code in hush.c and main.c. This brings the
code into one place.

As an added feature, if the command function returns CMD_RET_USAGE then
cmd_process() will print a usage message for the command before
returning the standard failure code of 1.

ARM code size increases about 32 bytes with this clean-up.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoRemove interleave of non-U-Boot code in hush
Simon Glass [Tue, 6 Dec 2011 19:47:53 +0000 (19:47 +0000)]
Remove interleave of non-U-Boot code in hush

There is a nasty interleave of #ifdefs in hush.c where the two code
paths have different indents. Remove this ickiness.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoCreate a single cmd_call() function to handle command execution
Simon Glass [Tue, 14 Feb 2012 19:59:23 +0000 (19:59 +0000)]
Create a single cmd_call() function to handle command execution

We should aim for a single point of entry to the commands, whichever
parser is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoDon't include standard parser if hush is used
Simon Glass [Tue, 14 Feb 2012 19:59:22 +0000 (19:59 +0000)]
Don't include standard parser if hush is used

This saves about 1KB of code space on ARM with CONFIG_SYS_HUSH_PARSER
defined.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoStop using builtin_run_command()
Simon Glass [Tue, 14 Feb 2012 19:59:21 +0000 (19:59 +0000)]
Stop using builtin_run_command()

Boards can select either the 'built-in' parser or the hush parser. We
should not call builtin_run_command() if we are using the hush parser.
We use run_command() instead, since it knows how to call the correct
parser.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoRename run_command2() to run_command()
Simon Glass [Tue, 14 Feb 2012 19:59:20 +0000 (19:59 +0000)]
Rename run_command2() to run_command()

This is a more sensible name, so rename it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoRename run_command() to builtin_run_command()
Simon Glass [Tue, 14 Feb 2012 19:59:19 +0000 (19:59 +0000)]
Rename run_command() to builtin_run_command()

The current run_command() is only one of the parsing options - the other
is hush. We should not call run_command() when the hush parser is being
used. So we rename this function to better explain its purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoRemove CMD_PXE's static on run_command()
Simon Glass [Tue, 14 Feb 2012 19:59:18 +0000 (19:59 +0000)]
Remove CMD_PXE's static on run_command()

It really isn't clear why this is here and there is no comment, so
drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agosc520: fix build warning about unused temp var
Mike Frysinger [Mon, 5 Mar 2012 11:55:32 +0000 (11:55 +0000)]
sc520: fix build warning about unused temp var

Building the eNET_SRAM board fails for me:
sc520_timer.c: In function 'sc520_udelay':
sc520_timer.c:81:7: error: variable 'temp' set but not used
[-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [sc520_timer.o] Error 1

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoRemove execute permissions from source files
Thomas Weber [Mon, 13 Feb 2012 18:21:54 +0000 (19:21 +0100)]
Remove execute permissions from source files

Signed-off-by: Thomas Weber <weber@corscience.de>
12 years agointegrator: remove fragile delay loop from PCI code
Linus Walleij [Sat, 3 Mar 2012 20:21:13 +0000 (21:21 +0100)]
integrator: remove fragile delay loop from PCI code

The reference implementation of the PCI initialization code almost
everywhere contain this fragile loop of "a few usecs", and its
use of volatile variables to delay a number of bus cycles is indeed
uncertain.

Reading the manual "Integrator/AP Users Guide", page 5-15 it is
clearly stated:

"Wait until 230ms after the end of the reset period before
accessing V360EPC internal registers. The V360EPC supports the
use of a serial configuration PROM and the software must wait for
the device to detect the absence of this PROM before accessing any
registers. The required delay is a function of the PCI Clock, but
at the lower frequency (25MHz) is 230ms".

So let's simply wait 230ms per the spec.

This solves the compilation error that looked like this:
pci.c: In function ‘pci_init_board’:
pci.c:286:18: warning: variable ‘j’ set but not used

Reported-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agopci: move pciauto_config_init() to pci.h
Linus Walleij [Sat, 3 Mar 2012 10:05:08 +0000 (10:05 +0000)]
pci: move pciauto_config_init() to pci.h

Fixing build regressions for the Integrator I get find that a few
boards try to work around the missing declaration of
pciauto_config_init() by declaring it in the local scope. This
does not make sense when the sibling functions are in <pci.h>
so move the function to the header, ridding the build error
in the Integrator and getting rid of the local declarations
here and there.

Reported-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agoppc: Change memsz variable to signed char
Simon Glass [Thu, 5 Jan 2012 17:54:57 +0000 (17:54 +0000)]
ppc: Change memsz variable to signed char

This seems to be unsigned char for no good reason. Tidy this up and
remove the casts.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agom68k: Change memsz to a signed char to avoid warning
Simon Glass [Thu, 5 Jan 2012 17:54:56 +0000 (17:54 +0000)]
m68k: Change memsz to a signed char to avoid warning

There doesn't seem to be any reason for using uchar here, so change it
to char. This fixes a warning:

pointer targets in passing argument 1 of 'sprintf' differ in signedness

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoUSB: relax usbcore reset timings
Wolfgang Grandegger [Wed, 21 Dec 2011 00:01:09 +0000 (00:01 +0000)]
USB: relax usbcore reset timings

Following the corresponding Linux code, this patch relaxes reset timings
waiting at least 100ms after power to the ports. There are some reports
that it helps make enumeration work better on some high speed devices.
Furthermore, the wait is only done once after power has been enabled
on all ports.

CC: Remy Bohmer <linux@bohmer.net>
CC: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Wolfgang Grandegger <wg@denx.de>
12 years agoUSB: move keyboard polling into kbd driver
amartin@nvidia.com [Tue, 20 Dec 2011 14:56:16 +0000 (14:56 +0000)]
USB: move keyboard polling into kbd driver

This moves keyboard polling logic from USB HCD drivers into USB
keyboard driver.  Remove usb_event_poll() as keyboard polling was
the only user of this API.  With this patch USB keyboard works with
EHCI controllers again.  Tested on a tegra2 seaboard.

Signed-off-by: Allen Martin <amartin@nvidia.com>
12 years agoUSB: reevaluate iomux stdin on USB kbd detect
amartin@nvidia.com [Fri, 23 Dec 2011 10:29:48 +0000 (10:29 +0000)]
USB: reevaluate iomux stdin on USB kbd detect

If CONSOLE_MUX is enabled, reevaluate console stdin when USB keyboard
device is detected.

Signed-off-by: Allen Martin <amartin@nvidia.com>
12 years agousb: add numeric keypad support to HID driver
Vincent Palatin [Mon, 9 Jan 2012 12:59:36 +0000 (12:59 +0000)]
usb: add numeric keypad support to HID driver

When keys are pressed on the numeric keypad, emit key codes for the numbers,
operators, dot and enter.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
12 years agoUSB: fix USB keyboard polling parameter
Vincent Palatin [Mon, 9 Jan 2012 08:35:09 +0000 (08:35 +0000)]
USB: fix USB keyboard polling parameter

When doing a "GET_REPORT" request on the keyboard control endpoint,
the report ID should 0 (ie report ID not used) rather than 1
as reports are not used in boot mode.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
12 years agoeth: remove usb-ethernet devices before re-enumerating them
Vincent Palatin [Mon, 9 Jan 2012 08:32:36 +0000 (08:32 +0000)]
eth: remove usb-ethernet devices before re-enumerating them

Fix the crash when running several times usb_init() with a USB ethernet
device plugged.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Wolfgang Grandegger <wg@denx.de>
12 years agoUSB: Make struct devrequest setup_packet local
Marek Vasut [Mon, 13 Feb 2012 18:58:18 +0000 (18:58 +0000)]
USB: Make struct devrequest setup_packet local

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Remy Bohmer <linux@bohmer.net>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoUSB: Separate out USB hub driver
Marek Vasut [Mon, 13 Feb 2012 18:58:17 +0000 (18:58 +0000)]
USB: Separate out USB hub driver

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Remy Bohmer <linux@bohmer.net>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoUSB: Staticize internal functions
Marek Vasut [Mon, 13 Feb 2012 18:58:16 +0000 (18:58 +0000)]
USB: Staticize internal functions

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Remy Bohmer <linux@bohmer.net>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Wolfgang Denk [Sat, 3 Mar 2012 14:15:07 +0000 (15:15 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

* 'master' of git://git.denx.de/u-boot-nand-flash:
  cmd_nand.c: Fix 'nand dump' after latest MTD resync
  mtd/nand:Fix wrong usage of is_blank() in fsl_ifc_run_command
  mtd/nand: Fix IFC driver to support 2K NAND page
  nand: reinstate lazy bad block scanning
  Revert "nand: make 1-bit software ECC configurable"

12 years agoMerge branch 'master' of git://git.denx.de/u-boot-nds32
Wolfgang Denk [Sat, 3 Mar 2012 14:13:41 +0000 (15:13 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-nds32

* 'master' of git://git.denx.de/u-boot-nds32:
  nds32/board.c: add PCI prompt at boot up
  nds32/ag101/watchdog.S: add linkage support
  nds32: add linkage support

12 years agoEthernut 5: fix build error
prabhakar.csengg@gmail.com [Thu, 23 Feb 2012 01:53:40 +0000 (01:53 +0000)]
Ethernut 5: fix build error

Fix build error for ethernut5 board due to prototype change
for function board_mmc_getcd().
ethernut5.c:238: error: conflicting types for 'board_mmc_getcd'
u-boot/include/mmc.h:318: note: previous declaration of 'board_mmc_getcd'
was here
make[2]: *** [ethernut5.o] Error 1

Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Cc: Tim Schendekehl <tim.schendekehl@egnite.de>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: egnite GmbH <info@egnite.de>
12 years agocmd_nand.c: Fix 'nand dump' after latest MTD resync
Tom Rini [Thu, 23 Feb 2012 22:47:46 +0000 (15:47 -0700)]
cmd_nand.c: Fix 'nand dump' after latest MTD resync

With 2a8e0fc nand_do_read_ops changed in behavior slightly (keeping in sync
with the kernel which did this change in b64d39d8) such that the OOB data is
always copied into oobbuf and never appended to datbuf.  Within U-Boot only
the nand_dump function (for the dump nand subcommand) was expecting the OOB
data to only be appended to datbuf.  So we now change nand_dump to not
malloc extra space, correct the comment about datbuf and OOB data and switch
the pointer to oobbuf before printing.

Cc: Scott Wood <scottwood@freescale.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agomtd/nand:Fix wrong usage of is_blank() in fsl_ifc_run_command
Prabhakar Kushwaha [Fri, 20 Jan 2012 13:08:14 +0000 (18:38 +0530)]
mtd/nand:Fix wrong usage of is_blank() in fsl_ifc_run_command

Freescale IFC NAND Machine calculates ECC on 512byte sector and same is used in
fsl_ifc_run_command() during ECC status verification. Also this sector is passed
to is_blank() for blank checking. It is wrong at first place because
is_blank()'s implementation checks for Page size and OOB area size.
is_blank() should be called per page for main and OOB area verification.

Variables name are redefined to avoid confusion between buffer and ecc sector.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agomtd/nand: Fix IFC driver to support 2K NAND page
Prabhakar Kushwaha [Fri, 20 Jan 2012 13:09:05 +0000 (18:39 +0530)]
mtd/nand: Fix IFC driver to support 2K NAND page

1) OOB area should be updated irrespective of NAND page size. Earlier it was
updated only for 512byte NAND page.

2) During OOB update fbcr should be equal to OOB size.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agonand: reinstate lazy bad block scanning
Scott Wood [Mon, 20 Feb 2012 20:50:39 +0000 (14:50 -0600)]
nand: reinstate lazy bad block scanning

commit 2a8e0fc8b3dc31a3c571e439fbf04b882c8986be ("nand: Merge changes
from Linux nand driver") accidentally reverted commit
13f0fd94e3cae6f8a0d9fba5d367e311edc8ebde ("NAND: Scan bad blocks
lazily.").

Reinstate the change, as amended by commit
ff49ea8977b56916edd5b1766d9939010e30b181 ("NAND: Mark the BBT as scanned
prior to calling scan_bbt.").

Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agoRevert "nand: make 1-bit software ECC configurable"
Scott Wood [Mon, 13 Feb 2012 21:46:27 +0000 (15:46 -0600)]
Revert "nand: make 1-bit software ECC configurable"

This reverts commit 4fee6c2f295f932b8febdc7ce8731ba045695fa5.

It breaks boards that currently rely on soft-ecc, as pointed out here:
http://patchwork.ozlabs.org/patch/140872/

The reverted patch should be resubmitted with documentation, and with the
CONFIG_MTD_ECC_SOFT selected from every board that needs it.  We could
start by looking at what NAND driver the board selects, and whether
that driver ever asks for soft ECC.

Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agonds32/board.c: add PCI prompt at boot up
Macpaul Lin [Fri, 25 Nov 2011 09:14:51 +0000 (17:14 +0800)]
nds32/board.c: add PCI prompt at boot up

add PCI prompt at boot up for probing PCI device

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
12 years agonds32/ag101/watchdog.S: add linkage support
Macpaul Lin [Wed, 30 Nov 2011 08:01:28 +0000 (16:01 +0800)]
nds32/ag101/watchdog.S: add linkage support

Add linkage support to watchdog.S.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
12 years agonds32: add linkage support
Macpaul Lin [Wed, 30 Nov 2011 07:33:55 +0000 (15:33 +0800)]
nds32: add linkage support

Add linkage support.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
12 years agoarmv7: omap3: leave outer cache enabled
Aneesh V [Thu, 16 Feb 2012 03:40:15 +0000 (03:40 +0000)]
armv7: omap3: leave outer cache enabled

Mainline kernel for OMAP3 doesn't enable L2 cache
It expects L2$ to be enabled by ROM-code/bootloader.

Leaving L2$ enabled can be troublesome in cases where
the L2 cache is not under CP15 control, such as in
Cortex-A9. This problem is explained in detail in
the commit dc7100f4080952798413fb63bb4134b22c57623a

However, this problem doesn't apply to Cortex-A8
because L2$ in Cortex-A8 is under CP15 control and
hence the generic armv7 maintenance opertions work
for it.

As such we can make an exception for OMAP3 and
leave the L2$ enabled when we jump to kernel. This
is done by removing the strongly-linked implementation
of v7_outer_cache_disable() and allowing it to fall
back to the weakly linked implementation that doesn't
do anything.

Signed-off-by: Aneesh V <aneesh@ti.com>
12 years agoat91: modified NAND flash timing on otc570 board
Daniel Gorsulowski [Wed, 25 Jan 2012 03:19:50 +0000 (03:19 +0000)]
at91: modified NAND flash timing on otc570 board

Signed-off-by: Daniel Gorsulowski <Daniel.Gorsulowski@esd.eu>
12 years agoat91: modified NAND flash timing on meesc board
Daniel Gorsulowski [Wed, 25 Jan 2012 03:19:49 +0000 (03:19 +0000)]
at91: modified NAND flash timing on meesc board

Signed-off-by: Daniel Gorsulowski <Daniel.Gorsulowski@esd.eu>
12 years agott01: fix hush parser config, add release config
Helmut Raiger [Mon, 30 Jan 2012 04:21:55 +0000 (04:21 +0000)]
tt01: fix hush parser config, add release config

Add PREBOOT, SILENT_CONSOLE and DEVICE_NULLDEV for release
build. Fixed bug in CONFIG_SYS_HUSH_PARSER define.

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
12 years agott01: add video support
Helmut Raiger [Wed, 15 Feb 2012 22:40:12 +0000 (22:40 +0000)]
tt01: add video support

The video setup for the Epson display is provided. Addtionally
some extra info is displayed next to the Linux logo.
Make get_cpu_rev() publicly available (added to sys_proto.h).

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
12 years agott01: fix environment size
Helmut Raiger [Mon, 30 Jan 2012 04:21:53 +0000 (04:21 +0000)]
tt01: fix environment size

size of environment must match erasable block size in the flash.

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
12 years agoi.mx6q: mx6qsabrelite: Update the network configuration
Troy Kisky [Tue, 7 Feb 2012 14:08:50 +0000 (14:08 +0000)]
i.mx6q: mx6qsabrelite: Update the network configuration

Define CONFIG_PHY_MICREL, and
minimize the tx clock delay.

There is an issue with 1000 baseTx mode on early revs
of the SabreLite boards. The center tap pin 9 of the mag RJ45
USB combo was connected to the 3.3 filtered supply. Letting
this pin float solved the problem. Symptoms of the problem
were packets with many extra zeroes tacked on the end, and random
bit flips causing a high rate of CRC errors. 10/100 baseTx worked
fine on all revs. To disable 1000 baseTx for these boards, simply
define the environment variable disable_giga. ie.

setenv disable_giga 1

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
12 years agonet: phy: make board_phy_config responsible for calling drv->config
Troy Kisky [Tue, 7 Feb 2012 14:08:49 +0000 (14:08 +0000)]
net: phy: make board_phy_config responsible for calling drv->config

Boards may have things they want done before or after normal phy config.
Letting the boards call drv->config allows them more flexibilty.
Boards affected by this change are corenet_ds and mpc8544ds.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
12 years agonet: phy: add support for Micrel's KSZ9021
Troy Kisky [Tue, 7 Feb 2012 14:08:48 +0000 (14:08 +0000)]
net: phy: add support for Micrel's KSZ9021

Add the gigabit phy KSZ9021.
Also, add function ksz9021_phy_extended_write
/_read for access to the phys extended registers.
The environment variable "disable_giga"
can be used to disable 1000baseTx.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
12 years agonet: fec_mxc: add PHYLIB support
Troy Kisky [Tue, 7 Feb 2012 14:08:47 +0000 (14:08 +0000)]
net: fec_mxc: add PHYLIB support

Surround non PHYLIB routines miiphy_restart_aneg
and miiphy_wait_aneg with ifndef CONFIG_PHYLIB.
When later PHYLIB is required it is easy to delete
the non-PHYLIB code. This separation idea
came from Andy Fleming.

fec_miiphy_read, and fec_miiphy_write changed to
fec_phy_read, and fec_phy_write with argument changes.

Deprecated miiphy_register is no longer used. Both
old and new PHYLIB code now use mdio_register.

Cleanup some debug prints.

Inline function fec_miiphy_fec_to_eth is no longer necessary.
Moved to the single call location.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agonet: fec_mxc: add 1000 Mbps selection
Troy Kisky [Tue, 7 Feb 2012 14:08:46 +0000 (14:08 +0000)]
net: fec_mxc: add 1000 Mbps selection

Define FEC_QUIRK_ENET_MAC and add to
arch-mx6/imx-regs.h

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
12 years agointegrator: update the Integrator/CP config
Linus Walleij [Tue, 31 Jan 2012 12:20:17 +0000 (12:20 +0000)]
integrator: update the Integrator/CP config

The Integrator/CP config file was very outdated and gives a
non functional U-Boot. So:

- Set the CONFIG_ARCH_CINTEGRATOR arch flag correctly
- Add proper core module configuration options
- Skip cluttered command lista and just include
  <config_cmd_default.h>
- Kill off #if 0 network section and insert some example
  configuration that simply just boots from the network
  using TFTP if available.
- Delete flash control registers that have no business
  in this config file. These are already moved down to
  board/armltd/integrator/integrator-sc.h

Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agointegrator: rewrite the AP PCI driver
Linus Walleij [Mon, 30 Jan 2012 13:49:34 +0000 (13:49 +0000)]
integrator: rewrite the AP PCI driver

The PCI support for the Integrator AP has apparently never
been finished and I strongly suspect that it has never worked,
so let's fix it. This is a list of the more or less
un-splittable changes done in this driver rewrite:

- Replace the register definitions stashed into the config
  file (!) with a copy if the register file from the Linux
  kernels arch/arm/include/asm/hardware/pci_v3.h

- Delete the unreadable gigantic macros that perform the
  config accesses and replace them with copyedited code from
  Linux arch/arm/mach-integrator/pci_v3.c

- Rewrite the rest of the setup code to use the
  v3_[read|write][lwb]() accessors.

- Enable PCI by default in the AP board configuration.

- Fix checkpatch warnings and make code more conformant.

Tested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agointegrator: stop calling pci_init() twice
Linus Walleij [Sat, 21 Jan 2012 13:13:19 +0000 (13:13 +0000)]
integrator: stop calling pci_init() twice

The U-Boot startup infrastructure already makes sure pci_init() is
called at a proper time, calling it again from within the board
setup code will not make things better.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agomcx: Enable command line editing
Detlev Zundel [Wed, 8 Feb 2012 04:49:02 +0000 (04:49 +0000)]
mcx: Enable command line editing

Signed-off-by: Detlev Zundel <dzu@denx.de>
CC: Stefano Babic <sbabic@denx.de>
12 years agodm6467Tevm: Use a common configuration file for davinci_dm6467evm and davinci_dm6467Tevm
prabhakar.csengg@gmail.com [Sun, 12 Feb 2012 21:38:22 +0000 (21:38 +0000)]
dm6467Tevm: Use a common configuration file for davinci_dm6467evm and davinci_dm6467Tevm

In commit 2d575e46859dd9127a9cec731ace77523e6ea2ab a separate header
file was introduced for the DM6467T EVM, include/configs/davinci_dm6467Tevm.h.
The substantial difference between the davinci_dm6467evm and the
davinci_dm6467Tevm configuration is a single bit in the hardware revision
that is passed to the Linux kernel and davinci_dm6467evm has
REFCLK_FREQ = 27000000 where as davinci_dm6467Tevm.h has a
REFCLK_FREQ = 33000000.

This patch removes include/configs/davinci_dm6467Tevm.h. Instead the
include/configs/davinci_dm6467evm.h configuration is used for DM6467T EVMs and
renamed CFG_REFCLK_FREQ to CONFIG_REFCLK_FREQ and CONFIG_REFCLK_FREQ is defined
in boards.cfg.

Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Cc: Tom Rini <trini@ti.com>
12 years agoOMAP3: Remove unused CONFIG_SYS_NAND_ECCSTEPS/TOTAL
Thomas Weber [Mon, 13 Feb 2012 07:59:07 +0000 (07:59 +0000)]
OMAP3: Remove unused CONFIG_SYS_NAND_ECCSTEPS/TOTAL

Signed-off-by: Thomas Weber <weber@corscience.de>
12 years agoTricorder: Switch env to generic mmc driver
Thomas Weber [Mon, 13 Feb 2012 03:16:53 +0000 (03:16 +0000)]
Tricorder: Switch env to generic mmc driver

Because the tricorder uses the CONFIG_OMAP_HSMMC the
initialization command is mmc rescan and not mmc init.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tom Rini <trini@ti.com>
12 years agoomap3_beagle: Change MAINTAINERS entry
Tom Rini [Mon, 13 Feb 2012 06:19:36 +0000 (06:19 +0000)]
omap3_beagle: Change MAINTAINERS entry

Cc: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Dirk Behme<dirk.behme@gmail.com>
12 years agoam335x_evm: Change MAINTAINERS entry
Tom Rini [Mon, 13 Feb 2012 06:02:01 +0000 (06:02 +0000)]
am335x_evm: Change MAINTAINERS entry

Signed-off-by: Tom Rini <trini@ti.com>
12 years agoam33xx: ddr_defs.h: Change DDR timings
Chase Maupin [Mon, 13 Feb 2012 05:57:27 +0000 (05:57 +0000)]
am33xx: ddr_defs.h: Change DDR timings

* For cold silicon the DDR timings need to be relaxed in order for
  the device to boot with DDR at 266MHz
* Fix proposed by James Doublesin

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
12 years agoda850evm: read mac address from I2C EEPROM on AM18x EVM
Hadli, Manjunath [Thu, 9 Feb 2012 20:22:25 +0000 (20:22 +0000)]
da850evm: read mac address from I2C EEPROM on AM18x EVM

add support to read mac address for AM18x EVM manufactured from
Spectrum digital which have mac address stored in I2C EEPROM manufactured
by WINBOND. This patch reads mac address from I2C EEPROM and sets the
environment variable if not set, If mac address is already present in
environment compare it with the mac address in EEPROM and warn on
mismatch.Introduced a config option CONFIG_MAC_ADDR_IN_EEPROM to where
to look for the mac address.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Cc: Tom Rini <trini@ti.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Wolfgang Denk <wd@denx.de>