1
0
Fork 0
Commit Graph

16665 Commits (fa042186b932e9b9ee9a2fd8a04a3acf7c70d224)

Author SHA1 Message Date
Tetsuyuki Kobayashi fa042186b9 arm: bugfix: save_boot_params_default accesses uninitalized stack when -O0
save_boot_params_default() in cpu.c accesses uninitialized stack area
when it compiled with -O0 (not optimized).

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Acked-by: Tom Rini <trini@ti.com>
2012-07-07 14:07:36 +02:00
Nikita Kiryanov 816e392148 cm-t35: fix incorrect NAND_ECC layout selection
The current configuration selects an incorrect NAND ECC layout,
which causes u-boot to write HW ECC data incorrectly.
This patch selects the right layout.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
2012-07-07 14:07:36 +02:00
SRICHARAN R f3f98bb0b8 ARM: OMAP4/5: Do not configure non essential pads, clocks, dplls.
Currently on OMAP4/5 platforms, many kernel drivers are dependent
upon the bootloaders for mux, dpll and clock configurations.
This should not be the case and bootloaders should set only the
minimum required for the uboot functionality and kernel boot.

Note that this is going to break the kernel drivers. But this
is the only way to get things fixed in the kernel.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
2012-07-07 14:07:36 +02:00
SRICHARAN R 1a89a217f5 ARM: OMAP4/5: Move USB pads to essential list.
USB module pads are getting enabled under non-essential
group. These will be required for fastboot, tftp support.
So move this to essential list to have them working when
non-essential pads are no more muxed.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
2012-07-07 14:07:36 +02:00
SRICHARAN R 5e9cd44ca0 ARM: OMAP4/5: Move USB clocks to essential group.
USB clocks will be required for fastboot, tftp
related functionalities. Move these clocks to
essential group inorder to have the functionality
working when non-essential clocks are not enabled.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
2012-07-07 14:07:36 +02:00
SRICHARAN R dbf8fb6ad1 ARM: OMAP4/5: Move gpmc clocks to essential group.
GPMC clocks are currently getting enabled as a part
non-essential clocks. This will be required during
NOR boot. Move this to essential group to keep the
functionality, when non-essential clocks are not
enabled.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
2012-07-07 14:07:36 +02:00
SRICHARAN R 254763822e ARM: OMAP4+: Move external phy initialisations to arch specific place.
The external phy is present in the case OMAP5 soc is currently
configured in emif-common.c. This results in having dummy structures
for those Socs which do not have a external phy. So by having a weak
function in emif-common and overriding it in OMAP5, avoids the use
of dummy structures.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
2012-07-07 14:07:35 +02:00
Sebastien Jan cc009defa4 omap4: Use a smaller M,N couple for IVA DPLL
This reduced M,N couple corresponds to the advised value from
TI HW team.

Tested on 4460 Pandaboard, it also provides peripheral clocks
closer to the advised values.

Signed-off-by: Sebastien Jan <s-jan@ti.com>
2012-07-07 14:07:35 +02:00
Rajashekhara, Sudhakar b78375a806 da850/omap-l138: Enable auto negotiation in RMII mode
On DA850/OMAP-L138 it was observed that in RMII mode,
auto negotiation was not performed. This patch enables
auto negotiation in RMII mode. Without this patch, EMAC
initialization takes more time and sometimes tftp fails
in RMII mode.

Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Hadli, Manjunath <manjunath.hadli@ti.com>
2012-07-07 14:07:35 +02:00
Steve Sakoman f2b37a6533 omap: am33xx: accomodate input clocks other than 24 Mhz
The PLL setup values currently assume a 24 Mhz input clock.

This patch uses V_OSCK from the board config file to support boards
with different input clock rates.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2012-07-07 14:07:35 +02:00
Steve Sakoman ad0878a749 omap: emif: fix bug in manufacturer code test
Code currently tests for <= 0xff.  Micron manufacturer code is 0xff, so
Micron memory will not be detected!

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2012-07-07 14:07:35 +02:00
Steve Sakoman 55c1284942 omap: emif: deal with rams that return duplicate mr data on all byte lanes
Some rams (Micron for example) return duplicate mr data on all byte lanes.

