Commit Graph

38 Commits

Author SHA1 Message Date
Trent Piepho f62fb99941 Fix all linker script to handle all rodata sections
A recent gcc added a new unaligned rodata section called '.rodata.str1.1',
which needs to be added the the linker script.  Instead of just adding this
one section, we use a wildcard ".rodata*" to get all rodata linker section
gcc has now and might add in the future.

However, '*(.rodata*)' by itself will result in sub-optimal section
ordering.  The sections will be sorted by object file, which causes extra
padding between the unaligned rodata.str.1.1 of one object file and the
aligned rodata of the next object file.  This is easy to fix by using the
SORT_BY_ALIGNMENT command.

This patch has not be tested one most of the boards modified.  Some boards
have a linker script that looks something like this:

*(.text)
. = ALIGN(16);
*(.rodata)
*(.rodata.str1.4)
*(.eh_frame)

I change this to:

*(.text)
. = ALIGN(16);
*(.eh_frame)
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))

This means the start of rodata will no longer be 16 bytes aligned.
However, the boundary between text and rodata/eh_frame is still aligned to
16 bytes, which is what I think the real purpose of the ALIGN call is.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-03-20 22:39:12 +01:00
Kumar Gala ff4e66e93c pci: Rename PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY for clarity
The PCI_REGION_MEMORY and PCI_REGION_MEM are a bit to similar and
can be confusing when reading the code.

Rename PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY to clarify its used
for system memory mapping purposes.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-02-07 23:50:04 +01:00
Ralph Kondziella 70a4da45e1 ADS5121 Add PATA support
Original patch from Ralph Kondziella
plus clean up by Wolfgang Denk
plus changes by John Rigby
    use ips clock not lpc
    port forward to current u-boot release

Signed-off-by: Ralph Kondziella <rk@argos-messtechnik.de>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: John Rigby <jrigby@freescale.com>
2009-02-03 15:40:29 -07:00
Martha Marx abfbd0ae49 ADS5121 Add IC Ident Module (IIM) support
IIM (IC Identification Module) is the fusebox for the mpc5121.
Use #define CONFIG_IIM to turn on the clock for this module
use #define CONFIG_CMD_FUSE to add fusebox commands.
Fusebox commands include the ability to read
the status, read the register cache, override the register cache,
program the fuses and sense them.

Signed-off-by: Martha Marx <mmarx@silicontkx.com>
Signed-off-by: John Rigby <jrigby@freescale.com>
2009-02-03 15:40:20 -07:00
John Rigby 14d19cd1bc ADS5121 Fix rev2 silicon pci iopad config
Reset config is not correct

Signed-off-by: John Rigby <jrigby@freescale.com>
2009-02-03 09:25:51 -07:00
John Rigby 4c154252c4 ADS5121 DIU Add diu_bmp_addr env
Add support for using a bmp other than
FSL_Logo_BMP for the DIU splash screen.

Can now set the env var "diu_bmp_addr" to
the address of a BMP in flash to use instead
of the default FSL_Logo_BMP.

Signed-off-by: Martha Marx <mmarx@silicontkx.com>
Signed-off-by: John Rigby <jrigby@freescale.com>
2009-02-03 09:25:51 -07:00
John Rigby 92c20fbd3a ADS5121 DIU Make inclusion of FSL logo optional
Make inclusion of FSL logo optional and
turn it off by default.

Signed-off-by: John Rigby <jrigby@freescale.com>
2009-02-03 09:25:51 -07:00
Peter Tyser 2fb2604d5c Command usage cleanup
Remove command name from all command "usage" fields and update
common/command.c to display "name - usage" instead of
just "usage". Also remove newlines from command usage fields.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-01-28 08:49:52 +01:00
Peter Tyser 62c3ae7c6e Standardize command usage messages with cmd_usage()
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-01-28 08:43:45 +01:00
Peter Tyser 9507e7867e Clean up diufb command definitions
The diufb command usage formatting is non-standard.  It was
made standard in preparation for larger command usage updates.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-01-28 08:43:34 +01:00
Selvamuthukumar 9b827cf172 Align end of bss by 4 bytes
Most of the bss initialization loop increments 4 bytes
at a time. And the loop end is checked for an 'equal'
condition. Make the bss end address aligned by 4, so
that the loop will end as expected.

