Don't selecu any usb class drivers for a simulator build
[kugel-rb.git] / firmware / export / config.h
blobadc03d54f8b872eb920a7a69c93bdf4613f70931
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 */
44 /* CONFIG_CODEC */
45 #define MAS3587F 3587
46 #define MAS3507D 3507
47 #define MAS3539F 3539
48 #define SWCODEC 1 /* if codec is done by SW */
50 /* CONFIG_CPU */
51 #define SH7034 7034
52 #define MCF5249 5249
53 #define MCF5250 5250
54 #define PP5002 5002
55 #define PP5020 5020
56 #define PP5022 5022
57 #define PP5024 5024
58 #define PP6100 6100
59 #define PNX0101 101
60 #define S3C2440 2440
61 #define DSC25 25
62 #define DM320 320
63 #define IMX31L 31
64 #define TCC770 770
65 #define TCC771L 771
66 #define TCC773L 773
67 #define TCC7801 7801
68 #define S5L8700 8700
69 #define S5L8701 8701
70 #define JZ4732 4732
71 #define AS3525 3525
72 #define AT91SAM9260 9260
74 /* CONFIG_KEYPAD */
75 #define PLAYER_PAD 1
76 #define RECORDER_PAD 2
77 #define ONDIO_PAD 3
78 #define IRIVER_H100_PAD 4
79 #define IRIVER_H300_PAD 5
80 #define IAUDIO_X5M5_PAD 6
81 #define IPOD_4G_PAD 7
82 #define IPOD_3G_PAD 8
83 #define IPOD_1G2G_PAD 9
84 #define IRIVER_IFP7XX_PAD 10
85 #define GIGABEAT_PAD 11
86 #define IRIVER_H10_PAD 12
87 #define SANSA_E200_PAD 13
88 #define SANSA_C200_PAD 14
89 #define ELIO_TPJ1022_PAD 15
90 #define ARCHOS_AV300_PAD 16
91 #define MROBE100_PAD 17
92 #define MROBE500_PAD 18
93 #define GIGABEAT_S_PAD 19
94 #define LOGIK_DAX_PAD 20
95 #define IAUDIO67_PAD 21
96 #define COWOND2_PAD 22
97 #define IAUDIO_M3_PAD 23
98 #define CREATIVEZVM_PAD 24
99 #define SANSA_M200_PAD 25
100 #define CREATIVEZV_PAD 26
101 #define PHILIPS_SA9200_PAD 27
102 #define SANSA_C100_PAD 28
103 #define PHILIPS_HDD1630_PAD 29
104 #define MEIZU_M6SL_PAD 30
105 #define ONDAVX747_PAD 31
106 #define ONDAVX767_PAD 32
107 #define MEIZU_M6SP_PAD 33
108 #define MEIZU_M3_PAD 34
109 #define SANSA_CLIP_PAD 35
110 #define SANSA_FUZE_PAD 36
111 #define LYRE_PROTO1_PAD 37
112 #define SAMSUNG_YH_PAD 38
113 #define ONDAVX777_PAD 39
114 #define SAMSUNG_YPS3_PAD 40
115 #define MINI2440_PAD 41
117 /* CONFIG_REMOTE_KEYPAD */
118 #define H100_REMOTE 1
119 #define H300_REMOTE 2
120 #define X5_REMOTE 3
121 #define MROBE_REMOTE 4
123 /* CONFIG_BACKLIGHT_FADING */
124 /* No fading capabilities at all (yet) */
125 #define BACKLIGHT_NO_FADING 0x0
126 /* Backlight fading is controlled using a hardware PWM mechanism */
127 #define BACKLIGHT_FADING_PWM 0x1
128 /* Backlight is controlled using a software implementation
129 * BACKLIGHT_FADING_SW_SETTING means that backlight is turned on by only setting
130 * the brightness (i.e. no real difference between backlight_on and
131 * backlight_set_brightness)
132 * BACKLIGHT_FADING_SW_SETTING means that backlight brightness is restored
133 * "in hardware", from a hardware register upon backlight_on
134 * Both types need to have minor adjustments in the software fading code */
135 #define BACKLIGHT_FADING_SW_SETTING 0x2
136 #define BACKLIGHT_FADING_SW_HW_REG 0x4
137 /* Backlight fading is done in a target specific way
138 * for example in hardware, but not controllable*/
139 #define BACKLIGHT_FADING_TARGET 0x8
141 /*include support for crossfading - requires significant PCM buffer space*/
142 #if MEMORYSIZE > 2
143 #define HAVE_CROSSFADE
144 #endif
146 /* CONFIG_CHARGING */
148 /* Generic types */
149 #define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging
150 * (CPU cannot read charger state but may read
151 * when power is plugged-in). */
152 #define CHARGING_MONITOR 2 /* Hardware controlled charging with monitoring
153 * (CPU is able to read HW charging state and
154 * when power is plugged-in). */
156 /* Mostly target-specific code in the /target tree */
157 #define CHARGING_TARGET 3 /* Any algorithm - usually software controlled
158 * charging or specific programming is required to
159 * use the charging hardware. */
161 /* CONFIG_LCD */
162 #define LCD_SSD1815 1 /* as used by Archos Recorders and Ondios */
163 #define LCD_SSD1801 2 /* as used by Archos Player/Studio */
164 #define LCD_S1D15E06 3 /* as used by iRiver H100 series */
165 #define LCD_H300 4 /* as used by iRiver H300 series, exact model name is
166 unknown at the time of this writing */
167 #define LCD_X5 5 /* as used by iAudio X5 series, exact model name is
168 unknown at the time of this writing */
169 #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */
170 #define LCD_IPODNANO 7 /* as used by iPod Nano */
171 #define LCD_IPODVIDEO 8 /* as used by iPod Video */
172 #define LCD_IPOD2BPP 9 /* as used by all fullsize greyscale iPods */
173 #define LCD_IPODMINI 10 /* as used by iPod Mini g1/g2 */
174 #define LCD_IFP7XX 11 /* as used by iRiver iFP 7xx/8xx */
175 #define LCD_GIGABEAT 12
176 #define LCD_H10_20GB 13 /* as used by iriver H10 20Gb */
177 #define LCD_H10_5GB 14 /* as used by iriver H10 5Gb */
178 #define LCD_TPJ1022 15 /* as used by Tatung Elio TPJ-1022 */
179 #define LCD_DSC25 16 /* as used by Archos AV300 */
180 #define LCD_C200 17 /* as used by Sandisk Sansa c200 */
181 #define LCD_MROBE500 18 /* as used by Olympus M:Robe 500i */
182 #define LCD_MROBE100 19 /* as used by Olympus M:Robe 100 */
183 #define LCD_LOGIKDAX 20 /* as used by Logik DAX - SSD1815 */
184 #define LCD_IAUDIO67 21 /* as used by iAudio 6/7 - unknown */
185 #define LCD_CREATIVEZVM 22 /* as used by Creative Zen Vision:M */
186 #define LCD_TL0350A 23 /* as used by the iAudio M3 remote, treated as main LCD */
187 #define LCD_COWOND2 24 /* as used by Cowon D2 - LTV250QV, TCC7801 driver */
188 #define LCD_SA9200 25 /* as used by the Philips SA9200 */
189 #define LCD_S6B33B2 26 /* as used by the Sansa c100 */
190 #define LCD_HDD1630 27 /* as used by the Philips HDD1630 */
191 #define LCD_MEIZUM6 28 /* as used by the Meizu M6SP and M6SL (various models) */
192 #define LCD_ONDAVX747 29 /* as used by the Onda VX747 */
193 #define LCD_ONDAVX767 30 /* as used by the Onda VX767 */
194 #define LCD_SSD1303 31 /* as used by the Sansa Clip */
195 #define LCD_FUZE 32 /* as used by the Sansa Fuze */
196 #define LCD_LYRE_PROTO1 33 /* as used by the Lyre prototype 1 */
197 #define LCD_YH925 34 /* as used by Samsung YH-925 (similar to the H10 20GB) */
198 #define LCD_VIEW 35 /* as used by the Sansa View */
199 #define LCD_NANO2G 36 /* as used by the iPod Nano 2nd Generation */
200 #define LCD_MINI2440 37 /* as used by the Mini2440 */
202 /* LCD_PIXELFORMAT */
203 #define HORIZONTAL_PACKING 1
204 #define VERTICAL_PACKING 2
205 #define HORIZONTAL_INTERLEAVED 3
206 #define VERTICAL_INTERLEAVED 4
207 #define RGB565 565
208 #define RGB565SWAPPED 3553
210 /* LCD_STRIDEFORMAT */
211 #define VERTICAL_STRIDE 1
212 #define HORIZONTAL_STRIDE 2
214 /* CONFIG_ORIENTATION */
215 #define SCREEN_PORTRAIT 0
216 #define SCREEN_LANDSCAPE 1
217 #define SCREEN_SQUARE 2
219 /* CONFIG_I2C */
220 #define I2C_NONE 0 /* For targets that do not use I2C - as the
221 Lyre prototype 1 */
222 #define I2C_PLAYREC 1 /* Archos Player/Recorder style */
223 #define I2C_ONDIO 2 /* Ondio style */
224 #define I2C_COLDFIRE 3 /* Coldfire style */
225 #define I2C_PP5002 4 /* PP5002 style */
226 #define I2C_PP5020 5 /* PP5020 style */
227 #define I2C_PNX0101 6 /* PNX0101 style */
228 #define I2C_S3C2440 7
229 #define I2C_PP5024 8 /* PP5024 style */
230 #define I2C_IMX31L 9
231 #define I2C_TCC77X 10
232 #define I2C_TCC780X 11
233 #define I2C_DM320 12 /* DM320 style */
234 #define I2C_S5L8700 13
235 #define I2C_JZ47XX 14 /* Ingenic Jz47XX style */
236 #define I2C_AS3525 15
238 /* CONFIG_LED */
239 #define LED_REAL 1 /* SW controlled LED (Archos recorders, player) */
240 #define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */
241 /* else HW controlled LED (iRiver H1x0) */
243 /* CONFIG_NAND */
244 #define NAND_IFP7XX 1
245 #define NAND_TCC 2
246 #define NAND_SAMSUNG 3
247 #define NAND_CC 4 /* ChinaChip */
249 /* CONFIG_RTC */
250 #define RTC_M41ST84W 1 /* Archos Recorder */
251 #define RTC_PCF50605 2 /* iPod 3G, 4G & Mini */
252 #define RTC_PCF50606 3 /* iriver H300 */
253 #define RTC_S3C2440 4
254 #define RTC_E8564 5 /* iriver H10 */
255 #define RTC_AS3514 6 /* Sandisk Sansa series */
256 #define RTC_DS1339_DS3231 7 /* h1x0 RTC mod */
257 #define RTC_IMX31L 8
258 #define RTC_RX5X348AB 9
259 #define RTC_TCC77X 10
260 #define RTC_TCC780X 11
261 #define RTC_MR100 12
262 #define RTC_MC13783 13 /* Freescale MC13783 PMIC */
263 #define RTC_S5L8700 14
264 #define RTC_S35390A 15
265 #define RTC_JZ47XX 16 /* Ingenic Jz47XX */
266 #define RTC_NANO2G 17 /* This seems to be a PCF5063x */
267 #define RTC_D2 18 /* Either PCF50606 or PCF50635 */
269 /* USB On-the-go */
270 #define USBOTG_M66591 6591 /* M:Robe 500 */
271 #define USBOTG_ISP1362 1362 /* iriver H300 */
272 #define USBOTG_ISP1583 1583 /* Creative Zen Vision:M */
273 #define USBOTG_M5636 5636 /* iAudio X5 */
274 #define USBOTG_ARC 5020 /* PortalPlayer 502x */
275 #define USBOTG_JZ4740 4740 /* Ingenic Jz4740/Jz4732 */
276 #define USBOTG_AS3525 3525 /* AMS AS3525 */
277 #define USBOTG_S3C6400X 6400 /* Samsung S3C6400X, also used in the S5L8701 */
279 /* Multiple cores */
280 #define CPU 0
281 #define COP 1
283 /* now go and pick yours */
284 #if defined(ARCHOS_PLAYER)
285 #include "config-player.h"
286 #elif defined(ARCHOS_RECORDER)
287 #include "config-recorder.h"
288 #elif defined(ARCHOS_FMRECORDER)
289 #include "config-fmrecorder.h"
290 #elif defined(ARCHOS_RECORDERV2)
291 #include "config-recorderv2.h"
292 #elif defined(ARCHOS_ONDIOSP)
293 #include "config-ondiosp.h"
294 #elif defined(ARCHOS_ONDIOFM)
295 #include "config-ondiofm.h"
296 #elif defined(ARCHOS_AV300)
297 #include "config-av300.h"
298 #elif defined(IRIVER_H100)
299 #include "config-h100.h"
300 #elif defined(IRIVER_H120)
301 #include "config-h120.h"
302 #elif defined(IRIVER_H300)
303 #include "config-h300.h"
304 #elif defined(IAUDIO_X5)
305 #include "config-iaudiox5.h"
306 #elif defined(IAUDIO_M5)
307 #include "config-iaudiom5.h"
308 #elif defined(IAUDIO_M3)
309 #include "config-iaudiom3.h"
310 #elif defined(IPOD_COLOR)
311 #include "config-ipodcolor.h"
312 #elif defined(IPOD_NANO)
313 #include "config-ipodnano.h"
314 #elif defined(IPOD_VIDEO)
315 #include "config-ipodvideo.h"
316 #elif defined(IPOD_1G2G)
317 #include "config-ipod1g2g.h"
318 #elif defined(IPOD_3G)
319 #include "config-ipod3g.h"
320 #elif defined(IPOD_4G)
321 #include "config-ipod4g.h"
322 #elif defined(IPOD_NANO2G)
323 #include "config-ipodnano2g.h"
324 #elif defined(IRIVER_IFP7XX)
325 #include "config-ifp7xx.h"
326 #elif defined(GIGABEAT_F)
327 #include "config-gigabeat.h"
328 #elif defined(GIGABEAT_S)
329 #include "config-gigabeat-s.h"
330 #elif defined(IPOD_MINI)
331 #include "config-ipodmini.h"
332 #elif defined(IPOD_MINI2G)
333 #include "config-ipodmini2g.h"
334 #elif defined(IRIVER_H10)
335 #include "config-h10.h"
336 #elif defined(IRIVER_H10_5GB)
337 #include "config-h10_5gb.h"
338 #elif defined(SANSA_E200)
339 #include "config-e200.h"
340 #elif defined(SANSA_C200)
341 #include "config-c200.h"
342 #elif defined(SANSA_M200)
343 #include "config-m200.h"
344 #elif defined(ELIO_TPJ1022)
345 #include "config-tpj1022.h"
346 #elif defined(MROBE_100)
347 #include "config-mrobe100.h"
348 #elif defined(MROBE_500)
349 #include "config-mrobe500.h"
350 #elif defined(LOGIK_DAX)
351 #include "config-logikdax.h"
352 #elif defined(IAUDIO_7)
353 #include "config-iaudio7.h"
354 #elif defined(COWON_D2)
355 #include "config-cowond2.h"
356 #elif defined(CREATIVE_ZVM)
357 #include "config-creativezvm.h"
358 #elif defined(CREATIVE_ZVM60GB)
359 #include "config-creativezvm60gb.h"
360 #elif defined(CREATIVE_ZV)
361 #include "config-creativezv.h"
362 #elif defined(PHILIPS_SA9200)
363 #include "config-sa9200.h"
364 #elif defined(PHILIPS_HDD1630)
365 #include "config-hdd1630.h"
366 #elif defined(SANSA_C100)
367 #include "config-c100.h"
368 #elif defined(MEIZU_M6SL)
369 #include "config-meizu-m6sl.h"
370 #elif defined(MEIZU_M6SP)
371 #include "config-meizu-m6sp.h"
372 #elif defined(MEIZU_M3)
373 #include "config-meizu-m3.h"
374 #elif defined(ONDA_VX747) || defined(ONDA_VX747P) || defined(ONDA_VX777)
375 #include "config-ondavx747.h"
376 #elif defined(ONDA_VX767)
377 #include "config-ondavx767.h"
378 #elif defined(SANSA_CLIP)
379 #include "config-clip.h"
380 #elif defined(SANSA_E200V2)
381 #include "config-e200v2.h"
382 #elif defined(SANSA_M200V4)
383 #include "config-m200v4.h"
384 #elif defined(SANSA_FUZE)
385 #include "config-fuze.h"
386 #elif defined(SANSA_C200V2)
387 #include "config-c200v2.h"
388 #elif defined(SANSA_VIEW)
389 #include "config-view.h"
390 #elif defined(LYRE_PROTO1)
391 #include "config-lyre_proto1.h"
392 #elif defined(MINI2440)
393 #include "config-mini2440.h"
394 #elif defined(SAMSUNG_YH820)
395 #include "config-yh820.h"
396 #elif defined(SAMSUNG_YH920)
397 #include "config-yh920.h"
398 #elif defined(SAMSUNG_YH925)
399 #include "config-yh925.h"
400 #elif defined(SAMSUNG_YPS3)
401 #include "config-yps3.h"
402 #else
403 /* no known platform */
404 #endif
406 /* setup basic macros from capability masks */
407 #include "config_caps.h"
409 /* setup CPU-specific defines */
411 /* define for all cpus from SH family */
412 #if (CONFIG_CPU == SH7034)
413 #define CPU_SH
414 #endif
416 /* define for all cpus from coldfire family */
417 #if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250)
418 #define CPU_COLDFIRE
419 #endif
421 /* define for all cpus from PP family */
422 #if (CONFIG_CPU == PP5002)
423 #define CPU_PP
424 #elif (CONFIG_CPU == PP5020) || (CONFIG_CPU == PP5022) \
425 || (CONFIG_CPU == PP5024) || (CONFIG_CPU == PP6100)
426 #define CPU_PP
427 #define CPU_PP502x
428 #endif
430 /* define for all cpus from S5L870X family */
431 #if (CONFIG_CPU == S5L8700) || (CONFIG_CPU == S5L8701)
432 #define CPU_S5L870X
433 #endif
435 /* define for all cpus from TCC77X family */
436 #if (CONFIG_CPU == TCC771L) || (CONFIG_CPU == TCC773L) || (CONFIG_CPU == TCC770)
437 #define CPU_TCC77X
438 #endif
440 /* define for all cpus from TCC780 family */
441 #if (CONFIG_CPU == TCC7801)
442 #define CPU_TCC780X
443 #endif
445 /* define for all cpus from ARM7TDMI family (for specific optimisations) */
446 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == DSC25)
447 #define CPU_ARM7TDMI
448 #endif
450 /* define for all cpus from ARM family */
451 #if (CONFIG_CPU == IMX31L)
452 #define CPU_ARM
453 #define ARM_ARCH 6 /* ARMv6 */
454 #endif
456 #if defined(CPU_TCC77X) || defined(CPU_TCC780X) || (CONFIG_CPU == DM320) \
457 || (CONFIG_CPU == AT91SAM9260)
458 #define CPU_ARM
459 #define ARM_ARCH 5 /* ARMv5 */
460 #endif
462 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) \
463 || (CONFIG_CPU == DSC25) || defined(CPU_S5L870X) || (CONFIG_CPU == AS3525)
464 #define CPU_ARM
465 #define ARM_ARCH 4 /* ARMv4 */
466 #endif
468 #if (CONFIG_CPU == JZ4732)
469 #define CPU_MIPS 32
470 #endif
472 /* now set any CONFIG_ defines correctly if they are not used,
473 No need to do this on CONFIG_'s which are compulsory (e.g CONFIG_CODEC ) */
475 #if !defined(CONFIG_BACKLIGHT_FADING)
476 #define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
477 #endif
479 #ifndef CONFIG_TUNER
480 #define CONFIG_TUNER 0
481 #endif
483 #ifndef CONFIG_USBOTG
484 #define CONFIG_USBOTG 0
485 #endif
487 #ifndef CONFIG_LED
488 #define CONFIG_LED LED_VIRTUAL
489 #endif
491 #ifndef CONFIG_CHARGING
492 #define CONFIG_CHARGING 0
493 #endif
495 #ifndef CONFIG_RTC
496 #define CONFIG_RTC 0
497 #endif
499 #ifndef CONFIG_ORIENTATION
500 #if LCD_HEIGHT > LCD_WIDTH
501 #define CONFIG_ORIENTATION SCREEN_PORTRAIT
502 #elif LCD_HEIGHT < LCD_WIDTH
503 #define CONFIG_ORIENTATION SCREEN_LANDSCAPE
504 #else
505 #define CONFIG_ORIENTATION SCREEN_SQUARE
506 #endif
507 #endif
509 /* Pixel aspect ratio is defined in terms of a multiplier for pixel width and
510 * height, and is set to 1:1 if the target does not set a value
512 #ifndef LCD_PIXEL_ASPECT_HEIGHT
513 #define LCD_PIXEL_ASPECT_HEIGHT 1
514 #endif
515 #ifndef LCD_PIXEL_ASPECT_WIDTH
516 #define LCD_PIXEL_ASPECT_WIDTH 1
517 #endif
519 /* Used for split displays (Sansa Clip). Set to 0 otherwise */
520 #ifndef LCD_SPLIT_LINES
521 #define LCD_SPLIT_LINES 0
522 #endif
524 /* Simulator LCD dimensions. Set to standard dimensions if undefined */
525 #ifndef SIM_LCD_WIDTH
526 #define SIM_LCD_WIDTH LCD_WIDTH
527 #endif
528 #ifndef SIM_LCD_HEIGHT
529 #define SIM_LCD_HEIGHT (LCD_HEIGHT + LCD_SPLIT_LINES)
530 #endif
532 #ifdef HAVE_REMOTE_LCD
533 #ifndef SIM_REMOTE_WIDTH
534 #define SIM_REMOTE_WIDTH LCD_REMOTE_WIDTH
535 #endif
536 #ifndef SIM_REMOTE_HEIGHT
537 #define SIM_REMOTE_HEIGHT LCD_REMOTE_HEIGHT
538 #endif
539 #endif /* HAVE_REMOTE_LCD */
541 /* define this in the target config.h to use a different size */
542 #ifndef CONFIG_DEFAULT_ICON_HEIGHT
543 #define CONFIG_DEFAULT_ICON_HEIGHT 8
544 #endif
545 #ifndef CONFIG_DEFAULT_ICON_WIDTH
546 #define CONFIG_DEFAULT_ICON_WIDTH 6
547 #endif
548 #ifndef CONFIG_REMOTE_DEFAULT_ICON_HEIGHT
549 #define CONFIG_REMOTE_DEFAULT_ICON_HEIGHT 8
550 #endif
551 #ifndef CONFIG_REMOTE_DEFAULT_ICON_WIDTH
552 #define CONFIG_REMOTE_DEFAULT_ICON_WIDTH 6
553 #endif
555 #if (CONFIG_TUNER & (CONFIG_TUNER - 1)) != 0
556 /* Multiple possible tuners */
557 #define CONFIG_TUNER_MULTI
558 #endif
560 /* deactivate fading in bootloader/sim */
561 #if defined(BOOTLOADER) || defined(SIMULATOR)
562 #undef CONFIG_BACKLIGHT_FADING
563 #define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
564 #endif
566 /* determine which setting/manual text to use */
567 #if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_PWM)
569 /* possibly overridden in target config */
570 #if !defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) \
571 && !defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
572 #define HAVE_BACKLIGHT_FADING_INT_SETTING
573 #endif
575 #elif (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_SETTING) \
576 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_HW_REG) \
577 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_TARGET)
579 /* possibly overridden in target config */
580 #if !defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) \
581 && !defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
582 #define HAVE_BACKLIGHT_FADING_BOOL_SETTING
583 #endif
585 #endif /* CONFIG_BACKLIGHT_FADING */
587 /* Storage related config handling */
589 #if (CONFIG_STORAGE & (CONFIG_STORAGE - 1)) != 0
590 /* Multiple storage drivers */
591 #define CONFIG_STORAGE_MULTI
592 #endif
594 /* Explicit HAVE_MULTIVOLUME in the config file. Allow the maximum number */
595 #ifdef HAVE_MULTIVOLUME
596 #define NUM_VOLUMES_PER_DRIVE 4
597 #else
598 #define NUM_VOLUMES_PER_DRIVE 1
599 #endif
600 #if defined(CONFIG_STORAGE_MULTI) && !defined(HAVE_MULTIDRIVE)
601 #define HAVE_MULTIDRIVE
602 #endif
604 #if defined(HAVE_MULTIDRIVE) && !defined(HAVE_MULTIVOLUME)
605 #define HAVE_MULTIVOLUME
606 #endif
608 #if defined(HAVE_MULTIDRIVE) && !defined(NUM_DRIVES)
609 #error HAVE_MULTIDRIVE needs to have an explicit NUM_DRIVES
610 #endif
612 #ifndef NUM_DRIVES
613 #define NUM_DRIVES 1
614 #endif
616 #define NUM_VOLUMES (NUM_DRIVES * NUM_VOLUMES_PER_DRIVE)
618 #if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
619 /* Bootloaders don't use CPU frequency adjustment */
620 #undef HAVE_ADJUSTABLE_CPU_FREQ
621 #endif
623 /* Enable the directory cache and tagcache in RAM if we have
624 * plenty of RAM. Both features can be enabled independently. */
625 #if ((defined(MEMORYSIZE) && (MEMORYSIZE >= 8)) || MEM >= 8) && \
626 !defined(BOOTLOADER) && !defined(__PCTOOL__)
627 #define HAVE_DIRCACHE
628 #ifdef HAVE_TAGCACHE
629 #define HAVE_TC_RAMCACHE
630 #endif
631 #endif
633 /* Add one HAVE_ define for all mas35xx targets */
634 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3507D) || (CONFIG_CODEC == MAS3539F)
635 #define HAVE_MAS35XX
636 #endif
638 #if (CONFIG_CODEC == SWCODEC)
639 #ifdef BOOTLOADER
641 #if CONFIG_CPU == IMX31L
642 /* Priority in bootloader is wanted */
643 #define HAVE_PRIORITY_SCHEDULING
644 #define USB_STATUS_BY_EVENT
645 #define USB_DETECT_BY_DRV
646 #endif
648 #else /* !BOOTLOADER */
650 #define HAVE_EXTENDED_MESSAGING_AND_NAME
652 #ifndef SIMULATOR
653 #define HAVE_PRIORITY_SCHEDULING
654 #define HAVE_SCHEDULER_BOOSTCTRL
655 #endif /* SIMULATOR */
657 #define HAVE_SEMAPHORE_OBJECTS
659 #if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC
660 #define USB_STATUS_BY_EVENT
661 #define USB_DETECT_BY_DRV
662 #if CONFIG_CPU != IMX31L
663 #define INCLUDE_TIMEOUT_API
664 #endif
665 #endif /* HAVE_USBSTACK */
668 #endif /* BOOTLOADER */
670 #if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) \
671 || (CONFIG_CPU == AS3525) || (CONFIG_CPU == S3C2440) \
672 || defined(CPU_S5L870X)
673 #define HAVE_WAKEUP_OBJECTS
674 #endif
676 #endif /* (CONFIG_CODEC == SWCODEC) */
678 /* Determine if accesses should be strictly long aligned. */
679 #if (CONFIG_CPU == SH7034) || defined(CPU_ARM) || defined(CPU_MIPS)
680 #define ROCKBOX_STRICT_ALIGN 1
681 #endif
683 #ifndef CODEC_SIZE
684 #define CODEC_SIZE 0
685 #endif
687 /* This attribute can be used to ensure that certain symbols are never profiled
688 * which can be important as profiling a function de-inlines it */
689 #ifdef RB_PROFILE
690 #define NO_PROF_ATTR __attribute__ ((no_instrument_function))
691 #else
692 #define NO_PROF_ATTR
693 #endif
695 /* IRAM usage */
696 #if !defined(SIMULATOR) && /* Not for simulators */ \
697 (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
698 defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \
699 defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \
700 (CONFIG_CPU == AS3525 && MEMORYSIZE > 2) || /* AS3525 +2MB: core, plugins, codecs */ \
701 (CONFIG_CPU == AS3525 && MEMORYSIZE <= 2 && !defined(PLUGIN) && !defined(CODEC)) || /* AS3525 2MB:core only */ \
702 (CONFIG_CPU == PNX0101) || \
703 defined(CPU_S5L870X)) || /* Samsung S5L8700: core, plugins, codecs */ \
704 (CONFIG_CPU == JZ4732 && !defined(PLUGIN) && !defined(CODEC)) /* Jz4740: core only */
705 #define ICODE_ATTR __attribute__ ((section(".icode")))
706 #define ICONST_ATTR __attribute__ ((section(".irodata")))
707 #define IDATA_ATTR __attribute__ ((section(".idata")))
708 #define IBSS_ATTR __attribute__ ((section(".ibss")))
709 #define USE_IRAM
710 #if CONFIG_CPU != SH7034 && (CONFIG_CPU != AS3525 || MEMORYSIZE > 2) && CONFIG_CPU != JZ4732
711 #define PLUGIN_USE_IRAM
712 #endif
713 #if defined(CPU_ARM)
714 /* GCC quirk workaround: arm-elf-gcc treats static functions as short_call
715 * when not compiling with -ffunction-sections, even when the function has
716 * a section attribute. */
717 #define STATICIRAM
718 #else
719 #define STATICIRAM static
720 #endif
721 #else
722 #define ICODE_ATTR
723 #define ICONST_ATTR
724 #define IDATA_ATTR
725 #define IBSS_ATTR
726 #define STATICIRAM static
727 #endif
729 #if defined(SIMULATOR) && defined(__APPLE__)
730 #define DATA_ATTR __attribute__ ((section("__DATA, .data")))
731 #else
732 #define DATA_ATTR __attribute__ ((section(".data")))
733 #endif
735 #ifndef IRAM_LCDFRAMEBUFFER
736 /* if the LCD framebuffer has not been moved to IRAM, define it empty here */
737 #define IRAM_LCDFRAMEBUFFER
738 #endif
740 /* Change this if you want to build a single-core firmware for a multicore
741 * target for debugging */
742 #if defined(BOOTLOADER) || (CONFIG_CPU == PP6100)
743 #define FORCE_SINGLE_CORE
744 #endif
746 /* Core locking types - specifies type of atomic operation */
747 #define CORELOCK_NONE 0
748 #define SW_CORELOCK 1 /* Mutual exclusion provided by a software algorithm
749 and not a special semaphore instruction */
750 #define CORELOCK_SWAP 2 /* A swap (exchange) instruction */
752 #if defined(CPU_PP)
753 #define IDLE_STACK_SIZE 0x80
754 #define IDLE_STACK_WORDS 0x20
756 /* Attributes to place data in uncached DRAM */
757 /* These are useful beyond dual-core and ultimately beyond PP since they may
758 * be used for DMA buffers and such without cache maintenence calls. */
759 #define NOCACHEBSS_ATTR __attribute__((section(".ncbss"),nocommon))
760 #define NOCACHEDATA_ATTR __attribute__((section(".ncdata"),nocommon))
762 #if !defined(FORCE_SINGLE_CORE)
764 #define NUM_CORES 2
765 #define CURRENT_CORE current_core()
766 /* Attributes for core-shared data in DRAM where IRAM is better used for other
767 * purposes. */
768 #define SHAREDBSS_ATTR NOCACHEBSS_ATTR
769 #define SHAREDDATA_ATTR NOCACHEDATA_ATTR
771 #define IF_COP(...) __VA_ARGS__
772 #define IF_COP_VOID(...) __VA_ARGS__
773 #define IF_COP_CORE(core) core
775 #ifdef CPU_PP
776 #define CONFIG_CORELOCK SW_CORELOCK /* SWP(B) is broken */
777 #else
778 #define CONFIG_CORELOCK CORELOCK_SWAP
779 #endif
781 #endif /* !defined(BOOTLOADER) && CONFIG_CPU != PP5002 */
783 #endif /* CPU_PP */
785 #ifndef CONFIG_CORELOCK
786 #define CONFIG_CORELOCK CORELOCK_NONE
787 #endif
789 #if CONFIG_CORELOCK == SW_CORELOCK
790 #define IF_SWCL(...) __VA_ARGS__
791 #define IFN_SWCL(...)
792 #else
793 #define IF_SWCL(...)
794 #define IFN_SWCL(...) __VA_ARGS__
795 #endif /* CONFIG_CORELOCK == */
797 #ifndef NUM_CORES
798 /* Default to single core */
799 #define NUM_CORES 1
800 #define CURRENT_CORE CPU
801 /* Attributes for core-shared data in DRAM - no caching considerations */
802 #define SHAREDBSS_ATTR
803 #define SHAREDDATA_ATTR
804 #ifndef NOCACHEBSS_ATTR
805 #define NOCACHEBSS_ATTR
806 #define NOCACHEDATA_ATTR
807 #endif
808 #define CONFIG_CORELOCK CORELOCK_NONE
810 #define IF_COP(...)
811 #define IF_COP_VOID(...) void
812 #define IF_COP_CORE(core) CURRENT_CORE
814 #endif /* NUM_CORES */
816 #ifdef HAVE_HEADPHONE_DETECTION
817 /* Timeout objects required if headphone detection is enabled */
818 #ifndef INCLUDE_TIMEOUT_API
819 #define INCLUDE_TIMEOUT_API
820 #endif
821 #endif /* HAVE_HEADPHONE_DETECTION */
823 #if defined(HAVE_USBSTACK) || (CONFIG_STORAGE & STORAGE_NAND)
824 #define STORAGE_GET_INFO
825 #endif
827 #ifdef CPU_MIPS
828 #include <stdbool.h> /* MIPS GCC fix? */
829 #endif
831 #if defined(HAVE_USBSTACK)
832 /* Define the implemented USB transport classes */
833 #if CONFIG_USBOTG == USBOTG_ISP1583
834 #define USB_HAS_BULK
835 #elif (CONFIG_USBOTG == USBOTG_ARC) || \
836 (CONFIG_USBOTG == USBOTG_JZ4740) || \
837 (CONFIG_USBOTG == USBOTG_M66591)
838 #define USB_HAS_BULK
839 #define USB_HAS_INTERRUPT
840 #elif defined(CPU_TCC780X) || defined(CPU_TCC77X)
841 #define USB_HAS_BULK
842 #elif CONFIG_USBOTG == USBOTG_S3C6400X
843 #define USB_HAS_BULK
844 #define USB_HAS_INTERRUPT
845 #endif /* CONFIG_USBOTG */
847 /* define the class drivers to enable */
848 #ifdef BOOTLOADER
850 /* enable usb storage for targets that do bootloader usb */
851 #if (defined(TOSHIBA_GIGABEAT_S) || \
852 (defined(CREATIVE_ZVx) || \
853 defined(CPU_TCC77X) || defined(CPU_TCC780X))) || \
854 (CONFIG_USBOTG == USBOTG_JZ4740) || defined(IPOD_NANO2G)
855 #define USB_ENABLE_STORAGE
856 #endif
858 #else /* BOOTLOADER */
860 #ifndef SIMULATOR
861 //#define USB_ENABLE_SERIAL
862 #define USB_ENABLE_STORAGE
864 #ifdef USB_HAS_INTERRUPT
865 #define USB_ENABLE_HID
866 #else
867 #define USB_ENABLE_CHARGING_ONLY
868 #endif
869 #endif
871 #endif /* BOOTLOADER */
873 #endif /* HAVE_USBSTACK */
877 #endif /* __CONFIG_H__ */