Users of the get_mr function currently don't deal with this duplicated
data gracefully.  This patch detects the duplicated data and returns only
the expected 8 bit mr data.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2012-07-07 14:07:35 +02:00
Lokesh Vutla 38f25b125e OMAP4+: Force DDR in self-refresh after warm reset
Errata ID:i727

Description: The refresh rate is programmed in the EMIF_SDRAM_REF_CTRL[15:0]
REG_REFRESH_RATE parameter taking into account frequency of the device.
When a warm reset is applied on the system, the OMAP processor restarts
with another OPP and so frequency is not the same. Due to this frequency
change, the refresh rate will be too low and could result in an unexpected
behavior on the memory side.

Workaround:
The workaround is to force self-refresh when coming back from the warm reset
with the following sequence:
• Set EMIF_PWR_MGMT_CTRL[10:8] REG_LP_MODE to 0x2
• Set EMIF_PWR_MGMT_CTRL[7:4] REG_SR_TIM to 0x0
• Do a dummy read (loads automatically new value of sr_tim)
This will reduce the risk of memory content corruption, but memory content
can't be guaranteed after a warm reset.

This errata is impacted on
OMAP4430: 1.0, 2.0, 2.1, 2.2, 2.3
OMAP4460: 1.0, 1.1
OMAP4470: 1.0
OMAP5430: 1.0

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
2012-07-07 14:07:35 +02:00
Lokesh Vutla 784229cc25 OMAP4+: Handle sdram init after warm reset
EMIF and DDR device state are preserved in warmreset.  Redoing the full
initialisation would cause unexpected behaviour.  Do only partial
initialisation to account for frequency change.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
2012-07-07 14:07:34 +02:00
Lokesh Vutla 702395073f ARM: OMAP3+: Detect reset type
Certain modules are not affected by means of
a warm reset and need not be configured again.
Adding an API to detect the reset reason warm/cold.

This will be used to skip the module configurations
that are retained across a warm reset.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: R Sricharan <r.sricharan@ti.com>
2012-07-07 14:07:34 +02:00
Tetsuyuki Kobayashi f8b9d1d30e arm: bugfix: Move vector table before jumping relocated code
Interrupts and exceptions doesn't work in relocated code.
It badly use IRQ_STACK_START_IN in rom area as interrupt stack.
It is because the vecotr table is not moved to ram area.
This patch moves vector table before jumping relocated code.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tested-by: Tom Rini <trini@ti.com>
2012-07-07 14:07:33 +02:00
Marek Vasut 0ec005fe00 Kirkwood: Add support for Ka-Ro TK71
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Wolfgang Denk <wd@denx.de>
2012-07-07 14:07:33 +02:00
Valentin Longchamp 0c25defccd arm/km: use spi claim bus to switch between SPI and NAND
We overwrite these weak functions from the kirkwood spi code to
use our own method to be able to switch between the SPI NOR and
the NAND flash. This is needed e.g. to update the u-boot. The former
command do_spi_toggle can therefore be removed. And the usage of
this command is removed from the u-boot update command in the
u-boot environment.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:33 +02:00
Valentin Longchamp dacc8c6f79 arm/kirkwood: protect the ENV_SPI #defines
So that they can be redefined by some boards specific values.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:33 +02:00
Simon Guinot c59c085731 ARM: don't probe PHY address for LaCie boards
The command miiphy_read(name, 0xEE, 0xEE, (u16 *) &devadr) always
returns 8 for the PHY address. It is the reset value for the PHY
Address Register. Obviously, this default value could be incorrect.
Moreover, as the PHY address is well known, there is no need to
auto-detect it.

Now, the PHY address must given as a parameter to the PHY initialization
function. Additionally this patch also fixes some aesthetic issues.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2012-07-07 14:07:33 +02:00
Simon Guinot d92151b925 lacie_kw: fix CONFIG_SYS_KWD_CONFIG for inetspace_v2
Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2012-07-07 14:07:32 +02:00
Simon Guinot c4c4b0e661 lacie_kw: fix SDRAM banks number for net2big_v2
Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2012-07-07 14:07:32 +02:00
Michael Walle f214a20e7e Kirkwood: add lschlv2 and lsxhl board support
This patch adds support for both the Linkstation Live (LS-CHLv2) and
Linkstation Pro (LS-XHL) by Buffalo.

