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 */
145 #define USBOTG_ISP1362 1362 /* iriver H300 */
146 #define USBOTG_M5636 5636 /* iAudio X5 */
147 #define USBOTG_ARC 5020 /* PortalPlayer 502x */
153 /* now go and pick yours */
154 #if defined(ARCHOS_PLAYER)
155 #include "config-player.h"
156 #elif defined(ARCHOS_RECORDER)
157 #include "config-recorder.h"
158 #elif defined(ARCHOS_FMRECORDER)
159 #include "config-fmrecorder.h"
160 #elif defined(ARCHOS_RECORDERV2)
161 #include "config-recorderv2.h"
162 #elif defined(ARCHOS_ONDIOSP)
163 #include "config-ondiosp.h"
164 #elif defined(ARCHOS_ONDIOFM)
165 #include "config-ondiofm.h"
166 #elif defined(ARCHOS_AV300)
167 #include "config-av300.h"
168 #elif defined(IRIVER_H100)
169 #include "config-h100.h"
170 #elif defined(IRIVER_H120)
171 #include "config-h120.h"
172 #elif defined(IRIVER_H300)
173 #include "config-h300.h"
174 #elif defined(IAUDIO_X5)
175 #include "config-iaudiox5.h"
176 #elif defined(IAUDIO_M5)
177 #include "config-iaudiom5.h"
178 #elif defined(IPOD_COLOR)
179 #include "config-ipodcolor.h"
180 #elif defined(IPOD_NANO)
181 #include "config-ipodnano.h"
182 #elif defined(IPOD_VIDEO)
183 #include "config-ipodvideo.h"
184 #elif defined(IPOD_1G2G)
185 #include "config-ipod1g2g.h"
186 #elif defined(IPOD_3G)
187 #include "config-ipod3g.h"
188 #elif defined(IPOD_4G)
189 #include "config-ipod4g.h"
190 #elif defined(IRIVER_IFP7XX)
191 #include "config-ifp7xx.h"
192 #elif defined(GIGABEAT_F)
193 #include "config-gigabeat.h"
194 #elif defined(GIGABEAT_S)
195 #include "config-gigabeat-s.h"
196 #elif defined(IPOD_MINI)
197 #include "config-ipodmini.h"
198 #elif defined(IPOD_MINI2G)
199 #include "config-ipodmini2g.h"
200 #elif defined(IRIVER_H10)
201 #include "config-h10.h"
202 #elif defined(IRIVER_H10_5GB)
203 #include "config-h10_5gb.h"
204 #elif defined(SANSA_E200)
205 #include "config-e200.h"
206 #elif defined(SANSA_C200)
207 #include "config-c200.h"
208 #elif defined(ELIO_TPJ1022)
209 #include "config-tpj1022.h"
210 #elif defined(MROBE_500)
211 #include "config-mrobe500.h"
213 /* no known platform */
216 /* setup basic macros from capability masks */
217 #include "config_caps.h"
219 /* now set any CONFIG_ defines correctly if they are not used,
220 No need to do this on CONFIG_'s which are compulsary (e.g CONFIG_CODEC ) */
222 #define CONFIG_TUNER 0
225 #ifndef CONFIG_USBOTG
226 #define CONFIG_USBOTG 0
233 #ifndef CONFIG_CHARGING
234 #define CONFIG_CHARGING 0
241 /* define this in the target config.h to use a different size */
242 #ifndef CONFIG_DEFAULT_ICON_HEIGHT
243 #define CONFIG_DEFAULT_ICON_HEIGHT 8
245 #ifndef CONFIG_DEFAULT_ICON_WIDTH
246 #define CONFIG_DEFAULT_ICON_WIDTH 6
248 #ifndef CONFIG_REMOTE_DEFAULT_ICON_HEIGHT
249 #define CONFIG_REMOTE_DEFAULT_ICON_HEIGHT 8
251 #ifndef CONFIG_REMOTE_DEFAULT_ICON_WIDTH
252 #define CONFIG_REMOTE_DEFAULT_ICON_WIDTH 6
255 #if (CONFIG_TUNER & (CONFIG_TUNER - 1)) != 0
256 /* Multiple possible tuners */
257 #define CONFIG_TUNER_MULTI
260 #if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
261 /* Bootloaders don't use CPU frequency adjustment */
262 #undef HAVE_ADJUSTABLE_CPU_FREQ
265 /* Enable the directory cache and tagcache in RAM if we have
266 * plenty of RAM. Both features can be enabled independently. */
267 #if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) && \
268 !defined(BOOTLOADER) && !defined(SANSA_E200) && !defined(SANSA_C200)
269 #define HAVE_DIRCACHE
271 #define HAVE_TC_RAMCACHE
275 /* Add one HAVE_ define for all mas35xx targets */
276 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3507D) || (CONFIG_CODEC == MAS3539F)
280 #if CONFIG_CODEC == SWCODEC && !defined(BOOTLOADER)
281 #define HAVE_EXTENDED_MESSAGING_AND_NAME
284 #if (CONFIG_CODEC == SWCODEC) && !defined(SIMULATOR) && !defined(BOOTLOADER)
285 #define HAVE_PRIORITY_SCHEDULING
286 #define HAVE_SCHEDULER_BOOSTCTRL
289 /* define for all cpus from SH family */
290 #if (CONFIG_CPU == SH7034)
294 /* define for all cpus from coldfire family */
295 #if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250)
299 /* define for all cpus from PP family */
300 #if (CONFIG_CPU == PP5002)
302 #elif (CONFIG_CPU == PP5020) || (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
307 /* define for all cpus from ARM family */
308 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) \
309 || (CONFIG_CPU == TMS320DSC25) || (CONFIG_CPU == DM320) \
310 || (CONFIG_CPU == IMX31L)
314 /* Determine if accesses should be strictly long aligned. */
315 #if (CONFIG_CPU == SH7034) || defined(CPU_ARM)
316 #define ROCKBOX_STRICT_ALIGN 1
323 /* This attribute can be used to ensure that certain symbols are never profiled
324 * which can be important as profiling a function de-inlines it */
326 #define NO_PROF_ATTR __attribute__ ((no_instrument_function))
332 #if !defined(SIMULATOR) && /* Not for simulators */ \
333 (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
334 defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \
335 defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \
336 (CONFIG_CPU == PNX0101))
337 #define ICODE_ATTR __attribute__ ((section(".icode")))
338 #define ICONST_ATTR __attribute__ ((section(".irodata")))
339 #define IDATA_ATTR __attribute__ ((section(".idata")))
340 #define IBSS_ATTR __attribute__ ((section(".ibss")))
342 #if CONFIG_CPU != SH7034
346 /* GCC quirk workaround: arm-elf-gcc treats static functions as short_call
347 * when not compiling with -ffunction-sections, even when the function has
348 * a section attribute. */
351 #define STATICIRAM static
358 #define STATICIRAM static
361 #ifndef IRAM_LCDFRAMEBUFFER
362 /* if the LCD framebuffer has not been moved to IRAM, define it empty here */
363 #define IRAM_LCDFRAMEBUFFER
366 /* Dual core support - not yet working on the 1G/2G and 3G iPod */
367 #if defined(CPU_PP) && CONFIG_CPU != PP5002 && !defined(BOOTLOADER)
369 #define CURRENT_CORE current_core()
370 /* Hopefully at some point we will learn how to mark areas of main memory as
371 * not to be cached. Until then, use IRAM for variables shared across cores */
372 #define NOCACHEBSS_ATTR IBSS_ATTR
373 #define NOCACHEDATA_ATTR IDATA_ATTR
375 #define IF_COP(...) __VA_ARGS__
377 #define IDLE_STACK_SIZE 0x80
378 #define IDLE_STACK_WORDS 0x20
382 #define CURRENT_CORE CPU
383 #define NOCACHEBSS_ATTR
384 #define NOCACHEDATA_ATTR
388 #endif /* Processor specific */