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