Commit Graph

129 Commits

Author SHA1 Message Date
Marek Vasut
3a96ad851f PXA: Align stack to 8 bytes
Part of this patch is by: Mikhail Kshevetskiy.

Stack must be aligned to 8 bytes on PXA (possibly all armv5te) for LDRD/STRD
instructions. In case LDRD/STRD is issued on an unaligned address, the behaviour
is undefined.

The issue was observed when working with the NAND code, which was rendered
disfunctional. Also, the vsprintf() function had serious problems with printing
64bit wide long longs. After aligning the stack, this wrong behaviour is no
longer present.

Tested on:
	Marvell Littleton PXA310 board
	Toradex Colibri PXA320 board
	Aeronix Zipit Z2 PXA270 handheld
	Voipac PXA270 board

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-06-13 13:39:02 +02:00
Wolfgang Denk
9bb3b3d440 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2010-05-30 21:44:07 +02:00
Wolfgang Denk
a81cd434b9 Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-05-30 21:43:05 +02:00
Timur Tabi
6e37a04407 fsl/85xx: add clkdvdr and pmuxcr2 to global utilities structure definition
Add the 'clkdvdr' and 'pmuxcr2' registers to the 85xx definition of
struct ccsr_gur.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-05-30 11:10:32 -05:00
Wolfgang Denk
bd7bb6f8a3 Merge branch 'next' of git://git.denx.de/u-boot-nios 2010-05-28 20:34:39 +02:00
Tom
39c209546a ARM Update mach-types
Fetched from http://www.arm.linux.org.uk/developer/machines/download.php
And built with

repo http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
commit 3defb2476166445982a90c12d33f8947e75476c4

Signed-off-by: Tom <Tom@bumblecow.com>
2010-05-28 13:23:16 -05:00
Tom
551bd947bd ARM Update mach-types
Fetched from http://www.arm.linux.org.uk/developer/machines/download.php
And built with

repo http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
commit 257dab81413b31b8648becfe11586b3a41e5c29a

Signed-off-by: Tom <Tom@bumblecow.com>
2010-05-28 11:49:42 -05:00
Thomas Chou
1117cbf2ad nios: remove nios-32 arch
The nios-32 arch is obsolete and broken. So it is removed.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2010-05-28 10:56:04 -04:00
Thomas Chou
6803336c9f nios2: allow STANDALONE_LOAD_ADDR overriding
This patch allows users to override default STANDALONE_LOAD_ADDR.
The gcclibdir path was duplicated in the standalone Makefile and
can be removed.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
2010-05-28 10:56:04 -04:00
Thomas Chou
8d52ea6db4 nios2: fix div64 issue for gcc4
This patch fixes the run-time error on div64 when built with
gcc4, which was reported by jhwu0625 on nios forum. It merges
math support from libgcc of gcc4. This patch is copied from
nios2-linux.

It works with both gcc3 and gcc4. The old mult.c, divmod.c and
math.h are removed.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
2010-05-28 10:56:03 -04:00
Thomas Chou
0df01fd3d7 nios2: fix r15 issue for gcc4
The "-ffixed-r15" option doesn't work well for gcc4. Since we
don't use gp for small data with option "-G0", we can use gp
as global data pointer. This allows compiler to use r15. It
is necessary for gcc4 to work properly.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
2010-05-28 10:56:03 -04:00
Thomas Chou
cedd341d55 nios2: add gpio support
This patch adds driver for a trivial gpio core, which is described
in http://nioswiki.com/GPIO. It is used for gpio led and nand flash
interface in u-boot.

When CONFIG_SYS_GPIO_BASE is not defined, board may provide
its own driver.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Tested-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
2010-05-28 10:56:03 -04:00
Wolfgang Wegner
adf55679af add CONFIG_SYS_FEC_FULL_MII for MCF5445x
This patch adds support for full MII interface on MCF5445x (in contrast
to RMII as used on the evaluation boards).

Signed-off-by: Wolfgang Wegner <w.wegner at astro-kom.de>
2010-05-28 02:15:57 -05:00
Wolfgang Wegner
ae49099755 add CONFIG_SYS_FEC_NO_SHARED_PHY for MCF5445x
This patch adds the possibility to handle seperate PHYs to MCF5445x.
Naming is chosen to resemble the contrary CONFIG_FEC_SHARED_PHY in the
linux kernel.

Signed-off-by: Wolfgang Wegner <w.wegner at astro-kom.de>
2010-05-28 02:15:55 -05:00
Wolfgang Wegner
e9b43cae1a add missing PCS3 for MCF5445x
This patch adds the code for handling PCS3 (DSPI chip select 3) in
cpu_init.c and m5445x.h

Signed-off-by: Wolfgang Wegner <w.wegner at astro-kom.de>
2010-05-28 02:15:51 -05:00
Wolfgang Denk
c4976807cb Coding style cleanup, update CHANGELOG.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-05-26 23:51:22 +02:00
Wolfgang Denk
45b728cdee Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx 2010-05-26 22:36:32 +02:00
Kumar Gala
6ece2550d1 Convert Makefiles from COBJS-${} to COBJS-$()
Match style we use almost everywhere else

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-05-26 22:27:38 +02:00
Michael Weiss
59dde44acb powerpc/bootcount: Fix endianness problem
For CONFIG_SYS_BOOTCOUNT_SINGLEWORD the code had an endianness problem.

