wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 1 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 2 | U-Boot for Motorola (or Freescale/NXP) ColdFire processors |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 3 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 4 | =============================================================================== |
Heiko Schocher | 9acb626 | 2006-04-20 08:42:42 +0200 | [diff] [blame] | 5 | History |
| 6 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 7 | November 02, 2017 Angelo Dureghello <angelo@sysam.it> |
| 8 | August 08, 2005 Jens Scharsig <esw@bus-elektronik.de> |
Heiko Schocher | 9acb626 | 2006-04-20 08:42:42 +0200 | [diff] [blame] | 9 | MCF5282 implementation without preloader |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 10 | January 12, 2004 <josef.baumgartner@telex.de> |
| 11 | =============================================================================== |
| 12 | |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 13 | |
| 14 | This file contains status information for the port of U-Boot to the |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 15 | Motorola ColdFire series of CPUs. |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 16 | |
| 17 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 18 | 1. Overview |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 19 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 20 | The ColdFire instruction set is "assembly source" compatible but an evolution |
| 21 | of the original 68000 instruction set. Some not much used instructions has |
| 22 | been removed. The instructions are only 16, 32, or 48 bits long, a |
| 23 | simplification compared to the 68000 series. |
| 24 | |
| 25 | Bernhard Kuhn ported U-Boot 0.4.0 to the Motorola ColdFire architecture. |
| 26 | The patches of Bernhard support the MCF5272 and MCF5282. A great disadvantage |
| 27 | of these patches was that they needed a pre-bootloader to start U-Boot. |
| 28 | Because of this, a new port was created which no longer needs a first stage |
| 29 | booter. |
| 30 | |
| 31 | Thanks mainly to Freescale but also to several other contributors, U-Boot now |
| 32 | supports nearly the entire range of ColdFire processors and their related |
| 33 | development boards. |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 34 | |
| 35 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 36 | 2. Supported CPU families |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 37 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 38 | Please "make menuconfig" with ARCH=m68k, or check arch/m68k/cpu to see the |
| 39 | currently supported processor and families. |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 40 | |
| 41 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 42 | 3. Supported boards |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 43 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 44 | U-Boot supports actually more than 40 ColdFire based boards. |
| 45 | Board configuration can be done trough include/configs/<boardname>.h but the |
| 46 | current recommended method is to use the new and more friendly approach as |
| 47 | the "make menuconfig" way, very similar to the Linux way. |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 48 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 49 | To know details as memory map, build targets, default setup, etc, of a |
| 50 | specific board please check: |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 51 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 52 | include/configs/<boardname>.h |
| 53 | and/or |
| 54 | configs/<boardname>_defconfig |
| 55 | |
| 56 | It is possible to build all ColdFire boards in a single command-line command, |
| 57 | from u-boot root directory, as: |
| 58 | |
| 59 | ./tools/buildman/buildman m68k |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 60 | |
| 61 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 62 | 3.1. Build U-Boot for a specific board |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 63 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 64 | A bash script similar to the one below may be used: |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 65 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 66 | #!/bin/bash |
Heiko Schocher | 9acb626 | 2006-04-20 08:42:42 +0200 | [diff] [blame] | 67 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 68 | export CROSS_COMPILE=/opt/toolchains/m68k/gcc-4.9.0-nolibc/bin/m68k-linux- |
Heiko Schocher | 9acb626 | 2006-04-20 08:42:42 +0200 | [diff] [blame] | 69 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 70 | board=M5475DFE |
Heiko Schocher | 9acb626 | 2006-04-20 08:42:42 +0200 | [diff] [blame] | 71 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 72 | make distclean |
| 73 | make ARCH=m68k ${board}_defconfig |
| 74 | make ARCH=m68k KBUILD_VERBOSE=1 |
Heiko Schocher | 9acb626 | 2006-04-20 08:42:42 +0200 | [diff] [blame] | 75 | |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 76 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 77 | 4. Adopted toolchains |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 78 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 79 | Please check: |
| 80 | https://www.denx.de/wiki/U-Boot/ColdFireNotes |
| 81 | |
| 82 | |
| 83 | 5. ColdFire specific configuration options/settings |
| 84 | |
| 85 | |
| 86 | 5.1. Configuration to use a pre-loader |
| 87 | |
Bin Meng | a187559 | 2016-02-05 19:30:11 -0800 | [diff] [blame] | 88 | If U-Boot should be loaded to RAM and started by a pre-loader |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 89 | CONFIG_MONITOR_IS_IN_RAM must be defined. If it is defined the |
| 90 | initial vector table and basic processor initialization will not |
Bin Meng | a187559 | 2016-02-05 19:30:11 -0800 | [diff] [blame] | 91 | be compiled in. The start address of U-Boot must be adjusted in |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 92 | the boards config header file (CONFIG_SYS_MONITOR_BASE) and Makefile |
Wolfgang Denk | 14d0a02 | 2010-10-07 21:51:12 +0200 | [diff] [blame] | 93 | (CONFIG_SYS_TEXT_BASE) to the load address. |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 94 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 95 | |
| 96 | 5.2 ColdFire CPU specific options/settings |
| 97 | |
| 98 | To specify a CPU model, some defines shoudl be used, i.e.: |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 99 | |
| 100 | CONFIG_MCF52x2 -- defined for all MCF52x2 CPUs |
| 101 | CONFIG_M5272 -- defined for all Motorola MCF5272 CPUs |
| 102 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 103 | Other options, generally set inside include/configs/<boardname>.h, they may |
| 104 | apply to one or more cpu for the ColdFire family: |
wdenk | bf9e3b3 | 2004-02-12 00:47:09 +0000 | [diff] [blame] | 105 | |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 106 | CONFIG_SYS_MBAR -- defines the base address of the MCF5272 configuration |
| 107 | registers |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 108 | CONFIG_SYS_ENET_BD_BASE |
Mike Williams | 1626308 | 2011-07-22 04:01:30 +0000 | [diff] [blame] | 109 | -- defines the base address of the FEC buffer descriptors |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 110 | CONFIG_SYS_SCR -- defines the contents of the System Configuration Register |
| 111 | CONFIG_SYS_SPR -- defines the contents of the System Protection Register |
| 112 | CONFIG_SYS_MFD -- defines the PLL Multiplication Factor Divider |
Heiko Schocher | 9acb626 | 2006-04-20 08:42:42 +0200 | [diff] [blame] | 113 | (see table 9-4 of MCF user manual) |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 114 | CONFIG_SYS_RFD -- defines the PLL Reduce Frequency Devider |
Heiko Schocher | 9acb626 | 2006-04-20 08:42:42 +0200 | [diff] [blame] | 115 | (see table 9-4 of MCF user manual) |
Angelo Dureghello | 6ba2da9 | 2017-11-03 01:35:34 +0100 | [diff] [blame] | 116 | CONFIG_SYS_CSx_BASE |
| 117 | -- defines the base address of chip select x |
| 118 | CONFIG_SYS_CSx_SIZE |
| 119 | -- defines the memory size (address range) of chip select x |
| 120 | CONFIG_SYS_CSx_WIDTH |
| 121 | -- defines the bus with of chip select x |
| 122 | CONFIG_SYS_CSx_MASK |
| 123 | -- defines the mask for the related chip select x |
| 124 | CONFIG_SYS_CSx_RO |
| 125 | -- if set to 0 chip select x is read/write else chip select |
| 126 | is read only |
| 127 | CONFIG_SYS_CSx_WS |
| 128 | -- defines the number of wait states of chip select x |
| 129 | CONFIG_SYS_CACHE_ICACR |
| 130 | CONFIG_SYS_CACHE_DCACR |
| 131 | CONFIG_SYS_CACHE_ACRX |
| 132 | -- cache-related registers config |
| 133 | CONFIG_SYS_SDRAM_BASE |
| 134 | CONFIG_SYS_SDRAM_SIZE |
| 135 | CONFIG_SYS_SDRAM_BASEX |
| 136 | CONFIG_SYS_SDRAM_CFG1 |
| 137 | CONFIG_SYS_SDRAM_CFG2 |
| 138 | CONFIG_SYS_SDRAM_CTRL |
| 139 | CONFIG_SYS_SDRAM_MODE |
| 140 | CONFIG_SYS_SDRAM_EMOD |
| 141 | -- SDRAM config for SDRAM controller-specific registers, please |
| 142 | see arch/m68k/cpu/<specific_cpu>/start.S files to see how |
| 143 | these options are used. |
| 144 | CONFIG_MCFUART |
| 145 | -- defines enabling of ColdFire UART driver |
| 146 | CONFIG_SYS_UART_PORT |
| 147 | -- defines the UART port to be used (only a single UART can be |
| 148 | actually enabled) |
| 149 | CONFIG_SYS_SBFHDR_SIZE |
| 150 | -- size of the prepended SBF header, if any |