Add basic support for mini2440 board to barebox.
[barebox-mini2440.git] / arch / arm / mach-arm.dox
blob758df3f5415e57b3279aae1f811a54f4b66d0114
1 /* This document is intended to provide the developer with information
2  * how to integrate a new CPU (MACH) into this part of the barebox tree
3  */
5 /** @page dev_arm_mach ARM based CPU (MACH) into the tree
7 FIXME
9 @section mach_arm_reset What's happens when the reset signal is gone
11 @note Code running immediately after reset runs at an address it is not linked
12       to: "runtime address != link address". You should only use branches and
13       do not refer to fixed data. This implies the use of assembler code only.
15 The ARM CPU starts at lable \<reset\> in one of the corresponding start-*.S
16 files. After some basic hardware setup it can call a function
17 \<arch_init_lowlevel\> if not disabled. This call is intended to give all
18 developers a chance to use a standard reset vector file, but also do some
19 special things required only on their specific CPU.
21 After handling some MMU related things \<board_init_lowlevel\> can be called (if
22 not disabled). This is a board specific function for SDRAM setup for example.
23 As its board specific, your can do whatever you need to bring your board up.
25 In the case the boot happens from NAND flash memory, further steps are required.
26 Most of the known processor devices are reading the first few blocks from the
27 NAND flash memory into some kind of internal SRAM. This small part must be able
28 to initialize the SDRAM controller and to read the remaining rest of the
29 barebox binary from the NAND flash memory prior returning from \<board_init_lowlevel\>.
31 When \<board_init_lowlevel\> returns it will be assumed there is now a working
32 RAM that can be used for all further steps.
34 Next step is relocation of @a barebox itself (if not already done). It gets copied
35 to RAM and the last assembler instruction is a jump into start_barebox(). This
36 target address is the first C instruction in barebox. At this point of time:\n
37 "runtime address == link address".
39 @section mach_arm_files List of changes
41 Lets call the new MACH new_cpu.
43  - create a new subdirectory in /arch/arm/mach-new_cpu
44  - create a new subdirectory in /arch/arm/mach-new_cpu/include
45  - add CPU specific definitions into /arch/arm/mach-new_cpu/include
46  - add /arch/arm/mach-new_cpu/Kconfig
47  - add /arch/arm/mach-new_cpu/Makfile
48  - add other CPU specific code into /arch/arm/mach-new_cpu/
49  - modify /arch/arm/Kconfig
50  - modify /arch/arm/Makfile
52 @section mach_arm_architecures Architectures using ARM processors
53 For details on specific architectures:
55 @subsection mach_arm_omap_info OMAP CPUs
57 @li @subpage dev_omap_arch
59 @subsection mach_arm_s3c24xx_info S3C24XX CPUs
61 @li @subpage dev_s3c24xx_arch
63 TODO add more details