oweals/u-boot.git
12 years agomxc_i2c: add retries
Troy Kisky [Thu, 19 Jul 2012 08:18:16 +0000 (08:18 +0000)]
mxc_i2c: add retries

Retry unexpected hardware errors. This
will not retry a received NAK.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agomxc_i2c: check for arbitration lost
Troy Kisky [Thu, 19 Jul 2012 08:18:15 +0000 (08:18 +0000)]
mxc_i2c: check for arbitration lost

No need to continue waiting if arbitration lost.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: change slave addr if conflicts with destination.
Troy Kisky [Thu, 19 Jul 2012 08:18:14 +0000 (08:18 +0000)]
mxc_i2c: change slave addr if conflicts with destination.

The i2c controller cannot be both master and slave in the
same transaction.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agomxc_i2c: don't disable controller after every transaction
Troy Kisky [Thu, 19 Jul 2012 08:18:13 +0000 (08:18 +0000)]
mxc_i2c: don't disable controller after every transaction

This helps in a multiple bus master environment which
is why I also added a wait for bus idle.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agomxc_i2c: place i2c_reset code inline
Troy Kisky [Thu, 19 Jul 2012 08:18:12 +0000 (08:18 +0000)]
mxc_i2c: place i2c_reset code inline

imx_reset is only referenced once so
move to that location.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: place imx_start code inline
Troy Kisky [Thu, 19 Jul 2012 08:18:11 +0000 (08:18 +0000)]
mxc_i2c: place imx_start code inline

imx_start is only referenced once so
move to that location.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: remove redundant read
Troy Kisky [Thu, 19 Jul 2012 08:18:10 +0000 (08:18 +0000)]
mxc_i2c: remove redundant read

wait_for_sr_state returns i2sr on success
so no need to read again.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: combine i2c_imx_bus_busy and i2c_imx_trx_complete into wait_for_sr_state
Troy Kisky [Thu, 19 Jul 2012 08:18:09 +0000 (08:18 +0000)]
mxc_i2c: combine i2c_imx_bus_busy and i2c_imx_trx_complete into wait_for_sr_state

Not using udelay gives a more accurate timeout. The current implementation of udelay
in imx-common does not seem to wait at all for a udelay(1).

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
----
V2: Added WATCHDOG_RESET as suggested by Marek Vasut
add error message when stop fails

mxc_i2c: code i2c_probe as a 0 length i2c_write

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomxc_i2c.c: code i2c_probe as a 0 length i2c_write
Troy Kisky [Thu, 19 Jul 2012 08:18:08 +0000 (08:18 +0000)]
mxc_i2c.c: code i2c_probe as a 0 length i2c_write

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomxc_i2c: call i2c_imx_stop on error in i2c_read/i2c_write
Troy Kisky [Thu, 19 Jul 2012 08:18:07 +0000 (08:18 +0000)]
mxc_i2c: call i2c_imx_stop on error in i2c_read/i2c_write

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agomxc_i2c: create i2c_init_transfer
Troy Kisky [Thu, 19 Jul 2012 08:18:06 +0000 (08:18 +0000)]
mxc_i2c: create i2c_init_transfer

Initial code of i2c_read and i2c_write
is identical, move to subroutine.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomxc_i2c: clear i2sr before waiting for bit
Troy Kisky [Thu, 19 Jul 2012 08:18:05 +0000 (08:18 +0000)]
mxc_i2c: clear i2sr before waiting for bit

Let's clear the sr register before waiting for
bit to be set, instead of clearing it after
hardware sets it. No real operational difference here,
but allows combining of i2c_imx_trx_complete and
i2c_imx_bus_busy in later patches.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: create tx_byte function
Troy Kisky [Thu, 19 Jul 2012 08:18:04 +0000 (08:18 +0000)]
mxc_i2c: create tx_byte function

Use tx_byte function instead of having 3 copies
of the code.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: remove ifdef of CONFIG_HARD_I2C
Troy Kisky [Thu, 19 Jul 2012 08:18:03 +0000 (08:18 +0000)]
mxc_i2c: remove ifdef of CONFIG_HARD_I2C

This is always selected when CONFIG_I2C_MXC is
selected, so it adds no value.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: fix i2c_imx_stop
Troy Kisky [Thu, 19 Jul 2012 08:18:02 +0000 (08:18 +0000)]
mxc_i2c: fix i2c_imx_stop

Instead of clearing 2 bits, all the other
bits were set because '|=' was used instead
of '&='.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agoi2c: deblock i2c bus also if accessed before realocation
Holger Brunck [Thu, 28 Jun 2012 04:30:22 +0000 (04:30 +0000)]
i2c: deblock i2c bus also if accessed before realocation

If we switch to a different i2c bus in changing the mux config for the
i2c mux, we have to be sure to deblock the bus also before realocation.

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

12 years agoMerge branch 'next' of git://git.denx.de/u-boot
Wolfgang Denk [Mon, 30 Jul 2012 18:39:52 +0000 (20:39 +0200)]
Merge branch 'next' of git://git.denx.de/u-boot

