u-boot/board/cogent
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
..
config.mk Consolidate mpc8260 linker scripts 2007-07-04 01:05:04 +02:00
dipsw.c Initial revision 2002-08-17 09:36:01 +00:00
dipsw.h Initial revision 2000-12-14 10:04:19 +00:00
flash.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
flash.h Initial revision 2001-01-23 21:22:09 +00:00
kbm.c Initial revision 2000-12-14 10:04:19 +00:00
kbm.h Initial revision 2000-12-14 10:04:19 +00:00
lcd.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
lcd.h Big white-space cleanup. 2008-05-21 00:14:08 +02:00
Makefile Cleanup out-or-tree building for some boards (.depend) 2008-07-02 23:49:18 +02:00
mb.c Change initdram() return type to phys_size_t 2008-06-12 08:50:18 +02:00
mb.h rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
par.c Initial revision 2000-12-14 10:04:19 +00:00
par.h Initial revision 2000-12-14 10:04:19 +00:00
pci.c Initial revision 2000-12-14 10:04:19 +00:00
pci.h Initial revision 2000-12-14 10:04:19 +00:00
README rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
README.cma286 Fix Murray Jensen's mail address. 2005-08-12 23:20:59 +02:00
rtc.c Initial revision 2000-12-14 10:04:19 +00:00
rtc.h Initial revision 2000-12-14 10:04:19 +00:00
serial.c board/[A-Za-c]*: Remove obsolete references to CONFIG_COMMANDS 2007-07-09 18:47:45 -05:00
serial.h Initial revision 2000-12-14 10:04:19 +00:00
u-boot.lds Fix all linker script to handle all rodata sections 2009-03-20 22:39:12 +01:00
u-boot.lds.debug rename environment.c in env_embedded.c to reflect is functionality 2008-09-10 22:48:01 +02:00

Cogent Modular Architecture configuration
-----------------------------------------

As the name suggests, the Cogent platform is a modular system where
you have a motherboard into which plugs a cpu module and one or more
i/o modules. This provides very nice flexibility, but makes the
configuration task somewhat harder.

The possible Cogent motherboards are:

Code		Config Variable		Description
----		---------------		-----------

CMA101		CONFIG_CMA101		32MB ram, 2 ser, 1 par, rtc, dipsw,
					2x16 lcd, eth(?)
CMA102		CONFIG_CMA102		32MB ram, 2 ser, 1 par, rtc, dipsw,
					2x16 lcd
CMA111		CONFIG_CMA111		32MB ram, 1MB flash, 4 ser, 1 par,
					rtc, ps/2 kbd/mse, 2x16 lcd, 2xPCI,
					10/100TP eth
CMA120		CONFIG_CMA120		32MB ram, 1MB flash, 4 ser, 1 par,
					rtc, ps/2 kbd/mse, 2x16 lcd, 2xPCI,
					10/100TP eth, 2xPCMCIA, video/lcd-panel
CMA150		CONFIG_CMA150		8MB ram, 1MB flash, 2 ser, 1 par, rtc,
					ps/2 kbd/mse, 2x16 lcd

The possible Cogent PowerPC CPU modules are:

Code		Config Variable		Description
----		---------------		-----------

CMA278-603EV	CONFIG_CMA278_603EV	PPC603ev CPU, 66MHz clock, 512K EPROM,
					JTAG/COP
CMA278-603ER	CONFIG_CMA278_603ER	PPC603er CPU, 66MHz clock, 512K EPROM,
					JTAG/COP
CMA278-740	CONFIG_CMA278_740	PPC740 CPU, 66MHz clock, 512K EPROM,
					JTAG/COP
CMA280-509	CONFIG_CMA280_509	MPC505/509 CPU, 50MHz clock,
					512K EPROM, BDM