Signed-off-by: Selvamuthukumar <selva.muthukumar@e-coninfotech.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-11-18 23:13:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6d0f6bcf33 rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18 21:54:03 +02:00
John Rigby 8a490422be ADS5121: Fix NOR and CPLD ALE timing for rev 2 silicon
MPC5121 rev 2 silicon has a new register for controlling how long
CS is asserted after deassertion of ALE in multiplexed mode.

The default is to assert CS together with ALE.  The alternative
is to assert CS (ALEN+1)*LPC_CLK clocks after deassertion of ALE.

The default is wrong for the NOR flash and CPLD on the ADS5121.

This patch turns on the alternative for CS0 (NOR) and CS2 (CPLD)
it does so conditionally based on silicon rev 2.0 or greater.

Signed-off-by: Martha J Marx <mmarx@silicontkx.com>
Signed-off-by: John Rigby <jrigby@freescale.com>
2008-08-28 13:36:43 -06:00
Kenneth Johansson 6689484ccd mpc5121: Move iopin features from board specific to common files.
And in the process eliminate some duplicate register defines.

Signed-off-by: Kenneth Johansson <kenneth@southpole.se>
2008-08-05 20:45:34 -06:00
Wolfgang Denk 699f051255 Prepare v1.3.4-rc1: Code cleanup, update CHANGELOG, sort Makefile
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-15 22:22:44 +02:00
Wolfgang Denk 0f9d5f6d6e ADS5121: Fix (delete) incorrect ads5121_diu_init() prototype
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-13 19:48:26 +02:00
Kenneth Johansson f889265753 fix DIU for small screens
The DIU_DIV register is 8 bit not 5 bit. This prevented large DIV values
so it was not possible to set a slow pixel clock and thus prevented
display on small screens.

Signed-off-by: Kenneth Johansson <kenneth@southpole.se>
Acked-by: John Rigby <jrigby@freescale.com>
2008-07-12 13:34:15 -06:00
John Rigby b60b857387 ADS5121 cleanup compile warnings
board/ads5121/iopin.c
    Replace bit fields in struct iopin_t with a single
    field and intialize it via plain old macros.
    This fixes the type pun warnings and makes the code
    more readable.

board/ads5121/ads5121.c
    Add include iopin.h to ads5121.c for the iopin_initialize
    prototype.

    Add an extern void ads5121_diu_init(void)

Signed-off-by: John Rigby <jrigby@freescale.com>
2008-07-12 13:33:59 -06:00
Wolfgang Denk 9b55a25369 Fix some more print() format errors.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-11 01:16:00 +02:00
Martha Marx f31c49db2a Configuration changes for ADS5121 Rev 3
ADS5121 Rev 3 board is now the default config

config targets are now

ads5121_config
    Rev 3 board with
	PCI
	M41T62 on board RTC
	512MB DRAM

ads5121_rev2_config
    Rev 2 board with
	No PCI
	256MB DRAM

Signed-off-by: Martha Marx <mmarx@silicontkx.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: John Rigby <jrigby@freescale.com>
2008-07-10 11:36:42 -06:00
Martha Marx 16bee7b0dc Consolidate ADS5121 IO Pin configuration
Consolidate ADS5121 IO Pin configuration to one file
board/ads5121/iopin.c.

Remove pin config from cpu/mpc512x/fec.c

Signed-off-by: Martha Marx <mmarx@silicontkx.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: John Rigby <jrigby@freescale.com>
2008-07-10 11:36:32 -06:00
Wolfgang Denk c8a3b109f0 Cleanup out-or-tree building for some boards (.depend)
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-02 23:49:18 +02:00
Becky Bruce 9973e3c614 Change initdram() return type to phys_size_t
This patch changes the return type of initdram() from long int to phys_size_t.
This is required for a couple of reasons: long int limits the amount of dram
to 2GB, and u-boot in general is moving over to phys_size_t to represent the
size of physical memory.  phys_size_t is defined as an unsigned long on almost
all current platforms.

