2003-02-07 09:41:57 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002 by Daniel Stenberg
|
|
|
|
*
|
|
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __CONFIG_H__
|
|
|
|
#define __CONFIG_H__
|
|
|
|
|
2005-05-07 22:41:17 +00:00
|
|
|
#include "autoconf.h"
|
|
|
|
|
2004-09-28 22:13:26 +00:00
|
|
|
/* symbolic names for multiple choice configurations: */
|
|
|
|
|
2004-10-15 21:41:46 +00:00
|
|
|
/* CONFIG_TUNER (note these are combineable bit-flags) */
|
|
|
|
#define S1A0903X01 0x01 /* Samsung */
|
|
|
|
#define TEA5767 0x02 /* Philips */
|
2004-09-28 22:13:26 +00:00
|
|
|
|
2005-08-29 21:15:27 +00:00
|
|
|
/* CONFIG_CODEC */
|
2004-09-28 22:13:26 +00:00
|
|
|
#define MAS3587F 3587
|
|
|
|
#define MAS3507D 3507
|
|
|
|
#define MAS3539F 3539
|
2005-08-29 21:15:27 +00:00
|
|
|
#define SWCODEC 1 /* if codec is done by SW */
|
2004-09-28 22:13:26 +00:00
|
|
|
|
|
|
|
/* CONFIG_CPU */
|
|
|
|
#define SH7034 7034
|
2004-10-06 13:29:10 +00:00
|
|
|
#define MCF5249 5249
|
2005-07-15 21:22:10 +00:00
|
|
|
#define MCF5250 5250
|
2005-01-10 21:54:28 +00:00
|
|
|
#define TCC730 730 /* lacking a proper abbrivation */
|
2005-11-07 23:07:19 +00:00
|
|
|
#define PP5002 5002
|
|
|
|
#define PP5020 5020
|
2006-01-12 00:35:50 +00:00
|
|
|
#define PNX0101 101
|
2006-02-24 15:42:52 +00:00
|
|
|
#define S3C2440 2440
|
2004-09-28 22:13:26 +00:00
|
|
|
|
|
|
|
/* CONFIG_KEYPAD */
|
2006-02-05 16:52:22 +00:00
|
|
|
#define PLAYER_PAD 0
|
|
|
|
#define RECORDER_PAD 1
|
|
|
|
#define ONDIO_PAD 2
|
|
|
|
#define IRIVER_H100_PAD 3
|
|
|
|
#define GMINI100_PAD 4
|
|
|
|
#define IRIVER_H300_PAD 5
|
|
|
|
#define IAUDIO_X5_PAD 6
|
|
|
|
#define IPOD_4G_PAD 7
|
|
|
|
#define IPOD_3G_PAD 8
|
|
|
|
#define IRIVER_IFP7XX_PAD 9
|
2006-02-24 15:42:52 +00:00
|
|
|
#define GIGABEAT_PAD 10
|
2006-08-01 22:28:14 +00:00
|
|
|
#define IRIVER_H10_PAD 11
|
|
|
|
#define SANSA_E200_PAD 12
|
2004-09-28 22:13:26 +00:00
|
|
|
|
2005-06-02 11:08:55 +00:00
|
|
|
/* CONFIG_REMOTE_KEYPAD */
|
2005-08-17 05:03:33 +00:00
|
|
|
#define H100_REMOTE 1
|
|
|
|
#define H300_REMOTE 2
|
|
|
|
#define X5_REMOTE 3
|
2005-06-02 11:08:55 +00:00
|
|
|
|
2004-10-08 17:45:52 +00:00
|
|
|
/* CONFIG_BATTERY */
|
2005-01-30 16:25:46 +00:00
|
|
|
#define BATT_LIION2200 2200 /* FM/V2 recorder type */
|
|
|
|
#define BATT_4AA_NIMH 1500
|
|
|
|
#define BATT_3AAA 1000 /* Ondio */
|
2005-04-06 23:53:19 +00:00
|
|
|
#define BATT_LIPOL1300 1300 /* the type used in iRiver h1x0 models */
|
2006-08-01 22:28:14 +00:00
|
|
|
#define BATT_LPCS355385 1550 /* iriver h10 - SKC LPCS355385 */
|
2004-10-08 17:45:52 +00:00
|
|
|
|
2006-06-06 22:23:52 +00:00
|
|
|
/* CONFIG_CHARGING */
|
|
|
|
#define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging */
|
|
|
|
#define CHARGING_MONITOR 2 /* Hardware controlled charging with monitoring */
|
|
|
|
#define CHARGING_CONTROL 3 /* Software controlled charging */
|
|
|
|
|
2005-01-10 21:54:28 +00:00
|
|
|
/* CONFIG_LCD */
|
2005-11-07 23:07:19 +00:00
|
|
|
#define LCD_GMINI100 0
|
|
|
|
#define LCD_SSD1815 1 /* as used by Archos Recorders and Ondios */
|
|
|
|
#define LCD_SSD1801 2 /* as used by Archos Player/Studio */
|
|
|
|
#define LCD_S1D15E06 3 /* as used by iRiver H100 series */
|
|
|
|
#define LCD_H300 4 /* as used by iRiver H300 series, exact model name is
|
|
|
|
unknown at the time of this writing */
|
|
|
|
#define LCD_X5 5 /* as used by iAudio X5 series, exact model name is
|
2005-07-15 21:22:10 +00:00
|
|
|
unknown at the time of this writing */
|
2005-11-07 23:07:19 +00:00
|
|
|
#define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */
|
|
|
|
#define LCD_IPODNANO 7 /* as used by iPod Nano */
|
2005-12-18 13:04:00 +00:00
|
|
|
#define LCD_IPODVIDEO 8 /* as used by iPod Video */
|
2006-02-05 16:52:22 +00:00
|
|
|
#define LCD_IPOD2BPP 9 /* as used by all greyscale iPods */
|
|
|
|
#define LCD_IFP7XX 10 /* as used by iRiver iFP 7xx/8xx */
|
2006-02-24 15:42:52 +00:00
|
|
|
#define LCD_GIGABEAT 11
|
2005-01-10 21:54:28 +00:00
|
|
|
|
2005-11-19 02:06:46 +00:00
|
|
|
/* LCD_PIXELFORMAT */
|
2006-02-09 00:48:53 +00:00
|
|
|
#define HORIZONTAL_PACKING 1
|
|
|
|
#define VERTICAL_PACKING 2
|
2006-07-28 07:35:45 +00:00
|
|
|
#define HORIZONTAL_INTERLEAVED 3
|
|
|
|
#define VERTICAL_INTERLEAVED 4
|
2005-11-19 02:06:46 +00:00
|
|
|
#define RGB565 565
|
|
|
|
#define RGB565SWAPPED 3553
|
|
|
|
|
2004-12-18 10:29:47 +00:00
|
|
|
/* CONFIG_BACKLIGHT */
|
2005-11-14 22:12:50 +00:00
|
|
|
#define BL_PA14_LO 0 /* Player, PA14 low active */
|
|
|
|
#define BL_RTC 1 /* Recorder, RTC square wave output */
|
|
|
|
#define BL_PA14_HI 2 /* Ondio, PA14 high active */
|
|
|
|
#define BL_IRIVER_H100 3 /* IRiver GPIO */
|
|
|
|
#define BL_GMINI 4 /* Archos GMini */
|
|
|
|
#define BL_IPOD4G 5 /* Apple iPod 4G */
|
2005-12-18 13:04:00 +00:00
|
|
|
#define BL_IPODNANO 6 /* Apple iPod Nano and iPod Video*/
|
2006-02-05 16:52:22 +00:00
|
|
|
#define BL_IPOD3G 7 /* Apple iPod 3g with dock */
|
|
|
|
#define BL_IRIVER_H300 8 /* IRiver PWM */
|
|
|
|
#define BL_IRIVER_IFP7XX 9 /* IRiver GPIO */
|
2006-02-21 15:01:25 +00:00
|
|
|
#define BL_IPODMINI 10 /* Apple iPod Mini */
|
2006-02-24 15:42:52 +00:00
|
|
|
#define BL_GIGABEAT 11 /* Toshiba Gigabeat */
|
2004-12-18 10:29:47 +00:00
|
|
|
|
2005-01-27 12:16:45 +00:00
|
|
|
/* CONFIG_I2C */
|
|
|
|
#define I2C_PLAYREC 0 /* Archos Player/Recorder style */
|
|
|
|
#define I2C_ONDIO 1 /* Ondio style */
|
|
|
|
#define I2C_GMINI 2 /* Gmini style */
|
2005-07-31 17:31:33 +00:00
|
|
|
#define I2C_COLDFIRE 3 /* Coldfire style */
|
2006-02-05 16:52:22 +00:00
|
|
|
#define I2C_PP5002 4 /* PP5002 style */
|
|
|
|
#define I2C_PP5020 5 /* PP5020 style */
|
|
|
|
#define I2C_PNX0101 6 /* PNX0101 style */
|
2006-02-24 15:42:52 +00:00
|
|
|
#define I2C_S3C2440 7
|
2005-01-27 12:16:45 +00:00
|
|
|
|
2005-06-04 23:15:52 +00:00
|
|
|
/* CONFIG_LED */
|
|
|
|
#define LED_REAL 1 /* SW controlled LED (Archos recorders, player, Gmini) */
|
|
|
|
#define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */
|
2006-06-16 17:34:18 +00:00
|
|
|
/* else HW controlled LED (iRiver H1x0) */
|
2005-12-04 13:05:56 +00:00
|
|
|
|
2006-01-12 00:35:50 +00:00
|
|
|
/* CONFIG_FLASH */
|
|
|
|
#define FLASH_IFP7XX 1
|
|
|
|
|
2005-12-04 13:05:56 +00:00
|
|
|
/* CONFIG_RTC */
|
2005-12-11 10:52:17 +00:00
|
|
|
#define RTC_M41ST84W 1 /* Archos Recorder */
|
2006-02-27 12:35:05 +00:00
|
|
|
#define RTC_PCF50605 2 /* iPod 3G, 4G & Mini */
|
2005-12-11 10:52:17 +00:00
|
|
|
#define RTC_PCF50606 3 /* iriver H300 */
|
2006-02-24 15:42:52 +00:00
|
|
|
#define RTC_S3C2440 4
|
2005-12-04 13:05:56 +00:00
|
|
|
|
2006-06-16 17:34:18 +00:00
|
|
|
/* USB On-the-go */
|
|
|
|
#define USBOTG_ISP1362 1362
|
2006-07-13 07:40:30 +00:00
|
|
|
#define USBOTG_M5636 5636
|
2005-06-04 23:15:52 +00:00
|
|
|
|
2004-09-28 22:13:26 +00:00
|
|
|
/* now go and pick yours */
|
2003-02-07 09:41:57 +00:00
|
|
|
#if defined(ARCHOS_PLAYER)
|
|
|
|
#include "config-player.h"
|
|
|
|
#elif defined(ARCHOS_RECORDER)
|
|
|
|
#include "config-recorder.h"
|
|
|
|
#elif defined(ARCHOS_FMRECORDER)
|
|
|
|
#include "config-fmrecorder.h"
|
2003-11-19 06:41:43 +00:00
|
|
|
#elif defined(ARCHOS_RECORDERV2)
|
2003-11-27 21:23:48 +00:00
|
|
|
#include "config-recorderv2.h"
|
2004-09-09 06:01:46 +00:00
|
|
|
#elif defined(ARCHOS_ONDIOSP)
|
|
|
|
#include "config-ondiosp.h"
|
|
|
|
#elif defined(ARCHOS_ONDIOFM)
|
|
|
|
#include "config-ondiofm.h"
|
2004-09-16 14:36:08 +00:00
|
|
|
#elif defined(IRIVER_H100)
|
|
|
|
#include "config-h100.h"
|
2005-07-08 06:31:13 +00:00
|
|
|
#elif defined(IRIVER_H120)
|
|
|
|
#include "config-h120.h"
|
2005-06-15 11:28:25 +00:00
|
|
|
#elif defined(IRIVER_H300)
|
|
|
|
#include "config-h300.h"
|
2005-01-04 15:00:55 +00:00
|
|
|
#elif defined(ARCHOS_GMINI120)
|
|
|
|
#include "config-gmini120.h"
|
2005-02-12 14:12:10 +00:00
|
|
|
#elif defined(ARCHOS_GMINISP)
|
|
|
|
#include "config-gminisp.h"
|
2005-07-15 21:22:10 +00:00
|
|
|
#elif defined(IAUDIO_X5)
|
|
|
|
#include "config-iaudiox5.h"
|
2005-11-07 23:07:19 +00:00
|
|
|
#elif defined(IPOD_COLOR)
|
|
|
|
#include "config-ipodcolor.h"
|
|
|
|
#elif defined(IPOD_NANO)
|
|
|
|
#include "config-ipodnano.h"
|
2005-12-18 13:04:00 +00:00
|
|
|
#elif defined(IPOD_VIDEO)
|
|
|
|
#include "config-ipodvideo.h"
|
2006-02-05 16:52:22 +00:00
|
|
|
#elif defined(IPOD_3G)
|
|
|
|
#include "config-ipod3g.h"
|
2006-02-05 18:25:41 +00:00
|
|
|
#elif defined(IPOD_4G)
|
|
|
|
#include "config-ipod4g.h"
|
2006-01-12 00:35:50 +00:00
|
|
|
#elif defined(IRIVER_IFP7XX)
|
|
|
|
#include "config-ifp7xx.h"
|
2006-02-24 15:42:52 +00:00
|
|
|
#elif defined(GIGABEAT_F)
|
|
|
|
#include "config-gigabeat.h"
|
2006-02-21 15:01:25 +00:00
|
|
|
#elif defined(IPOD_MINI)
|
|
|
|
#include "config-ipodmini.h"
|
2006-03-30 17:29:21 +00:00
|
|
|
#elif defined(IPOD_MINI2G)
|
|
|
|
#include "config-ipodmini2g.h"
|
2006-08-01 22:28:14 +00:00
|
|
|
#elif defined(IRIVER_H10)
|
|
|
|
#include "config-h10.h"
|
|
|
|
#elif defined(SANSA_E200)
|
|
|
|
#include "config-e200.h"
|
2003-02-07 09:41:57 +00:00
|
|
|
#else
|
|
|
|
/* no known platform */
|
|
|
|
#endif
|
|
|
|
|
2005-10-07 17:38:05 +00:00
|
|
|
/* Enable the directory cache if we have plenty of RAM. */
|
|
|
|
/* Cache is just temporarily disabled for simulator build.
|
|
|
|
* Do the small fix in dircache.c to enable this. */
|
2006-03-30 19:18:45 +00:00
|
|
|
#if (MEMORYSIZE > 8 || MEM > 8) && !defined(BOOTLOADER)
|
2005-10-07 17:38:05 +00:00
|
|
|
#define HAVE_DIRCACHE 1
|
|
|
|
#endif
|
|
|
|
|
2006-07-10 16:22:03 +00:00
|
|
|
/* Define tagcache in ram for all players (can operate
|
|
|
|
* also without dircache). */
|
|
|
|
#define HAVE_TC_RAMCACHE 1
|
|
|
|
|
2005-07-18 12:40:29 +00:00
|
|
|
/* define for all cpus from coldfire family */
|
|
|
|
#if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250)
|
|
|
|
#define CPU_COLDFIRE
|
|
|
|
#endif
|
|
|
|
|
2005-11-07 23:07:19 +00:00
|
|
|
/* define for all cpus from ARM family */
|
2006-08-01 22:28:14 +00:00
|
|
|
#if (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) || (CONFIG_CPU == PP5024)
|
2005-11-07 23:07:19 +00:00
|
|
|
#define CPU_ARM
|
|
|
|
#endif
|
|
|
|
|
2006-03-26 18:24:36 +00:00
|
|
|
/* Determine if accesses should be strictly long aligned. */
|
2006-03-26 18:36:31 +00:00
|
|
|
#if (CONFIG_CPU == SH7034) || defined(CPU_ARM)
|
2006-03-26 18:24:36 +00:00
|
|
|
#define ROCKBOX_STRICT_ALIGN 1
|
|
|
|
#endif
|
|
|
|
|
2005-06-27 21:23:03 +00:00
|
|
|
#ifndef CODEC_SIZE
|
|
|
|
#define CODEC_SIZE 0
|
|
|
|
#endif
|
|
|
|
|
2006-01-18 20:54:13 +00:00
|
|
|
/* This attribute can be used to ensure that certain symbols are never profiled
|
|
|
|
* which can be important as profiling a function de-inlines it */
|
|
|
|
#ifdef RB_PROFILE
|
|
|
|
#define NO_PROF_ATTR __attribute__ ((no_instrument_function))
|
|
|
|
#else
|
|
|
|
#define NO_PROF_ATTR
|
|
|
|
#endif
|
|
|
|
|
2005-07-03 14:05:12 +00:00
|
|
|
/* IRAM usage */
|
|
|
|
#if !defined(SIMULATOR) && /* Not for simulators */ \
|
|
|
|
(((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
|
2006-03-28 12:48:56 +00:00
|
|
|
defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \
|
2005-11-07 23:07:19 +00:00
|
|
|
(CONFIG_CPU == PP5020) || /* iPod: core, plugins, codecs */ \
|
2006-02-05 16:52:22 +00:00
|
|
|
(CONFIG_CPU == PP5002) || /* iPod: core, plugins, codecs */ \
|
2005-11-07 23:07:19 +00:00
|
|
|
(CONFIG_CPU == TCC730)) /* CalmRISC16: core, (plugins, codecs) */
|
2006-02-05 16:52:22 +00:00
|
|
|
#define ICODE_ATTR __attribute__ ((section(".icode")))
|
|
|
|
#define ICONST_ATTR __attribute__ ((section(".irodata")))
|
|
|
|
#define IDATA_ATTR __attribute__ ((section(".idata")))
|
|
|
|
#define IBSS_ATTR __attribute__ ((section(".ibss")))
|
2005-07-03 14:05:12 +00:00
|
|
|
#define USE_IRAM
|
|
|
|
#else
|
|
|
|
#define ICODE_ATTR
|
2005-10-19 19:35:24 +00:00
|
|
|
#define ICONST_ATTR
|
2005-07-03 14:05:12 +00:00
|
|
|
#define IDATA_ATTR
|
2005-10-19 19:35:24 +00:00
|
|
|
#define IBSS_ATTR
|
2005-07-03 14:05:12 +00:00
|
|
|
#endif
|
|
|
|
|
2006-04-11 10:37:37 +00:00
|
|
|
#ifndef IRAM_LCDFRAMEBUFFER
|
|
|
|
/* if the LCD framebuffer has not been moved to IRAM, define it empty here */
|
|
|
|
#define IRAM_LCDFRAMEBUFFER
|
|
|
|
#endif
|
|
|
|
|
2003-02-07 09:41:57 +00:00
|
|
|
#endif
|