diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/FILES | 1 | ||||
-rw-r--r-- | firmware/SOURCES | 11 | ||||
-rw-r--r-- | firmware/drivers/serial.c | 3 | ||||
-rw-r--r-- | firmware/export/config-e200.h | 121 | ||||
-rw-r--r-- | firmware/export/config-h10.h | 120 | ||||
-rw-r--r-- | firmware/export/config.h | 9 | ||||
-rw-r--r-- | firmware/export/cpu.h | 3 | ||||
-rw-r--r-- | firmware/export/pp5024.h | 26 | ||||
-rw-r--r-- | firmware/kernel.c | 2 | ||||
-rw-r--r-- | firmware/pcm_playback.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/ata-target.h | 1 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/ata.c | 198 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/backlight-target.h | 1 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/button-target.h | 7 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/lcd.c | 15 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/usb-target.h | 1 |
16 files changed, 517 insertions, 5 deletions
diff --git a/firmware/FILES b/firmware/FILES index d12ba2dace..a99deba0b4 100644 --- a/firmware/FILES +++ b/firmware/FILES | |||
@@ -16,3 +16,4 @@ target/arm/*.[chS] | |||
16 | target/sh/*.[chS] | 16 | target/sh/*.[chS] |
17 | target/coldfire/*.[chS] | 17 | target/coldfire/*.[chS] |
18 | target/coldfire/iaudio/x5/*.[chS] | 18 | target/coldfire/iaudio/x5/*.[chS] |
19 | target/arm/sandisk/sansa-e200/*.[chS] | ||
diff --git a/firmware/SOURCES b/firmware/SOURCES index 601fcab3a2..a4f35a2d6f 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -96,12 +96,12 @@ drivers/lcd-ipodvideo.c | |||
96 | #if CONFIG_LCD==LCD_H300 | 96 | #if CONFIG_LCD==LCD_H300 |
97 | drivers/lcd-h300.c | 97 | drivers/lcd-h300.c |
98 | #endif | 98 | #endif |
99 | #ifndef IAUDIO_X5 | 99 | #ifndef TARGET_TREE |
100 | drivers/power.c | 100 | drivers/power.c |
101 | #endif | 101 | #endif |
102 | drivers/led.c | 102 | drivers/led.c |
103 | #ifndef SIMULATOR | 103 | #ifndef SIMULATOR |
104 | #ifndef IAUDIO_X5 | 104 | #ifndef TARGET_TREE |
105 | drivers/adc.c | 105 | drivers/adc.c |
106 | #endif | 106 | #endif |
107 | #ifdef HAVE_MMC | 107 | #ifdef HAVE_MMC |
@@ -110,9 +110,11 @@ drivers/ata_mmc.c | |||
110 | #ifdef HAVE_FLASH_DISK | 110 | #ifdef HAVE_FLASH_DISK |
111 | drivers/ata_flash.c | 111 | drivers/ata_flash.c |
112 | #else | 112 | #else |
113 | #ifndef SANSA_E200 | ||
113 | drivers/ata.c | 114 | drivers/ata.c |
114 | #endif | 115 | #endif |
115 | #endif | 116 | #endif |
117 | #endif | ||
116 | drivers/button.c | 118 | drivers/button.c |
117 | drivers/dac.c | 119 | drivers/dac.c |
118 | drivers/fat.c | 120 | drivers/fat.c |
@@ -217,6 +219,11 @@ drivers/isp1362.c | |||
217 | drivers/m5636.c | 219 | drivers/m5636.c |
218 | #endif | 220 | #endif |
219 | 221 | ||
222 | #ifdef SANSA_E200 | ||
223 | target/arm/sandisk/sansa-e200/ata.c | ||
224 | target/arm/sandisk/sansa-e200/lcd.c | ||
225 | #endif | ||
226 | |||
220 | #ifdef IAUDIO_X5 | 227 | #ifdef IAUDIO_X5 |
221 | target/coldfire/iaudio/x5/power-x5.c | 228 | target/coldfire/iaudio/x5/power-x5.c |
222 | #ifndef SIMULATOR | 229 | #ifndef SIMULATOR |
diff --git a/firmware/drivers/serial.c b/firmware/drivers/serial.c index 8479da52f8..f1cee96d51 100644 --- a/firmware/drivers/serial.c +++ b/firmware/drivers/serial.c | |||
@@ -30,7 +30,8 @@ | |||
30 | 30 | ||
31 | #if (CONFIG_CPU != MCF5249) && (CONFIG_CPU != TCC730) && \ | 31 | #if (CONFIG_CPU != MCF5249) && (CONFIG_CPU != TCC730) && \ |
32 | (CONFIG_CPU != PP5020) && (CONFIG_CPU != PNX0101) && \ | 32 | (CONFIG_CPU != PP5020) && (CONFIG_CPU != PNX0101) && \ |
33 | (CONFIG_CPU != PP5002) && (CONFIG_CPU != MCF5250) | 33 | (CONFIG_CPU != PP5002) && (CONFIG_CPU != MCF5250) && \ |
34 | (CONFIG_CPU != PP5024) | ||
34 | 35 | ||
35 | /* FIX: this doesn't work on iRiver or Gmini or iPod yet */ | 36 | /* FIX: this doesn't work on iRiver or Gmini or iPod yet */ |
36 | /* iFP7xx has no remote */ | 37 | /* iFP7xx has no remote */ |
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h new file mode 100644 index 0000000000..3793a716ec --- /dev/null +++ b/firmware/export/config-e200.h | |||
@@ -0,0 +1,121 @@ | |||
1 | /* | ||
2 | * This config file is for the Sandisk Sansa e200 | ||
3 | */ | ||
4 | #define TARGET_TREE /* this target is using the target tree system */ | ||
5 | |||
6 | /* For Rolo and boot loader */ | ||
7 | #define MODEL_NUMBER 12 | ||
8 | |||
9 | /* define this if you have recording possibility */ | ||
10 | /*#define HAVE_RECORDING 1*/ /* TODO: add support for this */ | ||
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 | /* define this if you have access to the quickscreen */ | ||
19 | #define HAVE_QUICKSCREEN | ||
20 | |||
21 | /* LCD dimensions */ | ||
22 | #define LCD_WIDTH 176 | ||
23 | #define LCD_HEIGHT 220 | ||
24 | #define LCD_DEPTH 16 /* 65536 colours */ | ||
25 | #define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ | ||
26 | |||
27 | /* #define IRAM_LCDFRAMEBUFFER IDATA_ATTR *//* put the lcd frame buffer in IRAM */ | ||
28 | |||
29 | #define CONFIG_KEYPAD SANSA_E200_PAD | ||
30 | |||
31 | /* Define this if you do software codec */ | ||
32 | #define CONFIG_CODEC SWCODEC | ||
33 | |||
34 | /* define this if you have a real-time clock */ | ||
35 | #ifndef BOOTLOADER | ||
36 | #define CONFIG_RTC RTC_E8564 /* TODO: figure this out */ | ||
37 | #endif | ||
38 | |||
39 | /* Define this if you have a software controlled poweroff */ | ||
40 | #define HAVE_SW_POWEROFF | ||
41 | |||
42 | /* The number of bytes reserved for loadable codecs */ | ||
43 | #define CODEC_SIZE 0x80000 | ||
44 | |||
45 | /* The number of bytes reserved for loadable plugins */ | ||
46 | #define PLUGIN_BUFFER_SIZE 0x80000 | ||
47 | |||
48 | /* Define this if you have the WM8975 audio codec */ | ||
49 | #define HAVE_WM8731 | ||
50 | |||
51 | #define AB_REPEAT_ENABLE 1 | ||
52 | |||
53 | /* FM Tuner */ | ||
54 | /*#define CONFIG_TUNER TEA5767 | ||
55 | #define CONFIG_TUNER_XTAL 32768 *//* TODO: what is this? */ | ||
56 | |||
57 | /* Define this for LCD backlight available */ | ||
58 | #define CONFIG_BACKLIGHT BL_H10 /* TODO: figure this out, probably not necessary | ||
59 | because of 'target' stuff */ | ||
60 | |||
61 | #define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity | ||
62 | TODO: check this, probably different | ||
63 | for different models too */ | ||
64 | |||
65 | #ifndef SIMULATOR | ||
66 | |||
67 | /* Define this if you have a PortalPlayer PP5024 */ | ||
68 | #define CONFIG_CPU PP5024 | ||
69 | |||
70 | /* Define this if you want to use the PP5020 i2c interface */ | ||
71 | #define CONFIG_I2C I2C_PP5020 | ||
72 | |||
73 | /* Type of mobile power */ | ||
74 | #define CONFIG_BATTERY BATT_LPCS355385 | ||
75 | #define BATTERY_CAPACITY_MIN 1500 /* min. capacity selectable */ | ||
76 | #define BATTERY_CAPACITY_MAX 1600 /* max. capacity selectable */ | ||
77 | #define BATTERY_CAPACITY_INC 10 /* capacity increment */ | ||
78 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | ||
79 | #define BATTERY_SCALE_FACTOR 5865 | ||
80 | |||
81 | /* Hardware controlled charging? FIXME */ | ||
82 | //#define CONFIG_CHARGING CHARGING_SIMPLE | ||
83 | |||
84 | /* define this if the hardware can be powered off while charging */ | ||
85 | /* TODO: should this be set for the H10? */ | ||
86 | //#define HAVE_POWEROFF_WHILE_CHARGING | ||
87 | |||
88 | /* The start address index for ROM builds */ | ||
89 | #define ROM_START 0x00000000 | ||
90 | |||
91 | /* Define this to the CPU frequency */ | ||
92 | /* TODO: this is probably wrong */ | ||
93 | #define CPU_FREQ 11289600 | ||
94 | |||
95 | /* Type of LCD TODO: hopefully the same as the x5 but check this*/ | ||
96 | #define CONFIG_LCD LCD_X5 | ||
97 | |||
98 | /* Offset ( in the firmware file's header ) to the file length */ | ||
99 | #define FIRMWARE_OFFSET_FILE_LENGTH 0 | ||
100 | |||
101 | /* Offset ( in the firmware file's header ) to the file CRC */ | ||
102 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
103 | |||
104 | /* Offset ( in the firmware file's header ) to the real data */ | ||
105 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
106 | |||
107 | /* #define USB_IPODSTYLE */ | ||
108 | |||
109 | /* define this if the unit can be powered or charged via USB */ | ||
110 | #define HAVE_USB_POWER | ||
111 | |||
112 | /* Virtual LED (icon) */ | ||
113 | #define CONFIG_LED LED_VIRTUAL | ||
114 | |||
115 | /* Define this if you have adjustable CPU frequency */ | ||
116 | /*#define HAVE_ADJUSTABLE_CPU_FREQ Let's say we don't for now*/ | ||
117 | |||
118 | #define BOOTFILE_EXT "e200" | ||
119 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
120 | |||
121 | #endif | ||
diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h new file mode 100644 index 0000000000..470ff6b4fa --- /dev/null +++ b/firmware/export/config-h10.h | |||
@@ -0,0 +1,120 @@ | |||
1 | /* | ||
2 | * This config file is for the iriver H10 | ||
3 | */ | ||
4 | |||
5 | /* For Rolo and boot loader */ | ||
6 | #define MODEL_NUMBER 11 | ||
7 | |||
8 | /* define this if you have recording possibility */ | ||
9 | /*#define HAVE_RECORDING 1*/ /* TODO: add support for this */ | ||
10 | |||
11 | /* define this if you have a bitmap LCD display */ | ||
12 | #define HAVE_LCD_BITMAP 1 | ||
13 | |||
14 | /* define this if you have a colour LCD */ | ||
15 | #define HAVE_LCD_COLOR 1 | ||
16 | |||
17 | /* define this if you have access to the quickscreen */ | ||
18 | #define HAVE_QUICKSCREEN | ||
19 | |||
20 | /* LCD dimensions */ | ||
21 | #define LCD_WIDTH 160 | ||
22 | #define LCD_HEIGHT 128 | ||
23 | #define LCD_DEPTH 16 /* 65536 colours */ | ||
24 | #define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ | ||
25 | |||
26 | /* #define IRAM_LCDFRAMEBUFFER IDATA_ATTR *//* put the lcd frame buffer in IRAM */ | ||
27 | |||
28 | #define CONFIG_KEYPAD IRIVER_H10_PAD | ||
29 | |||
30 | /* Define this if you do software codec */ | ||
31 | #define CONFIG_CODEC SWCODEC | ||
32 | |||
33 | /* define this if you have a real-time clock */ | ||
34 | #ifndef BOOTLOADER | ||
35 | #define CONFIG_RTC RTC_E8564 /* TODO: figure this out */ | ||
36 | #endif | ||
37 | |||
38 | /* Define this if you have a software controlled poweroff */ | ||
39 | #define HAVE_SW_POWEROFF | ||
40 | |||
41 | /* The number of bytes reserved for loadable codecs */ | ||
42 | #define CODEC_SIZE 0x80000 | ||
43 | |||
44 | /* The number of bytes reserved for loadable plugins */ | ||
45 | #define PLUGIN_BUFFER_SIZE 0x80000 | ||
46 | |||
47 | /* Define this if you have the WM8975 audio codec */ | ||
48 | #define HAVE_WM8731 | ||
49 | |||
50 | #define AB_REPEAT_ENABLE 1 | ||
51 | |||
52 | /* FM Tuner */ | ||
53 | /*#define CONFIG_TUNER TEA5767 | ||
54 | #define CONFIG_TUNER_XTAL 32768 *//* TODO: what is this? */ | ||
55 | |||
56 | /* Define this for LCD backlight available */ | ||
57 | #define CONFIG_BACKLIGHT BL_H10 /* TODO: figure this out, probably not necessary | ||
58 | because of 'target' stuff */ | ||
59 | |||
60 | #define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity | ||
61 | TODO: check this, probably different | ||
62 | for different models too */ | ||
63 | |||
64 | #ifndef SIMULATOR | ||
65 | |||
66 | /* Define this if you have a PortalPlayer PP5020 */ | ||
67 | #define CONFIG_CPU PP5020 | ||
68 | |||
69 | /* Define this if you want to use the PP5020 i2c interface */ | ||
70 | #define CONFIG_I2C I2C_PP5020 | ||
71 | |||
72 | /* Type of mobile power */ | ||
73 | #define CONFIG_BATTERY BATT_LPCS355385 | ||
74 | #define BATTERY_CAPACITY_MIN 1500 /* min. capacity selectable */ | ||
75 | #define BATTERY_CAPACITY_MAX 1600 /* max. capacity selectable */ | ||
76 | #define BATTERY_CAPACITY_INC 10 /* capacity increment */ | ||
77 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | ||
78 | #define BATTERY_SCALE_FACTOR 5865 | ||
79 | |||
80 | /* Hardware controlled charging? FIXME */ | ||
81 | //#define CONFIG_CHARGING CHARGING_SIMPLE | ||
82 | |||
83 | /* define this if the hardware can be powered off while charging */ | ||
84 | /* TODO: should this be set for the H10? */ | ||
85 | //#define HAVE_POWEROFF_WHILE_CHARGING | ||
86 | |||
87 | /* The start address index for ROM builds */ | ||
88 | #define ROM_START 0x00000000 | ||
89 | |||
90 | /* Define this to the CPU frequency */ | ||
91 | /* TODO: this is probably wrong */ | ||
92 | #define CPU_FREQ 11289600 | ||
93 | |||
94 | /* Type of LCD TODO: hopefully the same as the x5 but check this*/ | ||
95 | #define CONFIG_LCD LCD_X5 | ||
96 | |||
97 | /* Offset ( in the firmware file's header ) to the file length */ | ||
98 | #define FIRMWARE_OFFSET_FILE_LENGTH 0 | ||
99 | |||
100 | /* Offset ( in the firmware file's header ) to the file CRC */ | ||
101 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
102 | |||
103 | /* Offset ( in the firmware file's header ) to the real data */ | ||
104 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
105 | |||
106 | /* #define USB_IPODSTYLE */ | ||
107 | |||
108 | /* define this if the unit can be powered or charged via USB */ | ||
109 | #define HAVE_USB_POWER | ||
110 | |||
111 | /* Virtual LED (icon) */ | ||
112 | #define CONFIG_LED LED_VIRTUAL | ||
113 | |||
114 | /* Define this if you have adjustable CPU frequency */ | ||
115 | #define HAVE_ADJUSTABLE_CPU_FREQ | ||
116 | |||
117 | #define BOOTFILE_EXT "h10" | ||
118 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
119 | |||
120 | #endif | ||
diff --git a/firmware/export/config.h b/firmware/export/config.h index 684353e499..9b3945640e 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -56,6 +56,8 @@ | |||
56 | #define IPOD_3G_PAD 8 | 56 | #define IPOD_3G_PAD 8 |
57 | #define IRIVER_IFP7XX_PAD 9 | 57 | #define IRIVER_IFP7XX_PAD 9 |
58 | #define GIGABEAT_PAD 10 | 58 | #define GIGABEAT_PAD 10 |
59 | #define IRIVER_H10_PAD 11 | ||
60 | #define SANSA_E200_PAD 12 | ||
59 | 61 | ||
60 | /* CONFIG_REMOTE_KEYPAD */ | 62 | /* CONFIG_REMOTE_KEYPAD */ |
61 | #define H100_REMOTE 1 | 63 | #define H100_REMOTE 1 |
@@ -67,6 +69,7 @@ | |||
67 | #define BATT_4AA_NIMH 1500 | 69 | #define BATT_4AA_NIMH 1500 |
68 | #define BATT_3AAA 1000 /* Ondio */ | 70 | #define BATT_3AAA 1000 /* Ondio */ |
69 | #define BATT_LIPOL1300 1300 /* the type used in iRiver h1x0 models */ | 71 | #define BATT_LIPOL1300 1300 /* the type used in iRiver h1x0 models */ |
72 | #define BATT_LPCS355385 1550 /* iriver h10 - SKC LPCS355385 */ | ||
70 | 73 | ||
71 | /* CONFIG_CHARGING */ | 74 | /* CONFIG_CHARGING */ |
72 | #define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging */ | 75 | #define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging */ |
@@ -182,6 +185,10 @@ | |||
182 | #include "config-ipodmini.h" | 185 | #include "config-ipodmini.h" |
183 | #elif defined(IPOD_MINI2G) | 186 | #elif defined(IPOD_MINI2G) |
184 | #include "config-ipodmini2g.h" | 187 | #include "config-ipodmini2g.h" |
188 | #elif defined(IRIVER_H10) | ||
189 | #include "config-h10.h" | ||
190 | #elif defined(SANSA_E200) | ||
191 | #include "config-e200.h" | ||
185 | #else | 192 | #else |
186 | /* no known platform */ | 193 | /* no known platform */ |
187 | #endif | 194 | #endif |
@@ -203,7 +210,7 @@ | |||
203 | #endif | 210 | #endif |
204 | 211 | ||
205 | /* define for all cpus from ARM family */ | 212 | /* define for all cpus from ARM family */ |
206 | #if (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) | 213 | #if (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) || (CONFIG_CPU == PP5024) |
207 | #define CPU_ARM | 214 | #define CPU_ARM |
208 | #endif | 215 | #endif |
209 | 216 | ||
diff --git a/firmware/export/cpu.h b/firmware/export/cpu.h index 4c33ac96f4..93b66aac52 100644 --- a/firmware/export/cpu.h +++ b/firmware/export/cpu.h | |||
@@ -36,6 +36,9 @@ | |||
36 | #if CONFIG_CPU == PP5002 | 36 | #if CONFIG_CPU == PP5002 |
37 | #include "pp5002.h" | 37 | #include "pp5002.h" |
38 | #endif | 38 | #endif |
39 | #if CONFIG_CPU == PP5024 | ||
40 | #include "pp5024.h" | ||
41 | #endif | ||
39 | #if CONFIG_CPU == PNX0101 | 42 | #if CONFIG_CPU == PNX0101 |
40 | #include "pnx0101.h" | 43 | #include "pnx0101.h" |
41 | #endif | 44 | #endif |
diff --git a/firmware/export/pp5024.h b/firmware/export/pp5024.h new file mode 100644 index 0000000000..3ed3d5dade --- /dev/null +++ b/firmware/export/pp5024.h | |||
@@ -0,0 +1,26 @@ | |||
1 | #ifndef __PP5024_H__ | ||
2 | #define __PP5024_H__ | ||
3 | /*************************************************************************** | ||
4 | * __________ __ ___. | ||
5 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
6 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
7 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
8 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
9 | * \/ \/ \/ \/ \/ | ||
10 | * $Id$ | ||
11 | * | ||
12 | * Copyright (C) 2006 by Daniel Stenberg | ||
13 | * | ||
14 | * All files in this archive are subject to the GNU General Public License. | ||
15 | * See the file COPYING in the source tree root for full license agreement. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | /* We believe is this quite similar to the 5020 and for how we just use that | ||
23 | completely */ | ||
24 | #include "pp5020.h" | ||
25 | |||
26 | #endif | ||
diff --git a/firmware/kernel.c b/firmware/kernel.c index c5edacabec..c931a1db72 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c | |||
@@ -344,7 +344,7 @@ void tick_start(unsigned int interval_in_ms) | |||
344 | IMR0 |= (1<<2); | 344 | IMR0 |= (1<<2); |
345 | } | 345 | } |
346 | 346 | ||
347 | #elif (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020) | 347 | #elif (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020) || (CONFIG_CPU==PP5024) |
348 | 348 | ||
349 | #ifndef BOOTLOADER | 349 | #ifndef BOOTLOADER |
350 | void TIMER1(void) | 350 | void TIMER1(void) |
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c index 67e8b933ef..f7a2de52c2 100644 --- a/firmware/pcm_playback.c +++ b/firmware/pcm_playback.c | |||
@@ -248,6 +248,8 @@ void pcm_init(void) | |||
248 | #define FIFO_FREE_COUNT ((IISFIFO_CFG & 0x3f0000) >> 16) | 248 | #define FIFO_FREE_COUNT ((IISFIFO_CFG & 0x3f0000) >> 16) |
249 | #elif CONFIG_CPU == PP5002 | 249 | #elif CONFIG_CPU == PP5002 |
250 | #define FIFO_FREE_COUNT ((IISFIFO_CFG & 0x7800000) >> 23) | 250 | #define FIFO_FREE_COUNT ((IISFIFO_CFG & 0x7800000) >> 23) |
251 | #elif CONFIG_CPU == PP5024 | ||
252 | #define FIFO_FREE_COUNT 4 /* TODO: make this sensible */ | ||
251 | #endif | 253 | #endif |
252 | 254 | ||
253 | static int pcm_freq = 44100; /* 44.1 is default */ | 255 | static int pcm_freq = 44100; /* 44.1 is default */ |
@@ -268,6 +270,7 @@ static void dma_start(const void *addr, size_t size) | |||
268 | /* setup I2S interrupt for FIQ */ | 270 | /* setup I2S interrupt for FIQ */ |
269 | outl(inl(0x6000402c) | I2S_MASK, 0x6000402c); | 271 | outl(inl(0x6000402c) | I2S_MASK, 0x6000402c); |
270 | outl(I2S_MASK, 0x60004024); | 272 | outl(I2S_MASK, 0x60004024); |
273 | #elif CONFIG_CPU == PP5024 | ||
271 | #else | 274 | #else |
272 | /* setup I2S interrupt for FIQ */ | 275 | /* setup I2S interrupt for FIQ */ |
273 | outl(inl(0xcf00102c) | DMA_OUT_MASK, 0xcf00102c); | 276 | outl(inl(0xcf00102c) | DMA_OUT_MASK, 0xcf00102c); |
diff --git a/firmware/target/arm/sandisk/sansa-e200/ata-target.h b/firmware/target/arm/sandisk/sansa-e200/ata-target.h new file mode 100644 index 0000000000..67a01ed518 --- /dev/null +++ b/firmware/target/arm/sandisk/sansa-e200/ata-target.h | |||
@@ -0,0 +1 @@ | |||
/* nothing here yet */ | |||
diff --git a/firmware/target/arm/sandisk/sansa-e200/ata.c b/firmware/target/arm/sandisk/sansa-e200/ata.c new file mode 100644 index 0000000000..0c37753c53 --- /dev/null +++ b/firmware/target/arm/sandisk/sansa-e200/ata.c | |||
@@ -0,0 +1,198 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 Daniel Stenberg | ||
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 | #include "ata.h" | ||
21 | #include <stdbool.h> | ||
22 | #include <string.h> | ||
23 | |||
24 | #define SECTOR_SIZE (512) | ||
25 | |||
26 | static unsigned short identify_info[SECTOR_SIZE]; | ||
27 | int ata_spinup_time = 0; | ||
28 | long last_disk_activity = -1; | ||
29 | |||
30 | void flash_select_chip(int no, int sel) | ||
31 | { | ||
32 | |||
33 | } | ||
34 | |||
35 | unsigned char flash_read_data(void) | ||
36 | { | ||
37 | |||
38 | } | ||
39 | |||
40 | void flash_write_data(unsigned char data) | ||
41 | { | ||
42 | |||
43 | } | ||
44 | |||
45 | void flash_write_cmd(unsigned char cmd) | ||
46 | { | ||
47 | |||
48 | } | ||
49 | |||
50 | void flash_write_addr(unsigned char addr) | ||
51 | { | ||
52 | |||
53 | } | ||
54 | |||
55 | void flash_wait_ready(void) | ||
56 | { | ||
57 | |||
58 | } | ||
59 | |||
60 | int flash_map_sector(int sector, int* chip, int* chip_sector) | ||
61 | { | ||
62 | |||
63 | } | ||
64 | |||
65 | int flash_read_id(int no) | ||
66 | { | ||
67 | |||
68 | } | ||
69 | |||
70 | int flash_read_sector(int sector, unsigned char* buf, | ||
71 | unsigned char* oob) | ||
72 | { | ||
73 | |||
74 | } | ||
75 | |||
76 | int flash_read_sector_oob(int sector, unsigned char* oob) | ||
77 | { | ||
78 | |||
79 | } | ||
80 | |||
81 | static int flash_get_n_segments(void) | ||
82 | { | ||
83 | |||
84 | } | ||
85 | |||
86 | static int flash_get_n_phblocks(void) | ||
87 | { | ||
88 | |||
89 | } | ||
90 | |||
91 | static int flash_get_n_sectors_in_block(void) | ||
92 | { | ||
93 | |||
94 | } | ||
95 | |||
96 | static int flash_phblock_to_sector(int segment, int block) | ||
97 | { | ||
98 | |||
99 | } | ||
100 | |||
101 | static int flash_is_bad_block(unsigned char* oob) | ||
102 | { | ||
103 | |||
104 | } | ||
105 | |||
106 | int flash_disk_scan(void) | ||
107 | { | ||
108 | |||
109 | } | ||
110 | |||
111 | int flash_disk_find_block(int block) | ||
112 | { | ||
113 | |||
114 | } | ||
115 | |||
116 | int flash_disk_read_sectors(unsigned long start, | ||
117 | int count, | ||
118 | void* buf) | ||
119 | { | ||
120 | |||
121 | } | ||
122 | |||
123 | int ata_read_sectors(IF_MV2(int drive,) | ||
124 | unsigned long start, | ||
125 | int incount, | ||
126 | void* inbuf) | ||
127 | { | ||
128 | |||
129 | } | ||
130 | |||
131 | int ata_write_sectors(IF_MV2(int drive,) | ||
132 | unsigned long start, | ||
133 | int count, | ||
134 | const void* buf) | ||
135 | { | ||
136 | (void)start; | ||
137 | (void)count; | ||
138 | (void)buf; | ||
139 | return -1; | ||
140 | } | ||
141 | |||
142 | /* schedule a single sector write, executed with the the next spinup | ||
143 | (volume 0 only, used for config sector) */ | ||
144 | extern void ata_delayed_write(unsigned long sector, const void* buf) | ||
145 | { | ||
146 | (void)sector; | ||
147 | (void)buf; | ||
148 | } | ||
149 | |||
150 | /* write the delayed sector to volume 0 */ | ||
151 | extern void ata_flush(void) | ||
152 | { | ||
153 | |||
154 | } | ||
155 | |||
156 | void ata_spindown(int seconds) | ||
157 | { | ||
158 | (void)seconds; | ||
159 | } | ||
160 | |||
161 | bool ata_disk_is_active(void) | ||
162 | { | ||
163 | return 0; | ||
164 | } | ||
165 | |||
166 | void ata_sleep(void) | ||
167 | { | ||
168 | } | ||
169 | |||
170 | void ata_spin(void) | ||
171 | { | ||
172 | } | ||
173 | |||
174 | /* Hardware reset protocol as specified in chapter 9.1, ATA spec draft v5 */ | ||
175 | int ata_hard_reset(void) | ||
176 | { | ||
177 | return 0; | ||
178 | } | ||
179 | |||
180 | int ata_soft_reset(void) | ||
181 | { | ||
182 | return 0; | ||
183 | } | ||
184 | |||
185 | void ata_enable(bool on) | ||
186 | { | ||
187 | (void)on; | ||
188 | } | ||
189 | |||
190 | unsigned short* ata_get_identify(void) | ||
191 | { | ||
192 | |||
193 | } | ||
194 | |||
195 | int ata_init(void) | ||
196 | { | ||
197 | return 0; | ||
198 | } | ||
diff --git a/firmware/target/arm/sandisk/sansa-e200/backlight-target.h b/firmware/target/arm/sandisk/sansa-e200/backlight-target.h new file mode 100644 index 0000000000..67a01ed518 --- /dev/null +++ b/firmware/target/arm/sandisk/sansa-e200/backlight-target.h | |||
@@ -0,0 +1 @@ | |||
/* nothing here yet */ | |||
diff --git a/firmware/target/arm/sandisk/sansa-e200/button-target.h b/firmware/target/arm/sandisk/sansa-e200/button-target.h new file mode 100644 index 0000000000..e78f91a154 --- /dev/null +++ b/firmware/target/arm/sandisk/sansa-e200/button-target.h | |||
@@ -0,0 +1,7 @@ | |||
1 | |||
2 | #define BUTTON_POWER 0x00000001 | ||
3 | #define BUTTON_LEFT 0x00000002 | ||
4 | #define BUTTON_RIGHT 0x00000004 | ||
5 | |||
6 | #define POWEROFF_BUTTON BUTTON_POWER | ||
7 | #define POWEROFF_COUNT 40 | ||
diff --git a/firmware/target/arm/sandisk/sansa-e200/lcd.c b/firmware/target/arm/sandisk/sansa-e200/lcd.c new file mode 100644 index 0000000000..dedb196c70 --- /dev/null +++ b/firmware/target/arm/sandisk/sansa-e200/lcd.c | |||
@@ -0,0 +1,15 @@ | |||
1 | |||
2 | void lcd_update(void) | ||
3 | { | ||
4 | |||
5 | } | ||
6 | |||
7 | void lcd_update_rect(int x, int y, int width, int height) | ||
8 | { | ||
9 | |||
10 | } | ||
11 | |||
12 | void lcd_init_device(void) | ||
13 | { | ||
14 | |||
15 | } | ||
diff --git a/firmware/target/arm/sandisk/sansa-e200/usb-target.h b/firmware/target/arm/sandisk/sansa-e200/usb-target.h new file mode 100644 index 0000000000..67a01ed518 --- /dev/null +++ b/firmware/target/arm/sandisk/sansa-e200/usb-target.h | |||
@@ -0,0 +1 @@ | |||
/* nothing here yet */ | |||