Signed-off-by: Michael Walle <michael@walle.cc>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:32 +02:00
Michael Walle 03c1b04f86 net: add helper to generate random mac address
Add new function eth_random_enetaddr() to generate a locally administered
ethernet address.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Joe Hershberger <joe.hershberger@gmail.com>
2012-07-07 14:07:32 +02:00
Michael Walle 99e139d590 net: use common rand()/srand() functions
Replace rand() with the functions from lib/. The link-local network code
stores its own seed, derived from the MAC address. Thus making it
independent from calls to srand() in other modules.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2012-07-07 14:07:32 +02:00
Michael Walle 9acf1ca50d lib: add rand() function
It's a PRNG using the simple and fast xorshift method.

Signed-off-by: Michael Walle <michael@walle.cc>
Cc: Wolfgang Denk <wd@denx.de>
2012-07-07 14:07:32 +02:00
Luka Perkov d131ad68c6 kwboot: boot kirkwood SoCs over a serial link
The kwboot program boots boards based on Marvell's Kirkwood platform
via Xmodem over their integrated UART.

Signed-off-by: Daniel Stodden <daniel.stodden@googlemail.com>
Acked-by: Luka Perkov <uboot@lukaperkov.net>
Tested-By: Holger Brunck <holger.brunck@keymile.com>
Tested-By: David Purdy <david.c.purdy@gmail.com>
Tested-by: Simon Guinot <simon.guinot@sequanux.org>
2012-07-07 14:07:32 +02:00
Valentin Longchamp 24934fea0c kw_spi: add weak functions board_spi_claim/release_bus
This allows a final, board specific, step in the claim/relase_bus
function for the SPI controller, which may be needed for some hardware
designs.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:32 +02:00
Valentin Longchamp ac486e3ba1 kw_spi: support spi_claim/release_bus functions
These two function nows ensure that the MPP is configured correctly for
the SPI controller before any SPI access, and restore the initial
configuration when the access is over.

Since the used pins for the SPI controller can differ (2 possibilities
for each signal), the used pins are configured with CONFIG_SYS_KW_SPI_MPP.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:32 +02:00
Valentin Longchamp ca880679dd kw_spi: backup and reset the MPP of the chosen CS pin
This was not done before, and in the case of a shared pin (for MPP0
between NF_IO[2] and CSn) this could lead to problems.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:31 +02:00
Valentin Longchamp 846836386f kirkwood: fix calls to kirkwood_mpp_conf
With the new second save argument introduced by the previous patch, all
the calls to the function had to be fixed.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:31 +02:00
Valentin Longchamp 8f5d7a0398 kirkwood: add save functionality kirkwood_mpp_conf function
If a second non NULL argument is given to the kirkwood_mpp_conf
function, it will be used to store the current configuration of the MPP
registers. mpp_save  must be a preallocated table of the same size as
mpp_list and it must be zero terminated as well.

A later call to kirkwood_mpp_conf function with this saved list as first
(mpp_conf) argment will set the configuration back.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:31 +02:00
Valentin Longchamp a0fb94f9ed km_arm: use filesize for erase in update command
We used to have an arbitrary value, which can be a problem if we have a
u-boot image that is bigger than this value.

This patch is dependant on the whole km/arm series and will be included
in the v3 of the series if there is one.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:31 +02:00
Valentin Longchamp 002ec08d6d arm/km: enable mii cmd
This is useful to debug the switch initialization

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:31 +02:00
Holger Brunck be67190e48 arm/km: remove CONFIG_RESET_PHY_R
This is already defined in the generic kirkwood header.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:31 +02:00
Holger Brunck 4b09701b30 arm/km: change maintainer for mgcoge3un
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Acked-By: Heiko Schocher <hs@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
2012-07-07 14:07:31 +02:00
Holger Brunck e947cbc94e arm/km: fix wrong comment in SDRAM config for mgcoge3un
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:30 +02:00
Holger Brunck b732632389 arm/km: use ARRAY_SIZE macro
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:30 +02:00
Holger Brunck af85f08588 arm/km: rename CONFIG option CONFIG_KM_DEF_ENV_UPDATE
This config option sounds like the it is responsible for the
update of  the environment, but it is the u-boot update handling.
Therefore we adapt it to a more apropriate naming.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:30 +02:00
Holger Brunck f5b5a1c80e arm/km: add piggy mac adress offset for mgcoge3un
On mgcoge3un the piggy mac adress is at offset 3.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:30 +02:00
Holger Brunck e29c6d0401 arm/km: add board type to boards.cfg
Some other kirkwood boards from keymile will follow. They will have some
small differences, but we want to use the km_kirkwood.h for all to
distinguish them. This patch a preparation for this.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:30 +02:00
Alexandre Belloni e139cb31d3 AT91SAM9*: Change kernel address in dataflash to match u-boot's size
On at91sam platforms, u-boot grew larger than the allocated size in
dataflash, the layout was:
bootstrap  0x00000000
ubootenv   0x00004200
uboot      0x00008400
kernel     0x00042000
fs         0x00252000

