Commit Graph

653 Commits

Author SHA1 Message Date
Wolfgang Denk e2c2a95e60 74xx_7xx: Cleanup for partial linking and --gc-sections
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-27 23:35:12 +01:00
Wolfgang Denk ba273f066f 8260: Cleanup for partial linking and --gc-sections
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-27 23:35:12 +01:00
Wolfgang Denk de550d6b34 824x: Cleanup for partial linking and --gc-sections
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-27 23:35:12 +01:00
Wolfgang Denk f0687a5b67 8220: Cleanup for partial linking and --gc-sections
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-27 23:35:11 +01:00
Wolfgang Denk 085ecde156 5xxx: Cleanup for partial linking and --gc-sections
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-27 23:35:11 +01:00
Wolfgang Denk 566d49a3f5 512x: Cleanup for partial linking and --gc-sections
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Timur Tabi <timur@freescale.com>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-27 23:35:11 +01:00
Wolfgang Denk 53f378fea4 5xx: Cleanup for partial linking and --gc-sections
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-27 23:35:11 +01:00
Wolfgang Denk cd0402a730 8xx: Cleanup for partial linking and --gc-sections
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-27 23:35:10 +01:00
Wolfgang Denk 4e2894be5e 86xx: Cleanup for partial linking and --gc-sections
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-27 23:35:10 +01:00
Wolfgang Denk ff2311ab5d 83xx: Cleanup for partial linking and --gc-sections
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Haiying Wang <r54964@freescale.com>
2010-11-27 23:35:09 +01:00
Wolfgang Denk ee8028b7f1 ppc4xx: Cleanup for partial linking and --gc-sections
This commit adapts 4xx boards for partial linking with --gc-sections.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Tirumala Marri <tmarri@apm.com>
Cc: David Updegraff <dave@cray.com>
Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: Larry Johnson <lrj@acm.org>
Cc: Peter De Schrijver <p2@mind.be>
Cc: Niklaus Giger <niklaus.giger@netstal.com>
Cc: Daniel Poirot <dan.poirot@windriver.com>
Acked-by: Stefan Roese <sr@denx.de>
2010-11-27 23:35:09 +01:00
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