1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by Daniel Stenberg
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
27 /* symbolic names for multiple choice configurations: */
29 /* CONFIG_TUNER (note these are combineable bit-flags) */
30 #define S1A0903X01 0x01 /* Samsung */
31 #define TEA5767 0x02 /* Philips */
32 #define LV24020LP 0x04 /* Sanyo */
33 #define SI4700 0x08 /* Silicon Labs */
39 #define SWCODEC 1 /* if codec is done by SW */
51 #define TMS320DSC25 25
57 #define RECORDER_PAD 2
59 #define IRIVER_H100_PAD 4
60 #define IRIVER_H300_PAD 5
61 #define IAUDIO_X5M5_PAD 6
64 #define IPOD_1G2G_PAD 9
65 #define IRIVER_IFP7XX_PAD 10
66 #define GIGABEAT_PAD 11
67 #define IRIVER_H10_PAD 12
68 #define SANSA_E200_PAD 13
69 #define SANSA_C200_PAD 14
70 #define ELIO_TPJ1022_PAD 15
71 #define ARCHOS_AV300_PAD 16
72 #define MROBE500_PAD 17
73 #define GIGABEAT_S_PAD 18
75 /* CONFIG_REMOTE_KEYPAD */
81 #define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging */
82 #define CHARGING_MONITOR 2 /* Hardware controlled charging with monitoring */
83 #define CHARGING_CONTROL 3 /* Software controlled charging */
86 #define LCD_SSD1815 1 /* as used by Archos Recorders and Ondios */
87 #define LCD_SSD1801 2 /* as used by Archos Player/Studio */
88 #define LCD_S1D15E06 3 /* as used by iRiver H100 series */
89 #define LCD_H300 4 /* as used by iRiver H300 series, exact model name is
90 unknown at the time of this writing */
91 #define LCD_X5 5 /* as used by iAudio X5 series, exact model name is
92 unknown at the time of this writing */
93 #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */
94 #define LCD_IPODNANO 7 /* as used by iPod Nano */
95 #define LCD_IPODVIDEO 8 /* as used by iPod Video */
96 #define LCD_IPOD2BPP 9 /* as used by all fullsize greyscale iPods */
97 #define LCD_IPODMINI 10 /* as used by iPod Mini g1/g2 */
98 #define LCD_IFP7XX 11 /* as used by iRiver iFP 7xx/8xx */
99 #define LCD_GIGABEAT 12
100 #define LCD_H10_20GB 13 /* as used by iriver H10 20Gb */
101 #define LCD_H10_5GB 14 /* as used by iriver H10 5Gb */
102 #define LCD_TPJ1022 15 /* as used by Tatung Elio TPJ-1022 */
103 #define LCD_DSC25 16 /* as used by Archos AV300 */
104 #define LCD_C200 17 /* as used by Sandisk Sansa c200 */
105 #define LCD_MROBE500 18 /* as used by Olympus M:Robe 500i */
107 /* LCD_PIXELFORMAT */
108 #define HORIZONTAL_PACKING 1
109 #define VERTICAL_PACKING 2
110 #define HORIZONTAL_INTERLEAVED 3
111 #define VERTICAL_INTERLEAVED 4
113 #define RGB565SWAPPED 3553
116 #define I2C_PLAYREC 1 /* Archos Player/Recorder style */
117 #define I2C_ONDIO 2 /* Ondio style */
118 #define I2C_COLDFIRE 3 /* Coldfire style */
119 #define I2C_PP5002 4 /* PP5002 style */
120 #define I2C_PP5020 5 /* PP5020 style */
121 #define I2C_PNX0101 6 /* PNX0101 style */
122 #define I2C_S3C2440 7
123 #define I2C_PP5024 8 /* PP5024 style */
127 #define LED_REAL 1 /* SW controlled LED (Archos recorders, player) */
128 #define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */
129 /* else HW controlled LED (iRiver H1x0) */
132 #define FLASH_IFP7XX 1
135 #define RTC_M41ST84W 1 /* Archos Recorder */
136 #define RTC_PCF50605 2 /* iPod 3G, 4G & Mini */
137 #define RTC_PCF50606 3 /* iriver H300 */
138 #define RTC_S3C2440 4
139 #define RTC_E8564 5 /* iriver H10 */
140 #define RTC_AS3514 6 /* Sandisk Sansa e200 series */
141 #define RTC_DS1339_DS3231 7 /* h1x0 RTC mod */
143 #define RTC_RX5X348AB 9
146 #define USBOTG_ISP1362 1362 /* iriver H300 */
147 #define USBOTG_M5636 5636 /* iAudio X5 */
148 #define USBOTG_ARC 5020 /* PortalPlayer 502x */
154 /* now go and pick yours */
155 #if defined(ARCHOS_PLAYER)
156 #include "config-player.h"
157 #elif defined(ARCHOS_RECORDER)
158 #include "config-recorder.h"
159 #elif defined(ARCHOS_FMRECORDER)
160 #include "config-fmrecorder.h"
161 #elif defined(ARCHOS_RECORDERV2)
162 #include "config-recorderv2.h"
163 #elif defined(ARCHOS_ONDIOSP)
164 #include "config-ondiosp.h"
165 #elif defined(ARCHOS_ONDIOFM)
166 #include "config-ondiofm.h"
167 #elif defined(ARCHOS_AV300)
168 #include "config-av300.h"
169 #elif defined(IRIVER_H100)
170 #include "config-h100.h"
171 #elif defined(IRIVER_H120)
172 #include "config-h120.h"
173 #elif defined(IRIVER_H300)
174 #include "config-h300.h"
175 #elif defined(IAUDIO_X5)
176 #include "config-iaudiox5.h"
177 #elif defined(IAUDIO_M5)
178 #include "config-iaudiom5.h"
179 #elif defined(IPOD_COLOR)
180 #include "config-ipodcolor.h"
181 #elif defined(IPOD_NANO)
182 #include "config-ipodnano.h"
183 #elif defined(IPOD_VIDEO)
184 #include "config-ipodvideo.h"
185 #elif defined(IPOD_1G2G)
186 #include "config-ipod1g2g.h"
187 #elif defined(IPOD_3G)
188 #include "config-ipod3g.h"
189 #elif defined(IPOD_4G)
190 #include "config-ipod4g.h"
191 #elif defined(IRIVER_IFP7XX)
192 #include "config-ifp7xx.h"
193 #elif defined(GIGABEAT_F)
194 #include "config-gigabeat.h"
195 #elif defined(GIGABEAT_S)
196 #include "config-gigabeat-s.h"
197 #elif defined(IPOD_MINI)
198 #include "config-ipodmini.h"
199 #elif defined(IPOD_MINI2G)
200 #include "config-ipodmini2g.h"
201 #elif defined(IRIVER_H10)
202 #include "config-h10.h"
203 #elif defined(IRIVER_H10_5GB)
204 #include "config-h10_5gb.h"
205 #elif defined(SANSA_E200)
206 #include "config-e200.h"
207 #elif defined(SANSA_C200)
208 #include "config-c200.h"
209 #elif defined(ELIO_TPJ1022)
210 #include "config-tpj1022.h"
211 #elif defined(MROBE_500)
212 #include "config-mrobe500.h"
214 /* no known platform */
217 /* setup basic macros from capability masks */
218 #include "config_caps.h"
220 /* now set any CONFIG_ defines correctly if they are not used,
221 No need to do this on CONFIG_'s which are compulsary (e.g CONFIG_CODEC ) */
223 #define CONFIG_TUNER 0
226 #ifndef CONFIG_USBOTG
227 #define CONFIG_USBOTG 0
234 #ifndef CONFIG_CHARGING
235 #define CONFIG_CHARGING 0
242 /* define this in the target config.h to use a different size */
243 #ifndef CONFIG_DEFAULT_ICON_HEIGHT
244 #define CONFIG_DEFAULT_ICON_HEIGHT 8
246 #ifndef CONFIG_DEFAULT_ICON_WIDTH
247 #define CONFIG_DEFAULT_ICON_WIDTH 6
249 #ifndef CONFIG_REMOTE_DEFAULT_ICON_HEIGHT
250 #define CONFIG_REMOTE_DEFAULT_ICON_HEIGHT 8
252 #ifndef CONFIG_REMOTE_DEFAULT_ICON_WIDTH
253 #define CONFIG_REMOTE_DEFAULT_ICON_WIDTH 6
256 #if (CONFIG_TUNER & (CONFIG_TUNER - 1)) != 0
257 /* Multiple possible tuners */
258 #define CONFIG_TUNER_MULTI
261 #if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
262 /* Bootloaders don't use CPU frequency adjustment */
263 #undef HAVE_ADJUSTABLE_CPU_FREQ
266 /* Enable the directory cache and tagcache in RAM if we have
267 * plenty of RAM. Both features can be enabled independently. */
268 #if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) && \
269 !defined(BOOTLOADER) && !defined(SANSA_E200) && !defined(SANSA_C200)
270 #define HAVE_DIRCACHE
272 #define HAVE_TC_RAMCACHE
276 /* Add one HAVE_ define for all mas35xx targets */
277 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3507D) || (CONFIG_CODEC == MAS3539F)
281 #if CONFIG_CODEC == SWCODEC && !defined(BOOTLOADER)
282 #define HAVE_EXTENDED_MESSAGING_AND_NAME
285 #if (CONFIG_CODEC == SWCODEC) && !defined(SIMULATOR) && !defined(BOOTLOADER)
286 #define HAVE_PRIORITY_SCHEDULING
287 #define HAVE_SCHEDULER_BOOSTCTRL
290 /* define for all cpus from SH family */
291 #if (CONFIG_CPU == SH7034)
295 /* define for all cpus from coldfire family */
296 #if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250)
300 /* define for all cpus from PP family */
301 #if (CONFIG_CPU == PP5002)
303 #elif (CONFIG_CPU == PP5020) || (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
308 /* define for all cpus from ARM family */
309 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) \
310 || (CONFIG_CPU == TMS320DSC25) || (CONFIG_CPU == DM320) \
311 || (CONFIG_CPU == IMX31L)
315 /* Determine if accesses should be strictly long aligned. */
316 #if (CONFIG_CPU == SH7034) || defined(CPU_ARM)
317 #define ROCKBOX_STRICT_ALIGN 1
324 /* This attribute can be used to ensure that certain symbols are never profiled
325 * which can be important as profiling a function de-inlines it */
327 #define NO_PROF_ATTR __attribute__ ((no_instrument_function))
333 #if !defined(SIMULATOR) && /* Not for simulators */ \
334 (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
335 defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \
336 defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \
337 (CONFIG_CPU == PNX0101))
338 #define ICODE_ATTR __attribute__ ((section(".icode")))
339 #define ICONST_ATTR __attribute__ ((section(".irodata")))
340 #define IDATA_ATTR __attribute__ ((section(".idata")))
341 #define IBSS_ATTR __attribute__ ((section(".ibss")))
343 #if CONFIG_CPU != SH7034
347 /* GCC quirk workaround: arm-elf-gcc treats static functions as short_call
348 * when not compiling with -ffunction-sections, even when the function has
349 * a section attribute. */
352 #define STATICIRAM static
359 #define STATICIRAM static
362 #ifndef IRAM_LCDFRAMEBUFFER
363 /* if the LCD framebuffer has not been moved to IRAM, define it empty here */
364 #define IRAM_LCDFRAMEBUFFER
367 /* Dual core support - not yet working on the 1G/2G and 3G iPod */
369 #define IDLE_STACK_SIZE 0x80
370 #define IDLE_STACK_WORDS 0x20
372 #if !defined(BOOTLOADER) && CONFIG_CPU != PP5002
374 #define CURRENT_CORE current_core()
375 /* Hopefully at some point we will learn how to mark areas of main memory as
376 * not to be cached. Until then, use IRAM for variables shared across cores */
377 #define NOCACHEBSS_ATTR IBSS_ATTR
378 #define NOCACHEDATA_ATTR IDATA_ATTR
380 #define IF_COP(...) __VA_ARGS__
381 #endif /* !defined(BOOTLOADER) && CONFIG_CPU != PP5002 */
385 /* Default to single core */
387 #define CURRENT_CORE CPU
388 #define NOCACHEBSS_ATTR
389 #define NOCACHEDATA_ATTR
392 #endif /* NUM_CORES */
394 #endif /* __CONFIG_H__ */