Commit Graph

268 Commits

Author SHA1 Message Date
Prafulla Wadaskar ce089c04a8 add Multi Function Pin configuration support for ARMADA100
This patch adds the support MFP support for Marvell ARMADA100 SoCs

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2010-12-16 23:02:47 +01:00
Prafulla Wadaskar 6c08d5dcf8 arm: Add Support for Marvell ARMADA 100 Familiy SoCs
ARMADA 100 Family processors are highly integrated SoCs
based on Sheeva_88SV331x-v5 PJ1 cpu core.
Ref: http://www.marvell.com/products/processors/applications/armada_100

SoC versions Supported:
1) ARMADA168/88AP168	(Aspen P)
2) ARMADA166/88AP166	(Aspen M)
3) ARMADA162/88AP162	(Aspen L)

Contributors:
Eric Miao <eric.y.miao@gmail.com>
Lei Wen <leiwen@marvell.com>
Mahavir Jain <mjain@marvell.com>

Signed-off-by: Mahavir Jain <mjain@marvell.com>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2010-12-16 23:02:36 +01:00
Wolfgang Denk 006915fbb0 Merge branch 'master' of ../master into next 2010-12-16 23:00:53 +01:00
Wolfgang Denk 3600945b5a ARM: */start.S: use canonical asm syntax
Make code build with older tool chains.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-12-13 23:58:50 +01:00
Nishanth Menon ee3894c681 omap3: emif|sdrc: use a single global data define
DECLARE_GLOBAL_DATA_PTR declarations in functions are inherently
troublesome with various compilers (e.g. gcc 4.5)

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-11 11:41:42 -05:00
Dirk Behme b03c8403cd OMAP: Timer: Replace bss variable by gd
Reuse the gd->tbl value for timestamp and add gd->lastinc for lastinc bss
values in the OMAP timer driver.

The usage of bss values in drivers before initialisation of bss is forbidden.
In that special case some data in .rel.dyn gets corrupted.

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Tested-by: Steve Sakoman <steve.sakoman@linaro.org>
Tested-by: John Rigby <john.rigby@linaro.org>
Tested-by: Nishanth Menon <nm@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Tested-by: Heiko Schocher <hs@denx.de>
Tested-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-11 10:50:48 -05:00
Nick Thompson e465cf2377 davinci: Rewrite timer.c to use tbl/tbu emulation variables in gd
This change allows the davinci timer functions to be used before
relocation since it avoids using static variables prior to BSS being
made available.

The code is based on that used in the at91 timers, modified to use
a davinci specific hardware timer. It also maintains reset_timer()
to allow deprecated timer usage to continue to work (for example,
in nand_base.c)

Signed-off-by: Nick Thompson <nick.thompson@ge.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
Tested-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Tested-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-11 10:46:46 -05:00
Wolfgang Denk ac8983bcba Merge branch 'master' of git://git.denx.de/u-boot-imx 2010-12-09 20:52:44 +01:00
Prafulla Wadaskar f9de0997d7 ARM: make timer variables in gt_t available for all ARM platforms
All code that attemots to access variables in BSS before relocation
(for example directly or indirectly by board_init_f()) needs to be
fixed. Especially timer.c needs to fix on most of the ARM platforms.

This patch makes timer related variables in gd_t available for
all ARM implementations.

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>

Edited commit message.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-12-09 11:01:16 +01:00
Andreas Bießmann b9c5081d7d armv7: fix relocation skip
I doubt the stack_setup() was defective before:
 we load the current location of _start and compare against destination
 of relocate_code(). If we are already there we shoud skip the
 relocation and jump over to clear_bss. Before the clear_bss was also skipped.

Signed-off-by: Andreas Biemann <andreas.devel@googlemail.com>
2010-12-09 11:01:16 +01:00
Andreas Bießmann 1f52d89f2b arm: fixloop(): do not use r8 for relocation
r8 is used for global_data and should therefore be left alone!

For C code the compiler flag --fixed-r8 does the job, but in assembler
we need to be aware of that fact.

