]> Git Repo - J-u-boot.git/blame - doc/arch/m68k.rst
Merge tag 'u-boot-imx-master-20250127' of https://gitlab.denx.de/u-boot/custodians...
[J-u-boot.git] / doc / arch / m68k.rst
CommitLineData
86f60a41
BM
1.. SPDX-License-Identifier: GPL-2.0+
2
3M68K / ColdFire
4===============
5
6History
7-------
0e685058 8* November 02, 2017 Angelo Dureghello <[email protected]>
86f60a41
BM
9* August 08, 2005 Jens Scharsig <[email protected]>
10 MCF5282 implementation without preloader
11* January 12, 2004 <[email protected]>
12
13This file contains status information for the port of U-Boot to the
14Motorola ColdFire series of CPUs.
15
16Overview
17--------
18
19The ColdFire instruction set is "assembly source" compatible but an evolution
20of the original 68000 instruction set. Some not much used instructions has
21been removed. The instructions are only 16, 32, or 48 bits long, a
22simplification compared to the 68000 series.
23
24Bernhard Kuhn ported U-Boot 0.4.0 to the Motorola ColdFire architecture.
25The patches of Bernhard support the MCF5272 and MCF5282. A great disadvantage
26of these patches was that they needed a pre-bootloader to start U-Boot.
27Because of this, a new port was created which no longer needs a first stage
28booter.
29
30Thanks mainly to Freescale but also to several other contributors, U-Boot now
31supports nearly the entire range of ColdFire processors and their related
32development boards.
33
34
35Supported CPU families
36----------------------
37
ee67ec98 38Please "make menuconfig" and select "m68k" or check arch/m68k/cpu to see the
86f60a41
BM
39currently supported processor and families.
40
41
42Supported boards
43----------------
44
45U-Boot supports actually more than 40 ColdFire based boards.
46Board configuration can be done trough include/configs/<boardname>.h but the
47current recommended method is to use the new and more friendly approach as
48the "make menuconfig" way, very similar to the Linux way.
49
50To know details as memory map, build targets, default setup, etc, of a
51specific board please check:
52
53* include/configs/<boardname>.h
54
55and/or
56
57* configs/<boardname>_defconfig
58
59It is possible to build all ColdFire boards in a single command-line command,
60from u-boot root directory, as::
61
62 ./tools/buildman/buildman m68k
63
64Build U-Boot for a specific board
65^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
67A bash script similar to the one below may be used:
68
69.. code-block:: shell
70
71 #!/bin/bash
72
73 export CROSS_COMPILE=/opt/toolchains/m68k/gcc-4.9.0-nolibc/bin/m68k-linux-
74
9b7993bb 75 board=M5249EVB
86f60a41
BM
76
77 make distclean
ee67ec98
TR
78 make ${board}_defconfig
79 make KBUILD_VERBOSE=1
86f60a41
BM
80
81
82Adopted toolchains
83------------------
84
6638f3a9
TR
85Currently the `kernel.org cross-development toolchains
86<https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/>`_ are
87used in the project CI builds.
86f60a41
BM
88
89ColdFire specific configuration options/settings
90------------------------------------------------
91
92Configuration to use a pre-loader
93^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94
95If U-Boot should be loaded to RAM and started by a pre-loader
e52fca22 96CONFIG_MONITOR_IS_IN_RAM must be enabled. If it is enabled the
86f60a41
BM
97initial vector table and basic processor initialization will not
98be compiled in. The start address of U-Boot must be adjusted in
e52fca22 99the boards defconfig file (CONFIG_SYS_MONITOR_BASE) and Makefile
98463903 100(CONFIG_TEXT_BASE) to the load address.
86f60a41
BM
101
102ColdFire CPU specific options/settings
103^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104
105To specify a CPU model, some defines shoudl be used, i.e.:
106
107CONFIG_MCF52x2:
108 defined for all MCF52x2 CPUs
109CONFIG_M5272:
110 defined for all Motorola MCF5272 CPUs
111
112Other options, generally set inside include/configs/<boardname>.h, they may
113apply to one or more cpu for the ColdFire family:
114
65cc0e2a 115CFG_SYS_MBAR:
86f60a41 116 defines the base address of the MCF5272 configuration registers
65cc0e2a 117CFG_SYS_SCR:
86f60a41 118 defines the contents of the System Configuration Register
65cc0e2a 119CFG_SYS_SPR:
86f60a41 120 defines the contents of the System Protection Register
65cc0e2a 121CFG_SYS_MFD:
86f60a41
BM
122 defines the PLL Multiplication Factor Divider
123 (see table 9-4 of MCF user manual)
65cc0e2a 124CFG_SYS_RFD:
86f60a41
BM
125 defines the PLL Reduce Frequency Devider
126 (see table 9-4 of MCF user manual)
127CONFIG_SYS_CSx_BASE:
128 defines the base address of chip select x
129CONFIG_SYS_CSx_SIZE:
130 defines the memory size (address range) of chip select x
131CONFIG_SYS_CSx_WIDTH:
132 defines the bus with of chip select x
133CONFIG_SYS_CSx_MASK:
134 defines the mask for the related chip select x
135CONFIG_SYS_CSx_RO:
136 if set to 0 chip select x is read/write else chip select is read only
137CONFIG_SYS_CSx_WS:
138 defines the number of wait states of chip select x
65cc0e2a 139CFG_SYS_CACHE_ICACR:
86f60a41 140 cache-related registers config
65cc0e2a 141CFG_SYS_CACHE_DCACR:
86f60a41
BM
142 cache-related registers config
143CONFIG_SYS_CACHE_ACRX:
144 cache-related registers config
aa6e94de 145CFG_SYS_SDRAM_BASE:
86f60a41 146 SDRAM config for SDRAM controller-specific registers
aa6e94de 147CFG_SYS_SDRAM_SIZE:
86f60a41 148 SDRAM config for SDRAM controller-specific registers
aa6e94de 149CFG_SYS_SDRAM_BASEX:
86f60a41 150 SDRAM config for SDRAM controller-specific registers
aa6e94de 151CFG_SYS_SDRAM_CFG1:
86f60a41 152 SDRAM config for SDRAM controller-specific registers
aa6e94de 153CFG_SYS_SDRAM_CFG2:
86f60a41 154 SDRAM config for SDRAM controller-specific registers
aa6e94de 155CFG_SYS_SDRAM_CTRL:
86f60a41 156 SDRAM config for SDRAM controller-specific registers
aa6e94de 157CFG_SYS_SDRAM_MODE:
86f60a41 158 SDRAM config for SDRAM controller-specific registers
aa6e94de 159CFG_SYS_SDRAM_EMOD:
86f60a41
BM
160 SDRAM config for SDRAM controller-specific registers, please
161 see arch/m68k/cpu/<specific_cpu>/start.S files to see how
162 these options are used.
163CONFIG_MCFUART:
164 defines enabling of ColdFire UART driver
65cc0e2a 165CFG_SYS_UART_PORT:
86f60a41 166 defines the UART port to be used (only a single UART can be actually enabled)
65cc0e2a 167CFG_SYS_SBFHDR_SIZE:
86f60a41 168 size of the prepended SBF header, if any
This page took 0.192462 seconds and 5 git commands to generate.