]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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)
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoPrepare v2012.07-rc1 v2012.07-rc1
Wolfgang Denk [Tue, 10 Jul 2012 07:21:12 +0000 (09:21 +0200)]
Prepare v2012.07-rc1

Signed-off-by: Wolfgang Denk <wd@denx.de>
11 years agoMinor Coding Style cleanup
Wolfgang Denk [Tue, 10 Jul 2012 07:18:33 +0000 (09:18 +0200)]
Minor Coding Style cleanup

Signed-off-by: Wolfgang Denk <wd@denx.de>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Tue, 10 Jul 2012 06:54:41 +0000 (08:54 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

* 'master' of git://git.denx.de/u-boot-arm:
  tegra: define fdt_load/fdt_high variables
  tegra: enable bootz command
  tegra: usb: Fix device enumeration problem of USB1
  tegra: trimslice: set up serial flash pinmux
  tegra: add pin_mux_spi() board initialization function
  tegra: add GMC/GMD funcmux entry for SFLASH
  tegra: bootcmd: start USB only when needed
  tegra: bootcmd enhancements
  tegra: add enterrcm command
  tegra: enable CONFIG_ENV_VARS_UBOOT_CONFIG
  Add env vars describing U-Boot target board
  tegra: usb: fix wrong error check
  tegra: add ULPI on USB2 funcmux entry
  tegra: fix leftover CONFIG_TEGRA2_MMC & _SPI build switches
  tegra: Add Tamonten Evaluation Carrier support
  tegra: Use SD write-protect GPIO on Tamonten
  tegra: Implement gpio_early_init() on Tamonten
  tegra: Allow boards to perform early GPIO setup
  tegra: plutux: Add device tree support
  tegra: medcom: Add device tree support
  tegra: Rework Tamonten support
  beagle: add eeprom expansion board info for bct brettl4

Signed-off-by: Wolfgang Denk <wd@denx.de>
11 years agoEXYNOS: Fix USB compiler warning
Rajeshwari Shinde [Mon, 9 Jul 2012 19:34:34 +0000 (19:34 +0000)]
EXYNOS: Fix USB compiler warning

Fixed the compiler warning message.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Marek Vasut <marex@denx.de>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Wolfgang Denk [Mon, 9 Jul 2012 21:59:00 +0000 (23:59 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

* 'master' of git://git.denx.de/u-boot-usb:
  CONFIG: EXYNOS5: USB: Enable USB 2.0 on smdk5250
  EXYNOS5: USB: Fix incorrect USB base addresses
  EXYNOS: Add power Enable/Disable for USB-EHCI
  USB: EXYNOS: Set USB 2.0 HOST Link mode
  EXYNOS5: Add structure for PMU registers
  EXYNOS5: Fix system register structure
  USB: EXYNOS: Incorporate EHCI review comments

Signed-off-by: Wolfgang Denk <wd@denx.de>
11 years agotegra: define fdt_load/fdt_high variables
Stephen Warren [Wed, 13 Jun 2012 09:55:12 +0000 (09:55 +0000)]
tegra: define fdt_load/fdt_high variables

These variables act like loadaddr, but for a device tree image. Defining
them in the environment allows boot scripts to be identical on Tegra20 and
Tegra30, which have different memory base addresses, and hence need
different values for these variables.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: enable bootz command
Stephen Warren [Wed, 13 Jun 2012 09:55:11 +0000 (09:55 +0000)]
tegra: enable bootz command

bootz is just like bootm, except that it can boot a raw zImage, without
requiring it to be wrapped inside a uImage.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: usb: Fix device enumeration problem of USB1
Jim Lin [Sun, 24 Jun 2012 20:40:57 +0000 (20:40 +0000)]
tegra: usb: Fix device enumeration problem of USB1

A known hardware issue of USB1 port where bit 1 (connect status
change) of PORTSC register will be set after issuing Port Reset
(like "usb reset" in u-boot command line).
This will be treated as an error and stops later device enumeration.

Therefore we clear that bit after Port Reset in order to proceed
later device enumeration.

Signed-off-by: Jim Lin <jilin@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: trimslice: set up serial flash pinmux
Stephen Warren [Tue, 12 Jun 2012 08:33:41 +0000 (08:33 +0000)]
tegra: trimslice: set up serial flash pinmux

When Trimslice is booted from serial flash, the boot ROM does this, so
U-Boot doesn't need to. However, booting from the SD slot for recovery
purposes, the boot ROM does not set up the pinmux for serial flash. Add
code to U-Boot to set this up, so that an SD-based recovery U-Boot image
can upgrade the U-Boot in serial flash.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: add pin_mux_spi() board initialization function
Stephen Warren [Tue, 12 Jun 2012 08:33:40 +0000 (08:33 +0000)]
tegra: add pin_mux_spi() board initialization function

Boards can override this to set up the pinmux correctly to access serial
flash.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: add GMC/GMD funcmux entry for SFLASH
Stephen Warren [Tue, 12 Jun 2012 08:33:39 +0000 (08:33 +0000)]
tegra: add GMC/GMD funcmux entry for SFLASH

This is used on TrimSlice.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: bootcmd: start USB only when needed
Stephen Warren [Mon, 4 Jun 2012 10:59:23 +0000 (10:59 +0000)]
tegra: bootcmd: start USB only when needed

Instead of initializing USB as soon as bootcmd is executed, defer it
until the first boot device that (potentially in the case of network)
uses USB is scanned. This avoids initializing USB when booting from MMC,
so speeds that up.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: bootcmd enhancements
Stephen Warren [Mon, 4 Jun 2012 10:59:22 +0000 (10:59 +0000)]
tegra: bootcmd enhancements

Place the list of searched boot devices, file-system types, boot file
locations/prefixes, and boot script names into variables. This allows
the user to override them directly (e.g. to change boot order, or select
the specific values they use) without having to edit the main bootcmd
and script_boot variables.

The default boot order is changed from USB, MMC, DHCP to MMC, USB, DHCP.
This speeds up the typical MMC boot case. People who want USB boot can
now edit variable boot_targets appropriately.

Also, reformat BOOTCMDS_COMMON to fit within 80 columns.

Potential future enhancements might be:
* Allow boards to specify which of bootcmd_mmc0/... should be defined,
  based on the HW they contain.
* Allow boards to influence the order that the boot targets are added
  into the boot_targets variable.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: add enterrcm command
Stephen Warren [Mon, 4 Jun 2012 09:23:55 +0000 (09:23 +0000)]
tegra: add enterrcm command

Tegra's boot ROM supports a mode whereby code may be downloaded and flash
programmed over a USB connection. On dev boards, this is typically entered
by holding down a "force recovery" button and resetting the CPU. However,
not all boards have such a button (one example is the Compulab Trimslice),
so a method to enter RCM from software is useful.

This change implements the command "enterrcm" to do this, and enables it
for all Tegra boards by default. Even on boards other than Trimslice,
controlling this over a UART may be useful, e.g. to allow simple remote
control without the need for mechanical button actuators, or hooking up
relays/... to the button.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: enable CONFIG_ENV_VARS_UBOOT_CONFIG
Stephen Warren [Tue, 22 May 2012 09:21:55 +0000 (09:21 +0000)]
tegra: enable CONFIG_ENV_VARS_UBOOT_CONFIG

So that all Tegra boards define environment variables that describe
themselves.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoAdd env vars describing U-Boot target board
Stephen Warren [Tue, 22 May 2012 09:21:54 +0000 (09:21 +0000)]
Add env vars describing U-Boot target board

This can be useful for generic scripts. For example, rather than hard-
coding a script to ext2load tegra-harmony.dtb, it could load
${soc}-${board}.dtb and hence not need adjustments to run on multiple
boards.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: usb: fix wrong error check
Lucas Stach [Thu, 31 May 2012 01:51:02 +0000 (01:51 +0000)]
tegra: usb: fix wrong error check

loop_count runs down from 10000, so the correct condition to error out
is ==0.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
CC: Stephen Warren <swarren@wwwdotorg.org>
CC: Tom Warren <twarren.nvidia@gmail.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: add ULPI on USB2 funcmux entry
Lucas Stach [Thu, 31 May 2012 01:51:01 +0000 (01:51 +0000)]
tegra: add ULPI on USB2 funcmux entry

This is needed as a prerequisite for Tegra USB ULPI support
within U-Boot.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
CC: Stephen Warren <swarren@wwwdotorg.org>
CC: Tom Warren <twarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: fix leftover CONFIG_TEGRA2_MMC & _SPI build switches
Tom Warren [Fri, 1 Jun 2012 08:22:14 +0000 (08:22 +0000)]
tegra: fix leftover CONFIG_TEGRA2_MMC & _SPI build switches

Missed some boards after my tegra2_mmc.* -> tegra_mmc.* change, and
one instance of CONFIG_TEGRA2_SPI. MAKEALL -s tegra2 AOK, Seaboard MMC
AOK. Didn't test Tamonten, Paz00 or TrimSlice, as I have none here.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agotegra: Add Tamonten Evaluation Carrier support
Thierry Reding [Mon, 4 Jun 2012 20:02:30 +0000 (20:02 +0000)]
tegra: Add Tamonten Evaluation Carrier support

The Tamonten Evaluation Carrier is an evaluation board for the Tamonten
processor board. More information is available here:

http://www.avionic-design.de/en/products/nvidia-tegra-tamonten-system-en/nvidia-tegra-tamonten-evboard-en.html

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Use SD write-protect GPIO on Tamonten
Thierry Reding [Mon, 4 Jun 2012 20:02:29 +0000 (20:02 +0000)]
tegra: Use SD write-protect GPIO on Tamonten

GPIO PI6 can be used to obtain the write-protect status of an SD card
inserted into the SD slot.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Implement gpio_early_init() on Tamonten
Thierry Reding [Mon, 4 Jun 2012 20:02:28 +0000 (20:02 +0000)]
tegra: Implement gpio_early_init() on Tamonten

The PI4 GPIO is used on Tamonten to reset carrier board peripherals.
Power sequencing hardware on the carrier pulls the reset low before
powering up the Tegra, and the CPU is supposed to signal readiness,
and therefore bring peripherals out of reset by pulling PI4 high.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Allow boards to perform early GPIO setup
Thierry Reding [Mon, 4 Jun 2012 20:02:27 +0000 (20:02 +0000)]
tegra: Allow boards to perform early GPIO setup

The new gpio_early_init() function, which does nothing by default, can
be overridden by boards to configure GPIOs at an early stage.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: plutux: Add device tree support
Thierry Reding [Mon, 4 Jun 2012 20:02:26 +0000 (20:02 +0000)]
tegra: plutux: Add device tree support

Device tree support is required for working USB host support, which in
turn enables ethernet support.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: medcom: Add device tree support
Thierry Reding [Mon, 4 Jun 2012 20:02:25 +0000 (20:02 +0000)]
tegra: medcom: Add device tree support

Device tree support is required for working USB host support, which in
turn enables ethernet support.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Rework Tamonten support
Thierry Reding [Mon, 4 Jun 2012 20:02:24 +0000 (20:02 +0000)]
tegra: Rework Tamonten support

This commit uses the common Tegra board implementation instead of
duplicating a lot of the code. In addition, the Plutux and Medcom
specific board files can be removed as the MMC/SD setup is common
among all Tamonten-based boards.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agobeagle: add eeprom expansion board info for bct brettl4
Peter Meerwald [Thu, 28 Jun 2012 05:38:35 +0000 (05:38 +0000)]
beagle: add eeprom expansion board info for bct brettl4

this is for a prototyping board

vendor/product ids have been added to
http://elinux.org/BeagleBoardPinMux#List_of_Vendor_and_Device_IDs

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
11 years agoCONFIG: EXYNOS5: USB: Enable USB 2.0 on smdk5250
Rajeshwari Shinde [Mon, 14 May 2012 05:52:05 +0000 (05:52 +0000)]
CONFIG: EXYNOS5: USB: Enable USB 2.0 on smdk5250

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5: USB: Fix incorrect USB base addresses
Rajeshwari Shinde [Mon, 14 May 2012 05:52:04 +0000 (05:52 +0000)]
EXYNOS5: USB: Fix incorrect USB base addresses

This patch corrects the base addresses for USB_PHY and USB_OTG.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Chander Kashyap <chander.kashyap@linaro.org>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS: Add power Enable/Disable for USB-EHCI
Rajeshwari Shinde [Mon, 14 May 2012 05:52:03 +0000 (05:52 +0000)]
EXYNOS: Add power Enable/Disable for USB-EHCI

This patch adds functions to enable/disable the power of USB
host controller for EXYNOS5.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
11 years agoUSB: EXYNOS: Set USB 2.0 HOST Link mode
Rajeshwari Shinde [Mon, 14 May 2012 05:52:02 +0000 (05:52 +0000)]
USB: EXYNOS: Set USB 2.0 HOST Link mode

This patch adds a function to set usb host mode to USB 2.0 HOST Link
for EXYNOS5

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
11 years agoEXYNOS5: Add structure for PMU registers
Rajeshwari Shinde [Mon, 14 May 2012 05:52:01 +0000 (05:52 +0000)]
EXYNOS5: Add structure for PMU registers

This patch adds power mananagement registers structure for exynos5 SoC.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Chander Kashyap <chander.kashyap@linaro.org>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoEXYNOS5: Fix system register structure
Rajeshwari Shinde [Mon, 14 May 2012 05:52:00 +0000 (05:52 +0000)]
EXYNOS5: Fix system register structure

This patch corrects the SYSREG structure.
We have removed the sysreg.h added in the previous patchset
version as the sysreg structure is already defined in system.h.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
11 years agoUSB: EXYNOS: Incorporate EHCI review comments
Rajeshwari Shinde [Mon, 21 May 2012 11:08:03 +0000 (16:38 +0530)]
USB: EXYNOS: Incorporate EHCI review comments

This patch incorates the review comments given by Minkyu Kang for
EHCI support on EXYNOS

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
11 years agoRevert "arm: bugfix: save_boot_params_default accesses uninitalized stack when -O0"
Wolfgang Denk [Mon, 9 Jul 2012 07:19:00 +0000 (09:19 +0200)]
Revert "arm: bugfix: save_boot_params_default accesses uninitalized stack when -O0"

This reverts commit fa042186b932e9b9ee9a2fd8a04a3acf7c70d224.
It causes build warnings like this:
cpu.c:48:1: warning: -fstack-usage not supported for this target
[enabled by default]

Signed-off-by: Wolfgang Denk <wd@denx.de>
11 years agofdt: send all dtc output to stderr
Stephen Warren [Fri, 8 Jun 2012 12:28:17 +0000 (12:28 +0000)]
fdt: send all dtc output to stderr

Commit 896bbb5 "fdt: avoid bad MAKEALL status" added logic to capture
the result code from dtc by echoing $? to stdout and capturing it using
$(). However, dtc emits some diagnostics to stderr and some to stdout.
The diagnostics send to stdout ended up getting captured via $() rather
than being echo'd to the user. This caused those diagnostics to be passed
to the exit command, which would then fail with the following cryptic
error message:

    /bin/sh: line 1: exit: too many arguments

Solve this by redirecting all dtc output to stderr so that $() does not
capture it. This allows the user to see the actual error message from dtc.

Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: albert.u.boot@aribaud.net
Cc: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agoext2fs: fix warning: 'blocknxt' may be used uninitialized
Kim Phillips [Tue, 3 Jul 2012 22:41:56 +0000 (17:41 -0500)]
ext2fs: fix warning: 'blocknxt' may be used uninitialized

This warning was introduced in 436da3c "ext2load: increase read
speed":

ext2fs.c: In function 'ext2fs_read_file':
ext2fs.c:458:19: warning: 'blocknxt' may be used uninitialized in this function [-Wuninitialized]

this change makes it go away.

Cc: Eric Nelson <eric.nelson@boundarydevices.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Jason Cooper <u-boot@lakedaemon.net>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agotools: Fix mingw tools build
Vladimir Yakovlev [Sat, 7 Jul 2012 10:05:06 +0000 (10:05 +0000)]
tools: Fix mingw tools build

mkenvimage does not build due to missed os_support.o and unsupported
file modes S_IRGRP S_IWGRP.
Tested with mingw 4.2.1 on ubuntu 12.04.

Signed-off-by: Vladimir Yakovlev <nagos@inbox.ru>
11 years agonet: make net_rand.h inclusion depend on BOOTP_RANDOM_DELAY
Kim Phillips [Thu, 5 Jul 2012 13:19:32 +0000 (13:19 +0000)]
net: make net_rand.h inclusion depend on BOOTP_RANDOM_DELAY

commit "net: use common rand()/srand() functions" introduced the following
build warning on the current u-boot-arm tree:

$ ./MAKEALL MPC8313ERDB_66
Configuring for MPC8313ERDB_66 - Board: MPC8313ERDB, Options: SYS_66MHZ
   text    data     bss     dec     hex filename
 271988   13976   41768  327732   50034 ./u-boot
In file included from bootp.c:15:0:
net_rand.h: In function 'srand_mac':
net_rand.h:40:2: warning: implicit declaration of function 'srand' [-Wimplicit-function-declaration]

adding this dependency fixes it.

Cc: Michael Walle <michael@walle.cc>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Michael Walle <michael@walle.cc>
11 years agoRemove remaining mdelay() macros
Anatolij Gustschin [Tue, 24 Apr 2012 22:43:23 +0000 (22:43 +0000)]
Remove remaining mdelay() macros

Drop mdelay() macros since we already have a common mdelay() func.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Sun, 8 Jul 2012 17:26:33 +0000 (19:26 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

* 'master' of git://git.denx.de/u-boot-arm: (212 commits)
  ARM: cache: Move the cp15 CR register read before flushing the cache.
  ARM: introduce arch_early_init_r()
  PXA: Enable CONFIG_PREBOOT on zipitz2
  ARM: mx28: Remove CONFIG_ARCH_CPU_INIT
  No need to define CONFIG_ARCH_CPU_INIT.
  add new board vl_ma2sc
  MTD: SPEAr SMI: Add write support for length < 4 bytes
  i2c: designware_i2c.c: Add support for the "i2c probe" command
  rtc/m41t62: Add support for M41T82 with HT (Halt Update)
  SPL: ARM: spear: Add SPL support for SPEAr600 platform
  Makefile: Add u-boot.spr build target (SPEAr)
  SPL: ARM: spear: Remove some objects from SPL build
  SPL: lib/Makefile: Add crc32.c to SPL build
  SPL: common/Makefile: Add image.c to SPL build
  arm: Don't use printf() in SPL builds
  GPIO: Add SPEAr GPIO driver
  net: Multiple updates/enhancements to designware.c
  cleanup/SPEAr: Define configuration flags more elegantly
  cleanup/SPEAr: Remove unnecessary parenthesis
  SPEAr: Correct SoC ID offset in misc configuration space
  SPEAr: explicitly select clk src for UART
  SPEAr: Remove CONFIG_MTD_NAND_VERIFY_WRITE to speed up NAND access
  SPEAr: Enable ONFI nand flash detection for spear3xx and 6xx and evb
  SPEAr: Enable CONFIG_SYS_FLASH_EMPTY_INFO macro
  SPEAr: Correct the definition of CONFIG_SYS_MONITOR_BASE
  SPEAr: Enable CONFIG_SYS_FLASH_PROTECTION
  SPEAr: Enable dcache for fast file transfer
  SPEAr: Enable autoneg for ethernet
  SPEAr: Enable udc and usb-console support only for usbtty configuration
  SPEAr: Enable usb device high speed support
  SPEAr: Initialize SNOR in early_board_init_f
  SPEAr: Change the default environment variables
  SPEAr: Remove unused flag (CONFIG_SYS_HZ_CLOCK)
  SPEAr: Add configuration options for spear3xx and spear6xx boards
  SPEAr: Add basic arch related support for SPEAr SoCs
  SPEAr: Add interface information in initialization
  SPEAr: Add macb driver support for spear310 and spear320
  SPEAr: Configure network support for spear SoCs
  SPEAr: Place ethaddr write and read within CONFIG_CMD_NET
  SPEAr: Eliminate dependency on Xloader table
  SPEAr: Fix ARM relocation support
  st_smi: Fixed page size for Winbond W25Q128FV flash
  st_smi: Change timeout loop implementation
  st_smi: Fix bug in flash_print_info()
  st_smi: Change the flash probing method
  st_smi: Removed no needed dependency on ST_M25Pxx_ID
  st_smi: Fix smi read status
  st_smi: Move status register read before modifying ctrl register
  st_smi: Read status until timeout happens
  st_smi: Enhance the error handling
  st_smi: Change SMI timeout values
  st_smi: Return error in case TFF is not set
  st_smi: Add support for SPEAr SMI driver
  mtd/NAND: Remove obsolete SPEAr specific NAND drivers
  SPEAr: Configure FSMC driver for NAND interface
  mtd/NAND: Add FSMC driver support
  arm/km: remove calls to kw_gpio_* in board_early_init_f
  arm/km: add implementation for read_dip_switch
  arm/km: support the 2 PCIe fpga resets
  arm/km: skip FPGA config when already configured
  arm/km: redefine piggy 4 reg names to avoid conflicts
  arm/km: cleanup km_kirkwood boards
  arm/km: enable BOCO2 FPGA download support
  arm/km: remove portl2.h and use km_kirkwood instead
  arm/km: convert mgcoge3un target to km_kirkwood
  arm/km: add kmcoge5un board support
  arm/km: add kmnusa board support
  arm: bugfix: save_boot_params_default accesses uninitalized stack when -O0
  cm-t35: fix incorrect NAND_ECC layout selection
  ARM: OMAP4/5: Do not configure non essential pads, clocks, dplls.
  ARM: OMAP4/5: Move USB pads to essential list.
  ARM: OMAP4/5: Move USB clocks to essential group.
  ARM: OMAP4/5: Move gpmc clocks to essential group.
  ARM: OMAP4+: Move external phy initialisations to arch specific place.
  omap4: Use a smaller M,N couple for IVA DPLL
  da850/omap-l138: Enable auto negotiation in RMII mode
  omap: am33xx: accomodate input clocks other than 24 Mhz
  omap: emif: fix bug in manufacturer code test
  omap: emif: deal with rams that return duplicate mr data on all byte lanes
  OMAP4+: Force DDR in self-refresh after warm reset
  OMAP4+: Handle sdram init after warm reset
  ARM: OMAP3+: Detect reset type
  arm: bugfix: Move vector table before jumping relocated code
  Kirkwood: Add support for Ka-Ro TK71
  arm/km: use spi claim bus to switch between SPI and NAND
  arm/kirkwood: protect the ENV_SPI #defines
  ARM: don't probe PHY address for LaCie boards
  lacie_kw: fix CONFIG_SYS_KWD_CONFIG for inetspace_v2
  lacie_kw: fix SDRAM banks number for net2big_v2
  Kirkwood: add lschlv2 and lsxhl board support
  net: add helper to generate random mac address
  net: use common rand()/srand() functions
  lib: add rand() function
  kwboot: boot kirkwood SoCs over a serial link
  kw_spi: add weak functions board_spi_claim/release_bus
  kw_spi: support spi_claim/release_bus functions
  kw_spi: backup and reset the MPP of the chosen CS pin
  kirkwood: fix calls to kirkwood_mpp_conf
  kirkwood: add save functionality kirkwood_mpp_conf function
  km_arm: use filesize for erase in update command
  arm/km: enable mii cmd
  arm/km: remove CONFIG_RESET_PHY_R
  arm/km: change maintainer for mgcoge3un
  arm/km: fix wrong comment in SDRAM config for mgcoge3un
  arm/km: use ARRAY_SIZE macro
  arm/km: rename CONFIG option CONFIG_KM_DEF_ENV_UPDATE
  arm/km: add piggy mac adress offset for mgcoge3un
  arm/km: add board type to boards.cfg
  AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  ATMEL/PIO: Enable new feature of PIO on Atmel device
  ehci-atmel: fix compiler warning
  AT91: at91sam9m10g45ek : Enable EHCI instead OHCI
  Atmel : usb : add EHCI driver for Atmel SoC
  Fix: AT91SAM9263 nor flash usage
  Fix: broken boot message at serial line on AT91SAM9263-EK board
  i.MX6 USDHC: Use the ESDHC clock
  mx28evk: Fix boot by adjusting HW_DRAM_CTL29 register
  i.MX28: Add function to adjust memory parameters
  mx28evk: Fix PSWITCH key position
  mx53smd: Remove CONFIG_SYS_I2C_SLAVE definition
  mx53loco: Remove CONFIG_SYS_I2C_SLAVE definition
  mx53evk: Remove CONFIG_SYS_I2C_SLAVE definition
  mx53ard: Remove CONFIG_SYS_I2C_SLAVE definition
  mx35pdk: Remove CONFIG_SYS_I2C_SLAVE definition
  imx31_phycore: Remove CONFIG_SYS_I2C_SLAVE definition
  mx53ard: Remove unused CONFIG_MII_GASKET
  mx6: Avoid writing to read-only bits in imximage.cfg
  m28evk: use same notation to alloc the 128kB stack
  ...

Signed-off-by: Wolfgang Denk <wd@denx.de>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Wolfgang Denk [Sun, 8 Jul 2012 17:16:14 +0000 (19:16 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

* 'master' of git://git.denx.de/u-boot-mpc85xx:
  powerpc/mpc85xx: Fix Handling the lack of L2 cache on P2040/P2040E
  powerpc/mpc85xx: Workaround for erratum CPU_A011
  powerpc/mpc85xx: Ignore E bit for SVR_SOC_VER()
  powerpc/P4080: Check SVR for CPU22 workaround
  lib/powerpc: addrmap_phys_to_virt() should return a pointer
  powerpc/85xx: clean up P1022DS board configuration header file
  powerpc/85xx: fdt_set_phy_handle() should return an error code
  powerpc/85xx: minor clean-ups to the P2020DS board header file
  powerpc/p1010rdb: add readme document for p1010rdb
  powerpc/mpc85xx:NAND_SPL:Avoid IFC/eLBC Base address setting
  powerpc/mpc85xx:Add debugger support for e500v2 SoC
  powerpc/85xx:Fix NAND code base to support debugger
  powerpc/85xx:Make debug exception vector accessible
  powerpc/85xx:Fix MSR[DE] bit in MSR to support debugger
  PATCH 1/4][v4] doc:Add documentation for e500 external debugger support
  powerpc/p1010rdb: update mux config of p1010rdb board
  powerpc/mpc85xx:Add BSC9131 RDB Support
  powerpc/mpc85xx:Add BSC9131/BSC9130/BSC9231 Processor Support
  powerpc/85xx: Add USB device-tree fixup for various platforms

Signed-off-by: Wolfgang Denk <wd@denx.de>
11 years agoARM: cache: Move the cp15 CR register read before flushing the cache.
SRICHARAN R [Wed, 16 May 2012 23:52:54 +0000 (23:52 +0000)]
ARM: cache: Move the cp15 CR register read before flushing the cache.

The following is the cleanup sequence in arch/arm/cpu/armv7/cpu.c

int cleanup_before_linux(void)
{
 ...
 ...
 dcache_disable();
 v7_outer_cache_disable();
 invalidate_dcache_all();
}

 1) invalidate_dcache_all call expects that all the caches has been
 flushed, invalidated and there are no dirty entries prior to its
 execution.  In the above sequence dcache_disable() flushes, invalidates
 the caches and turns off the  mmu. But after it cleanups the cache
 and before the mmu is disabled  there is a cp_delay() function which
 has STR instruction. On certain cores like the cortex-a15, cache hit
 and a write can happen to a cache line even when the dcache is
 disabled. So the above mentioned STR instruction creates a dirty entry
 after cleaning. The mmu gets disabled after this.

 2) invalidate_dcache_all invalidates the cache lines. Again on
 cores like cortex-a15, invalidate instruction flushes the dirty
 line as well. So some times the dirty line from sequence 1
 can corrupt the memory resulting in a crash.

 Fixing this by moving the get_cr() and cp_delay() calls before
 cleaning up the cache, thus avoiding the dirty entry.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
11 years agoARM: introduce arch_early_init_r()
Fabio Estevam [Mon, 2 Apr 2012 11:19:45 +0000 (11:19 +0000)]
ARM: introduce arch_early_init_r()

Introduce arch_early_init_r() function, which can be useful for doing
early initialization after relocation has happened.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoPXA: Enable CONFIG_PREBOOT on zipitz2
Marek Vasut [Thu, 8 Mar 2012 05:41:23 +0000 (05:41 +0000)]
PXA: Enable CONFIG_PREBOOT on zipitz2

Signed-off-by: Marek Vasut <marex@denx.de>
11 years agoARM: mx28: Remove CONFIG_ARCH_CPU_INIT
Fabio Estevam [Thu, 1 Mar 2012 04:02:40 +0000 (04:02 +0000)]
ARM: mx28: Remove CONFIG_ARCH_CPU_INIT

No need to define CONFIG_ARCH_CPU_INIT.

All mx28 based boards should use arch_cpu_init().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
11 years agoNo need to define CONFIG_ARCH_CPU_INIT.
Fabio Estevam [Thu, 1 Mar 2012 04:02:39 +0000 (04:02 +0000)]
No need to define CONFIG_ARCH_CPU_INIT.

All mx6 based boards should use arch_cpu_init().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
11 years agoadd new board vl_ma2sc
esw@bus-elektronik.de [Mon, 16 Jan 2012 00:22:02 +0000 (00:22 +0000)]
add new board vl_ma2sc

* add support for board VL+MA2SC
* adds vl_ma2sc_config for standard NOR boot configuration
* adds vl_ma2sc_ram_config for RAM load configuration

Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
11 years agoMTD: SPEAr SMI: Add write support for length < 4 bytes
Stefan Roese [Thu, 2 Feb 2012 12:25:45 +0000 (13:25 +0100)]
MTD: SPEAr SMI: Add write support for length < 4 bytes

Needed for redundant environment for example.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Amit Virdi <amit.virdi@st.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
11 years agoi2c: designware_i2c.c: Add support for the "i2c probe" command
Stefan Roese [Fri, 20 Jan 2012 10:52:33 +0000 (11:52 +0100)]
i2c: designware_i2c.c: Add support for the "i2c probe" command

i2c_probe() is changed to reinit the i2c bus upon read failure.
This is naturally the case upon i2c bus probing.

Also, some printf messages upon read failure are removed. As they
would interfere with the "i2c probe" command.

Additionally, i2c_set_bus_speed() now returns 0, so that the
"i2c speed" command can be used.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Amit Virdi <amit.virdi@st.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
11 years agortc/m41t62: Add support for M41T82 with HT (Halt Update)
Stefan Roese [Fri, 20 Jan 2012 10:47:47 +0000 (11:47 +0100)]
rtc/m41t62: Add support for M41T82 with HT (Halt Update)

Add support for the M41T82 RTC to the m41t62 driver. The only
difference that needs to be handled by this driver, is to
clear the HT (Halt Update) bit upon reset. This bit is not
used on the M41T62, so its save to clear this bit always.

The M41T82 support will be used by the X600 (SPEAr600)
board support.

Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPL: ARM: spear: Add SPL support for SPEAr600 platform
Stefan Roese [Tue, 3 Jan 2012 15:49:01 +0000 (16:49 +0100)]
SPL: ARM: spear: Add SPL support for SPEAr600 platform

This patch adds SPL support for SPEAr600. Currently only SNOR
(Serial NOR) flash support is included. Other boot devices
(NAND, MMC, USB ...) may be added with later patches.

Tested on the STM SPEAr600 evaluation and x600 SPEAr600 boards.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Amit Virdi <amit.virdi@st.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
11 years agoMakefile: Add u-boot.spr build target (SPEAr)
Stefan Roese [Thu, 5 Jan 2012 10:19:50 +0000 (11:19 +0100)]
Makefile: Add u-boot.spr build target (SPEAr)

On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. Both images are
created using mkimage (crc etc), so that the ROM bootloader can check
its integrity. Padding needs to be done to the SPL image (with
mkimage header) and not the binary. Otherwise the resulting image
which is loaded/copied by the ROM bootloader to SRAM doesn't fit.
The resulting image containing both U-Boot images is called u-boot.spr.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Amit Virdi <amit.virdi@st.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
11 years agoSPL: ARM: spear: Remove some objects from SPL build
Stefan Roese [Thu, 5 Jan 2012 10:23:45 +0000 (11:23 +0100)]
SPL: ARM: spear: Remove some objects from SPL build

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Amit Virdi <amit.virdi@st.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
11 years agoSPL: lib/Makefile: Add crc32.c to SPL build
Stefan Roese [Thu, 5 Jan 2012 09:57:20 +0000 (10:57 +0100)]
SPL: lib/Makefile: Add crc32.c to SPL build

This is needed for the SPEAr SPL support, as SPEAr uses the mkimage
header to wrap and validate the images (SPL & U-Boot).

Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPL: common/Makefile: Add image.c to SPL build
Stefan Roese [Thu, 5 Jan 2012 09:53:09 +0000 (10:53 +0100)]
SPL: common/Makefile: Add image.c to SPL build

This is needed for the SPEAr SPL support, as SPEAr uses the mkimage
header to wrap and validate the images (SPL & U-Boot).

Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoarm: Don't use printf() in SPL builds
Simon Glass [Sat, 3 Mar 2012 20:33:15 +0000 (12:33 -0800)]
arm: Don't use printf() in SPL builds

raise() likes to call printf() if it is available, but in SPL builds it
either is not available, or adds a large chunk to the resulting image
size.

So don't call it even if it is available.

This change reduces SPL size from 10KB to 6.3KB on hawkboard, for
example, using generic relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stefan Roese <sr@denx.de>
11 years agoGPIO: Add SPEAr GPIO driver
Stefan Roese [Tue, 14 Feb 2012 13:01:36 +0000 (14:01 +0100)]
GPIO: Add SPEAr GPIO driver

Tested on x600 (SPEAr600).

Signed-off-by: Stefan Roese <sr@denx.de>
11 years agonet: Multiple updates/enhancements to designware.c
Stefan Roese [Mon, 7 May 2012 10:04:25 +0000 (12:04 +0200)]
net: Multiple updates/enhancements to designware.c

This patch adds the following changes to designware ethernet driver
found on the ST SPEAr SoC:

- Don't init MAC & PHY upon startup. This causes a delay, waiting for
  the auto negotiation to complete. And we don't want this delay to
  always happen. Especially not on platforms where ethernet is not
  used at all (e.g. booting via flash).
  Instead postpone the MAC / PHY configuration to the stage, where
  ethernet is first used.
- Add possibility for board specific PHY init code. This is needed
  for example on the X600 board, where the Vitesse PHY needs to be
  configured for GMII mode.
  This board specific PHY init is done via the function
  designware_board_phy_init(). And this driver now adds a weak default
  which can be overridden by board code.
- Use common functions miiphy_speed() & miiphy_duplex() to read
  link status from PHY.
- Print status and progress of auto negotiation.
- Print link status (speed, dupex) upon first usage.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Amit Virdi <amit.virdi@st.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@gmail.com>
11 years agocleanup/SPEAr: Define configuration flags more elegantly
Amit Virdi [Mon, 7 May 2012 07:37:02 +0000 (13:07 +0530)]
cleanup/SPEAr: Define configuration flags more elegantly

In SPEAr, some of the configuration flags eg. CONFIG_SPEAR_EMI, were given value
"1", which isn't required. Define the flags without assigning any value

Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agocleanup/SPEAr: Remove unnecessary parenthesis
Amit Virdi [Mon, 7 May 2012 07:37:01 +0000 (13:07 +0530)]
cleanup/SPEAr: Remove unnecessary parenthesis

In SPEAr configuration files, unnecessary paranthesis are used in some
\#defines. Remove them as they serve no purpose

Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Correct SoC ID offset in misc configuration space
Shiraz Hashim [Mon, 7 May 2012 07:37:00 +0000 (13:07 +0530)]
SPEAr: Correct SoC ID offset in misc configuration space

SoC Core ID offset is 0x30 in miscellaneous configuration address
space. It was wrongly mentioned as periph2 clk enable.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: explicitly select clk src for UART
Shiraz Hashim [Mon, 7 May 2012 07:36:59 +0000 (13:06 +0530)]
SPEAr: explicitly select clk src for UART

UART in u-boot intends to run on 48MHz clock supplied by USB PLL.
Explicitly select the intended clock source.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Remove CONFIG_MTD_NAND_VERIFY_WRITE to speed up NAND access
Amit Virdi [Mon, 7 May 2012 07:36:58 +0000 (13:06 +0530)]
SPEAr: Remove CONFIG_MTD_NAND_VERIFY_WRITE to speed up NAND access

When CONFIG_MTD_NAND_VERIFY_WRITE is defined, nand driver read back the data
everytime it writes. This process unnecessarily slows down the nand access.

Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Enable ONFI nand flash detection for spear3xx and 6xx and evb
Vipin Kumar [Mon, 7 May 2012 07:36:57 +0000 (13:06 +0530)]
SPEAr: Enable ONFI nand flash detection for spear3xx and 6xx and evb

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Enable CONFIG_SYS_FLASH_EMPTY_INFO macro
Vipin Kumar [Mon, 7 May 2012 07:36:56 +0000 (13:06 +0530)]
SPEAr: Enable CONFIG_SYS_FLASH_EMPTY_INFO macro

Enable CONFIG_SYS_FLASH_EMPTY_INFO macro to enable reporting of empty sector
information through flinfo command.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Correct the definition of CONFIG_SYS_MONITOR_BASE
Vipin Kumar [Mon, 7 May 2012 07:36:55 +0000 (13:06 +0530)]
SPEAr: Correct the definition of CONFIG_SYS_MONITOR_BASE

The below text is copy pasted from README
- CONFIG_SYS_MONITOR_BASE:
Physical start address of boot monitor code (set by
make config files to be same as the text base address
(TEXT_BASE) used when linking) - same as
CONFIG_SYS_FLASH_BASE when booting from flash.

This patch corrects the definition of CONFIG_SYS_MONITOR_BASE and sets it to
TEXT_BASE

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Enable CONFIG_SYS_FLASH_PROTECTION
Vipin Kumar [Mon, 7 May 2012 07:36:54 +0000 (13:06 +0530)]
SPEAr: Enable CONFIG_SYS_FLASH_PROTECTION

This patch enables flash protection(lock/unlock) for CFI devices.
This is necessary because the Parallel NOR flash connected on the spear
boards, M28W64, can be locked/unlocked on a sector basis. Moreover, all its
sectors are in locked state at reset and these have to be unlocked explicitly
before being erased or written.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Enable dcache for fast file transfer
Shiraz Hashim [Mon, 7 May 2012 07:36:53 +0000 (13:06 +0530)]
SPEAr: Enable dcache for fast file transfer

Enable data cache with 1:1 mapping of DDR to enable fast file
transfer over tty which was doing lot of copy.

This feature is enabled only for flashing operation i.e. when
CONFIG_SPEAR_USBTTY is enabled.

This has been tested on SPEAr320, SPEAr600 and SPEAr900 evaluation
boards.

Following figures show an estimate on the performance improvements. The
test setup was a Linux host (not Windows) and involved measurement of
only binary transfer time, through kermit. The flash erase and flash
copy time would be unaffected by these patches.

Another thing is this that the timings remained more or less same across
ARM9 and Cortex based devices, hence reporting only one of the cases.

Before Enhancements
===================

$ time ukermit.small -p /dev/ttyACM0 -f spear320_uImage.img
Downloading file: 100.00% completed(2014080/2014080 bytes)
real    0m41.228s
user    0m0.002s
sys     0m0.064s

After Enhancements
==================

$ time ukermit.large -p /dev/ttyACM0 -f spear320_uImage.img
Downloading file: 100.00% completed(2014080/2014080 bytes)
real    0m5.441s
user    0m0.001s
sys     0m0.001s

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Enable autoneg for ethernet
Shiraz Hashim [Mon, 7 May 2012 07:36:52 +0000 (13:06 +0530)]
SPEAr: Enable autoneg for ethernet

Enabling autoneg avoids situation on few phys with fixed configuration. For
example, in one situation, nfs boot timed out when phy configuration is 100Mbps.
In another situtation, when traffic is directed to SPEAr, either thru
cross-cable or thru switch, the TFTP or DHCP command in u-boot starts to timeout
very often.

When Autoneg is ON, same phys started working perfectly.

Reported-by: Deepak Sikri <deepak.sikri@st.com>
Reported-by: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Enable udc and usb-console support only for usbtty configuration
Vipin KUMAR [Mon, 7 May 2012 07:36:51 +0000 (13:06 +0530)]
SPEAr: Enable udc and usb-console support only for usbtty configuration

This patch enables the UDC and usb-console support only for usbtty
configurations

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Enable usb device high speed support
Vipin KUMAR [Mon, 7 May 2012 07:36:50 +0000 (13:06 +0530)]
SPEAr: Enable usb device high speed support

This patch enables the support for usb high speed device for spear platform SOCs

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Initialize SNOR in early_board_init_f
Amit Virdi [Mon, 7 May 2012 07:36:49 +0000 (13:06 +0530)]
SPEAr: Initialize SNOR in early_board_init_f

flash reading is required earlier than flash_init is called since the env_init
is called before flash_init. This makes the smi_init necessary before env_init
being called.

Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Change the default environment variables
Vipin KUMAR [Mon, 7 May 2012 07:36:48 +0000 (13:06 +0530)]
SPEAr: Change the default environment variables

This patch modifies the default environment variables as:
1. Default bootargs:
 - console=ttyAMA0,115200
 - For environment present in NOR flash
     root=/dev/mtdblock3
 - For environment present in NAND flash
     root=/dev/mtdblock7
 - Removes "mem=" option
2. Introduces CONFIG_EXTRA_ENV_USBTTY as default usbtty env var even when usbtty
is not selected
3. Add default definitions for nfsboot and ramboot
4. Add a new default environment variable(CONFIG_EXTRA_ENV_UNLOCK) for SPEAr310
and SPEAr320

Signifacance of CONFIG_EXTRA_ENV_USBTTY:
This environment variable is important for flashing utility to work. So if
somebody accidently erases the env sector then also this variable must be
preserved so that flashing utility functions properly.

Signifacance of CONFIG_EXTRA_ENV_UNLOCK:
This env variable is read by the cfi driver to unlock all flash sectors.  This
is necessary because the Parallel NOR flash connected on the spear310 and
spear320 boards, M28W64, has all its sectors in locked state at reset and these
have to be unlocked explicitly before being erased or written.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoSPEAr: Remove unused flag (CONFIG_SYS_HZ_CLOCK)
Vipin KUMAR [Mon, 7 May 2012 07:36:47 +0000 (13:06 +0530)]
SPEAr: Remove unused flag (CONFIG_SYS_HZ_CLOCK)

SPEAr doesn't need CONFIG_SYS_HZ_CLOCK. This commit removes it.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>