Enable ARM ASM optimzations on android. Speedup in codecs ranges from 20% to 150...
[kugel-rb.git] / firmware / export / config.h
blob6b64137b432eabb729071bf4fd3975bbe2e1fb5c
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Daniel Stenberg
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef __CONFIG_H__
23 #define __CONFIG_H__
25 #include "autoconf.h"
27 /* symbolic names for multiple choice configurations: */
29 /* CONFIG_STORAGE (note these are combineable bit-flags) */
30 #define STORAGE_ATA 0x01
31 #define STORAGE_MMC 0x02
32 #define STORAGE_SD 0x04
33 #define STORAGE_NAND 0x08
34 #define STORAGE_RAMDISK 0x10
36 /* CONFIG_TUNER (note these are combineable bit-flags) */
37 #define S1A0903X01 0x01 /* Samsung */
38 #define TEA5767 0x02 /* Philips */
39 #define LV24020LP 0x04 /* Sanyo */
40 #define SI4700 0x08 /* Silicon Labs */
41 #define TEA5760 0x10 /* Philips */
42 #define LV240000 0x20 /* Sanyo */
43 #define IPOD_REMOTE_TUNER 0x40 /* Apple */
44 #define RDA5802 0x80 /* RDA Microelectronics */
46 /* CONFIG_CODEC */
47 #define MAS3587F 3587
48 #define MAS3507D 3507
49 #define MAS3539F 3539
50 #define SWCODEC 1 /* if codec is done by SW */
52 /* CONFIG_CPU */
53 #define SH7034 7034
54 #define MCF5249 5249
55 #define MCF5250 5250
56 #define PP5002 5002
57 #define PP5020 5020
58 #define PP5022 5022
59 #define PP5024 5024
60 #define PP6100 6100
61 #define PNX0101 101
62 #define S3C2440 2440
63 #define DSC25 25
64 #define DM320 320
65 #define IMX31L 31
66 #define TCC770 770
67 #define TCC771L 771
68 #define TCC773L 773
69 #define TCC7801 7801
70 #define S5L8700 8700
71 #define S5L8701 8701
72 #define JZ4732 4732
73 #define AS3525 3525
74 #define AT91SAM9260 9260
75 #define AS3525v2 35252
77 /* platforms
78 * bit fields to allow PLATFORM_HOSTED to be OR'ed e.g. with a
79 * possible future PLATFORM_ANDROID (some OSes might need totally different
80 * handling to run on them than a stand-alone application) */
81 #define PLATFORM_NATIVE (1<<0)
82 #define PLATFORM_HOSTED (1<<1)
83 #define PLATFORM_ANDROID (1<<2)
84 #define PLATFORM_SDL (1<<3)
86 /* CONFIG_KEYPAD */
87 #define PLAYER_PAD 1
88 #define RECORDER_PAD 2
89 #define ONDIO_PAD 3
90 #define IRIVER_H100_PAD 4
91 #define IRIVER_H300_PAD 5
92 #define IAUDIO_X5M5_PAD 6
93 #define IPOD_4G_PAD 7
94 #define IPOD_3G_PAD 8
95 #define IPOD_1G2G_PAD 9
96 #define IRIVER_IFP7XX_PAD 10
97 #define GIGABEAT_PAD 11
98 #define IRIVER_H10_PAD 12
99 #define SANSA_E200_PAD 13
100 #define SANSA_C200_PAD 14
101 #define TATUNG_TPJ1022_PAD 15
102 #define ARCHOS_AV300_PAD 16
103 #define MROBE100_PAD 17
104 #define MROBE500_PAD 18
105 #define GIGABEAT_S_PAD 19
106 #define LOGIK_DAX_PAD 20
107 #define IAUDIO67_PAD 21
108 #define COWON_D2_PAD 22
109 #define IAUDIO_M3_PAD 23
110 #define CREATIVEZVM_PAD 24
111 #define SANSA_M200_PAD 25
112 #define CREATIVEZV_PAD 26
113 #define PHILIPS_SA9200_PAD 27
114 #define SANSA_C100_PAD 28
115 #define PHILIPS_HDD1630_PAD 29
116 #define MEIZU_M6SL_PAD 30
117 #define ONDAVX747_PAD 31
118 #define ONDAVX767_PAD 32
119 #define MEIZU_M6SP_PAD 33
120 #define MEIZU_M3_PAD 34
121 #define SANSA_CLIP_PAD 35
122 #define SANSA_FUZE_PAD 36
123 #define LYRE_PROTO1_PAD 37
124 #define SAMSUNG_YH_PAD 38
125 #define ONDAVX777_PAD 39
126 #define SAMSUNG_YPS3_PAD 40
127 #define MINI2440_PAD 41
128 #define PHILIPS_HDD6330_PAD 42
129 #define PBELL_VIBE500_PAD 43
130 #define MPIO_HD200_PAD 44
131 #define ANDROID_PAD 45
132 #define SDL_PAD 46
133 #define MPIO_HD300_PAD 47
135 /* CONFIG_REMOTE_KEYPAD */
136 #define H100_REMOTE 1
137 #define H300_REMOTE 2
138 #define IAUDIO_REMOTE 3
139 #define MROBE_REMOTE 4
141 /* CONFIG_BACKLIGHT_FADING */
142 /* No fading capabilities at all (yet) */
143 #define BACKLIGHT_NO_FADING 0x0
144 /* Backlight fading is controlled using a hardware PWM mechanism */
145 #define BACKLIGHT_FADING_PWM 0x1
146 /* Backlight is controlled using a software implementation
147 * BACKLIGHT_FADING_SW_SETTING means that backlight is turned on by only setting
148 * the brightness (i.e. no real difference between backlight_on and
149 * backlight_set_brightness)
150 * BACKLIGHT_FADING_SW_HW_REG means that backlight brightness is restored
151 * "in hardware", from a hardware register upon backlight_on
152 * Both types need to have minor adjustments in the software fading code */
153 #define BACKLIGHT_FADING_SW_SETTING 0x2
154 #define BACKLIGHT_FADING_SW_HW_REG 0x4
155 /* Backlight fading is done in a target specific way
156 * for example in hardware, but not controllable*/
157 #define BACKLIGHT_FADING_TARGET 0x8
159 /* CONFIG_CHARGING */
161 /* Generic types */
162 #define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging
163 * (CPU cannot read charger state but may read
164 * when power is plugged-in). */
165 #define CHARGING_MONITOR 2 /* Hardware controlled charging with monitoring
166 * (CPU is able to read HW charging state and
167 * when power is plugged-in). */
169 /* Mostly target-specific code in the /target tree */
170 #define CHARGING_TARGET 3 /* Any algorithm - usually software controlled
171 * charging or specific programming is required to
172 * use the charging hardware. */
174 /* CONFIG_LCD */
175 #define LCD_SSD1815 1 /* as used by Archos Recorders and Ondios */
176 #define LCD_SSD1801 2 /* as used by Archos Player/Studio */
177 #define LCD_S1D15E06 3 /* as used by iRiver H100 series */
178 #define LCD_H300 4 /* as used by iRiver H300 series, exact model name is
179 unknown at the time of this writing */
180 #define LCD_X5 5 /* as used by iAudio X5 series, exact model name is
181 unknown at the time of this writing */
182 #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */
183 #define LCD_IPODNANO 7 /* as used by iPod Nano */
184 #define LCD_IPODVIDEO 8 /* as used by iPod Video */
185 #define LCD_IPOD2BPP 9 /* as used by all fullsize greyscale iPods */
186 #define LCD_IPODMINI 10 /* as used by iPod Mini g1/g2 */
187 #define LCD_IFP7XX 11 /* as used by iRiver iFP 7xx/8xx */
188 #define LCD_GIGABEAT 12
189 #define LCD_H10_20GB 13 /* as used by iriver H10 20Gb */
190 #define LCD_H10_5GB 14 /* as used by iriver H10 5Gb */
191 #define LCD_TPJ1022 15 /* as used by Tatung Elio TPJ-1022 */
192 #define LCD_DSC25 16 /* as used by Archos AV300 */
193 #define LCD_C200 17 /* as used by Sandisk Sansa c200 */
194 #define LCD_MROBE500 18 /* as used by Olympus M:Robe 500i */
195 #define LCD_MROBE100 19 /* as used by Olympus M:Robe 100 */
196 #define LCD_LOGIKDAX 20 /* as used by Logik DAX - SSD1815 */
197 #define LCD_IAUDIO67 21 /* as used by iAudio 6/7 - unknown */
198 #define LCD_CREATIVEZVM 22 /* as used by Creative Zen Vision:M */
199 #define LCD_TL0350A 23 /* as used by the iAudio M3 remote, treated as main LCD */
200 #define LCD_COWOND2 24 /* as used by Cowon D2 - LTV250QV, TCC7801 driver */
201 #define LCD_SA9200 25 /* as used by the Philips SA9200 */
202 #define LCD_S6B33B2 26 /* as used by the Sansa c100 */
203 #define LCD_HDD1630 27 /* as used by the Philips HDD1630 */
204 #define LCD_MEIZUM6 28 /* as used by the Meizu M6SP and M6SL (various models) */
205 #define LCD_ONDAVX747 29 /* as used by the Onda VX747 */
206 #define LCD_ONDAVX767 30 /* as used by the Onda VX767 */
207 #define LCD_SSD1303 31 /* as used by the Sansa Clip */
208 #define LCD_FUZE 32 /* as used by the Sansa Fuze */
209 #define LCD_LYRE_PROTO1 33 /* as used by the Lyre prototype 1 */
210 #define LCD_YH925 34 /* as used by Samsung YH-925 (similar to the H10 20GB) */
211 #define LCD_VIEW 35 /* as used by the Sansa View */
212 #define LCD_NANO2G 36 /* as used by the iPod Nano 2nd Generation */
213 #define LCD_MINI2440 37 /* as used by the Mini2440 */
214 #define LCD_HDD6330 38 /* as used by the Philips HDD6330 */
215 #define LCD_VIBE500 39 /* as used by the Packard Bell Vibe 500 */
217 /* LCD_PIXELFORMAT */
218 #define HORIZONTAL_PACKING 1
219 #define VERTICAL_PACKING 2
220 #define HORIZONTAL_INTERLEAVED 3
221 #define VERTICAL_INTERLEAVED 4
222 #define RGB565 565
223 #define RGB565SWAPPED 3553
225 /* LCD_STRIDEFORMAT */
226 #define VERTICAL_STRIDE 1
227 #define HORIZONTAL_STRIDE 2
229 /* CONFIG_ORIENTATION */
230 #define SCREEN_PORTRAIT 0
231 #define SCREEN_LANDSCAPE 1
232 #define SCREEN_SQUARE 2
234 /* CONFIG_I2C */
235 #define I2C_NONE 0 /* For targets that do not use I2C - as the
236 Lyre prototype 1 */
237 #define I2C_PLAYREC 1 /* Archos Player/Recorder style */
238 #define I2C_ONDIO 2 /* Ondio style */
239 #define I2C_COLDFIRE 3 /* Coldfire style */
240 #define I2C_PP5002 4 /* PP5002 style */
241 #define I2C_PP5020 5 /* PP5020 style */
242 #define I2C_PNX0101 6 /* PNX0101 style */
243 #define I2C_S3C2440 7
244 #define I2C_PP5024 8 /* PP5024 style */
245 #define I2C_IMX31L 9
246 #define I2C_TCC77X 10
247 #define I2C_TCC780X 11
248 #define I2C_DM320 12 /* DM320 style */
249 #define I2C_S5L8700 13
250 #define I2C_JZ47XX 14 /* Ingenic Jz47XX style */
251 #define I2C_AS3525 15
253 /* CONFIG_LED */
254 #define LED_REAL 1 /* SW controlled LED (Archos recorders, player) */
255 #define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */
256 /* else HW controlled LED (iRiver H1x0) */
258 /* CONFIG_NAND */
259 #define NAND_IFP7XX 1
260 #define NAND_TCC 2
261 #define NAND_SAMSUNG 3
262 #define NAND_CC 4 /* ChinaChip */
264 /* CONFIG_RTC */
265 #define RTC_M41ST84W 1 /* Archos Recorder */
266 #define RTC_PCF50605 2 /* iPod 3G, 4G & Mini */
267 #define RTC_PCF50606 3 /* iriver H300 */
268 #define RTC_S3C2440 4
269 #define RTC_E8564 5 /* iriver H10 */
270 #define RTC_AS3514 6 /* Sandisk Sansa series */
271 #define RTC_DS1339_DS3231 7 /* h1x0 RTC mod */
272 #define RTC_IMX31L 8
273 #define RTC_RX5X348AB 9
274 #define RTC_TCC77X 10
275 #define RTC_TCC780X 11
276 #define RTC_MR100 12
277 #define RTC_MC13783 13 /* Freescale MC13783 PMIC */
278 #define RTC_S5L8700 14
279 #define RTC_S35390A 15
280 #define RTC_JZ47XX 16 /* Ingenic Jz47XX */
281 #define RTC_NANO2G 17 /* This seems to be a PCF5063x */
282 #define RTC_D2 18 /* Either PCF50606 or PCF50635 */
283 #define RTC_S35380A 19
285 /* USB On-the-go */
286 #define USBOTG_M66591 6591 /* M:Robe 500 */
287 #define USBOTG_ISP1362 1362 /* iriver H300 */
288 #define USBOTG_ISP1583 1583 /* Creative Zen Vision:M */
289 #define USBOTG_M5636 5636 /* iAudio X5 */
290 #define USBOTG_ARC 5020 /* PortalPlayer 502x */
291 #define USBOTG_JZ4740 4740 /* Ingenic Jz4740/Jz4732 */
292 #define USBOTG_AS3525 3525 /* AMS AS3525 */
293 #define USBOTG_AS3525v2 3535 /* AMS AS3525v2 FIXME : same than S3C6400X */
294 #define USBOTG_S3C6400X 6400 /* Samsung S3C6400X, also used in the S5L8701 */
296 /* Multiple cores */
297 #define CPU 0
298 #define COP 1
300 /* now go and pick yours */
301 #if defined(ARCHOS_PLAYER)
302 #include "config/archosplayer.h"
303 #elif defined(ARCHOS_RECORDER)
304 #include "config/archosrecorder.h"
305 #elif defined(ARCHOS_FMRECORDER)
306 #include "config/archosfmrecorder.h"
307 #elif defined(ARCHOS_RECORDERV2)
308 #include "config/archosrecorderv2.h"
309 #elif defined(ARCHOS_ONDIOSP)
310 #include "config/archosondiosp.h"
311 #elif defined(ARCHOS_ONDIOFM)
312 #include "config/archosondiofm.h"
313 #elif defined(ARCHOS_AV300)
314 #include "config/archosav300.h"
315 #elif defined(IRIVER_H100)
316 #include "config/iriverh100.h"
317 #elif defined(IRIVER_H120)
318 #include "config/iriverh120.h"
319 #elif defined(IRIVER_H300)
320 #include "config/iriverh300.h"
321 #elif defined(IAUDIO_X5)
322 #include "config/iaudiox5.h"
323 #elif defined(IAUDIO_M5)
324 #include "config/iaudiom5.h"
325 #elif defined(IAUDIO_M3)
326 #include "config/iaudiom3.h"
327 #elif defined(IPOD_COLOR)
328 #include "config/ipodcolor.h"
329 #elif defined(IPOD_NANO)
330 #include "config/ipodnano1g.h"
331 #elif defined(IPOD_VIDEO)
332 #include "config/ipodvideo.h"
333 #elif defined(IPOD_1G2G)
334 #include "config/ipod1g2g.h"
335 #elif defined(IPOD_3G)
336 #include "config/ipod3g.h"
337 #elif defined(IPOD_4G)
338 #include "config/ipod4g.h"
339 #elif defined(IPOD_NANO2G)
340 #include "config/ipodnano2g.h"
341 #elif defined(IRIVER_IFP7XX)
342 #include "config/iriverifp7xx.h"
343 #elif defined(GIGABEAT_F)
344 #include "config/gigabeatfx.h"
345 #elif defined(GIGABEAT_S)
346 #include "config/gigabeats.h"
347 #elif defined(IPOD_MINI)
348 #include "config/ipodmini1g.h"
349 #elif defined(IPOD_MINI2G)
350 #include "config/ipodmini2g.h"
351 #elif defined(IRIVER_H10)
352 #include "config/iriverh10.h"
353 #elif defined(IRIVER_H10_5GB)
354 #include "config/iriverh10_5gb.h"
355 #elif defined(SANSA_E200)
356 #include "config/sansae200.h"
357 #elif defined(SANSA_C200)
358 #include "config/sansac200.h"
359 #elif defined(SANSA_M200)
360 #include "config/sansam200.h"
361 #elif defined(TATUNG_TPJ1022)
362 #include "config/tatungtpj1022.h"
363 #elif defined(MROBE_100)
364 #include "config/mrobe100.h"
365 #elif defined(MROBE_500)
366 #include "config/mrobe500.h"
367 #elif defined(LOGIK_DAX)
368 #include "config/logikdax.h"
369 #elif defined(IAUDIO_7)
370 #include "config/iaudio7.h"
371 #elif defined(COWON_D2)
372 #include "config/cowond2.h"
373 #elif defined(CREATIVE_ZVM)
374 #include "config/zenvisionm30gb.h"
375 #elif defined(CREATIVE_ZVM60GB)
376 #include "config/zenvisionm60gb.h"
377 #elif defined(CREATIVE_ZV)
378 #include "config/zenvision.h"
379 #elif defined(PHILIPS_SA9200)
380 #include "config/gogearsa9200.h"
381 #elif defined(PHILIPS_HDD1630)
382 #include "config/gogearhdd1630.h"
383 #elif defined(PHILIPS_HDD6330)
384 #include "config/gogearhdd6330.h"
385 #elif defined(SANSA_C100)
386 #include "config/sansac100.h"
387 #elif defined(MEIZU_M6SL)
388 #include "config/meizum6sl.h"
389 #elif defined(MEIZU_M6SP)
390 #include "config/meizum6sp.h"
391 #elif defined(MEIZU_M3)
392 #include "config/meizum3.h"
393 #elif defined(ONDA_VX747) || defined(ONDA_VX747P)
394 #include "config/ondavx747.h"
395 #elif defined(ONDA_VX777)
396 #include "config/ondavx777.h"
397 #elif defined(ONDA_VX767)
398 #include "config/ondavx767.h"
399 #elif defined(SANSA_CLIP)
400 #include "config/sansaclip.h"
401 #elif defined(SANSA_CLIPV2)
402 #include "config/sansaclipv2.h"
403 #elif defined(SANSA_CLIPPLUS)
404 #include "config/sansaclipplus.h"
405 #elif defined(SANSA_E200V2)
406 #include "config/sansae200v2.h"
407 #elif defined(SANSA_M200V4)
408 #include "config/sansam200v4.h"
409 #elif defined(SANSA_FUZE)
410 #include "config/sansafuze.h"
411 #elif defined(SANSA_FUZEV2)
412 #include "config/sansafuzev2.h"
413 #elif defined(SANSA_C200V2)
414 #include "config/sansac200v2.h"
415 #elif defined(SANSA_VIEW)
416 #include "config/sansaview.h"
417 #elif defined(LYRE_PROTO1)
418 #include "config/lyreproto1.h"
419 #elif defined(MINI2440)
420 #include "config/mini2440.h"
421 #elif defined(SAMSUNG_YH820)
422 #include "config/samsungyh820.h"
423 #elif defined(SAMSUNG_YH920)
424 #include "config/samsungyh920.h"
425 #elif defined(SAMSUNG_YH925)
426 #include "config/samsungyh925.h"
427 #elif defined(SAMSUNG_YPS3)
428 #include "config/samsungyps3.h"
429 #elif defined(PBELL_VIBE500)
430 #include "config/vibe500.h"
431 #elif defined(MPIO_HD200)
432 #include "config/mpiohd200.h"
433 #elif defined(MPIO_HD300)
434 #include "config/mpiohd300.h"
436 #elif defined(APPLICATION)
437 #include "config/application.h"
438 #define CONFIG_CPU 0
439 #define CONFIG_STORAGE 0
440 #else
441 /* no known platform */
442 #endif
444 /* keep this include after the target configs */
445 #ifdef SIMULATOR
446 #include "config/sim.h"
447 #endif
449 /* setup basic macros from capability masks */
450 #include "config_caps.h"
452 /* setup CPU-specific defines */
454 /* define for all cpus from SH family */
455 #if (CONFIG_CPU == SH7034)
456 #define CPU_SH
457 #endif
459 /* define for all cpus from coldfire family */
460 #if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250)
461 #define CPU_COLDFIRE
462 #endif
464 /* define for all cpus from PP family */
465 #if (CONFIG_CPU == PP5002)
466 #define CPU_PP
467 #elif (CONFIG_CPU == PP5020) || (CONFIG_CPU == PP5022) \
468 || (CONFIG_CPU == PP5024) || (CONFIG_CPU == PP6100)
469 #define CPU_PP
470 #define CPU_PP502x
471 #endif
473 /* define for all cpus from S5L870X family */
474 #if (CONFIG_CPU == S5L8700) || (CONFIG_CPU == S5L8701)
475 #define CPU_S5L870X
476 #endif
478 /* define for all cpus from TCC77X family */
479 #if (CONFIG_CPU == TCC771L) || (CONFIG_CPU == TCC773L) || (CONFIG_CPU == TCC770)
480 #define CPU_TCC77X
481 #endif
483 /* define for all cpus from TCC780 family */
484 #if (CONFIG_CPU == TCC7801)
485 #define CPU_TCC780X
486 #endif
488 /* define for all cpus from ARM7TDMI family (for specific optimisations) */
489 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == DSC25)
490 #define CPU_ARM7TDMI
491 #endif
493 /* define for all cpus from ARM family */
494 #if (CONFIG_CPU == IMX31L)
495 #define CPU_ARM
496 #define ARM_ARCH 6 /* ARMv6 */
498 #elif defined(CPU_TCC77X) || defined(CPU_TCC780X) || (CONFIG_CPU == DM320) \
499 || (CONFIG_CPU == AT91SAM9260) || (CONFIG_CPU == AS3525v2) \
500 || (CONFIG_PLATFORM & PLATFORM_ANDROID)
501 #define CPU_ARM
502 #define ARM_ARCH 5 /* ARMv5 */
504 #elif defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) \
505 || (CONFIG_CPU == DSC25) || defined(CPU_S5L870X) || (CONFIG_CPU == AS3525)
506 #define CPU_ARM
507 #define ARM_ARCH 4 /* ARMv4 */
508 #endif
510 #if (CONFIG_CPU == JZ4732)
511 #define CPU_MIPS 32
512 #endif
514 /* now set any CONFIG_ defines correctly if they are not used,
515 No need to do this on CONFIG_'s which are compulsory (e.g CONFIG_CODEC ) */
517 #if !defined(CONFIG_BACKLIGHT_FADING)
518 #define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
519 #endif
521 #ifndef CONFIG_PLATFORM
522 #define CONFIG_PLATFORM PLATFORM_NATIVE
523 #endif
525 #ifndef CONFIG_TUNER
526 #define CONFIG_TUNER 0
527 #endif
529 #ifndef CONFIG_USBOTG
530 #define CONFIG_USBOTG 0
531 #endif
533 #ifndef CONFIG_LED
534 #define CONFIG_LED LED_VIRTUAL
535 #endif
537 #ifndef CONFIG_CHARGING
538 #define CONFIG_CHARGING 0
539 #endif
541 #ifndef CONFIG_RTC
542 #define CONFIG_RTC 0
543 #endif
545 #ifndef CONFIG_ORIENTATION
546 #if LCD_HEIGHT > LCD_WIDTH
547 #define CONFIG_ORIENTATION SCREEN_PORTRAIT
548 #elif LCD_HEIGHT < LCD_WIDTH
549 #define CONFIG_ORIENTATION SCREEN_LANDSCAPE
550 #else
551 #define CONFIG_ORIENTATION SCREEN_SQUARE
552 #endif
553 #endif
555 /* Pixel aspect ratio is defined in terms of a multiplier for pixel width and
556 * height, and is set to 1:1 if the target does not set a value
558 #ifndef LCD_PIXEL_ASPECT_HEIGHT
559 #define LCD_PIXEL_ASPECT_HEIGHT 1
560 #endif
561 #ifndef LCD_PIXEL_ASPECT_WIDTH
562 #define LCD_PIXEL_ASPECT_WIDTH 1
563 #endif
565 /* Used for split displays (Sansa Clip). Set to 0 otherwise */
566 #ifndef LCD_SPLIT_LINES
567 #define LCD_SPLIT_LINES 0
568 #endif
570 /* Simulator LCD dimensions. Set to standard dimensions if undefined */
571 #ifndef SIM_LCD_WIDTH
572 #define SIM_LCD_WIDTH LCD_WIDTH
573 #endif
574 #ifndef SIM_LCD_HEIGHT
575 #define SIM_LCD_HEIGHT (LCD_HEIGHT + LCD_SPLIT_LINES)
576 #endif
578 #ifdef HAVE_REMOTE_LCD
579 #ifndef SIM_REMOTE_WIDTH
580 #define SIM_REMOTE_WIDTH LCD_REMOTE_WIDTH
581 #endif
582 #ifndef SIM_REMOTE_HEIGHT
583 #define SIM_REMOTE_HEIGHT LCD_REMOTE_HEIGHT
584 #endif
585 #endif /* HAVE_REMOTE_LCD */
587 /* define this in the target config.h to use a different size */
588 #ifndef CONFIG_DEFAULT_ICON_HEIGHT
589 #define CONFIG_DEFAULT_ICON_HEIGHT 8
590 #endif
591 #ifndef CONFIG_DEFAULT_ICON_WIDTH
592 #define CONFIG_DEFAULT_ICON_WIDTH 6
593 #endif
594 #ifndef CONFIG_REMOTE_DEFAULT_ICON_HEIGHT
595 #define CONFIG_REMOTE_DEFAULT_ICON_HEIGHT 8
596 #endif
597 #ifndef CONFIG_REMOTE_DEFAULT_ICON_WIDTH
598 #define CONFIG_REMOTE_DEFAULT_ICON_WIDTH 6
599 #endif
601 #if (CONFIG_TUNER & (CONFIG_TUNER - 1)) != 0
602 /* Multiple possible tuners */
603 #define CONFIG_TUNER_MULTI
604 #endif
606 /* deactivate fading in bootloader */
607 #if defined(BOOTLOADER)
608 #undef CONFIG_BACKLIGHT_FADING
609 #define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
610 #endif
612 /* determine which setting/manual text to use */
613 #if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_PWM)
615 /* possibly overridden in target config */
616 #if !defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) \
617 && !defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
618 #define HAVE_BACKLIGHT_FADING_INT_SETTING
619 #endif
621 #elif (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_SETTING) \
622 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_HW_REG) \
623 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_TARGET)
625 /* possibly overridden in target config */
626 #if !defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) \
627 && !defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
628 #define HAVE_BACKLIGHT_FADING_BOOL_SETTING
629 #endif
631 #endif /* CONFIG_BACKLIGHT_FADING */
633 /* Storage related config handling */
635 #if (CONFIG_STORAGE & (CONFIG_STORAGE - 1)) != 0
636 /* Multiple storage drivers */
637 #define CONFIG_STORAGE_MULTI
638 #endif
640 /* Explicit HAVE_MULTIVOLUME in the config file. Allow the maximum number */
641 #ifdef HAVE_MULTIVOLUME
642 #define NUM_VOLUMES_PER_DRIVE 4
643 #else
644 #define NUM_VOLUMES_PER_DRIVE 1
645 #endif
646 #if defined(CONFIG_STORAGE_MULTI) && !defined(HAVE_MULTIDRIVE)
647 #define HAVE_MULTIDRIVE
648 #endif
650 #if defined(HAVE_MULTIDRIVE) && !defined(HAVE_MULTIVOLUME)
651 #define HAVE_MULTIVOLUME
652 #endif
654 #if defined(HAVE_MULTIDRIVE) && !defined(NUM_DRIVES)
655 #error HAVE_MULTIDRIVE needs to have an explicit NUM_DRIVES
656 #endif
658 #ifndef NUM_DRIVES
659 #define NUM_DRIVES 1
660 #endif
662 #define NUM_VOLUMES (NUM_DRIVES * NUM_VOLUMES_PER_DRIVE)
664 #if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
665 /* Bootloaders don't use CPU frequency adjustment */
666 #undef HAVE_ADJUSTABLE_CPU_FREQ
667 #endif
669 /* Enable the directory cache and tagcache in RAM if we have
670 * plenty of RAM. Both features can be enabled independently. */
671 #if (MEMORYSIZE >= 8) && !defined(BOOTLOADER) && !defined(__PCTOOL__) \
672 && !defined(APPLICATION)
673 #define HAVE_DIRCACHE
674 #ifdef HAVE_TAGCACHE
675 #define HAVE_TC_RAMCACHE
676 #endif
677 #endif
679 #if defined(HAVE_TAGCACHE) && defined(HAVE_LCD_BITMAP)
680 #define HAVE_PICTUREFLOW_INTEGRATION
681 #endif
683 /* Add one HAVE_ define for all mas35xx targets */
684 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3507D) || (CONFIG_CODEC == MAS3539F)
685 #define HAVE_MAS35XX
686 #endif
688 #if (CONFIG_CODEC == SWCODEC)
689 #ifdef BOOTLOADER
691 #if CONFIG_CPU == IMX31L
692 /* Priority in bootloader is wanted */
693 #define HAVE_PRIORITY_SCHEDULING
694 #define USB_STATUS_BY_EVENT
695 #define USB_DETECT_BY_DRV
696 #endif
698 #else /* !BOOTLOADER */
700 #define HAVE_EXTENDED_MESSAGING_AND_NAME
701 #define HAVE_WAKEUP_EXT_CB
704 #if (CONFIG_PLATFORM & PLATFORM_ANDROID)
705 #define HAVE_PRIORITY_SCHEDULING
706 #endif
708 #if (CONFIG_PLATFORM & PLATFORM_NATIVE)
709 #define HAVE_PRIORITY_SCHEDULING
710 #define HAVE_SCHEDULER_BOOSTCTRL
711 #endif /* PLATFORM_NATIVE */
714 #define HAVE_SEMAPHORE_OBJECTS
716 #if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC
717 #define USB_STATUS_BY_EVENT
718 #define USB_DETECT_BY_DRV
719 #if CONFIG_CPU != IMX31L
720 #define INCLUDE_TIMEOUT_API
721 #endif
722 #endif /* HAVE_USBSTACK */
725 #endif /* BOOTLOADER */
727 #if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) \
728 || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) \
729 || defined(CPU_S5L870X) || (CONFIG_CPU == S3C2440) \
730 || defined(APPLICATION)
731 #define HAVE_WAKEUP_OBJECTS
732 #endif
734 /*include support for crossfading - requires significant PCM buffer space*/
735 #if MEMORYSIZE > 2
736 #define HAVE_CROSSFADE
737 #endif
739 #endif /* (CONFIG_CODEC == SWCODEC) */
741 /* Determine if accesses should be strictly long aligned. */
742 #if (CONFIG_CPU == SH7034) || defined(CPU_ARM) || defined(CPU_MIPS)
743 #define ROCKBOX_STRICT_ALIGN 1
744 #endif
746 #if defined(CPU_ARM) && defined(__ASSEMBLER__)
747 /* ARMv4T doesn't switch the T bit when popping pc directly, we must use BX */
748 .macro ldmpc cond="", order="ia", regs
749 #if ARM_ARCH == 4 && defined(USE_THUMB)
750 ldm\cond\order sp!, { \regs, lr }
751 bx\cond lr
752 #else
753 ldm\cond\order sp!, { \regs, pc }
754 #endif
755 .endm
756 .macro ldrpc cond=""
757 #if ARM_ARCH == 4 && defined(USE_THUMB)
758 ldr\cond lr, [sp], #4
759 bx\cond lr
760 #else
761 ldr\cond pc, [sp], #4
762 #endif
763 .endm
764 #endif
766 #ifndef CODEC_SIZE
767 #define CODEC_SIZE 0
768 #endif
770 /* This attribute can be used to ensure that certain symbols are never profiled
771 * which can be important as profiling a function de-inlines it */
772 #ifdef RB_PROFILE
773 #define NO_PROF_ATTR __attribute__ ((no_instrument_function))
774 #else
775 #define NO_PROF_ATTR
776 #endif
778 /* IRAM usage */
779 #if (CONFIG_PLATFORM & PLATFORM_NATIVE) && /* Not for hosted environments */ \
780 (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
781 defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \
782 defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \
783 (CONFIG_CPU == AS3525 && MEMORYSIZE > 2 && !defined(BOOTLOADER)) || /* AS3525 +2MB: core, plugins, codecs */ \
784 (CONFIG_CPU == AS3525 && MEMORYSIZE <= 2 && !defined(PLUGIN) && !defined(CODEC) && !defined(BOOTLOADER)) || /* AS3525 2MB: core only */ \
785 (CONFIG_CPU == AS3525v2 && !defined(PLUGIN) && !defined(CODEC) && !defined(BOOTLOADER)) || /* AS3525v2: core only */ \
786 (CONFIG_CPU == PNX0101) || \
787 (CONFIG_CPU == TCC7801) || \
788 defined(CPU_S5L870X)) || /* Samsung S5L8700: core, plugins, codecs */ \
789 (CONFIG_CPU == JZ4732 && !defined(PLUGIN) && !defined(CODEC)) /* Jz4740: core only */
790 #define ICODE_ATTR __attribute__ ((section(".icode")))
791 #define ICONST_ATTR __attribute__ ((section(".irodata")))
792 #define IDATA_ATTR __attribute__ ((section(".idata")))
793 #define IBSS_ATTR __attribute__ ((section(".ibss")))
794 #define USE_IRAM
795 #if CONFIG_CPU != SH7034 && (CONFIG_CPU != AS3525 || MEMORYSIZE > 2) \
796 && CONFIG_CPU != JZ4732 && CONFIG_CPU != AS3525v2
797 #define PLUGIN_USE_IRAM
798 #endif
799 #if defined(CPU_ARM) && !defined(__ARM_EABI__)
800 /* GCC quirk workaround: arm-elf-gcc treats static functions as short_call
801 * when not compiling with -ffunction-sections, even when the function has
802 * a section attribute.
803 * This is fixed with eabi since all calls are short ones by default */
804 #define STATICIRAM
805 #else
806 #define STATICIRAM static
807 #endif
808 #else
809 #define ICODE_ATTR
810 #define ICONST_ATTR
811 #define IDATA_ATTR
812 #define IBSS_ATTR
813 #define STATICIRAM static
814 #endif
816 #if (defined(CPU_PP) || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) || \
817 (CONFIG_CPU == IMX31L)) \
818 && (CONFIG_PLATFORM & PLATFORM_NATIVE) && !defined(BOOTLOADER)
819 /* Functions that have INIT_ATTR attached are NOT guaranteed to survive after
820 * root_menu() has been called. Their code may be overwritten by other data or
821 * code in order to save RAM, and references to them might point into
822 * zombie area.
824 * It is critical that you make sure these functions are only called before
825 * the final call to root_menu() (see apps/main.c) is called (i.e. basically
826 * only while main() runs), otherwise things may go wild,
827 * from crashes to freezes to exploding daps.
829 #define INIT_ATTR __attribute__ ((section(".init")))
830 #define HAVE_INIT_ATTR
831 #else
832 #define INIT_ATTR
833 #endif
835 #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
836 #define DATA_ATTR __attribute__ ((section("__DATA, .data")))
837 #else
838 #define DATA_ATTR __attribute__ ((section(".data")))
839 #endif
841 #ifndef IRAM_LCDFRAMEBUFFER
842 /* if the LCD framebuffer has not been moved to IRAM, define it empty here */
843 #define IRAM_LCDFRAMEBUFFER
844 #endif
846 /* Change this if you want to build a single-core firmware for a multicore
847 * target for debugging */
848 #if defined(BOOTLOADER) || (CONFIG_CPU == PP6100)
849 #define FORCE_SINGLE_CORE
850 #endif
852 #if defined(CPU_PP)
853 #define IDLE_STACK_SIZE 0x80
854 #define IDLE_STACK_WORDS 0x20
856 /* Attributes to place data in uncached DRAM */
857 /* These are useful beyond dual-core and ultimately beyond PP since they may
858 * be used for DMA buffers and such without cache maintenence calls. */
859 #define NOCACHEBSS_ATTR __attribute__((section(".ncbss"),nocommon))
860 #define NOCACHEDATA_ATTR __attribute__((section(".ncdata"),nocommon))
862 #if !defined(FORCE_SINGLE_CORE)
864 #define NUM_CORES 2
865 #define HAVE_CORELOCK_OBJECT
866 #define CURRENT_CORE current_core()
867 /* Attributes for core-shared data in DRAM where IRAM is better used for other
868 * purposes. */
869 #define SHAREDBSS_ATTR NOCACHEBSS_ATTR
870 #define SHAREDDATA_ATTR NOCACHEDATA_ATTR
872 #define IF_COP(...) __VA_ARGS__
873 #define IF_COP_VOID(...) __VA_ARGS__
874 #define IF_COP_CORE(core) core
876 #endif /* !defined(FORCE_SINGLE_CORE) */
878 #endif /* CPU_PP */
880 #if CONFIG_CPU == IMX31L
881 #define NOCACHEBSS_ATTR __attribute__((section(".ncbss"),nocommon))
882 #define NOCACHEDATA_ATTR __attribute__((section(".ncdata"),nocommon))
883 #endif
885 #ifndef NUM_CORES
886 /* Default to single core */
887 #define NUM_CORES 1
888 #define CURRENT_CORE CPU
889 /* Attributes for core-shared data in DRAM - no caching considerations */
890 #define SHAREDBSS_ATTR
891 #define SHAREDDATA_ATTR
892 #ifndef NOCACHEBSS_ATTR
893 #define NOCACHEBSS_ATTR
894 #define NOCACHEDATA_ATTR
895 #endif
897 #define IF_COP(...)
898 #define IF_COP_VOID(...) void
899 #define IF_COP_CORE(core) CURRENT_CORE
901 #endif /* NUM_CORES */
903 #ifdef HAVE_HEADPHONE_DETECTION
904 /* Timeout objects required if headphone detection is enabled */
905 #ifndef INCLUDE_TIMEOUT_API
906 #define INCLUDE_TIMEOUT_API
907 #endif
908 #endif /* HAVE_HEADPHONE_DETECTION */
910 #ifdef HAVE_TOUCHSCREEN
911 /* Timeout objects required for kinetic list scrolling */
912 #undef INCLUDE_TIMEOUT_API
913 #define INCLUDE_TIMEOUT_API
914 #endif /* HAVE_TOUCHSCREEN */
916 #if defined(HAVE_USB_CHARGING_ENABLE) && defined(HAVE_USBSTACK)
917 /* USB charging support in the USB stack requires timeout objects */
918 #ifndef INCLUDE_TIMEOUT_API
919 #define INCLUDE_TIMEOUT_API
920 #endif
921 #endif /* HAVE_USB_CHARGING_ENABLE && HAVE_USBSTACK */
923 #if defined(HAVE_USBSTACK) || (CONFIG_STORAGE & STORAGE_NAND)
924 #define STORAGE_GET_INFO
925 #endif
927 #ifdef CPU_MIPS
928 #include <stdbool.h> /* MIPS GCC fix? */
929 #endif
931 #if defined(HAVE_USBSTACK)
932 /* Define the implemented USB transport classes */
933 #if CONFIG_USBOTG == USBOTG_ISP1583
934 #define USB_HAS_BULK
935 #elif (CONFIG_USBOTG == USBOTG_ARC) || \
936 (CONFIG_USBOTG == USBOTG_JZ4740) || \
937 (CONFIG_USBOTG == USBOTG_M66591) || \
938 (CONFIG_USBOTG == USBOTG_AS3525)
939 #define USB_HAS_BULK
940 #define USB_HAS_INTERRUPT
941 #elif defined(CPU_TCC780X) || defined(CPU_TCC77X)
942 #define USB_HAS_BULK
943 #elif CONFIG_USBOTG == USBOTG_S3C6400X || CONFIG_USBOTG == USBOTG_AS3525v2
944 #define USB_HAS_BULK
945 //#define USB_HAS_INTERRUPT -- seems to be broken
946 #endif /* CONFIG_USBOTG */
948 #if (CONFIG_USBOTG == USBOTG_ARC) || \
949 (CONFIG_USBOTG == USBOTG_AS3525)
950 #define USB_HAS_ISOCHRONOUS
951 #endif
953 /* define the class drivers to enable */
954 #ifdef BOOTLOADER
956 /* enable usb storage for targets that do bootloader usb */
957 #if (defined(TOSHIBA_GIGABEAT_S) || \
958 (defined(CREATIVE_ZVx) || \
959 defined(CPU_TCC77X) || defined(CPU_TCC780X))) || \
960 (CONFIG_USBOTG == USBOTG_JZ4740) || defined(IPOD_NANO2G) || \
961 CONFIG_USBOTG == USBOTG_AS3525
962 #define USB_ENABLE_STORAGE
963 #endif
965 #else /* BOOTLOADER */
967 #if (CONFIG_PLATFORM & PLATFORM_NATIVE)
968 #ifdef USB_HAS_BULK
969 //#define USB_ENABLE_SERIAL
970 #ifdef USE_ROCKBOX_USB
971 #define USB_ENABLE_STORAGE
972 #endif /* USE_ROCKBOX_USB */
973 #endif /* USB_HAS_BULK */
975 #ifdef USB_HAS_INTERRUPT
976 #define USB_ENABLE_HID
977 #else
978 #define USB_ENABLE_CHARGING_ONLY
979 #endif
980 #endif
982 #endif /* BOOTLOADER */
984 #endif /* HAVE_USBSTACK */
986 /* This attribute can be used to enable to detection of plugin file handles leaks.
987 * When enabled, the plugin core will monitor open/close/creat and when the plugin exits
988 * will display an error message if the plugin leaked some file handles */
989 #if (CONFIG_PLATFORM & PLATFORM_NATIVE)
990 #define HAVE_PLUGIN_CHECK_OPEN_CLOSE
991 #endif
993 #if defined(HAVE_DIRCACHE) && (CONFIG_PLATFORM & PLATFORM_NATIVE)
994 #define HAVE_IO_PRIORITY
995 #endif
997 #endif /* __CONFIG_H__ */