Remove the calls to backlight_lcd_sleep_countdown from target specific code and move...
[kugel-rb.git] / firmware / target / arm / tms320dm320 / app.lds
blob14b44153a65cfefcca53084c274c2cb8e56f74f8
1 #include "config.h"
3 ENTRY(start)
5 OUTPUT_FORMAT(elf32-littlearm)
6 OUTPUT_ARCH(arm)
7 STARTUP(target/arm/tms320dm320/crt0.o)
9 #ifdef DEBUG
10 #define STUBOFFSET 0x10000
11 #else
12 #define STUBOFFSET 0
13 #endif
15 #ifndef LCD_NATIVE_WIDTH
16 #define LCD_NATIVE_WIDTH LCD_WIDTH
17 #endif
19 #ifndef LCD_NATIVE_HEIGHT
20 #define LCD_NATIVE_HEIGHT LCD_HEIGHT
21 #endif
23 #define LCD_FUDGE       LCD_NATIVE_WIDTH%32
25 #define LCD_BUFFER_SIZE  ((LCD_NATIVE_WIDTH+LCD_FUDGE)*LCD_NATIVE_HEIGHT*2)
27 /* must be 16Kb (0x4000) aligned */
28 #define TTB_SIZE        0x4000
30 /* Give this some memory to allow it to align to the MMU boundary.
31  * Note that since there are two buffers (YUV/RGB) it calculates the approximate
32  * memory needed in steps of 1 Meg.
33  */
34 #define LCD_TTB_AREA    0x100000*((LCD_BUFFER_SIZE>>19)+1)
36 #define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET
38 #define DRAMORIG        0x00900000 + STUBOFFSET
39 #define IRAMORIG        0x00000000
40 #define IRAMSIZE        0x4000
42 /* End of the audio buffer, where the codec buffer starts */
43 #define ENDAUDIOADDR  (DRAMORIG + DRAMSIZE - PLUGIN_BUFFER_SIZE - CODEC_SIZE - LCD_TTB_AREA)
45 MEMORY
47     DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
48     IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
51 SECTIONS
53     .text :
54     {
55         loadaddress = .;
56         _loadaddress = .;
57         *(.init.text)
58         *(.text*)
59         *(.glue_7)
60         *(.glue_7t)
61         . = ALIGN(0x4);
62     } > DRAM
64     .rodata :
65     {
66         *(.rodata)  /* problems without this, dunno why */
67         *(.rodata*)
68         *(.rodata.str1.1)
69         *(.rodata.str1.4)
70         . = ALIGN(0x4);
71     } > DRAM
73     .data : 
74     {
75         *(.data*)
76         . = ALIGN(0x4);
77     } > DRAM
79     /DISCARD/ :
80     {
81         *(.eh_frame)
82     }
84     .vectors IRAMORIG :
85     {
86         _vectorsstart = .;
87         *(.vectors);
88         _vectorsend = .;
89     } > IRAM AT> DRAM
91     _vectorscopy = LOADADDR(.vectors);
93     .iram :
94     {
95         _iramstart = .;
96         *(.icode)
97         *(.irodata*)
98         *(.idata)
99         . = ALIGN(0x4);
100         _iramend = .;
101     } > IRAM AT> DRAM
103     _iramcopy = LOADADDR(.iram);
104     
105     .ibss (NOLOAD) :
106     {
107         _iedata = .;
108         *(.ibss)
109         . = ALIGN(0x4);
110         _iend = .;
111     } > IRAM
113     .stack (NOLOAD) :
114     {
115        *(.stack)
116        stackbegin = .;
117        . += 0x2000;
118        stackend = .;
119     } > IRAM
120     
121     /* This could probably be shortened so that the audio buffer overwrites
122      * at the IRAM stuff (assuming that it is copied first in crt0.S), but
123      * leave it for now since the space is not critical at the moment.
124      */
125         .bss (NOLOAD) :
126     {
127         . = ADDR(.data) + SIZEOF(.data) + SIZEOF(.vectors) + SIZEOF(.iram);
128         _edata = .;
129         *(.bss*)
130         *(COMMON)
131         . = ALIGN(0x4);
132         _end = .;
133     } > DRAM
134     
136     .audiobuf (NOLOAD) :
137     {
138         . = ALIGN(4);
139         _audiobuffer = .;
140         audiobuffer = .;
141     } > DRAM
143     .audiobufend ENDAUDIOADDR (NOLOAD) :
144     {
145         audiobufend = .;
146         _audiobufend = .;
147     } > DRAM
149     .codec ENDAUDIOADDR (NOLOAD) :
150     {
151         codecbuf = .;
152         _codecbuf = .;
153         . += CODEC_SIZE;
154     } > DRAM
156     .plugin (NOLOAD) :
157     {
158         _pluginbuf = .;
159         pluginbuf = .;
160         . += PLUGIN_BUFFER_SIZE;
161     } > DRAM
162     
163     .ttbtable (NOLOAD) :
164     {
165         . = ALIGN (0x4000);
166         _ttbstart = .;
167         . += TTB_SIZE;
168     } > DRAM
169     
170     /* The LCD buffer should be at the end of memory to protect against
171      * overflowing something else when the YUV blitter is fudging the screen 
172      * size.
173      */
174     
175     .lcdbuffer (NOLOAD) :
176     {
177         _lcdbuf = .;
178         . += LCD_BUFFER_SIZE;
179     } > DRAM
180     
181     .lcdbuffer2 (NOLOAD) :
182     {
183         _lcdbuf2 = .;
184         . += LCD_BUFFER_SIZE;
185     } > DRAM