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 */
75 #define RECORDER_PAD 2
77 #define IRIVER_H100_PAD 4
78 #define IRIVER_H300_PAD 5
79 #define IAUDIO_X5M5_PAD 6
82 #define IPOD_1G2G_PAD 9
83 #define IRIVER_IFP7XX_PAD 10
84 #define GIGABEAT_PAD 11
85 #define IRIVER_H10_PAD 12
86 #define SANSA_E200_PAD 13
87 #define SANSA_C200_PAD 14
88 #define ELIO_TPJ1022_PAD 15
89 #define ARCHOS_AV300_PAD 16
90 #define MROBE100_PAD 17
91 #define MROBE500_PAD 18
92 #define GIGABEAT_S_PAD 19
93 #define LOGIK_DAX_PAD 20
94 #define IAUDIO67_PAD 21
95 #define COWOND2_PAD 22
96 #define IAUDIO_M3_PAD 23
97 #define CREATIVEZVM_PAD 24
98 #define SANSA_M200_PAD 25
99 #define CREATIVEZV_PAD 26
100 #define PHILIPS_SA9200_PAD 27
101 #define SANSA_C100_PAD 28
102 #define PHILIPS_HDD1630_PAD 29
103 #define MEIZU_M6SL_PAD 30
104 #define ONDAVX747_PAD 31
105 #define ONDAVX767_PAD 32
106 #define MEIZU_M6SP_PAD 33
107 #define MEIZU_M3_PAD 34
108 #define SANSA_CLIP_PAD 35
109 #define SANSA_FUZE_PAD 36
111 /* CONFIG_REMOTE_KEYPAD */
112 #define H100_REMOTE 1
113 #define H300_REMOTE 2
116 /* CONFIG_BACKLIGHT_FADING */
117 /* No fading capabilities at all (yet) */
118 #define BACKLIGHT_NO_FADING 0x0
119 /* Backlight fading is controlled using a hardware PWM mechanism */
120 #define BACKLIGHT_FADING_PWM 0x1
121 /* Backlight is controlled using a software implementation
122 * BACKLIGHT_FADING_SW_SETTING means that backlight is turned on by only setting
123 * the brightness (i.e. no real difference between backlight_on and
124 * backlight_set_brightness)
125 * BACKLIGHT_FADING_SW_SETTING means that backlight brightness is restored
126 * "in hardware", from a hardware register upon backlight_on
127 * Both types need to have minor adjustments in the software fading code */
128 #define BACKLIGHT_FADING_SW_SETTING 0x2
129 #define BACKLIGHT_FADING_SW_HW_REG 0x4
130 /* Backlight fading is done in a target specific way
131 * for example in hardware, but not controllable*/
132 #define BACKLIGHT_FADING_TARGET 0x8
134 /* CONFIG_CHARGING */
137 #define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging
138 * (CPU cannot read charger state but may read
139 * when power is plugged-in). */
140 #define CHARGING_MONITOR 2 /* Hardware controlled charging with monitoring
141 * (CPU is able to read HW charging state and
142 * when power is plugged-in). */
144 /* Mostly target-specific code in the /target tree */
145 #define CHARGING_TARGET 3 /* Any algorithm - usually software controlled
146 * charging or specific programming is required to
147 * use the charging hardware. */
150 #define LCD_SSD1815 1 /* as used by Archos Recorders and Ondios */
151 #define LCD_SSD1801 2 /* as used by Archos Player/Studio */
152 #define LCD_S1D15E06 3 /* as used by iRiver H100 series */
153 #define LCD_H300 4 /* as used by iRiver H300 series, exact model name is
154 unknown at the time of this writing */
155 #define LCD_X5 5 /* as used by iAudio X5 series, exact model name is
156 unknown at the time of this writing */
157 #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */
158 #define LCD_IPODNANO 7 /* as used by iPod Nano */
159 #define LCD_IPODVIDEO 8 /* as used by iPod Video */
160 #define LCD_IPOD2BPP 9 /* as used by all fullsize greyscale iPods */
161 #define LCD_IPODMINI 10 /* as used by iPod Mini g1/g2 */
162 #define LCD_IFP7XX 11 /* as used by iRiver iFP 7xx/8xx */
163 #define LCD_GIGABEAT 12
164 #define LCD_H10_20GB 13 /* as used by iriver H10 20Gb */
165 #define LCD_H10_5GB 14 /* as used by iriver H10 5Gb */
166 #define LCD_TPJ1022 15 /* as used by Tatung Elio TPJ-1022 */
167 #define LCD_DSC25 16 /* as used by Archos AV300 */
168 #define LCD_C200 17 /* as used by Sandisk Sansa c200 */
169 #define LCD_MROBE500 18 /* as used by Olympus M:Robe 500i */
170 #define LCD_MROBE100 19 /* as used by Olympus M:Robe 100 */
171 #define LCD_LOGIKDAX 20 /* as used by Logik DAX - SSD1815 */
172 #define LCD_IAUDIO67 21 /* as used by iAudio 6/7 - unknown */
173 #define LCD_CREATIVEZVM 22 /* as used by Creative Zen Vision:M */
174 #define LCD_TL0350A 23 /* as used by the iAudio M3 remote, treated as main LCD */
175 #define LCD_COWOND2 24 /* as used by Cowon D2 - LTV250QV, TCC7801 driver */
176 #define LCD_SA9200 25 /* as used by the Philips SA9200 */
177 #define LCD_S6B33B2 26 /* as used by the Sansa c100 */
178 #define LCD_HDD1630 27 /* as used by the Philips HDD1630 */
179 #define LCD_MEIZUM6 28 /* as used by the Meizu M6SP and M6SL (various models) */
180 #define LCD_ONDAVX747 29 /* as used by the Onda VX747 */
181 #define LCD_ONDAVX767 30 /* as used by the Onda VX767 */
182 #define LCD_SSD1303 31 /* as used by the Sansa Clip */
183 #define LCD_FUZE 32 /* as used by the Sansa Fuze */
185 /* LCD_PIXELFORMAT */
186 #define HORIZONTAL_PACKING 1
187 #define VERTICAL_PACKING 2
188 #define HORIZONTAL_INTERLEAVED 3
189 #define VERTICAL_INTERLEAVED 4
191 #define RGB565SWAPPED 3553
193 /* CONFIG_ORIENTATION */
194 #define SCREEN_PORTRAIT 0
195 #define SCREEN_LANDSCAPE 1
196 #define SCREEN_SQUARE 2
199 #define I2C_PLAYREC 1 /* Archos Player/Recorder style */
200 #define I2C_ONDIO 2 /* Ondio style */
201 #define I2C_COLDFIRE 3 /* Coldfire style */
202 #define I2C_PP5002 4 /* PP5002 style */
203 #define I2C_PP5020 5 /* PP5020 style */
204 #define I2C_PNX0101 6 /* PNX0101 style */
205 #define I2C_S3C2440 7
206 #define I2C_PP5024 8 /* PP5024 style */
208 #define I2C_TCC77X 10
209 #define I2C_TCC780X 11
210 #define I2C_DM320 12 /* DM320 style */
211 #define I2C_S5L8700 13
212 #define I2C_JZ47XX 14 /* Ingenic Jz47XX style */
213 #define I2C_AS3525 15
216 #define LED_REAL 1 /* SW controlled LED (Archos recorders, player) */
217 #define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */
218 /* else HW controlled LED (iRiver H1x0) */
221 #define NAND_IFP7XX 1
223 #define NAND_SAMSUNG 3
224 #define NAND_CC 4 /* ChinaChip */
227 #define RTC_M41ST84W 1 /* Archos Recorder */
228 #define RTC_PCF50605 2 /* iPod 3G, 4G & Mini */
229 #define RTC_PCF50606 3 /* iriver H300 */
230 #define RTC_S3C2440 4
231 #define RTC_E8564 5 /* iriver H10 */
232 #define RTC_AS3514 6 /* Sandisk Sansa series */
233 #define RTC_DS1339_DS3231 7 /* h1x0 RTC mod */
235 #define RTC_RX5X348AB 9
236 #define RTC_TCC77X 10
237 #define RTC_TCC780X 11
239 #define RTC_MC13783 13 /* Freescale MC13783 PMIC */
240 #define RTC_S5L8700 14
241 #define RTC_S35390A 15
242 #define RTC_JZ47XX 16 /* Ingenic Jz47XX */
245 #define USBOTG_ISP1362 1362 /* iriver H300 */
246 #define USBOTG_ISP1583 1583 /* Creative Zen Vision:M */
247 #define USBOTG_M5636 5636 /* iAudio X5 */
248 #define USBOTG_ARC 5020 /* PortalPlayer 502x */
249 #define USBOTG_JZ4740 4740 /* Ingenic Jz4740/Jz4732 */
250 #define USBOTG_AS3525 3525 /* AMS AS3525 */
256 /* now go and pick yours */
257 #if defined(ARCHOS_PLAYER)
258 #include "config-player.h"
259 #elif defined(ARCHOS_RECORDER)
260 #include "config-recorder.h"
261 #elif defined(ARCHOS_FMRECORDER)
262 #include "config-fmrecorder.h"
263 #elif defined(ARCHOS_RECORDERV2)
264 #include "config-recorderv2.h"
265 #elif defined(ARCHOS_ONDIOSP)
266 #include "config-ondiosp.h"
267 #elif defined(ARCHOS_ONDIOFM)
268 #include "config-ondiofm.h"
269 #elif defined(ARCHOS_AV300)
270 #include "config-av300.h"
271 #elif defined(IRIVER_H100)
272 #include "config-h100.h"
273 #elif defined(IRIVER_H120)
274 #include "config-h120.h"
275 #elif defined(IRIVER_H300)
276 #include "config-h300.h"
277 #elif defined(IAUDIO_X5)
278 #include "config-iaudiox5.h"
279 #elif defined(IAUDIO_M5)
280 #include "config-iaudiom5.h"
281 #elif defined(IAUDIO_M3)
282 #include "config-iaudiom3.h"
283 #elif defined(IPOD_COLOR)
284 #include "config-ipodcolor.h"
285 #elif defined(IPOD_NANO)
286 #include "config-ipodnano.h"
287 #elif defined(IPOD_VIDEO)
288 #include "config-ipodvideo.h"
289 #elif defined(IPOD_1G2G)
290 #include "config-ipod1g2g.h"
291 #elif defined(IPOD_3G)
292 #include "config-ipod3g.h"
293 #elif defined(IPOD_4G)
294 #include "config-ipod4g.h"
295 #elif defined(IRIVER_IFP7XX)
296 #include "config-ifp7xx.h"
297 #elif defined(GIGABEAT_F)
298 #include "config-gigabeat.h"
299 #elif defined(GIGABEAT_S)
300 #include "config-gigabeat-s.h"
301 #elif defined(IPOD_MINI)
302 #include "config-ipodmini.h"
303 #elif defined(IPOD_MINI2G)
304 #include "config-ipodmini2g.h"
305 #elif defined(IRIVER_H10)
306 #include "config-h10.h"
307 #elif defined(IRIVER_H10_5GB)
308 #include "config-h10_5gb.h"
309 #elif defined(SANSA_E200)
310 #include "config-e200.h"
311 #elif defined(SANSA_C200)
312 #include "config-c200.h"
313 #elif defined(SANSA_M200)
314 #include "config-m200.h"
315 #elif defined(ELIO_TPJ1022)
316 #include "config-tpj1022.h"
317 #elif defined(MROBE_100)
318 #include "config-mrobe100.h"
319 #elif defined(MROBE_500)
320 #include "config-mrobe500.h"
321 #elif defined(LOGIK_DAX)
322 #include "config-logikdax.h"
323 #elif defined(IAUDIO_7)
324 #include "config-iaudio7.h"
325 #elif defined(COWON_D2)
326 #include "config-cowond2.h"
327 #elif defined(CREATIVE_ZVM)
328 #include "config-creativezvm.h"
329 #elif defined(CREATIVE_ZVM60GB)
330 #include "config-creativezvm60gb.h"
331 #elif defined(CREATIVE_ZV)
332 #include "config-creativezv.h"
333 #elif defined(PHILIPS_SA9200)
334 #include "config-sa9200.h"
335 #elif defined(PHILIPS_HDD1630)
336 #include "config-hdd1630.h"
337 #elif defined(SANSA_C100)
338 #include "config-c100.h"
339 #elif defined(MEIZU_M6SL)
340 #include "config-meizu-m6sl.h"
341 #elif defined(MEIZU_M6SP)
342 #include "config-meizu-m6sp.h"
343 #elif defined(MEIZU_M3)
344 #include "config-meizu-m3.h"
345 #elif defined(ONDA_VX747)
346 #include "config-ondavx747.h"
347 #elif defined(ONDA_VX747P)
348 #include "config-ondavx747p.h"
349 #elif defined(ONDA_VX767)
350 #include "config-ondavx767.h"
351 #elif defined(SANSA_CLIP)
352 #include "config-clip.h"
353 #elif defined(SANSA_E200V2)
354 #include "config-e200v2.h"
355 #elif defined(SANSA_M200V4)
356 #include "config-m200v4.h"
357 #elif defined(SANSA_FUZE)
358 #include "config-fuze.h"
359 #elif defined(SANSA_C200V2)
360 #include "config-c200v2.h"
362 /* no known platform */
365 /* setup basic macros from capability masks */
366 #include "config_caps.h"
368 /* now set any CONFIG_ defines correctly if they are not used,
369 No need to do this on CONFIG_'s which are compulsory (e.g CONFIG_CODEC ) */
371 #if !defined(CONFIG_BACKLIGHT_FADING)
372 #define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
376 #define CONFIG_TUNER 0
379 #ifndef CONFIG_USBOTG
380 #define CONFIG_USBOTG 0
387 #ifndef CONFIG_CHARGING
388 #define CONFIG_CHARGING 0
395 #ifndef CONFIG_ORIENTATION
396 #if LCD_HEIGHT > LCD_WIDTH
397 #define CONFIG_ORIENTATION SCREEN_PORTRAIT
398 #elif LCD_HEIGHT < LCD_WIDTH
399 #define CONFIG_ORIENTATION SCREEN_LANDSCAPE
401 #define CONFIG_ORIENTATION SCREEN_SQUARE
405 /* Pixel aspect ratio is defined in terms of a multiplier for pixel width and
406 * height, and is set to 1:1 if the target does not set a value
408 #ifndef LCD_PIXEL_ASPECT_HEIGHT
409 #define LCD_PIXEL_ASPECT_HEIGHT 1
411 #ifndef LCD_PIXEL_ASPECT_WIDTH
412 #define LCD_PIXEL_ASPECT_WIDTH 1
415 /* define this in the target config.h to use a different size */
416 #ifndef CONFIG_DEFAULT_ICON_HEIGHT
417 #define CONFIG_DEFAULT_ICON_HEIGHT 8
419 #ifndef CONFIG_DEFAULT_ICON_WIDTH
420 #define CONFIG_DEFAULT_ICON_WIDTH 6
422 #ifndef CONFIG_REMOTE_DEFAULT_ICON_HEIGHT
423 #define CONFIG_REMOTE_DEFAULT_ICON_HEIGHT 8
425 #ifndef CONFIG_REMOTE_DEFAULT_ICON_WIDTH
426 #define CONFIG_REMOTE_DEFAULT_ICON_WIDTH 6
429 #if (CONFIG_TUNER & (CONFIG_TUNER - 1)) != 0
430 /* Multiple possible tuners */
431 #define CONFIG_TUNER_MULTI
434 #if (CONFIG_STORAGE & (CONFIG_STORAGE - 1)) != 0
435 /* Multiple storage drivers */
436 #define CONFIG_STORAGE_MULTI
439 /* deactive fading in bootloader/sim */
440 #if defined(BOOTLOADER) || defined(SIMULATOR)
441 #undef CONFIG_BACKLIGHT_FADING
442 #define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
445 /* determine which setting/manual text to use,
446 * possibly overridden in target config */
447 #if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_PWM)
449 #ifndef HAVE_BACKLIGHT_FADING_INT_SETTING
450 #define HAVE_BACKLIGHT_FADING_INT_SETTING
453 #elif (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_SETTING) \
454 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_HW_REG) \
455 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_TARGET)
457 /* BACKLIGHT_FADING_TARGET may the setting to use */
458 #if !defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) \
459 && !defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
460 #define HAVE_BACKLIGHT_FADING_BOOL_SETTING
463 #endif /* CONFIG_BACKLIGHT_FADING */
465 #if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
466 /* Bootloaders don't use CPU frequency adjustment */
467 #undef HAVE_ADJUSTABLE_CPU_FREQ
470 /* Enable the directory cache and tagcache in RAM if we have
471 * plenty of RAM. Both features can be enabled independently. */
472 #if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) && \
474 #define HAVE_DIRCACHE
476 #define HAVE_TC_RAMCACHE
480 /* Add one HAVE_ define for all mas35xx targets */
481 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3507D) || (CONFIG_CODEC == MAS3539F)
485 #if (CONFIG_CODEC == SWCODEC)
488 #if CONFIG_CPU == IMX31L
489 /* Priority in bootloader is wanted */
490 #define HAVE_PRIORITY_SCHEDULING
491 #define USB_STATUS_BY_EVENT
492 #define USB_DETECT_BY_DRV
495 #else /* !BOOTLOADER */
497 #define HAVE_EXTENDED_MESSAGING_AND_NAME
500 #define HAVE_PRIORITY_SCHEDULING
501 #define HAVE_SCHEDULER_BOOSTCTRL
502 #endif /* SIMULATOR */
504 #define HAVE_SEMAPHORE_OBJECTS
506 #if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC
507 #define USB_STATUS_BY_EVENT
508 #define USB_DETECT_BY_DRV
509 #if CONFIG_CPU != IMX31L
510 #define INCLUDE_TIMEOUT_API
512 #endif /* HAVE_USBSTACK */
514 #endif /* BOOTLOADER */
516 #if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) \
517 || (CONFIG_CPU == AS3525) || (CONFIG_CPU == S3C2440)
518 #define HAVE_WAKEUP_OBJECTS
521 #endif /* (CONFIG_CODEC == SWCODEC) */
523 /* define for all cpus from SH family */
524 #if (CONFIG_CPU == SH7034)
528 /* define for all cpus from coldfire family */
529 #if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250)
533 /* define for all cpus from PP family */
534 #if (CONFIG_CPU == PP5002)
536 #elif (CONFIG_CPU == PP5020) || (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
541 /* define for all cpus from TCC77X family */
542 #if (CONFIG_CPU == TCC771L) || (CONFIG_CPU == TCC773L) || (CONFIG_CPU == TCC770)
546 /* define for all cpus from TCC780 family */
547 #if (CONFIG_CPU == TCC7801)
551 /* define for all cpus from ARM7TDMI family (for specific optimisations) */
552 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == DSC25)
556 /* define for all cpus from ARM family */
557 #if (CONFIG_CPU == IMX31L)
559 #define ARM_ARCH 6 /* ARMv6 */
562 #if defined(CPU_TCC77X) || defined(CPU_TCC780X) || (CONFIG_CPU == DM320)
564 #define ARM_ARCH 5 /* ARMv5 */
567 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) \
568 || (CONFIG_CPU == DSC25) || (CONFIG_CPU == S5L8700) || (CONFIG_CPU == AS3525)
570 #define ARM_ARCH 4 /* ARMv4 */
573 /* Determine if accesses should be strictly long aligned. */
574 #if (CONFIG_CPU == SH7034) || defined(CPU_ARM)
575 #define ROCKBOX_STRICT_ALIGN 1
578 #if (CONFIG_CPU == JZ4732)
586 /* This attribute can be used to ensure that certain symbols are never profiled
587 * which can be important as profiling a function de-inlines it */
589 #define NO_PROF_ATTR __attribute__ ((no_instrument_function))
595 #if !defined(SIMULATOR) && /* Not for simulators */ \
596 (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
597 defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \
598 defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \
599 (CONFIG_CPU == PNX0101) || \
600 (CONFIG_CPU == S5L8700)) /* Samsung S5L8700: core, plugins, codecs */
601 #define ICODE_ATTR __attribute__ ((section(".icode")))
602 #define ICONST_ATTR __attribute__ ((section(".irodata")))
603 #define IDATA_ATTR __attribute__ ((section(".idata")))
604 #define IBSS_ATTR __attribute__ ((section(".ibss")))
606 #if CONFIG_CPU != SH7034
607 #define PLUGIN_USE_IRAM
610 /* GCC quirk workaround: arm-elf-gcc treats static functions as short_call
611 * when not compiling with -ffunction-sections, even when the function has
612 * a section attribute. */
615 #define STATICIRAM static
622 #define STATICIRAM static
625 #ifndef IRAM_LCDFRAMEBUFFER
626 /* if the LCD framebuffer has not been moved to IRAM, define it empty here */
627 #define IRAM_LCDFRAMEBUFFER
630 /* Change this if you want to build a single-core firmware for a multicore
631 * target for debugging */
632 #if defined(BOOTLOADER)
633 #define FORCE_SINGLE_CORE
636 /* Core locking types - specifies type of atomic operation */
637 #define CORELOCK_NONE 0
638 #define SW_CORELOCK 1 /* Mutual exclusion provided by a software algorithm
639 and not a special semaphore instruction */
640 #define CORELOCK_SWAP 2 /* A swap (exchange) instruction */
643 #define IDLE_STACK_SIZE 0x80
644 #define IDLE_STACK_WORDS 0x20
646 /* Attributes to place data in uncached DRAM */
647 /* These are useful beyond dual-core and ultimately beyond PP since they may
648 * be used for DMA buffers and such without cache maintenence calls. */
649 #define NOCACHEBSS_ATTR __attribute__((section(".ncbss"),nocommon))
650 #define NOCACHEDATA_ATTR __attribute__((section(".ncdata"),nocommon))
652 #if !defined(FORCE_SINGLE_CORE)
655 #define CURRENT_CORE current_core()
656 /* Attributes for core-shared data in DRAM where IRAM is better used for other
658 #define SHAREDBSS_ATTR NOCACHEBSS_ATTR
659 #define SHAREDDATA_ATTR NOCACHEDATA_ATTR
661 #define IF_COP(...) __VA_ARGS__
662 #define IF_COP_VOID(...) __VA_ARGS__
663 #define IF_COP_CORE(core) core
666 #define CONFIG_CORELOCK SW_CORELOCK /* SWP(B) is broken */
668 #define CONFIG_CORELOCK CORELOCK_SWAP
671 #endif /* !defined(BOOTLOADER) && CONFIG_CPU != PP5002 */
675 #ifndef CONFIG_CORELOCK
676 #define CONFIG_CORELOCK CORELOCK_NONE
679 #if CONFIG_CORELOCK == SW_CORELOCK
680 #define IF_SWCL(...) __VA_ARGS__
681 #define IFN_SWCL(...)
684 #define IFN_SWCL(...) __VA_ARGS__
685 #endif /* CONFIG_CORELOCK == */
688 /* Default to single core */
690 #define CURRENT_CORE CPU
691 /* Attributes for core-shared data in DRAM - no caching considerations */
692 #define SHAREDBSS_ATTR
693 #define SHAREDDATA_ATTR
694 #ifndef NOCACHEBSS_ATTR
695 #define NOCACHEBSS_ATTR
696 #define NOCACHEDATA_ATTR
698 #define CONFIG_CORELOCK CORELOCK_NONE
701 #define IF_COP_VOID(...) void
702 #define IF_COP_CORE(core) CURRENT_CORE
704 #endif /* NUM_CORES */
706 #ifdef HAVE_HEADPHONE_DETECTION
707 /* Timeout objects required if headphone detection is enabled */
708 #ifndef INCLUDE_TIMEOUT_API
709 #define INCLUDE_TIMEOUT_API
711 #endif /* HAVE_HEADPHONE_DETECTION */
713 #if defined(HAVE_USBSTACK) || (CONFIG_STORAGE & STORAGE_NAND)
714 #define STORAGE_GET_INFO
718 #include <stdbool.h> /* MIPS GCC fix? */
721 #endif /* __CONFIG_H__ */