1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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 ****************************************************************************/
29 /* symbolic names for multiple choice configurations: */
31 /* CONFIG_STORAGE (note these are combineable bit-flags) */
32 #define STORAGE_ATA 0x01
33 #define STORAGE_MMC 0x02
34 #define STORAGE_SD 0x04
35 #define STORAGE_NAND 0x08
36 #define STORAGE_RAMDISK 0x10
38 /* CONFIG_TUNER (note these are combineable bit-flags) */
39 #define S1A0903X01 0x01 /* Samsung */
40 #define TEA5767 0x02 /* Philips */
41 #define LV24020LP 0x04 /* Sanyo */
42 #define SI4700 0x08 /* Silicon Labs */
43 #define TEA5760 0x10 /* Philips */
44 #define LV240000 0x20 /* Sanyo */
50 #define SWCODEC 1 /* if codec is done by SW */
72 #define AT91SAM9260 9260
76 #define RECORDER_PAD 2
78 #define IRIVER_H100_PAD 4
79 #define IRIVER_H300_PAD 5
80 #define IAUDIO_X5M5_PAD 6
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
115 /* CONFIG_REMOTE_KEYPAD */
116 #define H100_REMOTE 1
117 #define H300_REMOTE 2
119 #define MROBE_REMOTE 4
121 /* CONFIG_BACKLIGHT_FADING */
122 /* No fading capabilities at all (yet) */
123 #define BACKLIGHT_NO_FADING 0x0
124 /* Backlight fading is controlled using a hardware PWM mechanism */
125 #define BACKLIGHT_FADING_PWM 0x1
126 /* Backlight is controlled using a software implementation
127 * BACKLIGHT_FADING_SW_SETTING means that backlight is turned on by only setting
128 * the brightness (i.e. no real difference between backlight_on and
129 * backlight_set_brightness)
130 * BACKLIGHT_FADING_SW_SETTING means that backlight brightness is restored
131 * "in hardware", from a hardware register upon backlight_on
132 * Both types need to have minor adjustments in the software fading code */
133 #define BACKLIGHT_FADING_SW_SETTING 0x2
134 #define BACKLIGHT_FADING_SW_HW_REG 0x4
135 /* Backlight fading is done in a target specific way
136 * for example in hardware, but not controllable*/
137 #define BACKLIGHT_FADING_TARGET 0x8
139 /* CONFIG_CHARGING */
142 #define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging
143 * (CPU cannot read charger state but may read
144 * when power is plugged-in). */
145 #define CHARGING_MONITOR 2 /* Hardware controlled charging with monitoring
146 * (CPU is able to read HW charging state and
147 * when power is plugged-in). */
149 /* Mostly target-specific code in the /target tree */
150 #define CHARGING_TARGET 3 /* Any algorithm - usually software controlled
151 * charging or specific programming is required to
152 * use the charging hardware. */
155 #define LCD_SSD1815 1 /* as used by Archos Recorders and Ondios */
156 #define LCD_SSD1801 2 /* as used by Archos Player/Studio */
157 #define LCD_S1D15E06 3 /* as used by iRiver H100 series */
158 #define LCD_H300 4 /* as used by iRiver H300 series, exact model name is
159 unknown at the time of this writing */
160 #define LCD_X5 5 /* as used by iAudio X5 series, exact model name is
161 unknown at the time of this writing */
162 #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */
163 #define LCD_IPODNANO 7 /* as used by iPod Nano */
164 #define LCD_IPODVIDEO 8 /* as used by iPod Video */
165 #define LCD_IPOD2BPP 9 /* as used by all fullsize greyscale iPods */
166 #define LCD_IPODMINI 10 /* as used by iPod Mini g1/g2 */
167 #define LCD_IFP7XX 11 /* as used by iRiver iFP 7xx/8xx */
168 #define LCD_GIGABEAT 12
169 #define LCD_H10_20GB 13 /* as used by iriver H10 20Gb */
170 #define LCD_H10_5GB 14 /* as used by iriver H10 5Gb */
171 #define LCD_TPJ1022 15 /* as used by Tatung Elio TPJ-1022 */
172 #define LCD_DSC25 16 /* as used by Archos AV300 */
173 #define LCD_C200 17 /* as used by Sandisk Sansa c200 */
174 #define LCD_MROBE500 18 /* as used by Olympus M:Robe 500i */
175 #define LCD_MROBE100 19 /* as used by Olympus M:Robe 100 */
176 #define LCD_LOGIKDAX 20 /* as used by Logik DAX - SSD1815 */
177 #define LCD_IAUDIO67 21 /* as used by iAudio 6/7 - unknown */
178 #define LCD_CREATIVEZVM 22 /* as used by Creative Zen Vision:M */
179 #define LCD_TL0350A 23 /* as used by the iAudio M3 remote, treated as main LCD */
180 #define LCD_COWOND2 24 /* as used by Cowon D2 - LTV250QV, TCC7801 driver */
181 #define LCD_SA9200 25 /* as used by the Philips SA9200 */
182 #define LCD_S6B33B2 26 /* as used by the Sansa c100 */
183 #define LCD_HDD1630 27 /* as used by the Philips HDD1630 */
184 #define LCD_MEIZUM6 28 /* as used by the Meizu M6SP and M6SL (various models) */
185 #define LCD_ONDAVX747 29 /* as used by the Onda VX747 */
186 #define LCD_ONDAVX767 30 /* as used by the Onda VX767 */
187 #define LCD_SSD1303 31 /* as used by the Sansa Clip */
188 #define LCD_FUZE 32 /* as used by the Sansa Fuze */
189 #define LCD_LYRE_PROTO1 33 /* as used by the Lyre */
190 #define LCD_YH925 34 /* as used by Samsung YH-925 (similar to the H10 20GB) */
192 /* LCD_PIXELFORMAT */
193 #define HORIZONTAL_PACKING 1
194 #define VERTICAL_PACKING 2
195 #define HORIZONTAL_INTERLEAVED 3
196 #define VERTICAL_INTERLEAVED 4
198 #define RGB565SWAPPED 3553
200 /* CONFIG_ORIENTATION */
201 #define SCREEN_PORTRAIT 0
202 #define SCREEN_LANDSCAPE 1
203 #define SCREEN_SQUARE 2
206 #define I2C_NONE 0 /* For targets that do not use I2C - as the
208 #define I2C_PLAYREC 1 /* Archos Player/Recorder style */
209 #define I2C_ONDIO 2 /* Ondio style */
210 #define I2C_COLDFIRE 3 /* Coldfire style */
211 #define I2C_PP5002 4 /* PP5002 style */
212 #define I2C_PP5020 5 /* PP5020 style */
213 #define I2C_PNX0101 6 /* PNX0101 style */
214 #define I2C_S3C2440 7
215 #define I2C_PP5024 8 /* PP5024 style */
217 #define I2C_TCC77X 10
218 #define I2C_TCC780X 11
219 #define I2C_DM320 12 /* DM320 style */
220 #define I2C_S5L8700 13
221 #define I2C_JZ47XX 14 /* Ingenic Jz47XX style */
222 #define I2C_AS3525 15
225 #define LED_REAL 1 /* SW controlled LED (Archos recorders, player) */
226 #define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */
227 /* else HW controlled LED (iRiver H1x0) */
230 #define NAND_IFP7XX 1
232 #define NAND_SAMSUNG 3
233 #define NAND_CC 4 /* ChinaChip */
236 #define RTC_M41ST84W 1 /* Archos Recorder */
237 #define RTC_PCF50605 2 /* iPod 3G, 4G & Mini */
238 #define RTC_PCF50606 3 /* iriver H300 */
239 #define RTC_S3C2440 4
240 #define RTC_E8564 5 /* iriver H10 */
241 #define RTC_AS3514 6 /* Sandisk Sansa series */
242 #define RTC_DS1339_DS3231 7 /* h1x0 RTC mod */
244 #define RTC_RX5X348AB 9
245 #define RTC_TCC77X 10
246 #define RTC_TCC780X 11
248 #define RTC_MC13783 13 /* Freescale MC13783 PMIC */
249 #define RTC_S5L8700 14
250 #define RTC_S35390A 15
251 #define RTC_JZ47XX 16 /* Ingenic Jz47XX */
254 #define USBOTG_M66591 6591 /* M:Robe 500 */
255 #define USBOTG_ISP1362 1362 /* iriver H300 */
256 #define USBOTG_ISP1583 1583 /* Creative Zen Vision:M */
257 #define USBOTG_M5636 5636 /* iAudio X5 */
258 #define USBOTG_ARC 5020 /* PortalPlayer 502x */
259 #define USBOTG_JZ4740 4740 /* Ingenic Jz4740/Jz4732 */
260 #define USBOTG_AS3525 3525 /* AMS AS3525 */
266 /* now go and pick yours */
267 #if defined(ARCHOS_PLAYER)
268 #include "config-player.h"
269 #elif defined(ARCHOS_RECORDER)
270 #include "config-recorder.h"
271 #elif defined(ARCHOS_FMRECORDER)
272 #include "config-fmrecorder.h"
273 #elif defined(ARCHOS_RECORDERV2)
274 #include "config-recorderv2.h"
275 #elif defined(ARCHOS_ONDIOSP)
276 #include "config-ondiosp.h"
277 #elif defined(ARCHOS_ONDIOFM)
278 #include "config-ondiofm.h"
279 #elif defined(ARCHOS_AV300)
280 #include "config-av300.h"
281 #elif defined(IRIVER_H100)
282 #include "config-h100.h"
283 #elif defined(IRIVER_H120)
284 #include "config-h120.h"
285 #elif defined(IRIVER_H300)
286 #include "config-h300.h"
287 #elif defined(IAUDIO_X5)
288 #include "config-iaudiox5.h"
289 #elif defined(IAUDIO_M5)
290 #include "config-iaudiom5.h"
291 #elif defined(IAUDIO_M3)
292 #include "config-iaudiom3.h"
293 #elif defined(IPOD_COLOR)
294 #include "config-ipodcolor.h"
295 #elif defined(IPOD_NANO)
296 #include "config-ipodnano.h"
297 #elif defined(IPOD_VIDEO)
298 #include "config-ipodvideo.h"
299 #elif defined(IPOD_1G2G)
300 #include "config-ipod1g2g.h"
301 #elif defined(IPOD_3G)
302 #include "config-ipod3g.h"
303 #elif defined(IPOD_4G)
304 #include "config-ipod4g.h"
305 #elif defined(IPOD_NANO2G)
306 #include "config-ipodnano2g.h"
307 #elif defined(IRIVER_IFP7XX)
308 #include "config-ifp7xx.h"
309 #elif defined(GIGABEAT_F)
310 #include "config-gigabeat.h"
311 #elif defined(GIGABEAT_S)
312 #include "config-gigabeat-s.h"
313 #elif defined(IPOD_MINI)
314 #include "config-ipodmini.h"
315 #elif defined(IPOD_MINI2G)
316 #include "config-ipodmini2g.h"
317 #elif defined(IRIVER_H10)
318 #include "config-h10.h"
319 #elif defined(IRIVER_H10_5GB)
320 #include "config-h10_5gb.h"
321 #elif defined(SANSA_E200)
322 #include "config-e200.h"
323 #elif defined(SANSA_C200)
324 #include "config-c200.h"
325 #elif defined(SANSA_M200)
326 #include "config-m200.h"
327 #elif defined(ELIO_TPJ1022)
328 #include "config-tpj1022.h"
329 #elif defined(MROBE_100)
330 #include "config-mrobe100.h"
331 #elif defined(MROBE_500)
332 #include "config-mrobe500.h"
333 #elif defined(LOGIK_DAX)
334 #include "config-logikdax.h"
335 #elif defined(IAUDIO_7)
336 #include "config-iaudio7.h"
337 #elif defined(COWON_D2)
338 #include "config-cowond2.h"
339 #elif defined(CREATIVE_ZVM)
340 #include "config-creativezvm.h"
341 #elif defined(CREATIVE_ZVM60GB)
342 #include "config-creativezvm60gb.h"
343 #elif defined(CREATIVE_ZV)
344 #include "config-creativezv.h"
345 #elif defined(PHILIPS_SA9200)
346 #include "config-sa9200.h"
347 #elif defined(PHILIPS_HDD1630)
348 #include "config-hdd1630.h"
349 #elif defined(SANSA_C100)
350 #include "config-c100.h"
351 #elif defined(MEIZU_M6SL)
352 #include "config-meizu-m6sl.h"
353 #elif defined(MEIZU_M6SP)
354 #include "config-meizu-m6sp.h"
355 #elif defined(MEIZU_M3)
356 #include "config-meizu-m3.h"
357 #elif defined(ONDA_VX747) || defined(ONDA_VX747P) || defined(ONDA_VX777)
358 #include "config-ondavx747.h"
359 #elif defined(ONDA_VX767)
360 #include "config-ondavx767.h"
361 #elif defined(SANSA_CLIP)
362 #include "config-clip.h"
363 #elif defined(SANSA_E200V2)
364 #include "config-e200v2.h"
365 #elif defined(SANSA_M200V4)
366 #include "config-m200v4.h"
367 #elif defined(SANSA_FUZE)
368 #include "config-fuze.h"
369 #elif defined(SANSA_C200V2)
370 #include "config-c200v2.h"
371 #elif defined(LYRE_PROTO1)
372 #include "config-lyre_proto1.h"
373 #elif defined(SAMSUNG_YH820)
374 #include "config-yh820.h"
375 #elif defined(SAMSUNG_YH920)
376 #include "config-yh920.h"
377 #elif defined(SAMSUNG_YH925)
378 #include "config-yh925.h"
380 /* no known platform */
383 /* setup basic macros from capability masks */
384 #include "config_caps.h"
386 /* now set any CONFIG_ defines correctly if they are not used,
387 No need to do this on CONFIG_'s which are compulsory (e.g CONFIG_CODEC ) */
389 #if !defined(CONFIG_BACKLIGHT_FADING)
390 #define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
394 #define CONFIG_TUNER 0
397 #ifndef CONFIG_USBOTG
398 #define CONFIG_USBOTG 0
405 #ifndef CONFIG_CHARGING
406 #define CONFIG_CHARGING 0
413 #ifndef CONFIG_ORIENTATION
414 #if LCD_HEIGHT > LCD_WIDTH
415 #define CONFIG_ORIENTATION SCREEN_PORTRAIT
416 #elif LCD_HEIGHT < LCD_WIDTH
417 #define CONFIG_ORIENTATION SCREEN_LANDSCAPE
419 #define CONFIG_ORIENTATION SCREEN_SQUARE
423 /* Pixel aspect ratio is defined in terms of a multiplier for pixel width and
424 * height, and is set to 1:1 if the target does not set a value
426 #ifndef LCD_PIXEL_ASPECT_HEIGHT
427 #define LCD_PIXEL_ASPECT_HEIGHT 1
429 #ifndef LCD_PIXEL_ASPECT_WIDTH
430 #define LCD_PIXEL_ASPECT_WIDTH 1
433 /* Used for split displays (Sansa Clip). Set to 0 otherwise */
434 #ifndef LCD_SPLIT_LINES
435 #define LCD_SPLIT_LINES 0
438 /* Simulator LCD dimensions. Set to standard dimensions if undefined */
439 #ifndef SIM_LCD_WIDTH
440 #define SIM_LCD_WIDTH LCD_WIDTH
442 #ifndef SIM_LCD_HEIGHT
443 #define SIM_LCD_HEIGHT (LCD_HEIGHT + LCD_SPLIT_LINES)
446 #ifdef HAVE_REMOTE_LCD
447 #ifndef SIM_REMOTE_WIDTH
448 #define SIM_REMOTE_WIDTH LCD_REMOTE_WIDTH
450 #ifndef SIM_REMOTE_HEIGHT
451 #define SIM_REMOTE_HEIGHT LCD_REMOTE_HEIGHT
453 #endif /* HAVE_REMOTE_LCD */
455 /* define this in the target config.h to use a different size */
456 #ifndef CONFIG_DEFAULT_ICON_HEIGHT
457 #define CONFIG_DEFAULT_ICON_HEIGHT 8
459 #ifndef CONFIG_DEFAULT_ICON_WIDTH
460 #define CONFIG_DEFAULT_ICON_WIDTH 6
462 #ifndef CONFIG_REMOTE_DEFAULT_ICON_HEIGHT
463 #define CONFIG_REMOTE_DEFAULT_ICON_HEIGHT 8
465 #ifndef CONFIG_REMOTE_DEFAULT_ICON_WIDTH
466 #define CONFIG_REMOTE_DEFAULT_ICON_WIDTH 6
469 #if (CONFIG_TUNER & (CONFIG_TUNER - 1)) != 0
470 /* Multiple possible tuners */
471 #define CONFIG_TUNER_MULTI
474 #if (CONFIG_STORAGE & (CONFIG_STORAGE - 1)) != 0
475 /* Multiple storage drivers */
476 #define CONFIG_STORAGE_MULTI
479 /* deactivate fading in bootloader/sim */
480 #if defined(BOOTLOADER) || defined(SIMULATOR)
481 #undef CONFIG_BACKLIGHT_FADING
482 #define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
485 /* determine which setting/manual text to use */
486 #if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_PWM)
488 /* possibly overridden in target config */
489 #if !defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) \
490 && !defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
491 #define HAVE_BACKLIGHT_FADING_INT_SETTING
494 #elif (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_SETTING) \
495 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_HW_REG) \
496 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_TARGET)
498 /* possibly overridden in target config */
499 #if !defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) \
500 && !defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
501 #define HAVE_BACKLIGHT_FADING_BOOL_SETTING
504 #endif /* CONFIG_BACKLIGHT_FADING */
506 #if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
507 /* Bootloaders don't use CPU frequency adjustment */
508 #undef HAVE_ADJUSTABLE_CPU_FREQ
511 /* Enable the directory cache and tagcache in RAM if we have
512 * plenty of RAM. Both features can be enabled independently. */
513 #if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) && \
515 #define HAVE_DIRCACHE
517 #define HAVE_TC_RAMCACHE
521 /* Add one HAVE_ define for all mas35xx targets */
522 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3507D) || (CONFIG_CODEC == MAS3539F)
526 #if (CONFIG_CODEC == SWCODEC)
529 #if CONFIG_CPU == IMX31L
530 /* Priority in bootloader is wanted */
531 #define HAVE_PRIORITY_SCHEDULING
532 #define USB_STATUS_BY_EVENT
533 #define USB_DETECT_BY_DRV
536 #else /* !BOOTLOADER */
538 #define HAVE_EXTENDED_MESSAGING_AND_NAME
541 #define HAVE_PRIORITY_SCHEDULING
542 #define HAVE_SCHEDULER_BOOSTCTRL
543 #endif /* SIMULATOR */
545 #define HAVE_SEMAPHORE_OBJECTS
547 #if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC
548 #define USB_STATUS_BY_EVENT
549 #define USB_DETECT_BY_DRV
550 #if CONFIG_CPU != IMX31L
551 #define INCLUDE_TIMEOUT_API
553 #endif /* HAVE_USBSTACK */
556 #endif /* BOOTLOADER */
558 #if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) \
559 || (CONFIG_CPU == AS3525) || (CONFIG_CPU == S3C2440) \
560 || (CONFIG_CPU == S5L8700)
561 #define HAVE_WAKEUP_OBJECTS
564 #endif /* (CONFIG_CODEC == SWCODEC) */
566 /* define for all cpus from SH family */
567 #if (CONFIG_CPU == SH7034)
571 /* define for all cpus from coldfire family */
572 #if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250)
576 /* define for all cpus from PP family */
577 #if (CONFIG_CPU == PP5002)
579 #elif (CONFIG_CPU == PP5020) || (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
584 /* define for all cpus from TCC77X family */
585 #if (CONFIG_CPU == TCC771L) || (CONFIG_CPU == TCC773L) || (CONFIG_CPU == TCC770)
589 /* define for all cpus from TCC780 family */
590 #if (CONFIG_CPU == TCC7801)
594 /* define for all cpus from ARM7TDMI family (for specific optimisations) */
595 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == DSC25)
599 /* define for all cpus from ARM family */
600 #if (CONFIG_CPU == IMX31L)
602 #define ARM_ARCH 6 /* ARMv6 */
605 #if defined(CPU_TCC77X) || defined(CPU_TCC780X) || (CONFIG_CPU == DM320) \
606 || (CONFIG_CPU == AT91SAM9260)
608 #define ARM_ARCH 5 /* ARMv5 */
611 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) \
612 || (CONFIG_CPU == DSC25) || (CONFIG_CPU == S5L8700) || (CONFIG_CPU == AS3525)
614 #define ARM_ARCH 4 /* ARMv4 */
617 #if (CONFIG_CPU == JZ4732)
621 /* Determine if accesses should be strictly long aligned. */
622 #if (CONFIG_CPU == SH7034) || defined(CPU_ARM) || defined(CPU_MIPS)
623 #define ROCKBOX_STRICT_ALIGN 1
630 /* This attribute can be used to ensure that certain symbols are never profiled
631 * which can be important as profiling a function de-inlines it */
633 #define NO_PROF_ATTR __attribute__ ((no_instrument_function))
639 #if !defined(SIMULATOR) && /* Not for simulators */ \
640 (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
641 defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \
642 defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \
643 (CONFIG_CPU == AS3525 && MEMORYSIZE > 2) || /* AS3525 +2MB: core, plugins, codecs */ \
644 (CONFIG_CPU == AS3525 && MEMORYSIZE <= 2 && !defined(PLUGIN) && !defined(CODEC)) || /* AS3525 2MB:core only */ \
645 (CONFIG_CPU == PNX0101) || \
646 (CONFIG_CPU == S5L8700)) /* Samsung S5L8700: core, plugins, codecs */ || \
647 (CONFIG_CPU == JZ4732 && !defined(PLUGIN) && !defined(CODEC)) /* Jz4740: core only */
648 #define ICODE_ATTR __attribute__ ((section(".icode")))
649 #define ICONST_ATTR __attribute__ ((section(".irodata")))
650 #define IDATA_ATTR __attribute__ ((section(".idata")))
651 #define IBSS_ATTR __attribute__ ((section(".ibss")))
653 #if CONFIG_CPU != SH7034 && (CONFIG_CPU != AS3525 || MEMORYSIZE > 2) && CONFIG_CPU != JZ4732
654 #define PLUGIN_USE_IRAM
657 /* GCC quirk workaround: arm-elf-gcc treats static functions as short_call
658 * when not compiling with -ffunction-sections, even when the function has
659 * a section attribute. */
662 #define STATICIRAM static
669 #define STATICIRAM static
672 #if defined(SIMULATOR) && defined(__APPLE__)
673 #define DATA_ATTR __attribute__ ((section(".section __DATA, __data")))
675 #define DATA_ATTR __attribute__ ((section(".data")))
678 #ifndef IRAM_LCDFRAMEBUFFER
679 /* if the LCD framebuffer has not been moved to IRAM, define it empty here */
680 #define IRAM_LCDFRAMEBUFFER
683 /* Change this if you want to build a single-core firmware for a multicore
684 * target for debugging */
685 #if defined(BOOTLOADER)
686 #define FORCE_SINGLE_CORE
689 /* Core locking types - specifies type of atomic operation */
690 #define CORELOCK_NONE 0
691 #define SW_CORELOCK 1 /* Mutual exclusion provided by a software algorithm
692 and not a special semaphore instruction */
693 #define CORELOCK_SWAP 2 /* A swap (exchange) instruction */
696 #define IDLE_STACK_SIZE 0x80
697 #define IDLE_STACK_WORDS 0x20
699 /* Attributes to place data in uncached DRAM */
700 /* These are useful beyond dual-core and ultimately beyond PP since they may
701 * be used for DMA buffers and such without cache maintenence calls. */
702 #define NOCACHEBSS_ATTR __attribute__((section(".ncbss"),nocommon))
703 #define NOCACHEDATA_ATTR __attribute__((section(".ncdata"),nocommon))
705 #if !defined(FORCE_SINGLE_CORE)
708 #define CURRENT_CORE current_core()
709 /* Attributes for core-shared data in DRAM where IRAM is better used for other
711 #define SHAREDBSS_ATTR NOCACHEBSS_ATTR
712 #define SHAREDDATA_ATTR NOCACHEDATA_ATTR
714 #define IF_COP(...) __VA_ARGS__
715 #define IF_COP_VOID(...) __VA_ARGS__
716 #define IF_COP_CORE(core) core
719 #define CONFIG_CORELOCK SW_CORELOCK /* SWP(B) is broken */
721 #define CONFIG_CORELOCK CORELOCK_SWAP
724 #endif /* !defined(BOOTLOADER) && CONFIG_CPU != PP5002 */
728 #ifndef CONFIG_CORELOCK
729 #define CONFIG_CORELOCK CORELOCK_NONE
732 #if CONFIG_CORELOCK == SW_CORELOCK
733 #define IF_SWCL(...) __VA_ARGS__
734 #define IFN_SWCL(...)
737 #define IFN_SWCL(...) __VA_ARGS__
738 #endif /* CONFIG_CORELOCK == */
741 /* Default to single core */
743 #define CURRENT_CORE CPU
744 /* Attributes for core-shared data in DRAM - no caching considerations */
745 #define SHAREDBSS_ATTR
746 #define SHAREDDATA_ATTR
747 #ifndef NOCACHEBSS_ATTR
748 #define NOCACHEBSS_ATTR
749 #define NOCACHEDATA_ATTR
751 #define CONFIG_CORELOCK CORELOCK_NONE
754 #define IF_COP_VOID(...) void
755 #define IF_COP_CORE(core) CURRENT_CORE
757 #endif /* NUM_CORES */
759 #ifdef HAVE_HEADPHONE_DETECTION
760 /* Timeout objects required if headphone detection is enabled */
761 #ifndef INCLUDE_TIMEOUT_API
762 #define INCLUDE_TIMEOUT_API
764 #endif /* HAVE_HEADPHONE_DETECTION */
766 #if defined(HAVE_USBSTACK) || (CONFIG_STORAGE & STORAGE_NAND)
767 #define STORAGE_GET_INFO
771 #include <stdbool.h> /* MIPS GCC fix? */
774 #if defined(HAVE_USBSTACK)
775 /* Define the implemented USB transport classes */
776 #if CONFIG_USBOTG == USBOTG_ISP1583
778 #elif CONFIG_USBOTG == USBOTG_ARC
780 #define USB_HAS_INTERRUPT
781 #elif CONFIG_USBOTG == USBOTG_JZ4740
783 #define USB_HAS_INTERRUPT
784 #elif defined(CPU_TCC780X) || defined(CPU_TCC77X) || defined(MROBE_500)
786 #endif /* CONFIG_USBOTG */
788 /* define the class drivers to enable */
791 /* enable usb storage for targets that do bootloader usb */
792 #if (defined(TOSHIBA_GIGABEAT_S) || \
793 (defined(CREATIVE_ZVx) || \
794 defined(CPU_TCC77X) || defined(CPU_TCC780X))) || \
795 (CONFIG_USBOTG == USBOTG_JZ4740)
796 #define USB_ENABLE_STORAGE
799 #else /* BOOTLOADER */
801 //#define USB_ENABLE_SERIAL
802 #define USB_ENABLE_STORAGE
804 #ifdef USB_HAS_INTERRUPT
805 #define USB_ENABLE_HID
807 #define USB_ENABLE_CHARGING_ONLY
810 #endif /* BOOTLOADER */
812 #endif /* HAVE_USBSTACK */
816 #endif /* __CONFIG_H__ */