* 'next' of git://git.denx.de/u-boot:
  MPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c
  doc: cleanup - move board READMEs into respective board directories
  net: sh_eth: add support for SH7757's GETHER
  net: sh_eth: modify the definitions of regsiter
  net: sh_eth: add SH_ETH_TYPE_ condition
  net: sh_eth: clean up for the SH7757's code
  net: fec_mxc: Fix MDC for xMII
  net: fec_mxc: Fix setting of RCR for xMII
  net: nfs: make NFS_TIMEOUT configurable
  net: Inline the new eth_setenv_enetaddr_by_index function
  net: allow setting env enetaddr from net device setting
  net/designware: Consecutive writes to the same register to be avoided
  CACHE: net: asix: Fix asix driver to work with data cache on
  net: phy: micrel: make ksz9021 phy accessible
  net: abort network initialization if the PHY driver fails
  phylib: phy_startup() should return an error code on failure
  net: tftp: fix type of block arg to store_block

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoPrepare v2012.07 v2012.07
Wolfgang Denk [Mon, 30 Jul 2012 18:24:37 +0000 (20:24 +0200)]
Prepare v2012.07

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agohawkboard: Fix SPL Nand driver misconfiguration
Linu Cherian [Thu, 26 Jul 2012 22:21:53 +0000 (22:21 +0000)]
hawkboard: Fix SPL Nand driver misconfiguration

Hawkboard was using the wrong nand_read_page version for SPL image.
As a side effect, the u-boot image loaded by the SPL from nand
was getting corrupted.

Enable CONFIG_SYS_NAND_HW_ECC_OOBFIRST to select the correct nand_read_page
algorithm for SPL.

