Commit Graph

11195 Commits

Author SHA1 Message Date
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
Wolfgang Denk bfe8fe87ba Merge branch 'master' of git://git.denx.de/u-boot-marvell 2010-10-13 09:59:13 +02:00
Ben Gardiner 11080ab66d ARM: relocation: don't undef CONFIG_SYS_ARM_WITHOUT_RELOC
There were some #undef's of CONFIG_SYS_ARM_WITHOUT_RELOC added to a few board
configs as part of the arm relocation series; but these are not needed now as we
do not #undef what is not #defined in the first place.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Heiko Schocher <hs@denx.de>
2010-10-13 09:57:47 +02:00
Heiko Schocher a784c01adc ARM: relocation: fix typo in comment
Signed-off-by: Heiko Schocher <hs@denx.de>
2010-10-13 09:50:55 +02:00
Prafulla Wadaskar 0b20ed76c0 Kirkwood: Changes specific to ARM relocation support
All Kirkwood based boards are supported for this new implementation
ref: docs/README.arm-relocation

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2010-10-13 09:36:20 +02:00
Prafulla Wadaskar 54e999a30a kirkwood: added common config file mv-common.h
It is observed that, in most of the board configs the code is being
duplicated, also for any common change all board files needs update
This issue was under discussion from long on mailing list and we
converge on introducing common config file.

With this patch-
1. Total Kirkwood specific configuration code is reduced by 210 lines
2. All common configuration can be shared by multiple boards
3. Easy to manage common updates like ARM relocation changes

mv-common.h file is added to include/configs/
It contains all common configuration supported for all Kirkwood boards
The respective board configs are updated for its usage

Build tested for guruplug, mv88f6281gtw_ge, openrd_base,
rd6281a and sheevaplug
Binary execution tested for sheevaplug

Todo:
1. Other custom Kirkwood boards to be synced
2. The support to be extended for Orion5X based boards

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2010-10-13 09:36:10 +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
Albert Aribaud d3497138ff mvsata_ide: adjust port init sequence
mvsata_ide_initialize_port(): adjust init sequence (SStatus
should be checked only after all writes to SControl) and
return success/failure to ide_preinit().

Also, as some tests showed init durations in the hundreds
of us, raise the time-out to 01 ms to be on the safe side.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-10-13 09:35:54 +02:00
Prafulla Wadaskar d30b5706d8 Kirkwood: Changes specific to ARM relocation support
All Kirkwood based boards are supported for this new implementation
ref: docs/README.arm-relocation

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2010-10-12 14:39:16 +05:30
Prafulla Wadaskar 44f1ec6c5e kirkwood: added common config file mv-common.h
It is observed that, in most of the board configs the code is being
duplicated, also for any common change all board files needs update
This issue was under discussion from long on mailing list and we
converge on introducing common config file.

With this patch-
1. Total Kirkwood specific configuration code is reduced by 210 lines
2. All common configuration can be shared by multiple boards
3. Easy to manage common updates like ARM relocation changes

mv-common.h file is added to include/configs/
It contains all common configuration supported for all Kirkwood boards
The respective board configs are updated for its usage

Build tested for guruplug, mv88f6281gtw_ge, openrd_base,
rd6281a and sheevaplug
Binary execution tested for sheevaplug

Todo:
1. Other custom Kirkwood boards to be synced
2. The support to be extended for Orion5X based boards

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2010-10-12 14:39:16 +05:30
Prafulla Wadaskar 6edf0f121f 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-12 14:39:15 +05:30
Albert Aribaud 3b467ec444 orion5x: optimize window size computation
Signed-off-by: Chris Moore <moore@free.fr>
Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-10-12 14:39:15 +05:30
Prafulla Wadaskar 35883cca8a 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-12 14:39:15 +05:30
Albert Aribaud 7054cfda65 mvsata_ide: adjust port init sequence
mvsata_ide_initialize_port(): adjust init sequence (SStatus
should be checked only after all writes to SControl) and
return success/failure to ide_preinit().