Signed-off-by: Andreas Biemann <andreas.devel@googlemail.com>
2010-12-09 11:01:15 +01:00
Andreas Bießmann a1a47d3c57 arm: relocate_code(): do not set register useless
In case we are still at relocation target address before relocation we
do not need to load the registers needed for relocation. We should
instead skip the whole relocation part and jump over to clear_bss
immediately.

Signed-off-by: Andreas Biemann <andreas.devel@googlemail.com>
2010-12-09 11:01:15 +01:00
Andreas Bießmann a78fb68f71 arm: copy_loop(): use scratch register
This patch uses r1 as scratch register for copy_loop(). Therefore we do
not longer need r7 for the storage of relocate_code()'s 'addr_moni' (the
destination address of relocation).
Therefore r7 can be used later on for other purposes.

Signed-off-by: Andreas Biemann <andreas.devel@googlemail.com>
2010-12-09 11:01:14 +01:00
Heiko Schocher 296cae732b arm: add 8-byte alignment for ABI compliance before board_init_f
suggested from Daniel Hobi<daniel.hobi@schmid-telecom.ch>

Tested on following boards:
arm1136: qong
armv7: omap3_beagle
arm926ejs: magnesium, tx25

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Daniel Hobi <daniel.hobi@schmid-telecom.ch>
cc: Albert ARIBAUD <albert.aribaud@free.fr>
2010-12-08 23:50:09 +01:00
Matt Waddel 7d38f87474 ARMV7: Vexpress: fix build errors
This patch fixes build errors in the vexpress system:
  - Removed sys_proto.h requirement from syslib.c.
  - Switched vexpress to the default armv7 linker script.
  - Renamed TEXT_BASE to CONFIG_SYS_TEXT_BASE.

Signed-off-by: Matt Waddel <matt.waddel@linaro.org>
2010-12-08 23:44:21 +01:00
Andreas Bießmann a429db7e3c arm920t/at91/timer: replace bss variables by gd
Reuse the gd->tbl value for timestamp and add gd->lastinc for lastinc
bss values in arm920t/at91/timer driver.
The usage of bss values in driver before initialisation of bss is
forbidden. In that special case some data in .rel.dyn gets corrupted by
the arm920t/at91/timer driver.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2010-12-07 22:08:07 +01:00
Andreas Bießmann 305bf489d1 arm920t/at91/reset: board_reset: define weak symbol
Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
2010-12-07 22:08:07 +01:00
Reinhard Meyer accef43145 AT91: fix EMAC gpio init in at91sam9260_devices.c
The AT91SAM9G20 BOOT ROM apparently initializes PA23 and PA24 to multi drive
(open drain). Revert this, if those pins are going to be used for MII.

Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-12-07 16:36:40 +01:00
Wolfgang Denk 52eb2c7911 Merge branch 'master' of git://git.denx.de/u-boot-samsung 2010-11-30 21:30:13 +01:00
Stefano Babic 6d1c649f44 Davinci 8xx: Move common functions to share code
As more Davinci 8xx board can be added, move common code
to be shared between boards.

 * rebased ontop of Sugosh's patches
 * moving the HAWKBOARD_KICK{0,1}_UNLOCK defines to
   arch/arm/include/asm/arch-davinci/davinci_misc.h from to
   arch/arm/include/asm/arch-davinci/da8xx_common.h
 * don't define dram functions in PRELOADER
 * move sync_env_enetaddr into existing EMAC ifdef
 * use misc.c in hawkboard nand_spl

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-30 11:32:59 -05:00
Sudhakar Rajashekhara d26074012b da850: Add RMII support for EMAC
This patch is a port of the work by Sudhakar Rajeshekhara in commit
ab3effbcad8851cc65dc5241a01c064d2030a3b2 of
git://arago-project.org/git/people/sandeep/u-boot-davinci.git.

The da850 UI board has on it an RMII PHY which can be used if the MDC line
to the MII PHY on the baseboard is disabled and the RMII PHY is enabled by
configuring the values of some GPIO pins on the IO expander of the UI board.
This patch implements disabling that line via GPIO2[6], configuring the UI
board's IO expander and setting only the pinmux settings that are needed for
RMII operation.

