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