Also, as some tests showed init durations in the hundreds
of us, raise the time-out to 01 ms to be on the safe side.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-10-12 14:39:15 +05:30
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
Wolfgang Denk 02b117d42b Merge branch 'sf' of git://git.denx.de/u-boot-blackfin 2010-10-11 09:52:16 +02:00
Timur Tabi bfb707191a fsl: add support for NXID v1 EEPROM format
Freescale application note AN3638 describes an update to the NXID format,
which stores MAC addresses and related data on an on-board EEPROM.  The new
version adds support for up to 23 MAC addresses, instead of just 8.  Since
the initial implementation of NXID had a "0" in the 'version' field, this
new version is called "v1".

Boards that are shipped with EEPROMs in the NXID v1 format should define
CONFIG_SYS_I2C_EEPROM_NXID_1 instead of CONFIG_SYS_I2C_EEPROM_NXID.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:57:07 -05: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
Kumar Gala 1bf8e9fd74 powerpc/85xx: Add support for 4th PCI controller on corenet_ds
We configure the controller but dont have virtual address space thus any
devices on the 4th controller are not accessible in u-boot.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Emil Medve c2b3b6408b powerpc/corenet_ds: Various updates to initial env cfg
* Make the U-Boot update command sequence conditional.  Helps prevent
  accidental erasing if an upload or previous step fails
* Make it easier to update other FLASH banks
* Enable DDR controller cache line interleaving and bank cs0/cs1 by default

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Timur Tabi 3addcb9343 fsl: verify writes to the MAC address EEPROM
Update the code which writes to the on-board EEPROM so that it can detect if
the write failed because the EEPROM is write-protected.  Most of the 8xxx-class
Freescale reference boards use an AT24C02 EEPROM to store MAC addresses and
similar information.  With this patch, if the EEPROM is protected, the
"mac save" command will display an error message indicating that the write
has not succeeded.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Timur Tabi a2d12f8812 p1022ds: add audclk hwconfig setting to enable codec reference clock
The Freescale P1022DS can use either a 12.288MHz or a 11.2896MHz reference
clock for the audio codec, but by default both are disabled.  Add a 'audclk'
hwconfig option that allows the user to choose which clock he wants.

The 12.288MHz clock allows the codec to use sampling rates of 16, 24, 32, 48,
64, and 96KHz.  The 11.2896 clock allows 14700, 22050, 29400, 44100, 58800, and
88200Hz.

Also configure a pin muxing to select some SSI signals, which will disable
I2C1.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Haiying Wang b6bde93090 mpc8569mds: fix some ddr settings
Enable half drive strength, set RTT to 60Ohm and set write leveling override.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Haiying Wang 3aed550742 mpc8569mds: fix consuming long time while relocating code.
The original code maps boot flash as non-cacheable region. When calling
relocate_code in flash to copy u-boot from flash to ddr, every loop copy command
is read from flash. The flash read speed will be the bottleneck, which consuming
long time to do this operation. To resovle this, map the boot flash as
write-through cache via tlb. And set tlb to remap the flash after code
executing in ddr, to confirm flash erase operation properly done.

Signed-off-by: Kai.Jiang <Kai.Jiang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Haiying Wang 1b8e4fa1a0 mpc8569mds: fix CONFIG_ENV_SIZE
CONFIG_ENV_SIZE of MPC8569MDS was wrongly set to CONFIG_ENV_SECT_SIZE which
is 128KB, so it took longer time to do crc32 calculation for ENV than it should
do. It causes the bootup for MPC8569MDS significantly slow. This patch fixs it
to 0x2000(8KB), also fix the comment for CONFIG_ENV_SECT_SIZE to correct size.

Signed-off-by: Kai.Jiang <Kai.Jiang@freescale.com
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
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