Tested on da850evm by adding a define for CONFIG_DRIVER_TI_EMAC_USE_RMII.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Sandeep Paulraj <s-paulraj@ti.com>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Mike Frysinger <vapier@gentoo.org>
CC: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-30 11:27:44 -05:00
Sughosh Ganu 48571ff005 Add board support for hawkboard
The patch adds basic board support for TI's OMAP-L138 based
Hawkboard. This board is pretty similar to the da850 EVM. Support for
nand and network access is added in this version.

The following bootup procedure is used.

At reset, the Rom Boot Loader(RBL), initialises the ddr and the nand
controllers and copies the second stage bootloader(nand_spl) to
RAM. The secondary bootloader then copies u-boot from a predefined
location in the nand flash to the RAM, and passes control to the
u-boot image.

Three config options are supported
* hawkboard_config - Used to create the u-boot.bin. Tftp the
 u-boot.bin image to the RAM from u-boot, and flash to the nand flash
 at address 0xe0000.

* hawkboard_nand_config - Used to generate the secondary
 bootloader(nand_spl) image. This creates an elf file u-boot-spl
 under nand_spl/. Create an AIS signed image using this file, and
 flash it to the nand flash at address 0x20000. The ais file should
 fit in one block.

* hawkboard_uart_config - This is same as the first image, but with
 the TEXT_BASE as expected by the RBL(0xc1080000). Create the AIS

Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-30 11:25:01 -05:00
Minkyu Kang d3b0d628b0 ARMV7: S5P: timer: get the count_value from register when call udelay
Because of count_value is set to tcnb4 register,
should be get from this register when call udelay function.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2010-11-30 09:07:07 +09:00
Vaibhav Hiremath 279c8283db AM3517:EMIF4: fix SDRAM size to 256Mb
With addition of "dram_init_banksize()" function from Heiko,Schocher
(commit ID: 561142af20), the DRAM size
is getting configured wrongly to 512Mb (CS0 & CS1).
So fix it to 256Mb.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-29 16:36:10 -05:00
Sughosh Ganu d7f9b503a8 Move and rename common headers from under
board/davinci.

 Move the davinci common headers to the architecture specific
 include file path.

Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-28 20:21:27 -05:00
Stefano Babic d73a8a1b8c da850: Enable SPI Flash
The patch was already posted to the arago project,
but not yet to mainline. It allows to save environment into
the spi flash. Tested on LogiPD tmdxl138.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Detlev Zundev <dzu@denx.de>
CC: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-28 20:17:35 -05:00
Sudhakar Rajashekhara a131148efe da8xx: Add cpu_is_da8xx macros
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Detlev Zundev <dzu@denx.de>
CC: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-28 20:17:30 -05:00
Albert Aribaud e42a7dff09 arm1176: bugfix: fix start.S for ELF relocation
The start.S file was only half-rewritten for ELF relocations.
This bugfix completes the rewrite.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-11-26 21:22:43 +01:00
Albert Aribaud 3336ca60d4 arm: add ELF relocation support to rest of cpus
bulk addition of ELF relocation support to ARM cpus
arm946es, arm720t,arm920t, arm925t, arm_intcm, ixp,
lh7a40x, s3c44b0, and sa1100.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-11-26 21:22:07 +01:00
Liu Hui-R64343 565e39c577 imx: Get fec mac address from fuse
The patch is to support getting FEC MAC address from fuse bank.

Signed-off-by: Jason Liu <r64343@freescale.com>
Tested-by: Stefano Babic <sbabic@denx.de>
2010-11-21 18:24:20 +01:00
Nishanth Menon 93e3568bd5 omap4: board: change global data pointer to file scope
DECLARE_GLOBAL_DATA_PTR is currently defined within the scope
of function while it is a global pointer. Change the scope of
definition to replicate it's global scope. This seems to help
gcc 4.5 optimizations as well.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-19 16:27:41 -05:00
Sebastien Carlier 6d8962e814 Switch from archive libraries to partial linking
Before this commit, weak symbols were not overridden by non-weak symbols
found in archive libraries when linking with recent versions of
binutils.  As stated in the System V ABI, "the link editor does not
extract archive members to resolve undefined weak symbols".