Signed-off-by: Michael Weiss <michael.weiss@ifm.com>
Signed-off-by: Detlev Zundel <dzu@denx.de>
2010-05-26 22:26:32 +02:00
Wolfgang Denk
40792d675a a320evb: fix udelay / __udelay confusion
Fix the following compiler problems:

arch/arm/cpu/arm920t/a320/liba320.a(timer.o): In function `udelay':
/home/wd/git/u-boot/work/arch/arm/cpu/arm920t/a320/timer.c:160: multiple definition of `udelay'
lib/libgeneric.a(time.o):/home/wd/git/u-boot/work/lib/time.c:34: first defined here
lib/libgeneric.a(time.o): In function `udelay':
time.c:(.text+0x1c): undefined reference to `__udelay'

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-05-21 23:14:53 +02:00
Wolfgang Denk
92381c41c7 ARM: */timer.c: fix spelling and vertical alignment
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-05-21 23:13:18 +02:00
Kim Phillips
71bd860cce mpc83xx: don't shift pre-shifted ACR, SPCR, SCCR bitfield masks in cpu_init.c
commit c7190f028f "mpc83xx:
retain POR values of non-configured ACR, SPCR, SCCR, and LCRR
bitfields" incorrectly shifted <register>_<bitfield> (e.g.
ACR_PIPE_DEP) values that were preshifted by their
definition in mpc83xx.h.

this patch removes the unnecessary shifting for the newly
utilized mask values in cpu_init.c, and prevents seemingly
unrelated symptoms such as an mpc8379erdb board from
locking up whilst performing a networking operation,
e.g. a tftp.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2010-05-21 15:22:39 -05:00
Horst Kronstorfer
f6970d0c54 Fixed two typos in arch/powerpc/cpu/mpc83xx/start.S.
Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2010-05-21 15:22:36 -05:00
Wolfgang Denk
8a452c2c17 Merge branch 'master' of git://git.denx.de/u-boot-imx 2010-05-21 22:22:23 +02:00
Wolfgang Denk
568278e336 Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx 2010-05-17 23:16:08 +02:00
Wolfgang Denk
1a1e6bf12b Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2010-05-17 23:11:21 +02:00
Kim Phillips
a4bfc4cc46 mpc83xx: fix NAND bootstrap too big error
commit 167cdad137 "SERIAL: Enable
port-mapped access" inadvertently broke 83xx nand boards by
converting NS16550_init to use io accessors, which expanded
the size of the generated code.

this patch fixes the problem by removing icache functions from
the nand builds, which somewhat follows commit
1a2e203b31 "mpc83xx: turn on icache
in core initialization to improve u-boot boot time"

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2010-05-17 14:44:25 -05:00
Wolfgang Denk
cd4b02be1b ARM: add __aeabi_unwind_cpp_pr0() function to avoid linker complaints
Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested-by: Thomas Weber <weber@corscience.de>
2010-05-15 19:50:36 +02:00
York Sun
bcb6c2bb84 Enabled support for Rev 1.3 SPD for DDR2 DIMMs
SPD has minor change from Rev 1.2 to 1.3. This patch enables Rev 1.3.
The difference has ben examined and the code is compatible.
Speed bins is not verified on hardware for CL7 at this moment.

This patch also enables SPD Rev 1.x where x is up to "F". According to SPD
spec, the lower nibble is optionally used to determine which additinal bytes
or attribute bits have been defined. Software can safely use defaults. However,
the upper nibble should always be checked.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-05-12 04:54:30 -05:00
Kumar Gala
f54fe87ace 85xx/fsl-sata: Use is_serdes_configured() to determine if SATA is enabled
On the MPC85xx platform if we have SATA its connected on SERDES.
Determing if SATA is enabled via sata_initialize should not be board
specific and thus we move it out of the MPC8536DS board code.

Additionally, now that we have is_serdes_configured() we can determine
if the given SATA port is enabled and error out if its not in the
driver.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-05-12 04:53:51 -05:00
Kumar Gala
54648985e2 85xx/mpc8536ds: Use is_serdes_configured() to determine of PCIe enabled
The new is_serdes_configured covers a broader range of devices than the
PCI specific code.  Use it instead as we convert away from the
is_fsl_pci_cfg() code.

Additionally move to setting LAWs for PCI based on if its configured.
Also updated PCI FDT fixup code to remove PCI controllers from dtb if
they are configured.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-05-12 04:53:51 -05:00
Kumar Gala
6ab4011b79 85xx: Add is_serdes_configured() support to MPC8536 SERDES
Add the ability to determine if a given IP block connected on SERDES is
configured.  This is useful for things like PCIe and SRIO since they are
only ever connected on SERDES.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-05-12 04:53:50 -05:00
Wolfgang Denk
ab92d0fd9a Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx 2010-05-09 01:16:51 +02:00
Ron Madrid
3b439792b0 mpc83xx: Add UPMA configuration to SIMPC8313
Added UPM array table, upmconfig, and Local Bus configuration support for SIMPC8313