CMA282		CONFIG_CMA282		MPC8260 CPU, 66MHz clock, 512K EPROM,
					JTAG, 16M RAM, 1 x ser (SMC2),
					1 x 10baseT PHY (SCC4), 1 x 10/100 TP
					PHY (FCC1), 2 x 48pin DIN (FCC2 + TDM1)
CMA285		CONFIG_CMA285		MPC801 CPU, 33MHz clock, 512K EPROM,
					BDM
CMA286-21	CONFIG_CMA286_21	MPC821 CPU, 66MHz clock, 512K EPROM,
					BDM, 16M RAM, 2 x ser (SMC1 + SMC2),
					1 x 10baseT PHY (SCC2)
CMA286-60-OLD	CONFIG_CMA286_60_OLD	MPC860 CPU, 33MHz clock, 128K EPROM,
					BDM
CMA286-60	CONFIG_CMA286_60	MPC860 CPU, 66MHz clock, 512K EPROM,
					BDM, 16M RAM, 2 x ser (SMC1 + SMC2),
					1 x 10baseT PHY (SCC2)
CMA286-60P	CONFIG_CMA286_60P	MPC860P CPU, 66MHz clock, 512K EPROM,
					BDM, 16M RAM, 2 x ser (SMC1 + SMC2),
					1 x 10baseT PHY (SCC2)
CMA287-23	CONFIG_CMA287_23	MPC823 CPU, 33MHz clock, 512K EPROM,
					BDM
CMA287-50	CONFIG_CMA287_50	MPC850 CPU, 33MHz clock, 512K EPROM,
					BDM

(there are a lot of other cpu modules with ARM, MIPS and M-CORE CPUs,
but we'll worry about those later).

The possible Cogent CMA I/O Modules are:

Code		Config Variable		Description
----		---------------		-----------

CMA302		CONFIG_CMA302		up to 16M flash, ps/2 keyboard/mouse
CMA352		CONFIG_CMA352		CMAbus <=> PCI

Currently supported:

	Motherboards:	CMA102
	CPU Modules:	CMA286-60-OLD
	I/O Modules:	CMA302 I/O module

To configure, perform the usual U-Boot configuration task of editing
"include/config_cogent_mpc8xx.h" and reviewing all the options and
settings in there. In particular, check the chip select values
installed into the memory controller's various option and base
registers - these are set by the defines CONFIG_SYS_CMA_CSn_{BASE,SIZE} and
CONFIG_SYS_{B,O}Rn_PRELIM. Also be careful of the clock settings installed
into the SCCR - via the define CONFIG_SYS_SCCR. Finally, decide whether you
want the serial console on motherboard serial port A or on one of the
8xx SMC ports, and set CONFIG_8xx_CONS_{SMC1,SMC2,NONE} accordingly
(NONE means use Cogent motherboard serial port A).

Then edit the file "cogent/config.mk". Firstly, set TEXT_BASE to be
the base address of the EPROM for the CPU module. This should be the
same as the value selected for CONFIG_SYS_MONITOR_BASE in
"include/config_cogent_*.h" (in fact, I have made this automatic via
the -DTEXT_BASE=... option in CPPFLAGS).

Finally, set the values of the make variables $(CMA_MB) and $(CMA_IOMS).

$(CMA_MB) is the name of the directory that contains support for your
motherboard. At this stage, only "cma10x" exists, which supports the
CMA101 and CMA102 motherboards - but only selected devices, namely
serial, lcd and dipsw.

$(CMA_IOMS) is a list of zero or more directories that contain
support for the i/o modules you have installed. At this stage, only
"cma302" exists, which supports the CMA302 flash i/o module - but
only the flash part, not the ps/2 keyboard and mouse interfaces.

There should be a make variable for each of the above directories,
which is the directory name with "_O" appended. This make variable is
a list of object files to compile from that directory and include in
the library.

	e.g. cma10x_O = serial.o ...

That's it. Good Luck.

Murray.Jensen@cmst.csiro.au
August 31, 2000.