Commit Graph

792 Commits

Author SHA1 Message Date
Wolfgang Denk c08e5cf7c7 POWERPC: enable --gc-sections and -ffunction-sections -fdata-sections
The switch from archive libraries to partial linking has introduced a
number of problems, that are non-trivial to solve.  For example, it is
no longer possible to include individual object files in the linker
script as we did before for example in the case of boards with
embedded environment to fill up the gap caused by the need to align
the environment on flash erase block boundaries.

The best (but unfortunately not easiest) approach to address this
problem is to enable -ffunction-sections (and -fdata-sections) so
we can again (and even in much finer granularity) place certain code
where we want it.  When doing this step, it seems only consequent to
also add --gc-sections which has the added benefit of reducing the
memory footprint of the U-Boot image (both in flash and in RAM).

Unfortunately, this requires changes to a lot of linker scripts.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-27 23:35:08 +01:00
Wolfgang Denk fa11dbe56d arch/powerpc/*/config.mk: make CONFIG_SYS_LDSCRIPT settings work
As we try to get rid of board specific config.mk files we must
provide a way for board specific settings of the LDSCRIPT variable
(path to the linker script) where needed.

We now implement the following hierarchy:

- Highest priority has a "#define CONFIG_SYS_LDCONFIG" in the board
  config file.
- If CONFIG_SYS_LDCONFIG is not set, and the system is booting from
  NAND (CONFIG_NAND_SPL is set), then a board specific linker
  script board/$(BOARDDIR)/u-boot-nand.lds gets used.
- If we are not booting from NAND, we test if a processor specific
  linker script arch/powerpc/cpu/$(CPU)/u-boot.lds exists; if so we
  use that.
- As default, arch/powerpc/config.mk gets used.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Kumar Gala <kumar.gala@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-26 22:08:19 +01:00
Wolfgang Denk a7186b8073 cpu/ppc4xx/Makefile: build only needed object files
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-26 22:08:19 +01:00
Wolfgang Denk 57d6c589f5 WINBOND_83C553: enable only on boards that actually use it.
So far, only the BAB7xx board would call the initialise_w83c553f()
function for the WINBOND 83C553 chip, even though some other boards
(HIDDEN_DRAGON, Sandpoint8240, Sandpoint8245) enabled it in their
board configuration.  These boards were also missing other config
settings needed for that, which resulted in build errors like this:

drivers/pci/libpci.o:(.got2+0x84): undefined reference to `ide_bus_offset'

Switch arch/powerpc/lib/board.c to call initialise_w83c553f() not on a
per-board base, but when a WINBOND_83C553 in enabled in a
configuration (like BAB7xx), and disable it in the boards that had
this set so far.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Yusdi Santoso <yusdi_santoso@adaptec.com>
Cc: Jim Thompson <jim@musenki.com>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-26 22:08:18 +01:00
Wolfgang Denk 41bb7531e1 Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-11-26 21:33:14 +01: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
Mike Frysinger 4024242669 Blackfin: drop initcode.o from combined object
We explicitly link in the initcode.o in the Blackfin linker script, so
there is no need to merge it into the main common object for the linker
to pull in itself.  This also fixes duplicate symbol errors with the new
partial linking logic.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-19 19:17:57 -05: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
Wolfgang Denk b9d77535e9 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2010-11-19 22:02:40 +01:00
Mike Frysinger 49508d4c59 Blackfin: make sure bss len is multiple of 4 bytes
The Blackfin on-chip BootROM requires that fill operations (which is
used for the bss) be aligned to 4 bytes (base addr and total len).
Plus, the Blackfin early init asm code assumes the same thing.  So
rather than making things work for no real gain, make sure the bss
len is padded to 4 bytes in the linker script.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-18 04:38:19 -05:00
Mike Frysinger cd97dd4f2c Blackfin: stick ins/outs funcs into their own .text section
This lets the linker garbage collect these functions when they aren't
actually used by placing them into the standard .text.<func> section.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-18 04:38:19 -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
Wolfgang Denk d7b1970015 Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-11-17 20:54:39 +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
Heiko Schocher 0091337932 i2c, mpc5xxx: add multibus support
Tested on upcoming hydra (mpc5200 based) board.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-11-17 08:03:56 +01:00
Joakim Tjernlund 34bbf61860 PowerPC: Don't destroy fixup table while doing fixups
The fixup procedure just stored a constant value in the
fixup table rather than just adjusting the table.
Although that doesn't seem to do any harm, it prevents
relocation more that once.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
2010-11-14 23:25:33 +01:00
Wolfgang Denk 227b725155 Merge branch 'master' of git://git.denx.de/u-boot-ti 2010-11-13 00:19:55 +01:00
Haiying Wang 0635b09cc0 powerpc/85xx: rename CONFIG_SYS_TEXT_BASE to CONFIG_SYS_MONITOR_BASE
Use CONFIG_SYS_MONITOR_BASE instead of CONFIG_SYS_TEXT_BASE in early
init code so we can share the same code with NAND or NOR boot and not
have additional ifdefs in here.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-11-11 00:46:31 -06:00
Haiying Wang 36ae6a8e70 powerpc/85xx: Fix lds for nand build
Fix u-boot-nand.lds and u-boot-nand_spl.lds according to:

Author: Peter Tyser <ptyser@xes-inc.com>
Date:   Wed Sep 29 14:05:56 2010 -0500
commit fbe53f59bd
    85xx: Use gc-sections to reduce image size

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-11-11 00:34:59 -06: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 3388db2cd7 Merge branch 'master' of git://git.denx.de/u-boot-blackfin 2010-10-29 21:46:08 +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
C Nauman d9abba8254 Add generic support for samsung s3c2440
This patch adds generic support for the Samsung s3c2440 processor.

Global s3c24x0 changes to struct members converting from upper case to
lower case.

Signed-off-by: Craig Nauman <cnauman@diagraph.com>
Cc: kevin.morfitt@fearnside-systems.co.uk
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2010-10-28 15:35:56 +09:00
Mike Frysinger 73520939b4 Blackfin: config.mk: drop manual stripping of config vars
Now that the common code takes care of stripping away quotes and such
from numeric options, we no longer need to do so ourselves.  So drop
the custom code we have in the Blackfin config.mk.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-27 21:18:05 -04:00
Mike Frysinger 1fde3eb2d3 Blackfin: fix building after asm-offsets.h intro
Since some of the defines in our config.h use the generated defines, we
need to include the generated header.  This fixes building of the Blackfin
start.S file (where the stack is setup).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-27 21:10:58 -04:00
Mikhail Kshevetskiy 9b8081a452 arm/pxa: remove unused arch-pxa/macro.h
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
2010-10-27 23:59:53 +02:00
Wolfgang Denk 071bc92330 Coding Style cleanup
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-27 22:48:30 +02:00
Wolfgang Denk 73bb4c7240 Merge branch 'master' of git://git.denx.de/u-boot-sparc 2010-10-27 20:37:33 +02:00
Wolfgang Denk 79e6313936 ARM: use the same branch insn on all architectures
For the "fixloop" implementation in start.S a number of different
instructions was used.  Unify code so all architectures use "blo"
here because it is more robust in case of incorrect alignments.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Albert ARIBAUD <albert.aribaud@free.fr>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Heiko Schocher <hs@denx.de>
2010-10-26 21:19:19 +02:00
Heiko Schocher 1336cad298 arm, bootm: Fix compile warning
Fix warning:

bootm.c: In function 'bootm_linux_fdt':
bootm.c:181: warning: unused variable 's'
bootm.c:180: warning: unused variable 'bd'

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-10-26 21:15:35 +02:00
Darius Augulis ea34c9d6ed arm1176: fix relocation
Fix relocation code for arm1176, do it like other ARM
CPU's are doing.
Tested only with CONFIG_SKIP_RELOCATE_UBOOT defined
and using nand_spl (booting from nand). Test done on
s3c6410 based board (not yet supported in main line).

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
2010-10-26 21:12:53 +02:00
Darius Augulis 123fb7deb2 ARM: fix address setup in start.S
Fix address setup bug for ARM.
This bug stops u-boot booting if
CONFIG_SKIP_RELOCATE_UBOOT is defined.

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
2010-10-26 21:11:58 +02:00
Wolfgang Denk 25ddd1fb0a Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated value
CONFIG_SYS_GBL_DATA_SIZE has always been just a bad workarond for not
being able to use "sizeof(struct global_data)" in assembler files.
Recent experience has shown that manual synchronization is not
reliable enough.  This patch renames CONFIG_SYS_GBL_DATA_SIZE into
GENERATED_GBL_DATA_SIZE which gets automatically generated by the
asm-offsets tool.  In the result, all definitions of this value can be
deleted from the board config files.  We have to make sure that all
files that reference such data include the new <asm-offsets.h> file.

No other changes have been done yet, but it is obvious that similar
changes / simplifications can be done for other, related macro
definitions as well.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-26 21:05:30 +02:00
Wolfgang Denk 553f09823c Rename CONFIG_SYS_INIT_RAM_END into CONFIG_SYS_INIT_RAM_SIZE
CONFIG_SYS_INIT_RAM_END was a misnomer as it suggests this might be
some end address; to make the meaning more clear we rename it into
CONFIG_SYS_INIT_RAM_SIZE

No other code changes are performed in this patch, only minor editing
of white space (due to the changed length) and the comments was done,
where noticed.

Note that the code for the PATI and cmi_mpc5xx board configurations
looks seriously broken.  Last known maintainers on Cc:

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Denis Peter <d.peter@mpl.ch>
Cc: Martin Winistoerfer <martinwinistoerfer@gmx.ch>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-26 21:03:25 +02:00
Gray Remlin 8c0c2b9050 ARM: Use consistent assembler syntax
Signed-off-by: Gray Remlin <g_remlin@rocketmail.com>
Acked-by: Heiko Schocher <hs@denx.de>
2010-10-26 20:52:23 +02:00
Wolfgang Denk 1db3fca719 MPC8315ERD: fix build error
Commit 29c6fbe "MPC5121: Add USB EHCI support" renamed
CONFIG_SYS_MPC8xxx_USB_ADDR into CONFIG_SYS_FSL_USB_ADDR but missed
to update arch/powerpc/cpu/mpc83xx/cpu_init.c, resulting in:

cpu_init.c: In function 'cpu_init_f':
cpu_init.c:332: error: 'CONFIG_SYS_MPC8xxx_USB_ADDR' undeclared (first use in this function)
cpu_init.c:332: error: (Each undeclared identifier is reported only once
cpu_init.c:332: error: for each function it appears in.)
make[1]: *** [/work/wd/tmp-ppc/arch/powerpc/cpu/mpc83xx/cpu_init.o] Error 1

Fix this.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
2010-10-24 16:13:40 +02:00
Enric Balletbo i Serra cdb1d4f97e ARM: fix relocation support for onenand device.
We also have to relocate the onenand command table manually, otherwise
onenand command don't work.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
2010-10-23 22:55:47 +02:00
Wolfgang Denk 02cf8fd6fb Merge branch 'for-wd-master' of git://git.denx.de/u-boot-pxa 2010-10-23 22:08:33 +02:00
Wolfgang Denk 33a08c10c7 Merge branch 'master' of git://git.denx.de/u-boot-video 2010-10-23 21:56:51 +02:00
Magnus Sjalander 997faf2edf SPARC: added unaligned definitions
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2010-10-22 11:10:18 +02:00
Marek Vasut 4abf2f7a23 PXA: Use pxa-regs.h register definitions in start.S
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-10-22 01:37:58 +02:00
Marek Vasut 6e96cf9a81 PXA: Implement ELF relocation
Based on patch by: Albert Aribaud <albert.aribaud@free.fr>

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-10-22 01:37:58 +02:00
Stefano Babic 575001e40c MX51: Add IPU driver for video support
The patch is a porting of the IPU Linux driver
developed by Freescale to have framebuffer
functionalities in u-boot. The port is based on
kernel 2.6.31 commit cc4fe714041805997b601fe8e5dd585d8a99297f,
as delivered by Freescale [i.MX BSP].
Most features are dropped from the original driver and
only LCD support is the goal of this porting.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-10-22 00:05:05 +02:00
Nobuhiro Iwamatsu de03f8bc4a sh: Fix warning about uninitialized value of ramdisk_flags
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2010-10-21 10:42:23 +09:00
Nobuhiro Iwamatsu 006442b352 sh: Rename TEXT_BASE to CONFIG_SYS_TEXT_BASE
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2010-10-21 10:42:23 +09:00
Nobuhiro Iwamatsu cf2c87d322 sh: Add support load and boot of Initrd.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2010-10-21 10:42:23 +09:00
John Schmoller c62491d260 ppc: Don't initialize write protected NOR flashes
If a NOR flash is write protected it can not be initialized/detected so
add the ability for boards to skip NOR initialization on bootup.  A
board can skip NOR initialization by implementing the
board_flash_wp_on() function.

Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
CC: sr@denx.de
Acked-by: Stefan Roese <sr@denx.de>
2010-10-20 21:58:16 +02:00
Wolfgang Denk d9d47d18e8 Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx 2010-10-20 21:20:24 +02:00
Stefan Roese f472069fb7 ppc4xx: Change tsr/tcr macros to upper case
Remove uneccessary functions to access the TCR/TSR registers as well.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-20 10:07:55 +02:00
Peter Tyser fbe53f59bd 85xx: Use gc-sections to reduce image size
On an XPedite5370 over 11KBytes were saved:
  Before:
       text	   data	    bss	    dec	    hex	filename
   332456	  33364	  33476	 399296	  617c0	./u-boot

  After:
      text	   data	    bss	    dec	    hex	filename
   321075	  33836	  33476	 388387	  5ed23	./u-boot

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20 02:38:41 -05:00
Peter Tyser 68337fb5f6 86xx: Use gc-sections to reduce image size
On an XPedite5170 over 11KBytes were saved:
  Before:
     text	   data	    bss	    dec	    hex	filename
   319488	  28700	  33204	 381392	  5d1d0	./u-boot

  After:
     text	   data	    bss	    dec	    hex	filename
   307663	  29144	  33204	 370011	  5a55b	./u-boot

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20 02:38:41 -05:00
Kumar Gala bd9715e3db 86xx: Create common linker script
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20 02:38:41 -05:00
Peter Tyser d333819479 mpc8640: Update the io_sel fields for PCI Express
Previously io_sel=0xe incorrect stated PCIE1 was enabled.  Also add
support for the mpc8640's PCIE2 interface.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20 02:38:40 -05:00
Aaron Sierra 9d64c6bb4a 85xx: Add support for not releasing secondary cores via 'mp_holdoff'
Some OSes require that secondary cores not be initialized when they
are booted (eg VxWorks).  By default when U-Boot is compiled with the
CONFIG_MP option all secondary cores are brought out of reset and held
in spinloops.  Setting the "mp_holdoff" environment variable to 'yes'
or '1' will cause U-Boot to leave secondary cores in their default
state.

Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20 02:38:40 -05:00
York Sun 58edbc9caa Disable unused chip-select for DDR controller interleaving
When DDR controller interleaving is eabled and less than all bank (chip-select)
interleaving is seletected, the unused chip-select should be disabled.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20 02:38:40 -05:00
York Sun 28a966715b Adding fixed sdram setting for cornet_ds board
800, 900, 1000, 1200MT/s data rate parameters are added for fixed sdram
setting. SPD based parameters and fixed parameters can be toggled by hwconfig.
To use fixed parameters,

hwconfig=fsl_ddr:sdram=fixed

To use SPD parameters,

hwconfig=fsl_ddr:ctlr_intlv=cacheline,bank_intlv=cs0_cs1

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20 02:38:39 -05:00
York Sun ebbe11dd36 Add memory test feature for mpc85xx POST.
The memory test is performed after DDR initialization when U-boot stills runs
in flash and cache. On recent mpc85xx platforms, the total memory can be more
than 2GB. To cover whole memory, it needs be mapped 2GB at a time using a
sliding TLB window. After the testing, DDR is remapped with up to 2GB memory
from the lowest address as normal.

If memory test fails, DDR DIMM SPD and DDR controller registers are dumped for
further debugging.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20 02:28:00 -05:00
York Sun c02ce6e5a1 Adding more control to physical address mapping
A worker function setup_ddr_tlbs_phys() is introduced to implement more
control on physical address mapping.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20 02:28:00 -05:00
Kumar Gala a1964ea5c2 powerpc/8xxx: Add fdt_fixup_phy_connection helper
Add a common helper that will set the PHY connection type based on enum.
We use this on eTSEC, UCC, and will with Fman in the future.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20 02:27:18 -05:00
Kumar Gala f8c42495e0 powerpc/fsl: Introduce common enum for PHY types
Have a common enum for phy types that we use in the UCC driver.  We will
also use this enum for dealing with phy connection fixup in the device
tree.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-20 02:27:18 -05:00
Stefano Babic d078b7c2ec MX31: Removed warnings for iomux function
Removed warnings generated in the mx31_set_pad() function.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-10-20 00:18:23 +02:00
Wolfgang Denk b18815752f Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-10-20 00:10:07 +02:00
Richard Retanubun 683e9f1ea5 board_init_r: Removed unused cmdtp variable
Follow up to commit 620f1f6a64
removed compiler warning for (now) unused cmd_tbl_t* cmdtp
2010-10-19 23:55:09 +02:00
Marek Vasut 2cad92fd67 PXA: Fix reloc, Push lowlevel init into C code
Firstly, this fixes relocation issues. I had to use part of Dcache as RAM for a
while. I also moved around the lowlevel init code. It turned out so most of the
lowlevel init code ended in cpu.c (and eventually was rewritten into C).

This will also allow easier operation with FDT, multi-CPU-model support etc. in
later releases.

NOTE: This breaks most of the PXA boards (actually, the reloc stuff did already,
this only finishes the doom).

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-10-19 23:04:35 +02:00
Mikhail Kshevetskiy 80124df14f PXA: fix MDREFR[APD] bit setting
pxa_mem_setup macro use r6 to store CONFIG_SYS_MDREFR_VAL during memory
initialization. This reg is modified during execution of pxa_wait_ticks.
Later we use r6 to setup MDREFR[APD] bit. As result MDREFR[APD] is always
zero.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
2010-10-19 22:47:31 +02:00
Marek Vasut 8b71d2b710 PXA: pxafb: Marvell Littleton LCD definition
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-10-19 22:46:56 +02:00
Marek Vasut 42222be43c PXA: pxafb: Add support for Sharp LQ038J7DH53
This LCD panel is found in Palm LifeDrive handheld

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-10-19 22:46:52 +02:00
Marek Vasut f7d58d9166 PXA: pxafb: Add ACX517AKN support
ACX517AKN LCD panel is found in Palm Tungsten|C

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-10-19 22:46:43 +02:00
Marek Vasut 3ba8bf7c6d PXA: pxa-regs.h cleanup
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-10-19 22:46:22 +02:00
Marek Vasut 9f80a20e05 PXA: pxafb: Fix indent problems
Also change the initializer style

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-10-19 22:46:18 +02:00
Wolfgang Denk 1ed3b710d0 Merge branch 'at91' of git://git.denx.de/u-boot-atmel 2010-10-19 22:10:47 +02:00
Wolfgang Denk 6d8d4ef994 Merge branch 'elf_reloc'
Conflicts:
	arch/arm/include/asm/config.h
	board/LaCie/edminiv2/config.mk
	board/karo/tx25/config.mk
	board/logicpd/imx27lite/config.mk
	doc/README.arm-relocation

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-19 21:07:52 +02:00
Wolfgang Denk 083d506937 Merge branch 'master' of git://git.denx.de/u-boot-imx
Conflicts:
	board/logicpd/imx31_litekit/config.mk
	boards.cfg

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-19 20:58:16 +02:00
Reinhard Meyer 5dca710a3d AT91 clock/timer: move static data to global_data struct
clock.c / timer.c used static data and are called before relocation.
Move all static variables into global_data structure. Also cleanup
timer.c from unused stubs and make it truly use 64 bit tick values.

Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-10-19 15:12:29 +02:00
Andreas Bießmann ab8fe79c99 at91rm9200: enable USB support
This patch fixes arch-at91/hardware.h to have the relevant defines for
at91rm9200 devices to support existing at91 usb driver.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-10-19 15:11:55 +02:00
Jason Liu 65e62d6941 MX5: Remove dead code with ENABLE_IMPRECISE_ABORT
This code section is dead due to we never define
ENABLE_IMPRECISE_ABORT for MX5

Signed-off-by: Jason Liu <r64343@freescale.com>
2010-10-19 12:28:08 +02:00
Minkyu Kang 1628cfc4fe ARMV7: S5P: serial: support the s5pc210
This patch is for s5pc210 support.
Due to the resigter of baudrate is changed from slot to value,
add both of them to uart structure.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2010-10-19 11:35:29 +09:00
Jaehoon Chung 1727e21698 s5p_mmc: support 8-bit bus width
This Patch do support 8-bit bus width for s5p
So we add parameter for bus_width (in s5p_mmc_init(), s5p_mmc_initialize())
If want to use 8-bit bus width, only change (0, 8) instead of (0, 4).

 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
 Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2010-10-19 11:34:54 +09:00
John Rigby 2d1916e48b ARM: add flat device tree support
Based on other architectures already supported.
Tested on OMAP3 Beagle board and another unnamed ARM platform.

Signed-off-by: John Rigby <john.rigby@linaro.org>
Tested-by: Rob Herring <rob.herring@smooth-stone.com>
Acked-by: Wolfgang Denk <wd@denx.de>
2010-10-18 22:54:00 +02:00
John Rigby fca43cc801 boot: change some arch ifdefs to feature ifdefs
The routines boot_ramdisk_high, boot_get_cmdline and boot_get_kbd
are currently enabled by various combinations of CONFIG_M68K,
CONFIG_POWERPC and CONFIG_SPARC.

Use CONFIG_SYS_BOOT_<FEATURE> defines instead.

CONFIG_SYS_BOOT_RAMDISK_HIGH
CONFIG_SYS_BOOT_GET_CMDLINE
CONFIG_SYS_BOOT_GET_KBD

Define these as appropriate in arch/include/asm/config.h files.

Signed-off-by: John Rigby <john.rigby@linaro.org>
Acked-by: Wolfgang Denk <wd@denx.de>
2010-10-18 22:53:32 +02:00
John Rigby 5a75e12107 FDT: only call boot_get_fdt from generic code
All arches except nios2 and microblaze call boot_get_fdt
from bootm_start in common/cmd_bootm.c.

Having nios2 and microblaze do so as well removes code from
their respective do_bootm_linux routines and allows removal of
a nasty ifdef from bootm_start.

In the case where boot_get_fdt returns an error bootm_start
returns and the platform specific do_bootm_linux routines
will never get called.

Also only check argv[3] for an fdt addr if argc > 3 first.
This is already the case for nios2.

Signed-off-by: John Rigby <john.rigby@linaro.org>
CC: Scott McNutt <smcnutt@psyent.com>
CC: Michal Simek <monstr@monstr.eu>
CC: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Wolfgang Denk <wd@denx.de>
Acked-by: Michal Simek <monstr@monstr.eu>
Tested-by: Thomas Chou <thomas@wytron.com.tw>
2010-10-18 22:52:10 +02:00
Joakim Tjernlund d1e0b10acc powerpc: do not fixup NULL ptrs
The fixup routine must not fixup NULL pointers.
Problem can be seen by
 char *testfun(void) __attribute__((weak));
 char *(*myfun)(void) = testfun;

Then add
  printf("myfun:%p, &myfun:%p\n", myfun, &myfun);
before relocation and after relocation.
myfun should be NULL in both cases but it is not.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
2010-10-18 22:39:37 +02:00
Peter Tyser d98b0523cf powerpc: Cleanup BOOTFLAG_* references
Now that warm booting is not supported, there isn't a need for the
BOOTFLAG_COLD and BOOTFLAG_WARM defines, so remove them.

Note that this change makes the board info bd_bootflags field useless.
It will always be set to 0, but we leave it around so that we don't
break the board info structure that some OSes are expecting to be passed
from U-Boot.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-18 22:38:56 +02:00
Damien Dusha 29c6fbe047 MPC5121: Add USB EHCI support
Signed-off-by: Francesco Rendine <francesco.rendine@valueteam.com>
Signed-off-by: Damien Dusha <d.dusha@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>

Coding style cleanup; slight file restructuring.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Remy Bohmer <linux@bohmer.net>
2010-10-18 22:33:32 +02:00
Wolfgang Denk 14d0a02a16 Rename TEXT_BASE into CONFIG_SYS_TEXT_BASE
The change is currently needed to be able to remove the board
configuration scripting from the top level Makefile and replace it by
a simple, table driven script.

Moving this configuration setting into the "CONFIG_*" name space is
also desirable because it is needed if we ever should move forward to
a Kconfig driven configuration system.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-18 22:07:10 +02:00
Jason Liu ff9f475d5d MX5: rename mx51 to mx5
Rename mx51 to mx5 in order to support more mx51
like-style SOCs such as MX53 and the followings.

Signed-off-by: Jason Liu <r64343@freescale.com>
2010-10-18 10:43:19 +02:00
Wolfgang Denk cacc342d5a Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-10-17 20:25:05 +02:00
Enric Balletbo i Serra 84b6631038 OMAP3: SDRC: Introduce Numonyx DDR type
Introduce Numonyx DDR timings and provide CONFIG_OMAP3_NUMONYX_DDR
config options to allow for platform files to setup their timings.

Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
Acked-by: Steve Sakoman <steve.sakoman@linaro.org>
Tested-by: Steve Sakoman <steve.sakoman@linaro.org>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-10-17 20:14:39 +02:00
Steve Sakoman 57b512b2ec ARMV7: OMAP4: Implement relocation for Panda and OMAP4430SDP
This patch fixes the build breakage introduced by the recent relocation
changes for ARMV7

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2010-10-17 20:14:30 +02:00
Steve Sakoman 136c69ad79 ARMV7: OMAP3: Fix bug in get_sdr_cs_offset()
This patch fixes a typo in the routine to calculate the cs offset
based upon the contents of the SDRC cs_cfg register.  This function
mistakenly shifts the CS1STARTLOW field 17 bits right instead of
17 bits left.

This hasn't been an issue to date because all OMAP3 boards currently
are configured to have zeros in this field.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
2010-10-17 20:14:28 +02:00
Sukumar Ghorai de941241a0 ARMV7: OMAP: Add new mmc driver compatible with CONFIG_GENERIC_MMC
OMAP boards currently use a legacy mmc driver. This patch adds a new
mmc driver which will work with the generic mmc driver in u-boot.

This new driver will work with both OMAP3 and OMAP4 boards.

This patch does not remove the old driver.  It should remain in the
tree until all boards that use it switch to the new driver.

Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com>
Tested-by: Steve Sakoman <steve@sakoman.com>
2010-10-17 20:14:10 +02:00
Wolfgang Denk 6ca803750e Merge branch 'master' of git://git.denx.de/u-boot-imx 2010-10-17 19:57:38 +02:00
Mike Frysinger 5641f34f8b Blackfin: workaround anomaly 05000440
We cannot rely on the syscontrol rom func to program PLL_DIV with anomaly
05000440 is in effect, so manually program the MMR when necessary.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-14 20:23:26 -04:00
Mike Frysinger e5d8984be6 Blackfin: update anomaly lists to latest sheets
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-14 20:23:26 -04:00
Steve Sakoman d470a6f60a env_mmc: Fix crashing bug encountered after enabling ARM relocation
The crash was occuring in env_relocate because it was being called prior
to mmc_initialize.  This patch moves the MMC initialization earlier in
the init process.

This patch also cleans up the env_relocate_spec code in env_mmc.c

Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
Acked-by: Stefano Babic <sbabic@denx.de>
2010-10-13 21:52:13 +02:00
Peter Tyser 4bbfd3e279 ppc: Conditionally compile bat_rw.c
Only a few PPC boards actually use the common BAT manipulation
functions, so only compile it for them.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-13 21:44:10 +02:00
Wolfgang Denk e1b4c57096 Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-10-13 20:59:47 +02:00
Stefano Babic f76888c294 MX31: add support for setting pin pads
The patch adds a utility function and defines
to set the pad as it is done in linux.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-10-13 18:11:30 +02:00
Stefano Babic 70e23264ff MX31: Adding missing iomux pin to MX.31 registers
Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-10-13 18:10:32 +02:00
Heiko Schocher bafe7437a4 arm1136, qong: add support for ELF relocations
Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Albert ARIBAUD <albert.aribaud@free.fr>
2010-10-13 10:12:52 +02:00
Heiko Schocher c3d3a5418d armv7, beagle: add support for ELF relocations
Signed-off-by: Heiko Schocher <hs@denx.de>
2010-10-13 10:12:25 +02:00
Heiko Schocher 9710504d20 arm926ejs, tx25: add support for ELF relocations
Signed-off-by: Heiko Schocher <hs@denx.de>
2010-10-13 10:12:01 +02:00
Albert Aribaud 92d5ecba47 arm: implement ELF relocations
ELF relocation tables generated with linker option -pie can
be used to fixup code and data in a single loop at relocation,
removing the need for manual fixups anywhere else in the code.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-10-13 10:10:21 +02:00
Matt Waddel b80e41ac54 ARMV7: Versatile Express Coretile CortexA9x4 support
Adds support for the ARM quad-core Cortex-A9 processor

This system includes a motherboard(Versatile Express), daughterboard
(Coretile), and SOC(Cortex-A9 quad core).  The serial port, ethernet,
and flash systems work with these additions.  The naming convention
is:
   SOC -> CortexA9 quad core = ca9x4
   daughterboard -> Coretile = ct
   motherboard -> Versatile Express = vxp
This gives ca9x4_ct_vxp.c as the board support file.

Signed-off-by: Matt Waddel <matt.waddel@linaro.org>
2010-10-13 09:59:39 +02:00
Andreas Bießmann a4a87d8a93 arch/arm/include/asm/sizes.h: cleanups
Merge several sizes.h in asm/arch subdirectories into a single
asm/sizes.h file.

Fixup usage of asm/arch/sizes.h in some files to use the merged file.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2010-10-13 09:59:33 +02:00
Prafulla Wadaskar beeb258976 Kirkwood: dram_init is moved to dram.c
For all Kirkwood boards so far dram_init function is duplicated
dram_init function is moved to dram.c and relevant code from all
board specific files removed

If any board needs specific dram init handling than standard one,
then, a macro CONFIG_SYS_BOARD_DRAM_INIT should be defined in
board config header file and the dram_init function can be put
in board specific source file
For ex. keymile boards

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2010-10-13 09:36:07 +02:00
Albert Aribaud 500f2ff52a orion5x: optimize window size computation
Signed-off-by: Chris Moore <moore@free.fr>
Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-10-13 09:36:02 +02:00
Prafulla Wadaskar c0cd02073d Kirkwood: print_cpuinfo fixed for valid devid revid
Earlier Device Identification register was used to detect
the type for SoC, considering 88F6282 support to be added,
It is not possible to detect the same using current
algorithm.

With this patch, device ID is being read using PCIE devid
register, also valid chip revision ID will also be read and
displayed

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2010-10-13 09:35:58 +02:00
Peter Tyser 52ebd9c1e5 powerpc: Remove warm reset entry point
No boards utilize the warm reset entry point, so remove it.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-12 23:01:32 +02:00
Peter Tyser a1c4864ab0 powerpc: Zero out board info struct on bootup
This puts the board info struct in a known state and allows the removal
of other code which initialized board info fields to 0.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-12 23:00:30 +02:00
Wolfgang Denk 655c549752 Merge branch 'master' of git://git.denx.de/u-boot-microblaze 2010-10-12 20:48:01 +02:00
Michal Simek b98cba0911 microblaze: Support little-endian microblaze target
Microblaze little-endian toolchain should export
__MICROBLAZEEL__.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-10-12 16:51:34 +10:00
Michal Simek d69f8f41af microblaze: Add support for NET_MULTI api
Microblaze hasn't supported NET_MULTI support.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-10-12 16:51:34 +10:00
Ben Gardiner 7b37a27e14 davinci_emac: davinci_eth_set_mac_addr to ->write_hwaddr
This patch proposes to migrate the davinci_emac driver to using the
eth_device->write_hwaddr function pointer as suggested by Ben Warren.

All the davinci boards had the behaviour, prior to this patch, of
sync'ing the environment variable enetaddr with the MAC address read
from non-volatile storage on boot -- when the two locations disagreed,
the environment variable value took precendence. This patch keeps the
same behaviour but lets eth_initialize take care of it.

This patch refactors davinci_emac setup in the boards so that the MAC
address is read from non-volatile storage into the environment variable
and then the environment variable value is use in eth_intialize. The
only exception is the direct call to davinci_eth_set_mac_addr made by
the da830evm board init which was changed into an assignment of the
enetaddr field.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Tested-by: Nick Thompson <nick.thompson@ge.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:07:17 -07:00
Albert Aribaud d778a2fbb3 orion5x: fix relocation-incompatible code
Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-10-11 14:35:45 +02:00
Albert Aribaud da90d4ce38 arm: bugfix: replace ble with blo in start.S files
Generalized misuse of ble within relocation and bss
initialization loops caused one iteration too many.
Instead of ble ('branch if lower or equal'), use
blo ('branch if lower').

While we're at it, fix all 'addreee' typos.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-10-11 10:28:43 +02:00
Wolfgang Denk ddf71e4cff Merge branch 'at91' of git://git.denx.de/u-boot-atmel 2010-10-11 10:24:22 +02:00
Wolfgang Denk e67f462864 Merge branch 'master' of git://git.denx.de/u-boot-imx 2010-10-11 10:19:04 +02:00
Wolfgang Denk bfc7bea6ad Merge branch 'master' of git://git.denx.de/u-boot-x86 2010-10-11 10:00:34 +02:00
Wolfgang Denk 29840de6b6 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2010-10-11 09:56:34 +02:00
Kim Phillips e95a0611f2 powerpc/85xx: fix rev.2 job queue LIODN error storm
pumping line-rate traffic though a p4080 rev.2, which
is configured to encrypt packets prior to forwarding through
an IPsec tunnel, gets this error:

of_platform ffe302000.jq: DECO: desc idx 22: LIODN error. DECO was trying
to share from itself or from another DECO but the two Non-SEQ LIODN
values didn't match or the "shared from" DECO's Descriptor required that
the SEQ LIODNs be the same and they aren't.

Since high traffic rates cause DECOs to begin to start sharing
shared descriptors amongst themselves, and DECOs inherit job queue
LIODNs when accessing shared descriptors, and a recently discovered
rev.2 h/w erratum requires all sharing job queues in a partition
have same liodn assignment, reassign the first job queue's liodn
assignment to the rest.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Kumar Gala 3c6a22b962 powerpc/p4080: Add new CPC register - HDBCR0
Manual was updated to add a new register for disabling CDQ speculation.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Graeme Russ c868af3e57 x86: Implement fully relocatable image
u-boot.bin can be loaded at any 4-byte aligned memory location and directly
'jumped' to using the 'go' command using the load address as the start
address. Doing so performs a 'warm boot' which skips memory initialisation
and other low-level initialisations, relocates U-Boot to upper memory and
starts U-Boot in RAM as per normal 'cold boot'
2010-10-07 20:03:33 +11:00
Graeme Russ f2ff75c0a2 x86: Use loops instead of memcpy/memset in board_init_f
Provides a small speed increase and prepares for fully relocatable image.
Downside is the TEXT_BASE, bss, load address etc must ALL be aligned on a
a 4-byte boundary which is not such a terrible restriction as everything
is already 4-byte aligned anyway
2010-10-07 20:03:33 +11:00
Graeme Russ 2219142658 x86: Rearrange linker script
Tidy up the linker script and discard some sections to save space
2010-10-07 20:03:32 +11:00
Graeme Russ 067f9b1071 x86: Rename linker script symbols
Create more generic names for the symbols exported from the linker script
2010-10-07 20:03:31 +11:00
Graeme Russ c81b26beb8 x86: Set cold/warm boot flag 2010-10-07 20:03:30 +11:00
Graeme Russ 161b3589ea x86: Place global data below stack before entering C
By reserving space for the Global Data immediately below the stack during
assembly level initialisation, the C declaration of the static global data
can be removed, along with the 'RAM Bootstrap' function. This results in
cleaner code, and the ability to pass boot-up flags from assembler into C
2010-10-07 20:03:29 +11:00
Graeme Russ 5a3876d2ac x86: Dont clobber %eax after getting memory size
By using another register, reduce code size by one instruction
2010-10-07 20:03:28 +11:00
Graeme Russ 5f2679055d x86: Don't clobber %ebx
%ebx will hold low-level boot flags and must be preserved
2010-10-07 20:03:28 +11:00
Graeme Russ 88fa0a6eb9 x86: Remove usage of %ebp as a return pointer
Using %ebp as a return pointer prevents creating 'load anywhere' images
2010-10-07 20:03:27 +11:00
Graeme Russ 00940a229d x86: Move ECC initialisation outside RAM initialisation
To allow for 'load anywhere' images, the %ebp return pointer 'hack' must
be removed, so we cannot have two 'calls' to get_mem_size
2010-10-07 20:03:26 +11:00
Graeme Russ 6ae032a86a x86: Remove progress indication in low-level init
Progress indication is not relocation friendly so remove it in
preperation for full relocatability support
2010-10-07 20:03:24 +11:00
Graeme Russ 7228efa3cb x86: Fix %ss and %esp in register structure for interrupts 2010-10-07 20:03:23 +11:00
Graeme Russ 5c161653db x86: Change compiler options
Change to:
 - reparam=3
 - no-from-pointer
 - no-stack-protector
 - preferred-stack-boundary=2
 - no-top-level-reorder

These options make the code a little smaller and faster
2010-10-07 20:03:23 +11:00
Graeme Russ 8ffb2e8f33 x86: Coding Style Cleanup
Perform some basic code cleanups of the x86 files
2010-10-07 20:03:21 +11:00
Graeme Russ 59c6d0ef9a x86: Move loading of GTD to C code
Linux has C macros and code to load the GTD after switching to Protected
Mode. Using these greatly simplifies the assembler code
2010-10-07 20:03:21 +11:00
Graeme Russ d664adb6bb x86: use gc sections to reduce image size
Follow the discussion of Charles Manning and Mike Frysinger.
Using gc_sections helps reduce image size.
2010-10-07 20:03:20 +11:00
Graeme Russ abe98f49e1 x86: zboot update
The header of recent Linux Kernels includes the size of the image, and
therefore is not needed to be passed to zboot. Still process the third
parameter (size of image) in the event that an older kernel is being loaded
2010-10-07 20:03:19 +11:00
Graeme Russ 76d5763a49 x86: Make CONFIG_RELOC_FIXUP_WORKS generic for all x86 boards
Relocation is not board-specific for the x86 architectrure, so
CONFIG_RELOC_FIXUP_WORKS can be defined globally in the config.h
2010-10-07 20:03:18 +11:00
Andre Schwarz 76221a6cfa PowerPC: change board specific early pci_init() into generic.
Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
2010-10-06 22:37:35 +02:00
Wolfgang Denk 544d97e9aa PCU_E: remove code for yet another corpse
The PCU_E board has long reached EOL, and support for it is no longer
relevant in current versions of U-Boot.  Remove it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-06 22:22:24 +02:00
Alexander Stein c8f6d84d10 at91: Add arch_preboot_os which disables PIT in a faster way
When disabled the PIT runs until it reaches the CPIV value.
The Linux PIT driver stops the PIT and waits until it stopped. This can
take over 100ms. Simply stopping in u-boot isn't sufficient as the PIT
will still be running when Linux is waiting until it stopped.
So, we stop it in u-boot by setting the compare value to a value slightly
greater than the current running counter to make the PIT stopped in short
time.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
2010-10-05 16:58:57 +02:00
Andreas Bießmann b944ad22b4 at91_emac.h: fix typo in register definition
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Jens Scharsig <js_at_ng@scharsoft.de>
2010-10-05 16:58:56 +02:00
Reinhard Meyer 6341c5cf87 AT91: convert cpu.c to struct SoC access
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-10-05 16:58:56 +02:00
Wolfgang Denk d628866474 Merge branch 'master' of git://git.denx.de/u-boot-blackfin 2010-10-05 14:42:32 +02:00
Wolfgang Denk db682a0b59 Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx 2010-10-05 14:37:25 +02:00
Wolfgang Denk bbf2abc0f5 Merge branch 'next' of git://git.denx.de/u-boot-video 2010-10-05 14:31:48 +02:00
Stefan Roese eb011d27aa ppc4xx: Remove some testing hacks from ppc4xx.h
I accidentally left these hacks in the code while doing the big header
cleanup. Let's remove it now.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-04 11:20:11 +02:00
Stefan Roese c96be63aab ppc4xx: Add defines for COM3 & COM4 (UART2 & UART3) on 440EPx/GRx
Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-04 11:19:43 +02:00
Tirumala Marri 1b8fec1393 APM821xx: Add CPU support
APM821XX is a new line of SoCs which are derivatives of
PPC44X family of processors. This patch adds support of CPU, cache,
tlb, 32k ocm, bootstraps, PLB and AHB bus.

Signed-off-by: Tirumala R Marri <tmarri@apm.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-04 11:15:02 +02:00
Mike Frysinger d3c07a5d24 Blackfin: fix MMC init output alignment
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:40 -04:00
Mike Frysinger 48c00fe25c Blackfin: propagate target cpu defines when building embedded env
Since we're no longer extracting the env from the target ELF file (since
upstream wouldn't take that change), we're back to the problem of cpu
defines not properly propagating to the env setup stage.  So the embedded
env built by the host compiler doesn't match the one that is linked into
the u-boot env.

Reported-by: Vivi Li <vivi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:40 -04:00
Mike Frysinger cec11d5014 Blackfin: cmd_gpio: accept upper case pin names
The intention all along was to accept pin names irrelevant of their case.
But I guess I forgot to test/implement support for that.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:40 -04:00
Mike Frysinger 73b6f4046b Blackfin: cmd_gpio: return gpio value to caller
Make the GPIO command usable in a scripting environment by returning
the GPIO value rather than always 0.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:39 -04:00
Mike Frysinger 1729615875 Blackfin: cmd_gpio: document/extend input sub-option
The input sub command was missing from the help text, and it didn't show
the actual value currently read on the GPIO.  This allows people to read
the value of input pins.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:39 -04:00
Mike Frysinger 821ad16fa9 Blackfin: move CONFIG_BFIN_CPU to board config.mk
The CONFIG_BFIN_CPU option is largely used in the build system, so move
it out of the board config.h and into the board config.mk.  It'd be nice
to keep everything in the config.h, but the patch to extract that value
early was rejected.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:38 -04:00
Mike Frysinger 543ef36586 Blackfin: bf561: merge headers
Only the BF561 port was using the common dual core headers, so merge them
into the BF561 specific headers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:38 -04:00
Mike Frysinger c489762ac2 Blackfin: bf533: merge headers
Only the BF533 port was using the common extended headers, so merge them
into the BF533 specific headers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:38 -04:00
Mike Frysinger 9615398dc2 Blackfin: unify core MMRs
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:38 -04:00
Mike Frysinger aa79cbbf27 Blackfin: bf52x: unify arch header duplication
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:38 -04:00
Mike Frysinger 9d291d816b Blackfin: bf537: unify arch header duplication
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:38 -04:00
Mike Frysinger 94e3e444de Blackfin: punt old *p style volatile MMR defines
These are unused now, so punt them to clean things up.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:38 -04:00
Mike Frysinger f47a5a83a2 Blackfin: punt headers for non-existent BF541
There is no BF541 processor variant, so punt headers for it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:37 -04:00
Mike Frysinger 6f070e1867 Blackfin: bfin_spi: add optional DMA support
This moves the last piece from the old spi_flash driver to the new SPI
framework -- optional DMA RX support.  This typically cuts speeds by ~40%
at the cost of additional ~300 bytes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:36 -04:00
Mike Frysinger 2c0a6f2d4f Blackfin: add support for BF51x parts
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:36 -04:00
Mike Frysinger 180e311f28 Blackfin: add support for BF538/BF539 processors
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:36 -04:00
Stefano Babic f3554dfdd9 MX51: Register definitions cannot be included in board config file
Due to wrong dependencies, it is not possible to include imx_regs.h
inside the board configuration file.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-30 14:42:14 +02:00
Stefano Babic 9583dfab1d MX51: add structure to access System Reset Controller
Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-29 11:24:31 +02:00
Stefano Babic 35af33da00 MX51: Added pins definition to set up pads
Add pins definitions to set up RAM pads. Pins have only
a pad, there is no entry in the multiplexer.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-29 11:24:31 +02:00
Stefano Babic 87d98d3b8e ARM: Use syslib functions for all CORTEXA8
The OMAP3 cpu directory contains a syslib file with some utilities
that can be shared by all targets using arm cortexa8 processors,
not only OMAP.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-29 11:24:31 +02:00
Stefano Babic c4ea142424 Use common function to set GPIOs for MX3 and MX5
The patch adds support for setting gpios to the
MX51 processor and change name to the corresponding
functions for MX31. In this way, it is possible to get rid
of nasty #ifdef switches related to the processor type.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-29 11:24:30 +02:00
Wolfgang Denk 2e6e1772c0 Merge branch 'next' of /home/wd/git/u-boot/next
Conflicts:
	include/ppc4xx.h

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-28 23:30:47 +02:00
Wolfgang Denk 949c80e100 mpc512x: fix build issues
Commit 800eb0964 "POST cleanup." removed file
arch/powerpc/cpu/mpc512x/common.c but failed to remove the reference
to it from arch/powerpc/cpu/mpc512x/Makefile which causes somewhat
obscure build errors:

make[1]: *** No rule to make target `/work/wd/tmp-ppc/arch/powerpc/cpu/mpc512x/.depend', needed by `_depend'.  Stop.

Fix these.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-28 23:02:05 +02:00
Aneesh V 7ca3f9c568 ARMV7: OMAP4: Calculate SDRAM size
Calculate the SDRAM size from DMM configuration registers instead of using
hard-coded values. This gives correct values for all different boards.

It's assumed that DMM sections do not overlap memory areas.

Signed-off-by: Aneesh V <aneesh@ti.com>
Tested-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-09-28 13:54:43 -04:00
Thomas Weber 85d3eba90d ixp/npe: Remove duplicated comment
Signed-off-by: Thomas Weber <weber@corscience.de>
2010-09-28 14:48:44 +02:00
Anatolij Gustschin 9e70d1378c fsl_diu_fb: further refactoring of FSL DIU code
Move common code to the fsl_diu_fb.c file and remove obsolete
code from board files (aria, mpc8610hpcd and pdm360ng).
Move fsl_diu_fb.h file to the include directory.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-09-25 13:10:03 +02:00
Peter Tyser 6aa3d3bfaa 83xx: Remove warmboot parameter from PCI init functions
This change lays the groundwork for the BOOTFLAG_* flags being removed.

This change has the small affect of delaying 100ms on PCI initialization
after a warm boot as opposed to the optimal 1ms on some boards.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>

included the mpc8308_p1m board.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2010-09-23 21:14:42 +02:00
Kim Phillips 654d49b401 mpc83xx: fix pcie build warning
Configuring for MPC8308RDB board...
pcie.c: In function 'mpc83xx_pcie_register_hose':
pcie.c:143: warning: assignment makes pointer from integer without a cast

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2010-09-23 21:14:25 +02:00
Ilya Yanok f1371048ab mpc83xx: add support for setting PCIE clocks
This patch adds support for setting PCIE clocks in cpu_init.c by
providing CONFIG_SYS_SCCR_PCIEXP{1,2} in configuration.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2010-09-23 21:13:56 +02:00
Ilya Yanok bab00b95b7 mpc83xx/pcie: make it compile with PCIE2 unconfigured
MPC8308 has only one PCIE host controller so we want it to compile
without CONFIG_SYS_PCIE2_CFG_{BASE,SIZE} defined.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2010-09-23 21:13:44 +02:00
Victor Gallardo ad876fff34 ppc4xx: Disable trace broadcast for 44x non debug mode
By default the trace broadcast is enabled on 44x systems.

To reduce power consumption when instruction tracing is
not needed, disable trace broadcast.

Check External Debug Mode (EDM) bit to detect if it should be
disabled or not.

Resetting system via a debugger will set the DBCR0[EDM] bit.
Resetting via u-boot or OS will not.

Signed-off-by: Victor Gallardo <vgallardo@apm.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:06 +02:00
Stefan Roese e02d449644 ppc4xx: Cleanup of PVR detection code in cpu.c
This patch cleans the PVR detection code in check_cpu() up a bit.
Basically the strings are better seperated, resulting in an easier
to understand and maintain code version.

The #ifdef's couldn't be removed easily because of two reasons:

- Some SoC revisions have the same PVR, so need a way to differentiate
  between those two SoC's.
- In some case statements registers only available in this SoC variant
  are referenced.

Instead I moved the CONFIG_440 #ifdef a bit, so that 405 platforms don't
add this 440 detection code and vice versa. Resulting in this U-Boot
image size change:

405EX (Kilauea):     408 bytes less
440EPx (Sequoia):    604 bytes less
460EX (Canyonlands): 564 bytes less

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
2010-09-23 09:02:06 +02:00
Stefan Roese 24956642ef Remove unused CONFIG_SERIAL_SOFTWARE_FIFO feature
This patch removes the completely unused CONFIG_SERIAL_SOFTWARE_FIFO
feature from U-Boot. It has only been implemented for PPC4xx and was not
used at all. So let's remove it and make the code smaller and cleaner.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
2010-09-23 09:02:05 +02:00
Stefan Roese 550650ddd0 ppc4xx: Use common NS16550 driver for PPC4xx UART
This patch removes the PPC4xx UART driver. Instead the common NS16550
driver is used, since all PPC4xx SoC's use this peripheral device.

The file 4xx_uart.c now only implements the UART clock calculation
function which also sets the SoC internal UART divisors.

All PPC4xx board config headers are changed to use this common NS16550
driver now.

Tested on these boards:
acadia, canyonlands, katmai, kilauea, sequoia, zeus

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Stefan Roese afabb498b7 ppc4xx: Big header cleanup part 2, mostly PPC405 related
This cleanup is done by creating header files for all SoC versions and
moving the SoC specific defines into these special headers. This way the
common header ppc405.h and ppc440.h can be cleaned up finally.

As a part from this cleanup, the GPIO definitions for PPC405EP are
corrected. The high and low parts of the registers (for example
CONFIG_SYS_GPIO0_OSRL vs. CONFIG_SYS_GPIO0_OSRH) have been defined in
the wrong order. This patch now fixes this issue by switching these
xxxH and xxxL values. This brings the GPIO 405EP port in sync with all
other PPC4xx ports.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Stefan Roese 5e7abce991 ppc4xx: Big header cleanup, mostly PPC440 related
This patch starts a bit PPC4xx header cleanup. First patch mostly
touches PPC440 files. A later patch will touch the PPC405 files as well.

This cleanup is done by creating header files for all SoC versions and
moving the SoC specific defines into these special headers. This way the
common header ppc405.h and ppc440.h can be cleaned up finally.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Stefan Roese 0988776288 ppc4xx: Move gpio.h to ppc4xx-gpio.h since its ppc4xx specific
Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Stefan Roese b36df56115 ppc4xx: Move ppc4xx headers to powerpc include directory
This patch moves some ppc4xx related headers from the common include
directory (include/) to the powerpc specific one
(arch/powerpc/include/asm/). This way to common include directory is not
so cluttered with files.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Stefan Roese 8a805df136 ppc4xx/fdt/flash: Change fdt_fixup_nor_flash_node() to not rely on cs size
This patch changes the behaviour of the fdt_fixup_nor_flash_node()
function. Now it doesn't patch the size of the "reg" property with the
chip-select size, but with the size returned from the new function
flash_get_bank_size(). This function will return per weak default the
flash size of the bank (bank = chip-select numer) detected by the flash
driver. If this does not fit your needs, this function may be overridden
by a board specific one.

For this the parameters needed to be changed. So I intentionally squashed
the PPC4xx stuff using this routine into this patch. Otherwise it would
not be git-bisectable anymore.

The board specific function for the AMCC/APM Ebony eval board is now
included in this patch version.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Detlev Zundel <dzu@denx.de>
Cc: Gerald Van Baren <vanbaren@cideas.com>
Cc: Wolfgang Denk <wd@denx.de>
2010-09-23 08:49:49 +02:00
Mike Frysinger 55fed6fd0b Blackfin: bfin_spi: use same gpio cs define as Linux
Linux uses an offset of 8 to switch from hardware cs to a gpio cs,
so have u-boot use the same value.  Also make sure it is public
for boards to access.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-21 18:22:14 -04:00
Timur Tabi e69e520f9d fsl: refactor MPC8610 and MPC5121 DIU code to use existing bitmap and logo features
The Freescale MPC8610 and MPC5121 DIU code had re-implement two features that already
existed in U-Boot: bitmap drawing and top-of-screen logo (CONFIG_VIDEO_LOGO).
So delete the 8610-specific code and use the built-in features instead.

Signed-off-by: Timur Tabi <timur@freescale.com>
2010-09-21 22:46:02 +02:00
Michael Zaidman 800eb09641 POST cleanup.
- Revives POST for blackfin arch;
- Removes redundant code:
     arch/blackfin/lib/post.c
     arch/powerpc/cpu/ppc4xx/commproc.c
     arch/powerpc/cpu/mpc512x/common.c
- fixes up the post_word_{load|store} usage.

Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
Acked-by: Detlev Zundel <dzu@denx.de>
Tested-by: Anatolij Gustschin <agust@denx.de>

List of the maintainers of the affected by patch boards:
Cc: Stephan Linz <linz@li-pro.net>
Cc: Denis Peter <d.peter@mpl.ch>
Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Niklaus Giger <niklaus.giger@netstal.com>
Cc: Larry Johnson <lrj@acm.org>
Cc: Feng Kan <fkan@amcc.com>
2010-09-21 21:39:31 +02:00
Heiko Schocher a51dd67a03 ARM: implement relocation for arm1176
Change the implementation for arm1176 to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:56 +02:00
Heiko Schocher abef7b859d ARM: implement relocation for arm720t
Change the implementation for arm720t to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:56 +02:00
Heiko Schocher c6c2ceb124 ARM: implement relocation for arm_intcm
Change the implementation for arm_intcm to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:56 +02:00
Heiko Schocher ec985e94a2 ARM: implement relocation for lh7a40x
Change the implementation for lh7a40x to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:55 +02:00
Heiko Schocher 0110955a79 ARM: implement relocation for s3c44b0
Change the implementation for s3c44b0 to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:55 +02:00
Heiko Schocher e30ceca21f ARM: implement relocation for sa1100
Change the implementation for sa1100 to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:55 +02:00
Heiko Schocher 2af0a099ac ARM: implement relocation for ixp
Change the implementation for ixp to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:55 +02:00
Heiko Schocher 5347f68c85 ARM: implement relocation for pxa
Change the implementation for pxa to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:55 +02:00
Heiko Schocher 5a8a87ed0e ARM: implement relocation for ARM946
Change the implementation for arm946 to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:54 +02:00
Heiko Schocher 405d023b71 ARM: implement relocation for ARM925
Change the implementation for arm925 to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:54 +02:00
Heiko Schocher cc7cdcbd1d ARM: implement relocation for ARM920
Change the implementation for arm920 to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:54 +02:00
Heiko Schocher ab86f72c35 ARM: implement relocation for ARM926
Change the implementation for arm926 to relocate the code to
an arbitrary address in RAM.

Adapt the TX25 (i.MX25), magnesium board to test the changes.

On the tx25 board TEXT_BASE is set to the final relocation
address to prevent one more copying of u-boot code
when relocating. More info see:
doc/README.arm-relocation

da850 board:
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Ben Gardiner <bengardiner@nanometrics.ca>
2010-09-19 19:29:54 +02:00
Heiko Schocher 561142af20 ARM: implement relocation for ARM V7 (OMAP)
Change the implementation for ARM V7 to relocate the code to an
arbitrary address in RAM.

Adapt the Beagle board (Cortex A8) to test the changes.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:53 +02:00
Heiko Schocher e48b7c0aad ARM: implement relocation for ARM11
Change the implementation for ARM11 to relocate the code to an
arbitrary address in RAM.

Tested on the qong board.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:53 +02:00
Heiko Schocher f1d2b313c9 ARM: add relocation support
!! This breaks support for all arm boards !!

To compile in old style, you must define
CONFIG_SYS_ARM_WITHOUT_RELOC or you can compile
with "CONFIG_SYS_ARM_WITHOUT_RELOC=1 ./MAKEALL board"

!! This define will be removed soon, so convert your
board to use relocation support

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>

Fix boot from NAND for non-ARM systems
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-19 19:29:53 +02:00
Heiko Schocher 3fbeeea633 common: move TOTAL_MALLOC_LEN to include/common.h
Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:52 +02:00
Heiko Schocher 620f1f6a64 relocation: fixup cmdtable
fixup_cmdtable() did all work for fixing up the cmdtable,
if CONFIG_RELOC_FIXUP_WORKS is not defined.

CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked
with Graeme Russ, and he will fix this soon.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:51 +02:00
Heiko Schocher 7e4a9e6dc8 ARM (ARM11): add data cache support, test on Qong board
Add data cache support for arm1136 systems.

Enable "cache" command on Qong board and test performance.

    Test 1: Loading 127 MB of data from NAND flash into RAM:

    Instr. Cache	off	on	on
      Data Cache	off	off	on
    --------------------------------------------------
    QONG (ARM11)	177s	95s	43s	= x 4.1

    Test 2: uncompressing a gzipped image from RAM to RAM
            (size compressed: 6.5 MiB, uncompressed: 35 MiB):

    Instr. Cache	off	on	on
      Data Cache	off	off	on
    --------------------------------------------------
    QONG (ARM11)	1.54s	0.95s	0.18s	= x 8.6

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:51 +02:00
Heiko Schocher 95c6f6d34d ARM V7 (OMAP): add data cache support, test on Beagle board
Add data cache support for ARM V7 systems. Used cache flush
functions from linux:arch/arm/mm/cache-v7.S developed from
Catalin Marinas.

Enable "cache" command on Beagle board and test performance.

    Test 1: Loading 127 MB of data from NAND flash into RAM:

    Instr. Cache	off	on	on
      Data Cache	off	off	on
    --------------------------------------------------
    Beagle (Cortex A8)	116s	106s	30.3s	= x 3.8

    Test 2: uncompressing a gzipped image from RAM to RAM
            (size compressed: 6.5 MiB, uncompressed: 35 MiB):

    Instr. Cache	off	on	on
      Data Cache	off	off	on
    --------------------------------------------------
    Beagle (Cortex A8)	1.84s	1.64s	0.12s	= x 15.3

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Ben Gardiner<bengardiner@nanometrics.ca>
2010-09-19 19:29:51 +02:00
Heiko Schocher c3330e9d6a ARM (ARM926ejs): add data cache support, tested on magnesium and tx25 board
Enable "cache" command on tx25 and magnesium board and test performance.

    Test 1: Loading 127 MB of data from NAND flash into RAM:

    Instr. Cache        off     on      on
      Data Cache        off     off     on
    --------------------------------------------------
    magnesium           32,6s   22,5s   30s     = x 1,09
    tx25 (29MB only)    9,69s   5,05s   8,16s   = x 1,19

    Test 2: uncompressing a gzipped image from RAM to RAM
            (size compressed: 6.5 MiB, uncompressed: 35 MiB):

    Instr. Cache        off     on      on
      Data Cache        off     off     on
    --------------------------------------------------
    magnesium           4,25s   2,08s   1,72s   = x 2,47
    tx25                4,82s   2,04s   1,84s   = x 2,62

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Alessandro Rubini <rubini@gnudd.com>
2010-09-19 19:29:51 +02:00
Heiko Schocher 880eff5cfb ARM: cp15: setup mmu and enable dcache
This has been tested on at91sam9263 and STN8815.
Again, I didn't check if it has bad effects
on non-arm926 cores.

Initially I had a "done" bit to only set up page tables
at the beginning. However, since the aligmnent requirement
was for the whole object file, this extra integer tool 16kB
in BSS, so I chose to remove it.

Also, note not all boards use PHYS_SDRAM, but it looks like
it's the most used name (more than CONFIG_SYS_DRAM_BASE for
example).

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:50 +02:00
Heiko Schocher 55e97429d1 arm: get rid of bi_env
bi_env is nowhere used, so delete it!

Signed-off-by: Heiko Schocher <hs@denx.de>

similar patch posted from Dirk Behme Tue Jul 27 18:36:09 CEST 2010
http://lists.denx.de/pipermail/u-boot/2010-July/074542.html
2010-09-19 19:29:50 +02:00
Wolfgang Denk ea882baf9c New implementation for internal handling of environment variables.
Motivation:

* Old environment code used a pessimizing implementation:
  - variable lookup used linear search => slow
  - changed/added variables were added at the end, i. e. most
    frequently used variables had the slowest access times => slow
  - each setenv() would calculate the CRC32 checksum over the whole
    environment block => slow
* "redundant" envrionment was locked down to two copies
* No easy way to implement features like "reset to factory defaults",
  or to select one out of several pre-defined (previously saved) sets
  of environment settings ("profiles")
* No easy way to import or export environment settings

======================================================================

API Changes:

- Variable names starting with '#' are no longer allowed

  I didn't find any such variable names being used; it is highly
  recommended to follow standard conventions and start variable names
  with an alphanumeric character

- "printenv" will now print a backslash at the end of all but the last
  lines of a multi-line variable value.

  Multi-line variables have never been formally defined, allthough
  there is no reason not to use them. Now we define rules how to deal
  with them, allowing for import and export.

- Function forceenv() and the related code in saveenv() was removed.
  At the moment this is causing build problems for the only user of
  this code (schmoogie - which has no entry in MAINTAINERS); may be
  fixed later by implementing the "env set -f" feature.

Inconsistencies:

- "printenv" will '\\'-escape the '\n' in multi-line variables, while
  "printenv var" will not do that.

======================================================================

Advantages:

- "printenv" output much better readable (sorted)
- faster!
- extendable (additional variable properties can be added)
- new, powerful features like "factory reset" or easy switching
  between several different environment settings ("profiles")

Disadvantages:

- Image size grows by typically 5...7 KiB (might shrink a bit again on
  systems with redundant environment with a following patch series)

======================================================================

Implemented:

- env command with subcommands:

  - env print [arg ...]

    same as "printenv": print environment

  - env set [-f] name [arg ...]

    same as "setenv": set (and delete) environment variables

    ["-f" - force setting even for read-only variables - not
    implemented yet.]

  - end delete [-f] name

    not implemented yet

    ["-f" - force delete even for read-only variables]

  - env save

    same as "saveenv": save environment

  - env export [-t | -b | -c] addr [size]

    export internal representation (hash table) in formats usable for
    persistent storage or processing:

	-t:	export as text format; if size is given, data will be
		padded with '\0' bytes; if not, one terminating '\0'
		will be added (which is included in the "filesize"
		setting so you can for exmple copy this to flash and
		keep the termination).
	-b:	export as binary format (name=value pairs separated by
		'\0', list end marked by double "\0\0")
	-c:	export as checksum protected environment format as
		used for example by "saveenv" command
	addr:	memory address where environment gets stored
	size:	size of output buffer

	With "-c" and size is NOT given, then the export command will
	format the data as currently used for the persistent storage,
	i. e. it will use CONFIG_ENV_SECT_SIZE as output block size and
	prepend a valid CRC32 checksum and, in case of resundant
	environment, a "current" redundancy flag. If size is given, this
	value will be used instead of CONFIG_ENV_SECT_SIZE; again, CRC32
	checksum and redundancy flag will be inserted.

	With "-b" and "-t", always only the real data (including a
	terminating '\0' byte) will be written; here the optional size
	argument will be used to make sure not to overflow the user
	provided buffer; the command will abort if the size is not
	sufficient. Any remainign space will be '\0' padded.

        On successful return, the variable "filesize" will be set.
        Note that filesize includes the trailing/terminating '\0'
        byte(s).

        Usage szenario: create a text snapshot/backup of the current
	settings:

		=> env export -t 100000
		=> era ${backup_addr} +${filesize}
		=> cp.b 100000 ${backup_addr} ${filesize}

	Re-import this snapshot, deleting all other settings:

		=> env import -d -t ${backup_addr}

  - env import [-d] [-t | -b | -c] addr [size]

    import external format (text or binary) into hash table,
    optionally deleting existing values:

	-d:	delete existing environment before importing;
		otherwise overwrite / append to existion definitions
	-t:	assume text format; either "size" must be given or the
		text data must be '\0' terminated
	-b:	assume binary format ('\0' separated, "\0\0" terminated)
	-c:	assume checksum protected environment format
	addr:	memory address to read from
	size:	length of input data; if missing, proper '\0'
		termination is mandatory

  - env default -f

    reset default environment: drop all environment settings and load
    default environment

  - env ask name [message] [size]

    same as "askenv": ask for environment variable

  - env edit name

    same as "editenv": edit environment variable

  - env run

    same as "run": run commands in an environment variable

======================================================================

TODO:

- drop default env as implemented now; provide a text file based
  initialization instead (eventually using several text files to
  incrementally build it from common blocks) and a tool to convert it
  into a binary blob / object file.

- It would be nice if we could add wildcard support for environment
  variables; this is needed for variable name auto-completion,
  but it would also be nice to be able to say "printenv ip*" or
  "printenv *addr*"

- Some boards don't link any more due to the grown code size:
  DU405, canyonlands, sequoia, socrates.

	=> cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>,
	       Stefan Roese <sr@denx.de>,
	       Heiko Schocher <hs@denx.de>

- Dropping forceenv() causes build problems on schmoogie

	=> cc: Sergey Kubushyn <ksi@koi8.net>

- Build tested on PPC and ARM only; runtime tested with NOR and NAND
  flash only => needs testing!!

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>,
Cc: Stefan Roese <sr@denx.de>,
Cc: Heiko Schocher <hs@denx.de>
Cc: Sergey Kubushyn <ksi@koi8.net>
2010-09-19 19:29:48 +02:00
Wolfgang Denk 91a76751a0 Make getenv() work before relocation.
So far, getenv() would work before relocation is most cases, even
though it was not intended to be used that way.  When switching to a
hash table based implementation, this would break a number of boards.

For convenience, we make getenv() check if it's running before
relocation and, if so, use getenv_f() internally.

Note that this is limited to simple cases, as we use a small static
buffer (32 bytes) in the global data for this purpose.

For this reason, it is also not a good idea to convert all current
uses of getenv_f() into getenv() - some of the existing use cases need
to be able to deal with longer variable values, so getenv_f() is still
needed and recommended for use before relocation.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-19 19:29:48 +02:00
Wolfgang Denk 3611665044 Cleanup use of CONFIG_SYS_SRAM_BASE and CONFIG_SYS_SRAM_SIZE
Traditionally many boards used local definitions for SRAM base address
and size (like SRAM_BASE, SRAM_LEN and/or SRAM_SIZE), while the (now)
"official" names are CONFIG_SYS_SRAM_BASE and CONFIG_SYS_SRAM_SIZE.

The corresponding code in arch/powerpc/lib/board.c was board specific,
and has never actually been maintained well. Replace this by feature-
specific code and adapt the boards that actually use this.

NOTE: there is still a ton of boards using the old #defines, which
therefor contain incorrect values in bi_sramstart and bi_sramsize.

All respective board maintainers are requested to clean up their
respective configurations.  Thanks.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Josef Wagner <Wagner@Microsys.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
2010-09-19 19:29:46 +02:00
Wolfgang Denk 07517e7f4f Prepare v2010.09-rc2
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-19 17:47:52 +02:00
Terry Lv a80603598c Save environment data to mmc.
This patch is to save environment data to mmc card.
It uses interfaces defined in generic mmc.

Signed-off-by: Terry Lv <r65388@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2010-09-19 17:47:29 +02:00
Thomas Weber c54b5923da ARM: Update ARM mach-types
This patch updates the mach-types.h based on the latest linux kernel

Signed-off-by: Thomas Weber <weber@corscience.de>
2010-09-18 23:54:50 +02:00
Graeme Russ 797960fda1 x86: Fix x86 Cold Boot
Commit 077e1958ca broke the ability of the
x86 port to boot from a cold-reset by removing the initial IDT. Re-
instate the initial IDT to allow cold-booting of x86 boards
2010-09-13 07:20:02 +10:00
Graeme Russ e69c0cba8f x86: Fix do_go_exec() - const argv[]
Commit 54841ab50c made the argv parameter
to do_go_exec() const but did not allow for the fact that argv[-1] is
set to point to the global data structure and relies on argv being non-
const.

With this patch, do_go_exec() creates a new copy of the argv array with
an extra element to store global data pointer rather than simply
clobbering an arbitrary memory location.
2010-09-13 07:20:02 +10:00
Wolfgang Denk 2d941de9d5 Prepare v2010.09-rc1
Coding style cleanup.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-10 00:16:19 +02:00
Wolfgang Denk 8fea51a4ac Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-09-09 21:39:46 +02:00
Wolfgang Denk a78ded1311 Merge branch 'master' of git://git.denx.de/u-boot-ti 2010-09-09 19:55:02 +02:00
Wolfgang Denk 40e74c852b bedbug_860.c, bedbug_603e.c: Fix return type to silence compile warnings.
commit 47e26b1b "cmd_usage(): simplify return code handling" caused
the following compile warnings:

bedbug_860.c: In function 'bedbug860_do_break':
bedbug_860.c:73: warning: 'return' with a value, in function returning void
bedbug_860.c:121: warning: 'return' with a value, in function returning void

Fix the return type.

Actually these files could need some cleanup - commands should
return proper error codes, and there are coding style issues.
=> To be fixed later.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-08 22:02:54 +02:00
Steve Sakoman 3667cbeed5 ARMV7: OMAP3: Remove erroneous hard coded sdram setup for 128MB/bank
Upcoming Beagle and Overo revisions use POP memory with 256MB or 512MB
per bank.  This patches uses the SDRC settings from x-load or the config
header to set up timing properly.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-09-08 14:51:24 -04:00
Steve Sakoman 543431b66d ARMV7: OMAP3: Fix broken reset command on OMAP36XX/37XX and OMAP4
Using the reset command on OMAP36XX/37XX and OMAP4 caused a hang. This
patch uses the reset bit appropriate for each CPU architecture.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-09-08 14:51:18 -04:00
Mans Rullgard 0c0a0e0781 ARMV7: OMAP3: Apply Cortex-A8 errata workarounds only on affected revisions
The workarounds for errata 621766 and 725233 should only be applied
on affected Cortex-A8 revisions.  Recent chips use r3px cores where
these have been fixed.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-09-08 14:51:13 -04:00
Mans Rullgard 096ca838b5 ARMV7: OMAP3: Convert setup_auxcr() to pure asm
This function consists entirely of inline asm statements, so writing
it directly in a .S file is simpler. Additionally, the inline asm is
not safe as is, since registers are not guaranteed to be preserved
between asm() statements.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-09-08 14:51:09 -04:00
Mans Rullgard 2984470746 ARMV7: OMAP3: Fix and clean up L2 cache enable/disable functions
On OMAP34xx ES1.0, the L2 enable bit can only be set in secure mode,
so an SMC call to the ROM monitor is required.  On later versions,
and on newer devices, this bit is banked and we can set it directly.

The code checked only the ES revision of the chip, and hence incorrectly
used the ROM call on ES1.0 versions of other devices.

This patch adds a check for chip family as well as revision, and also
removes some code duplication between the enable and disable functions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-09-08 14:51:04 -04:00
Steve Sakoman 7c281c985c ARMV7: OMAP3: Add clock setup for OMAP36XX/37XX
This patch configures clocks properly when a 36XX/37XX
processor is detected.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-09-08 14:50:58 -04:00
Steve Sakoman b2b9169f0b ARMV7: OMAP3: Update CPU type detection for AM35XX/OMAP36XX/37XX
TI has added new processors to the OMAP3 family.  This patch enhances
the code in sysinfo.c to detect which family member is present.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-09-08 14:50:52 -04:00