Signed-off-by: Linu Cherian <linucherian@gmail.com>
Acked-by: Sughosh Ganu <urwithsughosh@gmail.com>
Acked-by: Tom Rini <trini@ti.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Wolfgang Denk [Mon, 30 Jul 2012 08:07:00 +0000 (10:07 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

* 'master' of git://git.denx.de/u-boot-mips:
  MIPS: fix renaming of inca-swap-bytes to xway-swap-bytes

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c
Marek Vasut [Fri, 27 Jul 2012 22:57:12 +0000 (00:57 +0200)]
MPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c

cpu.c: In function ‘check_CPU’:
cpu.c:256:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Subject slightly changed.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested on TQM855MDCBAB7-T66.102 (MPC855T at 66 MHz) and
TQM860LDB0A3-T50.202 (MPC860T at 50MHz).

Tested-by: Wolfgang Denk <wd@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
12 years agoMakefile: avoid "Generating asm-offsets.h" message with "-s"
Wolfgang Denk [Thu, 26 Jul 2012 20:52:41 +0000 (20:52 +0000)]
Makefile: avoid "Generating asm-offsets.h" message with "-s"

make would spit out a message like

Generating /tmp/build/include/generated/asm-offsets.h

even when running with option "-s".  Fix this.

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agodoc: cleanup - move board READMEs into respective board directories
Wolfgang Denk [Sun, 29 Apr 2012 23:57:39 +0000 (23:57 +0000)]
doc: cleanup - move board READMEs into respective board directories

Also drop a few files referring to no longer / not yet supported
boards.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Jason Jin <jason.jin@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
12 years agoMIPS: fix renaming of inca-swap-bytes to xway-swap-bytes
Daniel Schwierzeck [Fri, 27 Jul 2012 21:44:24 +0000 (23:44 +0200)]
MIPS: fix renaming of inca-swap-bytes to xway-swap-bytes

Fix some remains of the renaming of inca-swap-bytes introduced in

commit 60b74bde9280e85f4423c05a50ecc41de56ad980

MIPS: INCA-IP: rename inca-swap-bytes host tool

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
12 years agoPrepare v2012.07-rc3 v2012.07-rc3
Wolfgang Denk [Fri, 27 Jul 2012 06:27:18 +0000 (08:27 +0200)]
Prepare v2012.07-rc3

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agonet: Make sure the ethaddr is updated in net_init()
Joe Hershberger [Mon, 23 Jul 2012 13:11:16 +0000 (13:11 +0000)]
net: Make sure the ethaddr is updated in net_init()

NetConsole may call NetSendUDPPacket before NetLoop is called.  This
will cause the source MAC address (NetOurEther) to be wrong.  Instead
of only changing it in NetLoop, move it to NetLoopInit so that it is
also updated when net_init() is called (especially by nc_start()).

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Michael Walle <michael@walle.cc>
Acked-by: Michael Walle <michael@walle.cc>
12 years agonet: sh_eth: add support for SH7757's GETHER
Yoshihiro Shimoda [Tue, 26 Jun 2012 16:38:11 +0000 (16:38 +0000)]
net: sh_eth: add support for SH7757's GETHER

SH7757 has 2 ETHERs and 2 GETHERs. This patch supports the SH7757's
GETHER. If CONFIG_SH_ETHER_USE_GETHER is defined using SH7757,
the driver handles the GETHER.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
12 years agonet: sh_eth: modify the definitions of regsiter
Yoshihiro Shimoda [Tue, 26 Jun 2012 16:38:09 +0000 (16:38 +0000)]
net: sh_eth: modify the definitions of regsiter

The previous code had many similar definitions in each CPU.

This patch borrows from the sh_eth driver of Linux kernel.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
12 years agonet: sh_eth: add SH_ETH_TYPE_ condition
Yoshihiro Shimoda [Tue, 26 Jun 2012 16:38:06 +0000 (16:38 +0000)]
net: sh_eth: add SH_ETH_TYPE_ condition

At the moment, the driver supports the following CPUs:
 - GETHER (Gigabit Ethernet) : SH7763, SH7734
 - ETHER  (Fast Ethernet)    : SH7724, SH7757

And the driver had the following "#if":

 #if defined(CONFIG_CPU_SH7763) || defined(CONFIG_CPU_SH7734)
 #if !defined(CONFIG_CPU_SH7757) && !defined(CONFIG_CPU_SH7724)
 - Those are for GETHER

 #if defined(CONFIG_CPU_SH7724) || defined(CONFIG_CPU_SH7757)
 - This is for ETHER

So, for clean up the code, this patch adds SH_ETH_TYPE_GETHER and
SH_ETH_TYPE_ETHER. And then, the patch modifies the above "#if".

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
12 years agonet: sh_eth: clean up for the SH7757's code
Yoshihiro Shimoda [Tue, 26 Jun 2012 16:38:02 +0000 (16:38 +0000)]
net: sh_eth: clean up for the SH7757's code

The SH7757's ETHER can work using the SH7724's setting. So, the patch
modifies it.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
12 years agoPrepare v2012.07-rc2 v2012.07-rc2
Wolfgang Denk [Sun, 22 Jul 2012 20:00:02 +0000 (22:00 +0200)]
Prepare v2012.07-rc2

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMinor Coding Style Cleanup.
Wolfgang Denk [Sun, 22 Jul 2012 19:58:26 +0000 (21:58 +0200)]
Minor Coding Style Cleanup.

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoBC3450 board: Remove unused CONFIG_SYS_CPU definition
Wolfgang Denk [Sun, 22 Jul 2012 07:58:47 +0000 (09:58 +0200)]
BC3450 board: Remove unused CONFIG_SYS_CPU definition

This fixes:
cmd_bc3450.c:55:0: warning: "CONFIG_SYS_CPU" redefined [enabled by default]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
12 years agoBC3450 board: change debug code to using debug()
Wolfgang Denk [Sun, 22 Jul 2012 07:56:06 +0000 (09:56 +0200)]
BC3450 board: change debug code to using debug()

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Sat, 21 Jul 2012 22:10:39 +0000 (00:10 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

* 'master' of git://git.denx.de/u-boot-arm:
  ARM1136: Fix cache range checks
  mx6: Make pad name macro consistent with the datasheet
  mx28: Fix elftosb source link in README.mx28_common
  doc: README.mx28_common: Add missing entry into Contents

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMPC83xx, MPC85xx: compile stub cache function
Stefano Babic [Thu, 19 Jul 2012 23:00:02 +0000 (23:00 +0000)]
MPC83xx, MPC85xx: compile stub cache function

An empty flush_dcache_range() was added into MPC83xx and MPC85xx to
work with drivers shared with other architecture.  However, it is
compiled only if USB is set, but it is required for other drivers
(FSL_ESDHC), too.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Andy Fleming <afleming@gmail.com>
CC: Dirk Behme <dirk.behme@de.bosch.com>
CC: Marek Vasut <marex@denx.de>
CC: Wolfgang Denk <wd@denx.de>
Added MPC83xx version.

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoARM1136: Fix cache range checks
Benoît Thébaudeau [Thu, 19 Jul 2012 01:35:32 +0000 (01:35 +0000)]
ARM1136: Fix cache range checks

bad_cache_range actually returned true if the range was OK, but it was used
according to its name, which resulted in all valid dcache range invalidate/flush
operations being dropped. Hence, most DMA transfers resulted in garbage data.

This patch renames this function according to what it does, and it fixes the
interpretation of its return value by other functions. The chosen naming is the
same as for ARM926EJ-S in order to be consistent.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomx6: Make pad name macro consistent with the datasheet
Ashok [Fri, 15 Jun 2012 03:48:57 +0000 (03:48 +0000)]
mx6: Make pad name macro consistent with the datasheet

Use the same name as defined in the datasheet.
DSP_CLK -> DISP_CLK

Signed-off-by: Ashok Kumar Reddy Kourla <ashokkourla2000@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomx28: Fix elftosb source link in README.mx28_common
Anatolij Gustschin [Wed, 27 Jun 2012 04:14:29 +0000 (04:14 +0000)]
mx28: Fix elftosb source link in README.mx28_common

The documented link to elftosb package tarball is not accessible,
change to another working link.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Detlev Zundel <dzu@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
12 years agodoc: README.mx28_common: Add missing entry into Contents
Fabio Estevam [Mon, 18 Jun 2012 05:51:49 +0000 (05:51 +0000)]
doc: README.mx28_common: Add missing entry into Contents

commit 419ea2d84 (mx28: Split the README into a common part and a m28 specific part)
missed an entry in the Contents section that was part of the original file.

Add the missing entry for completeness.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Fri, 20 Jul 2012 20:38:32 +0000 (22:38 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

* 'master' of git://git.denx.de/u-boot-arm:
  ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency
  ARM: OMAP4: PANDA: Add rest of the USB module pads to essentials
  arm: armv7: add compile option -mno-unaligned-access if available
  arm: Fix to mistake clean the memory space

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-nds32
Wolfgang Denk [Fri, 20 Jul 2012 20:35:13 +0000 (22:35 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-nds32

* 'master' of git://git.denx.de/u-boot-nds32:
  nds32: split common cache access from cpu into lib

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agocommon.h: Remove include compiler.h
Marek Vasut [Fri, 20 Jul 2012 10:12:58 +0000 (10:12 +0000)]
common.h: Remove include compiler.h

Remove this as including it on global scale breaks a lot of things.
This was reported by:
Matthew McClintock <B29882@freescale.com>

Fix found by:
Tom Rini <trini@ti.com>

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
12 years agonds32: split common cache access from cpu into lib
Macpaul Lin [Sun, 15 Jul 2012 03:54:13 +0000 (11:54 +0800)]
nds32: split common cache access from cpu into lib

This commit does the following updates.
1. Split the common cache access from cpu.c into lib folder.
2. Rename the following cache api to adapt common.h
 - dcache_flush_rang -> flush_dcache_rang
 - icache_inval_range -> invalidate_icache_range
3. Add invalidate_dcache_range

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
12 years agoARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency
Fabio Estevam [Thu, 1 Mar 2012 04:02:38 +0000 (04:02 +0000)]
ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

Create a weak-aliased arch_cpu_init, so that we can get rid of CONFIG_ARCH_CPU_INIT
and always call arch_cpu_init.

This way we do not need to define CONFIG_ARCH_CPU_INIT in every board file, since
arch_cpu_init() is supposed to handle common CPU level code.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agoARM: OMAP4: PANDA: Add rest of the USB module pads to essentials
SRICHARAN R [Wed, 18 Jul 2012 21:54:47 +0000 (14:54 -0700)]
ARM: OMAP4: PANDA: Add rest of the USB module pads to essentials

In commit 1a89a217f5c5ab3645c80c1247e8911a8b5ad491 we moved most of the
required pads and mux data for USB to the essential list so that later
on we could NOT enable anything that wasn't essential unless otherwise
configured.  This was however missing a few pandaboard-specific parts
which left for example USB ethernet non-functional.

Tested this on OMAP4430 ES2.2, OMAP4460 ES1.1 PANDA boards.

(Reworded by Tom Rini to be more precise about what the problem was)

Signed-off-by: R Sricharan <r.sricharan@ti.com>
Tested-by: Gary Thomas <gary@mlbassoc.com>
Tested-by: Tom Rini <trini@ti.com>
12 years agoarm: armv7: add compile option -mno-unaligned-access if available
Tetsuyuki Kobayashi [Sun, 1 Jul 2012 23:42:10 +0000 (23:42 +0000)]
arm: armv7: add compile option -mno-unaligned-access if available

Recent compiler generates unaligned memory access in armv7 default.
But current U-Boot does not allow unaligned memory access, so it causes
data abort exception.
This patch add compile option "-mno-unaligned-access" if it is available.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tested-by: Gary Thomas <gary@mlbassoc.com>
12 years agoarm: Fix to mistake clean the memory space
Zhong Hongbo [Sat, 7 Jul 2012 03:24:33 +0000 (03:24 +0000)]
arm: Fix to mistake clean the memory space

In currently, when __bss_start is equal to __bss_end__,
The bss loop will clear all the things in memory space.

But just only when __bss_end__ greater than __bss_start__,
we do the clear bss section operation.

Signed-off-by: Zhong Hongbo <bocui107@gmail.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Wolfgang Denk [Fri, 20 Jul 2012 07:12:43 +0000 (09:12 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

* 'master' of git://git.denx.de/u-boot-usb:
  usb_storage: fix ehci driver max transfer size
  smsc95xx: align buffers to cache line size
  ehci-hcd: change debug() to printf() in case of errors
  usb: check return value of submit_{control, bulk}_msg
  usb: pass cache-aligned buffer to usb_get_descriptor()
  ehci-hcd: fix external buffer cache handling
  ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment
  ehci-hcd: program asynclistaddr before every transfer
  common.h: Introduce DEFINE_CACHE_ALIGN_BUFFER
  ehci-omap: Do not call dcache_off from omap_ehci_hcd_init

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'sf' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Fri, 20 Jul 2012 06:58:06 +0000 (08:58 +0200)]
Merge branch 'sf' of git://git.denx.de/u-boot-blackfin

* 'sf' of git://git.denx.de/u-boot-blackfin:
  sf: spansion: inline useless id defines
  sf: drop unused/duplicate command defines

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Wolfgang Denk [Fri, 20 Jul 2012 06:55:38 +0000 (08:55 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-net

* 'master' of git://git.denx.de/u-boot-net:
  net: link_local: fix build
  net: bootp: fix build

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agotools: clean up mingw ifdefs
Mike Frysinger [Wed, 18 Jul 2012 16:59:45 +0000 (16:59 +0000)]
tools: clean up mingw ifdefs

We have a header file specifically for mingw cruft, so keep it there
to avoid crap spreading into the main tools.  This lets our devs just
worry about *nix systems.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosf: spansion: inline useless id defines
Mike Frysinger [Sun, 29 Jan 2012 00:32:18 +0000 (16:32 -0800)]
sf: spansion: inline useless id defines

No need for dedicated defines when these really only get used once.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosf: drop unused/duplicate command defines
Mike Frysinger [Sun, 29 Jan 2012 00:26:03 +0000 (16:26 -0800)]
sf: drop unused/duplicate command defines

In an effort to unify the spi flash drivers further, drop all the
unused and/or duplicate command defines.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agonet: link_local: fix build
benoit.thebaudeau@advans [Thu, 19 Jul 2012 01:19:34 +0000 (01:19 +0000)]
net: link_local: fix build

Fix comment within comment build error.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
12 years agonet: bootp: fix build
benoit.thebaudeau@advans [Thu, 19 Jul 2012 01:23:21 +0000 (01:23 +0000)]
net: bootp: fix build

Fix NetSetState function name used with CONFIG_BOOTP_MAY_FAIL.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
12 years agonet: fec_mxc: Fix MDC for xMII
benoit.thebaudeau@advans [Thu, 19 Jul 2012 02:12:58 +0000 (02:12 +0000)]
net: fec_mxc: Fix MDC for xMII

The MDC signal is available on all xMII (i.e. 'not 7-wire') interfaces, so
mii_speed has to be set for all these interfaces, and not only for MII.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agonet: fec_mxc: Fix setting of RCR for xMII
benoit.thebaudeau@advans [Thu, 19 Jul 2012 02:12:46 +0000 (02:12 +0000)]
net: fec_mxc: Fix setting of RCR for xMII

At least on i.MX25, the RMII mode did not work, which is fixed by this patch.

The MII_MODE bit of the FEC RCR register means xMII, i.e. 'not 7-wire', so set
it accordingly.

According to the xMII and 7-wire (aka GPSI) standards, full duplex should be
available on xMII, but not on 7-wire, so set FCE accordingly. The FEC may
support full duplex for 7-wire too, but the reference manual does not say that,
so avoid an invalid assumption. Actually, the choice between half and full
duplex also depends on the endpoint/switch/repeater configuration, so a config
option could be added for that, but there has been no need for it so far.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agoBlackfin: bfin_mac: drop volatile markings on packet buffers
Mike Frysinger [Thu, 19 Jul 2012 04:08:47 +0000 (00:08 -0400)]
Blackfin: bfin_mac: drop volatile markings on packet buffers

Now that common code doesn't declare these as volatile, we don't need to
either anymore.  This fixes the build warning:

bfin_mac.c: In function 'bfin_EMAC_recv':
bfin_mac.c:193:23: warning: assignment discards qualifiers from pointer target type

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agousb_storage: fix ehci driver max transfer size
Stefan Herbrechtsmeier [Mon, 9 Jul 2012 09:52:29 +0000 (09:52 +0000)]
usb_storage: fix ehci driver max transfer size

The commit 5dd95cf93dfffa1d19a1928990852aac9f55b9d9 'usb_storage:
Fix EHCI "out of buffer pointers" with CD-ROM' introduce a bug in
usb_storage as it wrongly assumes that every transfer can use
4096 bytes per qt_buffer. This is wrong if the start address of
the data is not page aligned to 4096 bytes and leads to 'EHCI
timed out on TD' messages because of 'out of buffer pointers'
in ehci_td_buffer function.

The bug appears during load of a fragmented file and
read from or write to an unaligned memory address.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
12 years agosmsc95xx: align buffers to cache line size
Ilya Yanok [Sun, 15 Jul 2012 04:43:53 +0000 (04:43 +0000)]
smsc95xx: align buffers to cache line size

Align buffers passed to the USB code to cache line size so
they can be DMAed safely.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoehci-hcd: change debug() to printf() in case of errors
Ilya Yanok [Sun, 15 Jul 2012 04:43:52 +0000 (04:43 +0000)]
ehci-hcd: change debug() to printf() in case of errors

Printing message could be useful if something goes really wrong.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agousb: check return value of submit_{control, bulk}_msg
Ilya Yanok [Sun, 15 Jul 2012 04:43:51 +0000 (04:43 +0000)]
usb: check return value of submit_{control, bulk}_msg

Return values of submit_{control,bulk}_msg() functions
should be checked to detect possible error.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agousb: pass cache-aligned buffer to usb_get_descriptor()
Ilya Yanok [Sun, 15 Jul 2012 04:43:50 +0000 (04:43 +0000)]
usb: pass cache-aligned buffer to usb_get_descriptor()

usb_get_descriptor passes it's buffer argument directly to
usb_control_msg() so it has to be properly aligned/padded.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoehci-hcd: fix external buffer cache handling
Ilya Yanok [Sun, 15 Jul 2012 04:43:49 +0000 (04:43 +0000)]
ehci-hcd: fix external buffer cache handling

Buffer coming from upper layers should be cacheline aligned/padded
to perform safe cache operations. For now we don't do bounce
buffering so getting unaligned buffer is an upper layer error.
We can't check if the buffer is properly padded with current
interface so just assume it is (consider changing with in the
future). The following changes are done:

1. Remove useless length alignment check. We get actual transfer
length not the size of the underlying buffer so it's perfectly
valid for it to be unaligned.
2. Move flush_dcache_range() out of while loop or it will
flush too much.
3. Don't try to fix buffer address before calling invalidate:
if it's unaligned it's an error anyway so let cache subsystem
cry about that.
4. Fix end buffer address to be cacheline aligned assuming upper
layer reserved enough space. This is potentially dangerous
operation so upper layers should be careful about that.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment
Tom Rini [Sun, 15 Jul 2012 22:14:24 +0000 (22:14 +0000)]
ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

The USB spec says that 32 bytes is the minimum required alignment.
However on some platforms we have a larger minimum requirement for cache
coherency.  In those cases, use that value rather than the USB spec
minimum.  We add a cpp check to <usb.h> to define USB_DMA_MINALIGN and
make use of it in ehci-hcd.c and musb_core.h.  We cannot use MAX() here
as we are not allowed to have tests inside of align(...).

Signed-off-by: Tom Rini <trini@ti.com>
[marek.vasut]: introduce some crazy macro voodoo
Signed-off-by: Marek Vasut <marex@denx.de>
[ilya.yanok]: moved external buffer fixes to separate patch,
we use {ALLOC,DEFINE}_ALIGN_BUFFER macros with alignment of USB_DMA_MINALIGN
for qh_list, qh and qtd structures to make sure they are proper aligned
for both controller and cache operations.
Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoehci-hcd: program asynclistaddr before every transfer
Ilya Yanok [Sun, 15 Jul 2012 22:12:08 +0000 (22:12 +0000)]
ehci-hcd: program asynclistaddr before every transfer

Move or_asynclistaddr programming to ehci_submit_async()
function to make sure queue head is properly programmed
before every transfer. This solves the problem with changing
qh address.

Also remove unneeded qh_list->qh_link reprogramming at the
end of transfer.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agocommon.h: Introduce DEFINE_CACHE_ALIGN_BUFFER
Marek Vasut [Sun, 15 Jul 2012 04:43:47 +0000 (04:43 +0000)]
common.h: Introduce DEFINE_CACHE_ALIGN_BUFFER

This is the out-of-function-scope counterpart of
ALLOC_CACHE_ALIGN_BUFFER.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
[ilya.yanok]: added missing <linux/compiler.h> include and
{DEFINE,ALLOC}_ALIGN_BUFFER macros allowing explicit alignment
specification.
Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoehci-omap: Do not call dcache_off from omap_ehci_hcd_init
Tom Rini [Sun, 15 Jul 2012 04:43:46 +0000 (04:43 +0000)]
ehci-omap: Do not call dcache_off from omap_ehci_hcd_init

This has never been completely sufficient and now happens too late to
paper over the cache coherency problems with the current USB stack.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoMerge branch 'next' of git://git.denx.de/u-boot-video
Wolfgang Denk [Wed, 18 Jul 2012 08:47:03 +0000 (10:47 +0200)]
Merge branch 'next' of git://git.denx.de/u-boot-video

* 'next' of git://git.denx.de/u-boot-video:
  ipu_common: Add ldb_clk for use in parenting the pixel clock
  ipu_common: Do not hardcode the ipu_clk frequency
  ipu_common: Rename MXC_CCM_BASE
  ipu_common: Let clk_ipu_enable/disable only run on MX51 and MX53
  ipu_common: Only apply the erratum to MX51
  video: Rename CONFIG_VIDEO_MX5
  mx6: Allow mx6 to access the IPUv3 registers
  common lcd: minor coding style changes

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-nios
Wolfgang Denk [Wed, 18 Jul 2012 06:58:43 +0000 (08:58 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-nios

* 'master' of git://git.denx.de/u-boot-nios:
  nios2: move gd and bd into BSS

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agonios2: move gd and bd into BSS
Thomas Chou [Mon, 23 Apr 2012 02:55:02 +0000 (10:55 +0800)]
nios2: move gd and bd into BSS

As suggested by Graeme Russ, move gd and bd data structrures
to BSS instead of calculating the locations around the stack
and heap.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoFSL/eSDHC: enable the clock to detect the SD card
Jerry Huang [Thu, 17 May 2012 23:57:02 +0000 (23:57 +0000)]
FSL/eSDHC: enable the clock to detect the SD card

For FSL low-end processors (VVN2.2), in order to detect the SD card,
we should enable PEREN, HCKEN and IPGEN to enable the clock.
Otherwise, after booting the u-boot, and then inserting the SD card,
the SD card can't be detected.
For SDHC VVN2.3 IP, these bits are reserved, and SDCLKEN is used.
And when accessing to these reserved bit, no any impact happened.

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
CC: Andy Fleming <afleming@gmail.com>
CC: Marek Vasut <marex@denx.de>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agoSD/MMC: check the card status during erase operation
Jerry Huang [Thu, 17 May 2012 23:00:51 +0000 (23:00 +0000)]
SD/MMC: check the card status during erase operation

Use the function 'mmc_send_status' to check the card status.
only when the card is ready, driver can send the next erase command
to the card, otherwise, the erase will failed:
=> mmc erase 0 1
MMC erase: dev # 0, block # 0, count 1 ... 1 blocks erase: OK
=> mmc erase 0 2
MMC erase: dev # 0, block # 0, count 2 ... mmc erase failed
1 blocks erase: ERROR
=> mmc erase 0 4
MMC erase: dev # 0, block # 0, count 4 ... mmc erase failed
1 blocks erase: ERROR

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
CC: Andy Fleming <afleming@gmail.com>
CC: Marek Vasut <marex@denx.de>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommc:fix Call mmc_init() when executing mmc_get_dev()
Łukasz Majewski [Thu, 19 Apr 2012 02:39:18 +0000 (02:39 +0000)]
mmc:fix Call mmc_init() when executing mmc_get_dev()

This code adds call to mmc_init(), for partition related commands (e.g.
fatls, fatinfo etc.).

It is safe to call mmc_init() multiple times since mmc->has_init flag
prevents from multiple initialization.

The FAT related code calls get_dev high level method and then uses
elements from mmc->block_dev, which is uninitialized until the mmc_init
(and thereof mmc_startup) is called.

This problem appears on boards, which don't use mmc as the default
place for envs

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Andy Fleming <afleming@gmail.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agommc: remove the hard setting for tran_speed
Jaehoon Chung [Mon, 26 Mar 2012 21:16:03 +0000 (21:16 +0000)]
mmc: remove the hard setting for tran_speed

mmc_set_clock is set to the hard-coding.
But i think good that use the tran_speed value.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agoi.MX: fsl_esdhc: allow use with cache enabled.
Eric Nelson [Wed, 25 Apr 2012 14:28:48 +0000 (14:28 +0000)]
i.MX: fsl_esdhc: allow use with cache enabled.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agonet: nfs: make NFS_TIMEOUT configurable
Tetsuyuki Kobayashi [Tue, 3 Jul 2012 22:25:21 +0000 (22:25 +0000)]
net: nfs: make NFS_TIMEOUT configurable

NFS_TIMEOUT is constant value defined in net/nfs.c. But sometimes it needs to adjust.
This patch enables to override NFS_TIMEOUT by defining CONFIG_NFS_TIMEOUT in a board specific config file.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
12 years agoMerge branch 'next' of git://git.denx.de/u-boot-net into next
Wolfgang Denk [Thu, 12 Jul 2012 06:23:58 +0000 (08:23 +0200)]
Merge branch 'next' of git://git.denx.de/u-boot-net into next

* 'next' of git://git.denx.de/u-boot-net:
  net: Inline the new eth_setenv_enetaddr_by_index function
  net: allow setting env enetaddr from net device setting
  net/designware: Consecutive writes to the same register to be avoided
  CACHE: net: asix: Fix asix driver to work with data cache on
  net: phy: micrel: make ksz9021 phy accessible
  net: abort network initialization if the PHY driver fails
  phylib: phy_startup() should return an error code on failure
  net: tftp: fix type of block arg to store_block

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Wolfgang Denk [Thu, 12 Jul 2012 06:17:29 +0000 (08:17 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

* 'master' of git://git.denx.de/u-boot-i2c:
  mx28evk: Add I2C support
  mxs-i2c: Fix internal address byte order
  mxc_i2c: remove setting speed at each start
  mx6qsabrelite: add i2c support
  mxc_i2c: specify i2c base address in config file

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agonet: Inline the new eth_setenv_enetaddr_by_index function
Joe Hershberger [Tue, 10 Jul 2012 21:23:22 +0000 (16:23 -0500)]
net: Inline the new eth_setenv_enetaddr_by_index function

This function is currently only used in one case.  Inline for now.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
12 years agonet: allow setting env enetaddr from net device setting
Rob Herring [Sat, 14 Apr 2012 18:06:49 +0000 (18:06 +0000)]
net: allow setting env enetaddr from net device setting

If the net driver has setup a valid ethernet address and an ethernet
address is not set in the environment already, then set the environment
variables from the net driver setting.

This enables pxe booting on boards which don't set ethaddr env variable.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agonet/designware: Consecutive writes to the same register to be avoided
Dinh Nguyen [Fri, 8 Jun 2012 05:26:52 +0000 (05:26 +0000)]
net/designware: Consecutive writes to the same register to be avoided

This commit is an add-on to f6c4191f. There are a few registers where
consecutive writes to the same location should be avoided or have a delay.

According to Synopsys, here is a list of the registers and bit(s) where
consecutive writes should be avoided or a delay is required:

DMA Registers:
Register 0        Bit 7
Register 6        All bits except for 24, 16-13, 2-1.

GMAC Registers:
Registers 0-3     All bits
Registers 6-7     All bits
Register 10       All bits
Register 11       All bits except for 5-6.
Registers 16-47   All bits
Register 48       All bits except for 18-16, 14.
Register 448      Bit 4.
Register 459      Bits 0-3.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Reviewed-by: Matthew Gerlach <mgerlach@altera.com>
Acked-by: Amit Virdi <amit.virdi@st.com>
12 years agoCACHE: net: asix: Fix asix driver to work with data cache on
Marek Vasut [Sun, 24 Jun 2012 14:17:56 +0000 (14:17 +0000)]
CACHE: net: asix: Fix asix driver to work with data cache on

The asix driver did not align buffers, therefore it didn't work
with data cache enabled. Fix this.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@gmail.com>
12 years agonet: phy: micrel: make ksz9021 phy accessible
Troy Kisky [Thu, 28 Jun 2012 08:00:28 +0000 (08:00 +0000)]
net: phy: micrel: make ksz9021 phy accessible

Micrel accidentally used the same part number
for the KS8721 and KSZ9021. So, both cannot be
in the same build of u-boot. Add a config option
to handle this.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
12 years agonet: abort network initialization if the PHY driver fails
Timur Tabi [Mon, 9 Jul 2012 08:52:43 +0000 (08:52 +0000)]
net: abort network initialization if the PHY driver fails

Now that phy_startup() can return an actual error code, check for that error
code and abort network initialization if the PHY fails.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Nobuhiro Iwamamatsu <nobuhiro.iwamatsu.yj@renesas.com> (sh_eth part)
Acked-by: Stephan Linz <linz@li-pro.net> (Xilinx part, xilinx_axi_emac and xilinx_ll_temac)
Reviewed-by: Marek Vasut <marex@denx.de> (FEC part)
12 years agophylib: phy_startup() should return an error code on failure
Timur Tabi [Thu, 5 Jul 2012 10:33:18 +0000 (10:33 +0000)]
phylib: phy_startup() should return an error code on failure

phy_startup() calls the PHY driver's startup function, but it ignores the
return code from that function, and so it never returns any failures.

Signed-off-by: Timur Tabi <timur@freescale.com>
12 years agonet: tftp: fix type of block arg to store_block
Jayachandran Chandrasekharan Nair [Tue, 10 Jul 2012 06:18:54 +0000 (11:48 +0530)]
net: tftp: fix type of block arg to store_block

The block argument for store_block can be -1 when the tftp sequence
number rolls over (i.e TftpBlock == 0), so the first argument to
store_block has to be of type 'int' instead of 'unsigned'.

In our environment (gcc 4.4.5 mips toolchain), this causes incorrect
'offset' to be generated for storing the block, and the tftp block
with number 0 will be written elsewhere, resulting in a bad block in
the downloaded file and a memory corruption.

Signed-off-by: Jayachandran Chandrasekharan Nair <jayachandranc@netlogicmicro.com>
12 years agomx28evk: Add I2C support
Fabio Estevam [Mon, 7 May 2012 05:42:34 +0000 (05:42 +0000)]
mx28evk: Add I2C support

Add I2C support.

Tested by placing a 24LC16 EEPROM into the U50 slot which comes empty from factory.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxs-i2c: Fix internal address byte order
Torsten Fleischer [Tue, 17 Apr 2012 05:37:45 +0000 (05:37 +0000)]
mxs-i2c: Fix internal address byte order

Large EEPROMs, e.g. 24lc32, need 2 byte to address the internal memory.
These devices require that the high byte of the internal address has to be
written first.
The mxs_i2c driver currently writes the address' low byte first.

The following patch fixes the byte order of the internal address that should
be written to the I2C device.

Signed-off-by: Torsten Fleischer <to-fleischer@t-online.de>
CC: Marek Vasut <marex@denx.de>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomxc_i2c: remove setting speed at each start
Troy Kisky [Tue, 24 Apr 2012 17:33:27 +0000 (17:33 +0000)]
mxc_i2c: remove setting speed at each start

Other then being very weird, this code was also wrong.
For example, say I set speed to 100K. I'll read back the speed
as 85937. But the speed is really 85937.5, so we I reset
the speed to 85937, I'll get 73660.7. After a couple of transactions
my speed is now exactly 68750 so it will remain there.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomx6qsabrelite: add i2c support
Troy Kisky [Tue, 24 Apr 2012 17:33:26 +0000 (17:33 +0000)]
mx6qsabrelite: add i2c support

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomxc_i2c: specify i2c base address in config file
Troy Kisky [Tue, 24 Apr 2012 17:33:25 +0000 (17:33 +0000)]
mxc_i2c: specify i2c base address in config file

The following platforms had their config files changed
flea3, imx31_phycore, mx35pdk, mx53ard, mx53evk, mx53smd
and mx53loco.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agonet: fix typo in arp clean up
Mike Frysinger [Tue, 10 Jul 2012 00:41:50 +0000 (00:41 +0000)]
net: fix typo in arp clean up

The clean up patch missed an &, so we end up passing an int rather than
a pointer to the sprintf function.

arp.c: In function 'ArpReceive':
arp.c:197: warning: format '%p' expects type 'void *', but argument 3 has type 'int'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agonet/sh-ether: Fix build by removing ECSIPR_BRCRXIP and other
Nobuhiro Iwamatsu [Tue, 5 Jun 2012 16:39:06 +0000 (16:39 +0000)]
net/sh-ether: Fix build by removing ECSIPR_BRCRXIP and other

When support sh7734 of sh-ether, ECSIPR_BRCRXIP and other were removed.
Therefore SH7757 and SH7724 can not build. This revise this probelem.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
12 years agoipu_common: Add ldb_clk for use in parenting the pixel clock
Eric Nelson [Thu, 31 May 2012 07:24:02 +0000 (07:24 +0000)]
ipu_common: Add ldb_clk for use in parenting the pixel clock

Add ldb_clk for use in parenting the pixel clock.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agoipu_common: Do not hardcode the ipu_clk frequency
Fabio Estevam [Thu, 31 May 2012 07:24:00 +0000 (07:24 +0000)]
ipu_common: Do not hardcode the ipu_clk frequency

Do not hardcode the ipu_clk frequency and let the board file pass this value.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agoipu_common: Rename MXC_CCM_BASE
Fabio Estevam [Thu, 31 May 2012 07:23:59 +0000 (07:23 +0000)]
ipu_common: Rename MXC_CCM_BASE

Rename MXC_CCM_BASE to CCM_BASE_ADDR as this is already defined for MX6.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agoipu_common: Let clk_ipu_enable/disable only run on MX51 and MX53
Fabio Estevam [Thu, 31 May 2012 07:23:58 +0000 (07:23 +0000)]
ipu_common: Let clk_ipu_enable/disable only run on MX51 and MX53

The registers accessed inside clk_ipu_enable/disable are not present on MX6,
so make sure they only run on MX51 and MX53.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agoipu_common: Only apply the erratum to MX51
Fabio Estevam [Thu, 31 May 2012 07:23:57 +0000 (07:23 +0000)]
ipu_common: Only apply the erratum to MX51

The following erratum :

"ENGcm08316
IPU: Clarification regarding the bypass mode registers setup for
display and camera interfaces"

only applies to mx51, so restrict its usage for this SoC only.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>