kernel/u-boot.git
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 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 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>
12 years agovideo: Rename CONFIG_VIDEO_MX5
Fabio Estevam [Thu, 31 May 2012 07:23:56 +0000 (07:23 +0000)]
video: Rename CONFIG_VIDEO_MX5

Rename CONFIG_VIDEO_MX5 as this driver can also be used on mx6.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agomx6: Allow mx6 to access the IPUv3 registers
Fabio Estevam [Thu, 31 May 2012 07:23:55 +0000 (07:23 +0000)]
mx6: Allow mx6 to access the IPUv3 registers

Adjust the IPUv3 registers, so that the IPUv3 driver can be extended for mx6 as well.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agocommon lcd: minor coding style changes
Nikita Kiryanov [Thu, 24 May 2012 01:42:38 +0000 (01:42 +0000)]
common lcd: minor coding style changes

No functional changes

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>