diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/adc.h | 9 | ||||
-rw-r--r-- | firmware/export/button.h | 13 | ||||
-rw-r--r-- | firmware/export/config-ifp7xx.h | 96 | ||||
-rw-r--r-- | firmware/export/config.h | 12 | ||||
-rw-r--r-- | firmware/export/cpu.h | 3 | ||||
-rw-r--r-- | firmware/export/pnx0101.h | 67 | ||||
-rw-r--r-- | firmware/export/system.h | 18 |
7 files changed, 214 insertions, 4 deletions
diff --git a/firmware/export/adc.h b/firmware/export/adc.h index 3ae9dae215..8364cdb012 100644 --- a/firmware/export/adc.h +++ b/firmware/export/adc.h | |||
@@ -29,6 +29,15 @@ | |||
29 | #define ADC_BATTERY 2 | 29 | #define ADC_BATTERY 2 |
30 | #define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */ | 30 | #define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */ |
31 | 31 | ||
32 | #elif defined(IRIVER_IFP7XX) | ||
33 | |||
34 | #define NUM_ADC_CHANNELS 5 | ||
35 | |||
36 | #define ADC_BUTTONS 0 | ||
37 | #define ADC_BATTERY 1 | ||
38 | #define ADC_BUTTON_PLAY 2 | ||
39 | #define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */ | ||
40 | |||
32 | #else | 41 | #else |
33 | 42 | ||
34 | #define NUM_ADC_CHANNELS 8 | 43 | #define NUM_ADC_CHANNELS 8 |
diff --git a/firmware/export/button.h b/firmware/export/button.h index 47912ef1df..7f50b1013c 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h | |||
@@ -45,6 +45,10 @@ bool button_hold(void); | |||
45 | bool remote_button_hold(void); | 45 | bool remote_button_hold(void); |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #if CONFIG_KEYPAD == IRIVER_IFP7XX_PAD | ||
49 | bool button_hold(void); | ||
50 | #endif | ||
51 | |||
48 | #define BUTTON_NONE 0x0000 | 52 | #define BUTTON_NONE 0x0000 |
49 | 53 | ||
50 | /* Shared button codes */ | 54 | /* Shared button codes */ |
@@ -159,6 +163,15 @@ bool remote_button_hold(void); | |||
159 | #define BUTTON_SCROLL_FWD 0x0010 | 163 | #define BUTTON_SCROLL_FWD 0x0010 |
160 | #define BUTTON_SCROLL_BACK 0x0020 | 164 | #define BUTTON_SCROLL_BACK 0x0020 |
161 | 165 | ||
166 | #elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD | ||
167 | |||
168 | #define BUTTON_PLAY 0x0001 | ||
169 | #define BUTTON_EQ 0x0002 | ||
170 | #define BUTTON_MODE 0x0004 | ||
171 | #define BUTTON_UP 0x0010 | ||
172 | #define BUTTON_DOWN 0x0020 | ||
173 | #define BUTTON_SELECT 0x0100 | ||
174 | |||
162 | #endif /* RECORDER/PLAYER/ONDIO/GMINI KEYPAD */ | 175 | #endif /* RECORDER/PLAYER/ONDIO/GMINI KEYPAD */ |
163 | 176 | ||
164 | #endif /* _BUTTON_H_ */ | 177 | #endif /* _BUTTON_H_ */ |
diff --git a/firmware/export/config-ifp7xx.h b/firmware/export/config-ifp7xx.h new file mode 100644 index 0000000000..086b455235 --- /dev/null +++ b/firmware/export/config-ifp7xx.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * This config file is for iriver iFP-799 | ||
3 | */ | ||
4 | #define IRIVER_IFP7XX_SERIES 1 | ||
5 | |||
6 | /* For Rolo and boot loader */ | ||
7 | #define MODEL_NUMBER 6 | ||
8 | |||
9 | /* define this if you have recording possibility */ | ||
10 | /*#define HAVE_RECORDING 1*/ | ||
11 | |||
12 | /* define this if you have a bitmap LCD display */ | ||
13 | #define HAVE_LCD_BITMAP 1 | ||
14 | |||
15 | /* define this if you have a colour LCD */ | ||
16 | /* #define HAVE_LCD_COLOR 1 */ | ||
17 | |||
18 | /* LCD dimensions */ | ||
19 | #define LCD_WIDTH 128 | ||
20 | #define LCD_HEIGHT 64 | ||
21 | #define LCD_DEPTH 1 | ||
22 | |||
23 | #define CONFIG_KEYPAD IRIVER_IFP7XX_PAD | ||
24 | |||
25 | #define CONFIG_FLASH FLASH_IFP7XX | ||
26 | |||
27 | #define HAVE_FAT16SUPPORT | ||
28 | |||
29 | /* Define this if you do software codec */ | ||
30 | #define CONFIG_CODEC SWCODEC | ||
31 | |||
32 | /* Define this if you have a software controlled poweroff */ | ||
33 | #define HAVE_SW_POWEROFF | ||
34 | |||
35 | /* The number of bytes reserved for loadable codecs */ | ||
36 | #define CODEC_SIZE 0x30000 | ||
37 | |||
38 | /* The number of bytes reserved for loadable plugins */ | ||
39 | #define PLUGIN_BUFFER_SIZE 0x20000 | ||
40 | |||
41 | /* Define this if you have the WM8975 audio codec */ | ||
42 | /* #define HAVE_WM8975 */ | ||
43 | |||
44 | #define HAVE_FLASH_DISK | ||
45 | |||
46 | #ifndef SIMULATOR | ||
47 | |||
48 | /* Define this if you have a Philips PNX0101 */ | ||
49 | #define CONFIG_CPU PNX0101 | ||
50 | |||
51 | /* Define this if you want to use the PNX0101 i2c interface */ | ||
52 | #define CONFIG_I2C I2C_PNX0101 | ||
53 | |||
54 | /* Type of mobile power */ | ||
55 | //#define CONFIG_BATTERY BATT_LIPOL1300 | ||
56 | |||
57 | #define BATTERY_SCALE_FACTOR 16665 /* FIX: this value is picked at random */ | ||
58 | |||
59 | /* Define this if the platform can charge batteries */ | ||
60 | //#define HAVE_CHARGING 1 | ||
61 | |||
62 | /* define this if the hardware can be powered off while charging */ | ||
63 | //#define HAVE_POWEROFF_WHILE_CHARGING | ||
64 | |||
65 | /* The start address index for ROM builds */ | ||
66 | #define ROM_START 0x00000000 | ||
67 | |||
68 | /* Define this for LCD backlight available */ | ||
69 | #define CONFIG_BACKLIGHT BL_IRIVER_IFP7XX /* port controlled */ | ||
70 | |||
71 | /* Define this to the CPU frequency */ | ||
72 | #define CPU_FREQ 30000000 | ||
73 | |||
74 | #define CONFIG_LCD LCD_IFP7XX | ||
75 | |||
76 | /* Offset ( in the firmware file's header ) to the file length */ | ||
77 | #define FIRMWARE_OFFSET_FILE_LENGTH 0 | ||
78 | |||
79 | /* Offset ( in the firmware file's header ) to the file CRC */ | ||
80 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
81 | |||
82 | /* Offset ( in the firmware file's header ) to the real data */ | ||
83 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
84 | |||
85 | #define USB_ISP1582 | ||
86 | |||
87 | /* Virtual LED (icon) */ | ||
88 | #define CONFIG_LED LED_VIRTUAL | ||
89 | |||
90 | /* Define this if you have adjustable CPU frequency */ | ||
91 | //#define HAVE_ADJUSTABLE_CPU_FREQ | ||
92 | |||
93 | #define BOOTFILE_EXT "iriver" | ||
94 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
95 | |||
96 | #endif | ||
diff --git a/firmware/export/config.h b/firmware/export/config.h index 3f563ca9df..5e3bbeb645 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #define TCC730 730 /* lacking a proper abbrivation */ | 41 | #define TCC730 730 /* lacking a proper abbrivation */ |
42 | #define PP5002 5002 | 42 | #define PP5002 5002 |
43 | #define PP5020 5020 | 43 | #define PP5020 5020 |
44 | #define PNX0101 101 | ||
44 | 45 | ||
45 | /* CONFIG_KEYPAD */ | 46 | /* CONFIG_KEYPAD */ |
46 | #define PLAYER_PAD 0 | 47 | #define PLAYER_PAD 0 |
@@ -51,6 +52,7 @@ | |||
51 | #define IRIVER_H300_PAD 5 | 52 | #define IRIVER_H300_PAD 5 |
52 | #define IAUDIO_X5_PAD 6 | 53 | #define IAUDIO_X5_PAD 6 |
53 | #define IPOD_4G_PAD 7 | 54 | #define IPOD_4G_PAD 7 |
55 | #define IRIVER_IFP7XX_PAD 8 | ||
54 | 56 | ||
55 | /* CONFIG_REMOTE_KEYPAD */ | 57 | /* CONFIG_REMOTE_KEYPAD */ |
56 | #define H100_REMOTE 1 | 58 | #define H100_REMOTE 1 |
@@ -75,6 +77,7 @@ | |||
75 | #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */ | 77 | #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */ |
76 | #define LCD_IPODNANO 7 /* as used by iPod Nano */ | 78 | #define LCD_IPODNANO 7 /* as used by iPod Nano */ |
77 | #define LCD_IPODVIDEO 8 /* as used by iPod Video */ | 79 | #define LCD_IPODVIDEO 8 /* as used by iPod Video */ |
80 | #define LCD_IFP7XX 9 /* as used by iRiver iFP 7xx/8xx */ | ||
78 | 81 | ||
79 | /* LCD_PIXELFORMAT */ | 82 | /* LCD_PIXELFORMAT */ |
80 | #define RGB565 565 | 83 | #define RGB565 565 |
@@ -89,6 +92,7 @@ | |||
89 | #define BL_IPOD4G 5 /* Apple iPod 4G */ | 92 | #define BL_IPOD4G 5 /* Apple iPod 4G */ |
90 | #define BL_IPODNANO 6 /* Apple iPod Nano and iPod Video*/ | 93 | #define BL_IPODNANO 6 /* Apple iPod Nano and iPod Video*/ |
91 | #define BL_IRIVER_H300 7 /* IRiver PWM */ | 94 | #define BL_IRIVER_H300 7 /* IRiver PWM */ |
95 | #define BL_IRIVER_IFP7XX 8 /* IRiver GPIO */ | ||
92 | 96 | ||
93 | /* CONFIG_I2C */ | 97 | /* CONFIG_I2C */ |
94 | #define I2C_PLAYREC 0 /* Archos Player/Recorder style */ | 98 | #define I2C_PLAYREC 0 /* Archos Player/Recorder style */ |
@@ -96,11 +100,15 @@ | |||
96 | #define I2C_GMINI 2 /* Gmini style */ | 100 | #define I2C_GMINI 2 /* Gmini style */ |
97 | #define I2C_COLDFIRE 3 /* Coldfire style */ | 101 | #define I2C_COLDFIRE 3 /* Coldfire style */ |
98 | #define I2C_PP5020 4 /* PP5020 style */ | 102 | #define I2C_PP5020 4 /* PP5020 style */ |
103 | #define I2C_PNX0101 5 /* PNX0101 style */ | ||
99 | 104 | ||
100 | /* CONFIG_LED */ | 105 | /* CONFIG_LED */ |
101 | #define LED_REAL 1 /* SW controlled LED (Archos recorders, player, Gmini) */ | 106 | #define LED_REAL 1 /* SW controlled LED (Archos recorders, player, Gmini) */ |
102 | #define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */ | 107 | #define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */ |
103 | 108 | ||
109 | /* CONFIG_FLASH */ | ||
110 | #define FLASH_IFP7XX 1 | ||
111 | |||
104 | /* CONFIG_RTC */ | 112 | /* CONFIG_RTC */ |
105 | #define RTC_M41ST84W 1 /* Archos Recorder */ | 113 | #define RTC_M41ST84W 1 /* Archos Recorder */ |
106 | #define RTC_PCF50605 2 /* iPod 4G */ | 114 | #define RTC_PCF50605 2 /* iPod 4G */ |
@@ -139,6 +147,8 @@ | |||
139 | #include "config-ipodnano.h" | 147 | #include "config-ipodnano.h" |
140 | #elif defined(IPOD_VIDEO) | 148 | #elif defined(IPOD_VIDEO) |
141 | #include "config-ipodvideo.h" | 149 | #include "config-ipodvideo.h" |
150 | #elif defined(IRIVER_IFP7XX) | ||
151 | #include "config-ifp7xx.h" | ||
142 | #else | 152 | #else |
143 | /* no known platform */ | 153 | /* no known platform */ |
144 | #endif | 154 | #endif |
@@ -156,7 +166,7 @@ | |||
156 | #endif | 166 | #endif |
157 | 167 | ||
158 | /* define for all cpus from ARM family */ | 168 | /* define for all cpus from ARM family */ |
159 | #if (CONFIG_CPU == PP5020) | 169 | #if (CONFIG_CPU == PP5020) || (CONFIG_CPU == PNX0101) |
160 | #define CPU_ARM | 170 | #define CPU_ARM |
161 | #endif | 171 | #endif |
162 | 172 | ||
diff --git a/firmware/export/cpu.h b/firmware/export/cpu.h index a65786c69f..1ced9fce5e 100644 --- a/firmware/export/cpu.h +++ b/firmware/export/cpu.h | |||
@@ -33,3 +33,6 @@ | |||
33 | #if CONFIG_CPU == PP5020 | 33 | #if CONFIG_CPU == PP5020 |
34 | #include "pp5020.h" | 34 | #include "pp5020.h" |
35 | #endif | 35 | #endif |
36 | #if CONFIG_CPU == PNX0101 | ||
37 | #include "pnx0101.h" | ||
38 | #endif | ||
diff --git a/firmware/export/pnx0101.h b/firmware/export/pnx0101.h new file mode 100644 index 0000000000..4408c0aa5b --- /dev/null +++ b/firmware/export/pnx0101.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2005 by Tomasz Malesinski | ||
11 | * | ||
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. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef __PNX0101_H__ | ||
21 | #define __PNX0101_H__ | ||
22 | |||
23 | #define GPIO0_READ (*(volatile unsigned long *)0x80003000) | ||
24 | #define GPIO0_SET (*(volatile unsigned long *)0x80003014) | ||
25 | #define GPIO0_CLR (*(volatile unsigned long *)0x80003018) | ||
26 | #define GPIO1_READ (*(volatile unsigned long *)0x80003040) | ||
27 | #define GPIO1_SET (*(volatile unsigned long *)0x80003054) | ||
28 | #define GPIO1_CLR (*(volatile unsigned long *)0x80003058) | ||
29 | #define GPIO2_READ (*(volatile unsigned long *)0x80003080) | ||
30 | #define GPIO2_SET (*(volatile unsigned long *)0x80003094) | ||
31 | #define GPIO2_CLR (*(volatile unsigned long *)0x80003098) | ||
32 | #define GPIO3_READ (*(volatile unsigned long *)0x800030c0) | ||
33 | #define GPIO3_SET (*(volatile unsigned long *)0x800030d4) | ||
34 | #define GPIO3_CLR (*(volatile unsigned long *)0x800030d8) | ||
35 | #define GPIO4_READ (*(volatile unsigned long *)0x80003100) | ||
36 | #define GPIO4_SET (*(volatile unsigned long *)0x80003114) | ||
37 | #define GPIO4_CLR (*(volatile unsigned long *)0x80003118) | ||
38 | #define GPIO5_READ (*(volatile unsigned long *)0x80003140) | ||
39 | #define GPIO5_SET (*(volatile unsigned long *)0x80003154) | ||
40 | #define GPIO5_CLR (*(volatile unsigned long *)0x80003158) | ||
41 | #define GPIO6_READ (*(volatile unsigned long *)0x80003180) | ||
42 | #define GPIO6_SET (*(volatile unsigned long *)0x80003194) | ||
43 | #define GPIO6_CLR (*(volatile unsigned long *)0x80003198) | ||
44 | #define GPIO7_READ (*(volatile unsigned long *)0x800031c0) | ||
45 | #define GPIO7_SET (*(volatile unsigned long *)0x800031d4) | ||
46 | #define GPIO7_CLR (*(volatile unsigned long *)0x800031d8) | ||
47 | |||
48 | #define LCDREG04 (*(volatile unsigned long *)0x80104004) | ||
49 | #define LCDSTAT (*(volatile unsigned long *)0x80104008) | ||
50 | #define LCDREG10 (*(volatile unsigned long *)0x80104010) | ||
51 | #define LCDCMD (*(volatile unsigned long *)0x80104020) | ||
52 | #define LCDDATA (*(volatile unsigned long *)0x80104030) | ||
53 | |||
54 | #define TIMERR00 (*(volatile unsigned long *)0x80020000) | ||
55 | #define TIMERR08 (*(volatile unsigned long *)0x80020008) | ||
56 | #define TIMERR0C (*(volatile unsigned long *)0x8002000c) | ||
57 | |||
58 | #define ADCCH0 (*(volatile unsigned long *)0x80002400) | ||
59 | #define ADCCH1 (*(volatile unsigned long *)0x80002404) | ||
60 | #define ADCCH2 (*(volatile unsigned long *)0x80002408) | ||
61 | #define ADCCH3 (*(volatile unsigned long *)0x8000240c) | ||
62 | #define ADCCH4 (*(volatile unsigned long *)0x80002410) | ||
63 | #define ADCST (*(volatile unsigned long *)0x80002420) | ||
64 | #define ADCR24 (*(volatile unsigned long *)0x80002424) | ||
65 | #define ADCR28 (*(volatile unsigned long *)0x80002428) | ||
66 | |||
67 | #endif | ||
diff --git a/firmware/export/system.h b/firmware/export/system.h index d197b06547..50cbaee686 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -299,7 +299,7 @@ static inline void invalidate_icache(void) | |||
299 | #define CPUFREQ_MAX_MULT 11 | 299 | #define CPUFREQ_MAX_MULT 11 |
300 | #define CPUFREQ_MAX (CPUFREQ_MAX_MULT * CPU_FREQ) | 300 | #define CPUFREQ_MAX (CPUFREQ_MAX_MULT * CPU_FREQ) |
301 | 301 | ||
302 | #elif CONFIG_CPU == PP5020 | 302 | #elif defined(CPU_ARM) |
303 | 303 | ||
304 | /* TODO: Implement set_irq_level and check CPU frequencies */ | 304 | /* TODO: Implement set_irq_level and check CPU frequencies */ |
305 | 305 | ||
@@ -330,14 +330,26 @@ static inline unsigned long swap32(unsigned long value) | |||
330 | } | 330 | } |
331 | 331 | ||
332 | #define HIGHEST_IRQ_LEVEL (1) | 332 | #define HIGHEST_IRQ_LEVEL (1) |
333 | |||
333 | static inline int set_irq_level(int level) | 334 | static inline int set_irq_level(int level) |
334 | { | 335 | { |
335 | int result=level; | 336 | unsigned long cpsr; |
336 | return result; | 337 | /* Read the old level and set the new one */ |
338 | asm volatile ("mrs %0,cpsr" : "=r" (cpsr)); | ||
339 | asm volatile ("msr cpsr_c,%0" | ||
340 | : : "r" ((cpsr & ~0x80) | (level << 7))); | ||
341 | return (cpsr >> 7) & 1; | ||
337 | } | 342 | } |
338 | 343 | ||
339 | #define invalidate_icache() | 344 | #define invalidate_icache() |
340 | 345 | ||
346 | #if CONFIG_CPU == PNX0101 | ||
347 | typedef void (*interrupt_handler_t)(void); | ||
348 | |||
349 | void irq_set_int_handler(int n, interrupt_handler_t handler); | ||
350 | void irq_enable_int(int n); | ||
351 | #endif | ||
352 | |||
341 | #elif CONFIG_CPU == TCC730 | 353 | #elif CONFIG_CPU == TCC730 |
342 | 354 | ||
343 | extern int smsc_version(void); | 355 | extern int smsc_version(void); |