This patch *only* changes the return type of the initdram function (in
include/common.h, as well as in each board's implementation of initdram).  It
does not actually modify the code inside the function on any of the platforms;
platforms which wish to support more than 2GB of DRAM will need to modify
their initdram() function code.

Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc
MPC8641HPCN.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-06-12 08:50:18 +02:00
York Sun 4416603aeb Make ads5121 out-of-tree compiling safe
Reuse the existing DIU driver in board/freescale/common.

Signed-off-by: York Sun <yorksun@freescale.com>
2008-05-21 00:54:37 +02:00
York Sun 0e1bad47cd Adding DIU support for Freescale 5121ADS
Add DIU and cfb console support to FSL 5121ADS board.

Use #define CONFIG_VIDEO in config file to enable fb console.

Signed-off-by: York Sun <yorksun@freescale.com>
2008-05-21 00:54:36 +02:00
Wolfgang Denk 53677ef18e Big white-space cleanup.
This commit gets rid of a huge amount of silly white-space issues.
Especially, all sequences of SPACEs followed by TAB characters get
removed (unless they appear in print statements).

Also remove all embedded "vim:" and "vi:" statements which hide
indentation problems.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-21 00:14:08 +02:00
John Rigby 5f91db7f58 MPC5121e ADS PCI support take 3
Adds PCI support for MPC5121

Tested with drivers/net/rtl8139.c

Support is conditional since PCI on old silicon does not work.

ads5121_PCI_config turns on PCI

In this version, condition compilation of PCI code has been moved
from ifdef in board/ads5121/pci.c to board/ads5121/Makefile as
suggested by Jean-Christophe PLAGNIOL-VILLARD

Signed-off-by: John Rigby <jrigby@freescale.com>
2008-03-02 21:44:59 +01:00
Grzegorz Bernacki 37e3c62fa0 ADS5121e: DDR2 init/timing update.
Signed-off-by: John Rigby <jrigby@freescale.com>
Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
2008-02-07 01:10:04 +01:00
Wolfgang Denk 8d103071b7 ADS5121: Fix typo in ads5121.c, adjust default environment
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-01-13 23:37:50 +01:00
John Rigby 51b67d06fa ADS5121: MAX slew rate for PATA pins
Signed-off-by: John Rigby <jrigby@freescale.com>
2008-01-13 23:36:22 +01:00
Wolfgang Denk e343ab83d5 ADS5121e: fix compile warning
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-01-13 00:55:47 +01:00
Wolfgang Denk 64134f0112 Fix linker scripts: add NOLOAD atribute to .bss/.sbss sections
With recent toolchain versions, some boards would not build because
or errors like this one (here for ocotea board when building with
ELDK 4.2 beta):
ppc_4xx-ld: section .bootpg [fffff000 -> fffff23b] overlaps section .bss [fffee900 -> fffff8ab]

For many boards, the .bss section is big enough that it wraps around
at the end of the address space (0xFFFFFFFF), so the problem will not
be visible unless you use a 64 bit tool chain for development. On
some boards however, changes to the code size (due to different
optimizations) we bail out with section overlaps like above.

The fix is to add the NOLOAD attribute to the .bss and .sbss
sections, telling the linker that .bss does not consume any space in
the image.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-01-12 20:31:39 +01:00
Grzegorz Bernacki 281ff9a45c ads5121: Added support for FDT.
Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
2008-01-12 15:36:17 +01:00
Grant Likely c93945e8f9 Revert "[MPC512x] Correct fixup relocation"
This reverts commit 8d17979d03.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-11-15 08:31:16 -07:00
Rafal Jaworowski 8d17979d03 [MPC512x] Correct fixup relocation
Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
2007-09-07 17:05:36 +02:00
Wolfgang Denk 6f6d7b9c85 Cleanup output on ADS5121 board
Signed-off-by: Wolfgang Denk
2007-08-12 18:28:18 +02:00
Wolfgang Denk b1b54e3520 Coding style cleanup, update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-08-02 21:27:46 +02:00
Rafal Jaworowski 8993e54b6f [ADS5121] Support for the ADS5121 board
The following MPC5121e subsystems are supported:

- low-level CPU init
- NOR Boot Flash (common CFI driver)
- DDR SDRAM
- FEC
- I2C
- Watchdog

Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
Signed-off-by: Jan Wrobel <wrr@semihalf.com>
2007-07-27 14:43:59 +02:00