Signed-off-by: Ron Madrid <ron_madrid@sbcglobal.net>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2010-05-07 12:19:52 -05:00
Mike Frysinger
f745817e74 update include/asm/ gitignore after move
With the cpu include paths moved, the gitignore paths need updating.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Tom Rix <tom@bumblecow.com>
2010-05-07 00:17:30 +02:00
Stefan Roese
e4a95d112e powerpc: Consolidate bootcount_{store|load} for PowerPC
This patch consolidates bootcount_{store|load} for PowerPC by
implementing a common version in arch/powerpc/lib/bootcount.c. This
code is now used by all PowerPC variants that currently have these
functions implemented.

The functions now use the proper IO-accessor functions to read/write the
values.

This code also supports two different bootcount versions:

a) Use 2 separate words (2 * 32bit) to store the bootcounter
b) Use only 1 word (2 * 16bit) to store the bootcounter

Version b) was already used by MPC5xxx.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
          for 83xx parts
Cc: Michael Zaidman <michael.zaidman@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Anatolij Gustschin <agust@denx.de>
2010-05-06 23:28:48 +02:00
Graeme Russ
1f9f3cf6cc sc520: Fix minor DRAM Controller Setup bug
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:20:56 +02:00
Graeme Russ
d20053efdf sc520: Update to new AMD Copyright
AMD recently changed the licensing of the RAM sizing code to the
GPLv2 (or at your option any later version)

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:20:44 +02:00
Graeme Russ
21e67e796b sc520: Board Specific PCI Init
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:18:52 +02:00
Graeme Russ
0278216b76 sc520: Move PCI defines to PCI include file
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:18:41 +02:00
Graeme Russ
5204566e53 sc520: Allow boards to override udelay
If the board has a high precision mico-second timer, it maked sense to use
it instead of the on-chip one

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:17:37 +02:00
Graeme Russ
95ffaba390 x86: Fix support for booting bzImage
Add support for newer (up to 2.6.33) kernels

Add zboot command which takes the address of a bzImage as its first
argument and (optionally) the size of the bzImage as the second argument
(the second argument is needed for older kernels which do not include
the bzImage size in the header)

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:17:01 +02:00
Graeme Russ
79ea6b8701 x86: Provide weak PC/AT compatibility setup function
It is possibly to setup x86 boards to use non-PC/AT configurations. For
example, the sc520 is an x86 CPU with PC/AT and non-PC/AT peripherals.
This function allows the board to set itself up for maximum PC/AT
compatibility just before booting the Linux kernel (the Linux kernel
'just works' if everything is PC/AT compliant)

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:16:54 +02:00
Graeme Russ
bf16500f79 x86: Use CONFIG_SERIAL_MULTI
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:16:46 +02:00
Graeme Russ
153c2d9f23 x86: Fix copying of Real-Mode code into RAM
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:15:58 +02:00
Graeme Russ
2fb1bc4f53 x86: Pass relocation offset into Global Data
In order to locate the 16-bit BIOS code, we need to know the reloaction
offset.

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:15:51 +02:00
Graeme Russ
c14a3669b2 x86: Move GDT to a safe location in RAM
Currently, the GDT is either located in FLASH or in the non-relocated
U-Boot image in RAM. Both of these locations are unsafe as those
locations can be erased during a U-Boot update. Move the GDT into the
highest available memory location and relocate U-Boot to just below it

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:15:43 +02:00
Graeme Russ
077e1958ca x86: Add RAM bootstrap functionality
Add a parameter to the 32-bit entry to indicate if entry is from Real
Mode or not. If entry is from Real Mode, execute the destructive 'sizer'
routine to determine memory size as we are booting cold and running in
Flash. If not entering from Real Mode, we are executing a U-Boot image
from RAM and therefore the memory size is already known (and running
'sizer' will destroy the running image)

There are now two 32-bit entry points. The first is the 'in RAM' entry
point which exists at the start of the U-Boot binary image. As such,
you can load u-boot.bin in RAM and jump directly to the load address
without needing to calculate any offsets. The second entry point is
used by the real-to-protected mode switch

This patch also changes TEXT_BASE to 0x6000000 (in RAM). You can load
the resulting image at 0x6000000 and simple go 0x6000000 from the u-boot
prompt

Hopefully a later patch will completely elliminate any dependency on
TEXT_BASE like a relocatable linux kernel (perfect world)

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:15:31 +02:00
Graeme Russ
759598f82f x86: Split sc520 memory sizing versus reporting
This patch allows the low-level assembler boot-strap to obtain the RAM
size without calling the destructive 'sizer' routine. This allows
boot-strapping from a U-Boot image loaded in RAM

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:14:44 +02:00
Graeme Russ
4dba333b3c x86: Fix sc520 memory size reporting
There is an error in how the assembler version of the sc520 memory size
reporting code works. As a result, it will only ever report at most the
size of one bank of RAM

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:14:32 +02:00