i.MX31: Add some enums and a couple helper functions to make dealing with pin muxing...
[kugel-rb.git] / firmware / target / arm / imx31 / boot.lds
blobe08b4bfb7a356f36b40416c27f62ce37c710b945
1 #include "config.h"
2 #include "imx31l.h"
4 ENTRY(start)
5 OUTPUT_FORMAT(elf32-littlearm)
6 OUTPUT_ARCH(arm)
7 STARTUP(target/arm/imx31/crt0.o)
9 #define DRAMSIZE (1 << 20) /* Limit 1 MB for bootloader */
11 #define DRAMORIG  0x02000000
12 /* #define IRAMORIG 0x1FFFC000 */
13 #define IRAM      DRAM
14 #define IRAMSIZE  IRAM_SIZE
15 #define IRAMORIG  DRAMORIG
16 #define FLASHORIG 0x0000000
17 #define FLASHSIZE 1M
19 MEMORY
21    DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
22    DEVBSS : ORIGIN = CSD0_BASE_ADDR + (MEMORYSIZE*0x100000 - 0x100000), \
23             LENGTH = 0x100000 - FRAME_SIZE - TTB_SIZE
26 SECTIONS
28     . = DRAMORIG;
30     .text :
31     {
32         *(.init.text)
33         *(.text*)
34         *(.icode)
35         *(.glue_7)
36         *(.glue_7t)
37         . = ALIGN(0x4);
38     } > DRAM
40     .rodata :
41     {
42         *(.rodata)  /* problems without this, dunno why */
43         *(.rodata*)
44         *(.rodata.str1.1)
45         *(.rodata.str1.4)
46         . = ALIGN(0x4);
48         /* Pseudo-allocate the copies of the data sections */
49         _datacopy = .;
50     } > DRAM
52     .data :
53     {
54         *(.irodata)
55         *(.idata)
56         *(.data*)
57         . = ALIGN(0x4);
58         *(.sdmacode)
59         . = ALIGN(0x4);
60         _dataend = . ;
61     } > DRAM
62     
63     .vectors 0x0 :
64     {
65         _vectorsstart = .;
66         *(.vectors);
67         KEEP(*(.vectors));
68         _vectorsend = .;
69     } AT > DRAM
70     _vectorscopy = LOADADDR(.vectors);
72     .stack (NOLOAD) :
73     {
74         *(.stack)
75         _stackbegin = .;
76         stackbegin = .;
77         . += 0x2000;
78         _stackend = .;
79         stackend = .;
80     } > IRAM
82     .bss (NOLOAD) :
83     {
84          _edata = .;
85          *(.bss*);
86          *(.ibss);
87          *(COMMON)
88          _end = .;
89     } > DRAM
90    
91     .devbss (NOLOAD) :
92     {
93         _devbssdata = .;
94         *(.qharray)
95         *(.devbss*)
96         _devbssend = .;
97     } > DEVBSS