This commit changes all Makefiles to use partial linking (ld -r) instead
of creating library archives, which forces all symbols to participate in
linking, allowing non-weak symbols to override weak symbols as intended.
This approach is also used by Linux, from which the gmake function
cmd_link_o_target (defined in config.mk and used in all Makefiles) is
inspired.

The name of each former library archive is preserved except for
extensions which change from ".a" to ".o".  This commit updates
references accordingly where needed, in particular in some linker
scripts.

This commit reveals board configurations that exclude some features but
include source files that depend these disabled features in the build,
resulting in undefined symbols.  Known such cases include:
- disabling CMD_NET but not CMD_NFS;
- enabling CONFIG_OF_LIBFDT but not CONFIG_QE.

Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
2010-11-17 21:02:18 +01:00
Albert Aribaud aaeb0a890a ARM: fix linker file for newer ld support
older ld emitted all ELF relocations in input sections named
.rel.dyn, whereas newer ld uses names of the form .rel*. The
linker script only collected .rel.dyn input sections. Rewrite
to collect all .rel* input sections.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-11-17 20:44:32 +01:00
Wolfgang Denk 227b725155 Merge branch 'master' of git://git.denx.de/u-boot-ti 2010-11-13 00:19:55 +01:00
Heiko Schocher 0fc43a417c armv7, beagle: Second SDRAM bank don;t work
since commit 3667cbeed5
on beagle board the second sdram bank didn;t longer
work. Since this patch sdram settings just get copied
from bank a, but CMD_NOP, CMD_PRECHARGE, CMD_AUTOREFRESH
are not executed and after that mr register is also
not updated. This patch adds this for the bank b.

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Steve Sakoman <steve@sakoman.com>
cc: Sandeep Paulraj <s-paulraj@ti.com>
cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-04 16:05:25 -04:00
Steve Sakoman 8345fb242c ARMV7: Fix build for non-OMAP3 boards
Commit c3d3a54 uses CONFIG_ARMV7 to determine whether to call the
v7_flush_cache_all function.  This breaks the build for all non-OMAP3
boards (like Panda and OMAP4430SDP) since there is only a v7_flush_cache_all
implementation for OMAP3.

This patch uses CONFIG_OMAP3XXX instead of CONFIG_ARMV7 so that only boards
with a v7_flush_cache_all will make the call.

Tested on Beagle, Overo, Panda, and OMAP4430SDP

Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-04 15:27:02 -04:00
Reinhard Meyer 7d44af08b8 AT91: add header file for the Shutdown Controller
and SHDWN address entry in at91sam9260.h

Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-11-02 09:47:13 +01:00
Reinhard Meyer 33825ec1a4 AT91: add 2nd SPI to 9260/9XE/9G20
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-10-30 10:20:46 +02:00
Wolfgang Denk 0c0892be0d Merge branch 'master' of git://git.denx.de/u-boot-marvell
Conflicts:
	include/configs/km_arm.h

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-29 22:03:00 +02:00
Wolfgang Denk d75c2a3d7f Merge branch 'master' of git://git.denx.de/u-boot-imx 2010-10-29 21:50:24 +02:00
Wolfgang Denk 17dd883c5b Merge branch 'master' of git://git.denx.de/u-boot-samsung 2010-10-29 21:47:48 +02:00
Wolfgang Denk 1ecb758341 Merge branch 'for-wd-master' of git://git.denx.de/u-boot-pxa 2010-10-29 21:44:40 +02:00
Wolfgang Denk e03f316974 Drop support for CONFIG_SKIP_RELOCATE_UBOOT
For ARM systems, before ELF relocation was introduced,
CONFIG_SKIP_RELOCATE_UBOOT coul be used to prevent *COPYING* the
U-Boot image from whereever it was loaded to it's link address
(CONFIG_SYS_TEXT_BASE).  The name was badly chosen, as no relocation
was performed at all, it was just a memcpy().