u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
0x39C00 bytes anymore.

Now, the layout is:
bootstrap  0x00000000
ubootenv   0x00004200
uboot      0x00008400
kernel     0x00084000
fs         0x00294000

Signed-off-by: Alexandre Belloni <alexandre.belloni@piout.net>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-07-07 14:07:30 +02:00
Bo Shen 2b3b1c668b ATMEL/PIO: Enable new feature of PIO on Atmel device
Enable new PIO feature supported by Atmel SoC.
Using CPU_HAS_PIO3 micro to enable PIO new feature.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-07-07 14:07:30 +02:00
Andreas Bießmann 81f40345d1 ehci-atmel: fix compiler warning
Commit 7a101e946cba55e32d3d1265e30456c810046da3 introduced following warning:
---8<---
ehci-atmel.c: In function 'ehci_hcd_init':
ehci-atmel.c:49:2: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
ehci-atmel.c: In function 'ehci_hcd_stop':
ehci-atmel.c:79:2: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
--->8---

This patch fixes it.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
cc: Bo Shen <voice.shen@atmel.com>
cc: Marek Vasut <marex@denx.de>
2012-07-07 14:07:30 +02:00
Bo Shen e1edd06594 AT91: at91sam9m10g45ek : Enable EHCI instead OHCI
Enable EHCI support instead OHCI

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-07-07 14:07:29 +02:00
Bo Shen cc30b7803d Atmel : usb : add EHCI driver for Atmel SoC
Some Atmel SoC support USB EHCI, add the EHCI driver to support it.

To enable the USB EHCI, add the following configuration options into
board relative configuration file and remove USB OHCI options.

    #define CONFIG_USB_EHCI
    #define CONFIG_USB_EHCI_ATMEL
    #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     2

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-07-07 14:07:29 +02:00
esw@bus-elektronik.de 5e7d0917b6 Fix: AT91SAM9263 nor flash usage
Fix: board doesn't boot from norflash
 Fix: environment can't write to flash (end address/start address not on sector boundary)

Signed-off-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-07-07 14:07:29 +02:00
esw@bus-elektronik.de 2feb736661 Fix: broken boot message at serial line on AT91SAM9263-EK board
Signed-off-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-07-07 14:07:29 +02:00
Michael Langer 5c23712dbd i.MX6 USDHC: Use the ESDHC clock
The commit "i.mx: fsl_esdhc: add the i.mx6q support" (4692708d) introduces
support for the i.MX6Q MMC host controller USDHC.

MXC_IPG_PERCLK sets the clock to 66MHz. This seems to be the default clock
of the ESDHC IP found in < i.MX6 silicon. However, the default clock for the USDHC
IP found in i.MX6 is 200MHz (MXC_ESDHC_CLK). This difference will cause a 3 times
higher clock on SD_CLK than expected (see fsl_esdh.c -> set_sysctl()).

Signed-off-by: Michael Langer <michael.langer@de.bosch.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Jason Liu <r64343@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2012-07-07 14:07:29 +02:00
Fabio Estevam f69b0653ac mx28evk: Fix boot by adjusting HW_DRAM_CTL29 register
commit acc4959fc1 (Revert "i.MX28: Enable additional DRAM address bits")
broke mx28evk boot.

Fix it by properly adjusting the HW_DRAM_CTL29 register value.

Suggested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
2012-07-07 14:07:29 +02:00