x86: Remove dead code in eNET

This avoids a compiler warning about unused variables.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-By: Graeme Russ <graeme.russ@gmail.com>
MIPS: board.c: fix init of flash data in bd_info

Boards with CONFIG_SYS_NO_FLASH should not forced to define
CONFIG_SYS_FLASH_BASE. In this case the flash data in bd_info
should be initialized with 0 like the other archs do.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
MIPS: fix inconsistency in config option for cache operation mode

Commit ab2a98b11716364bc5a8c43cdfa7fee176cda1d8 missed to
use the new config option in dcache_enable().

Fix this to avoid inconsistencies if someone wants to disable
and enable D-caches.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
MIPS: fix endianess handling

Make endianess of target CPU configurable. Use the new config
option for dbau1550_el and pb1000 boards.

Adapt linking of standalone applications to pass through
endianess options to LD.

Build tested with:
 - ELDK 4 mips_4KC- and mips4KCle
 - Sourcery CodeBench Lite 2011.03-93

With this patch all 26 MIPS boards can be compiled now in one step by
running "MAKEALL -a mips".

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
LMB: Fix undefined lmb_reserve() on non-lmb platforms

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <TWarren@nvidia.com>
Cc: Graeme Russ <graeme.russ@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
mvgbe: remove warning for unused methods

Some baords may use the GBE interface but they have no
phy connected to the interface and a direct MAC/MAC interface.
For them we need to get rid of compiler warnings.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
net/eth.c: fix eth_write_hwaddr() to use dev->enetaddr as fall back

Ignore the return value of eth_getenv_enetaddr_by_index(), and if it
fails, fall back to use dev->enetaddr, which could be filled up by
the ethernet device driver:

With the current code, introduced with below commit, eth_write_hwaddr()
will fail immediately if there is no eth<n>addr in the environment variables.

However, e.g. for an overo based product that uses the SMSC911x ethernet
chip (with the MAC address set via EEPROM connected to the SMSC911x chip),
the MAC address is still OK.

On mx28 boards that are depending on the OCOTP bits to set the MAC address
(like the Denx m28 board), the OCOTP bits should be used instead of
failing on the environment variables.

Actually, this was the original behavior, and was later changed by
commit 7616e7850804c7c69e0a22c179dfcba9e8f3f587.

Signed-off-by: Eric Miao <eric.miao@linaro.org>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
CC: Stefan Roese <sr@denx.de>
CC: Eric Miao <eric.miao@linaro.org>
CC: Wolfgang Denk <wd@denx.de>
CC: Philip Balister <philip@balister.org>
CC: Zach Sadecki <zach@itwatchdogs.com>
Update net subsystem maintainer in doc/git-mailrc

Signed-off-by: Joe Hershberger <joe.hershberger@gmail.com>
onenand:samsung Target dependent OneNAND chip probe function

Separate callback for probing OneNAND memory chip.
If no special function is defined, default implementation will be used.

This approach gives more flexibility for OneNAND device probing.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
onenand:samsung OneNAND chip probe functions added for GONI and Exynos4210

Separate callback for probing OneNAND memory chip.

Tested at:
       Samsung S5PC110 GONI
       Samsung Exynos4210 (S5PC210 Universal)

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
net: ll_temac: Add LL TEMAC driver to u-boot

Xilinx LocalLink Tri-Mode Ether MAC driver can be
used by Xilinx Microblaze or Xilinx ppc405/440 in
SDMA and FIFO mode. DCR or XPS bus can be used.

The driver uses and requires MII and PHYLIB.

CP: 4 warnings: 'Use of volatile is usually wrong'
I won't fix this, because it depends on the network
driver subsystem.

Reported-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Stephan Linz <linz@li-pro.net>
microblaze: Enable several ethernet driver compilation

U-Boot's multipple network supports enables to use
several ethernet drivers but microblaze-generic
platform config file select only one driver.

Reported-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Stephan Linz <linz@li-pro.net>
microblaze: Add faked LL_TEMAC driver configuration

Expand the specific configuration for the microblaze-generic
board in xparameters.h with a faked setup to enable the
LL_TEMAC driver.

Note: From now the microblaze-generic board is no longer a
valid board configuration for a real piece of hardware. Rather
than, we use the file config.mk and xparameters.h as a faked
board configuration to force the compilation of all potential
driver code for Microblaze systems.

Signed-off-by: Stephan Linz <linz@li-pro.net>
microblaze: Wire up LL_TEMAC driver initialization

Initialize ll_temac driver.

Reported-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Stephan Linz <linz@li-pro.net>
onenand: Replace ONENAND_IS_MLC() with ONENAND_HAS_4KB()

This replacement causes 4KB page size devices to work properly with u-boot.

The old ONENAND_IS_MLC() behavior has been preserved by explicit
setting of ONENAND_HAS_4KB_PAGE for those devices.

This change makes the onenand_base.c file more resembling the respective
kernel sources.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

---
Test HW:
       - Samsung S5PC110 GONI
       - Samsung S5PC210 Universal
onenand: samsung: Enable OneNAND support at Samsung's Exynos4210

Enable OneNAND support for Exynos4210 (C210 universal).

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
net/designware: Fix to restore hw mac address

The network controller mac resets hardware address stored in MAC_HI and MAC_LO
registers if mac is resetted. So, hw mac address needs to be restored in case
mac is explicitly resetted from driver.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
net/designware: Fix the max frame length size

The max frame length for normal descriptor can be 0x7FF i.e 2047. It was wrongly
specified as 2048. Currently, the max descriptor length is around 1500, so
redefining the mask to 1600

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
net/designware: Phy address fix

The code assumes the phy address to be > 0, which is not true, the phy address
can be in the range 0-31.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
net/designware: Consecutive writes must have delay

This patch solves a TX/RX problem which happens at 10Mbps, due to the
fact that we are not respecting 4 cyles of the phy_clk (2.5MHz) between
two consecutive writes on the same register.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>