With ELF relocation, this does not work like that any more, and
related boards need to be fixed anyway.  So don't keep this relict any
longer.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-10-29 21:40:08 +02:00
Wolfgang Denk a9aa392629 Drop support for CONFIG_SYS_ARM_WITHOUT_RELOC
When this define was introduced, the idea was to provide a soft
migration path for ARM boards to get adapted to the new relocation
support.  However, other recent changes led to a different
implementation (ELF relocation), where this no longer works.  By now
CONFIG_SYS_ARM_WITHOUT_RELOC does not only not help any more, but it
actually hurts because it obfuscates the actual code by sprinkling it
with lots of dead and non-working debris.

So let's make a clean cut and drop CONFIG_SYS_ARM_WITHOUT_RELOC.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-10-29 21:39:59 +02:00
Wolfgang Denk 2e5167ccad Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC
By now, the majority of architectures have working relocation
support, so the few remaining architectures have become exceptions.
To make this more obvious, we make working relocation now the default
case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-10-29 21:32:07 +02:00
Tanmay Upadhyay 28e57108a6 Kirkwood: bugfix: DRAM size initialization
If start of any DRAM bank is greater than total DDR size, remaining DDR banks' start address & size were left un-initialized in dram_init function. This could break other functions who uses array 'gd->bd->bi_dram'. Kirkwood network driver is one example. This also stops Linux kernel from booting.

v2 - Set start address also to 0. Without this Linux kernel couldn't
     boot up

Signed-off-by: Tanmay Upadhyay <tanmay.upadhyay@einfochips.com>
2010-10-28 20:06:22 +05:30
Shawn Guo 1ab027cbf6 mx51evk: support new relocation scheme
This patch is to fix build breakage and support new relocation
scheme for mx51evk.

- Correct IRAM base address and add size definition

  The IRAM starts from 0x1FFE0000 on final revsion i.mx51 than
  0x1FFE8000 which is for older revision.

- Include imx-regs.h in mx51evk.h

  Definitions like CSD0_BASE_ADDR and IRAM_BASE_ADDR can be
  referred to.

- Define CONFIG_SYS_INIT_RAM_ADDR and CONFIG_SYS_INIT_RAM_SIZE

  They are used to define init RAM layout.

- Remove comment for CONFIG_SYS_GBL_DATA_SIZE which has been
  buried by Wolfgang's commit below

  25ddd1fb: Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated value

Signed-off-by: Shawn Guo <shawn.gsc@gmail.com>
2010-10-28 11:43:23 +02:00
Stefano Babic 9a0044183a MX51: remove warning in clock.c
The patch removes the warning:

clock.c:291: warning: initialization from incompatible pointer type

after  constification of args[]

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-10-28 11:08:52 +02:00
Matthias Weisser 81129d07a0 imx25: Fix reset
This patch fixes the reset command on imx25. The watchdog registers are 16
bits in size and not 32. This patch also adds the service register codes as
constants.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
2010-10-28 10:32:21 +02:00
Jason Liu 95707aaa9e MX5:use common u-boot.lds of cpu layer
Remove u-boot.lds from mx5 and use the common u-boot.lds
of cpu layer. This patch also fix the building errors:

arch/arm/cpu/armv7/start.o: In function `_rel_dyn_start_ofs':
arch/arm/cpu/armv7/start.S:283: undefined reference to `__rel_dyn_start'
arch/arm/cpu/armv7/start.o: In function `_rel_dyn_end_ofs':
arch/arm/cpu/armv7/start.S:283: undefined reference to `__rel_dyn_end'
arch/arm/cpu/armv7/start.o: In function `_dynsym_start_ofs':
arch/arm/cpu/armv7/start.S:283: undefined reference to `__dynsym_start'

Signed-off-by: Jason Liu <r64343@freescale.com>
2010-10-28 10:32:20 +02:00