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