diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/config-h100.h | 6 | ||||
-rw-r--r-- | firmware/export/config-h120.h | 10 | ||||
-rw-r--r-- | firmware/export/eeprom_settings.h | 48 | ||||
-rw-r--r-- | firmware/export/system.h | 8 |
4 files changed, 70 insertions, 2 deletions
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h index 6d204c3d66..7310dfa42f 100644 --- a/firmware/export/config-h100.h +++ b/firmware/export/config-h100.h | |||
@@ -123,7 +123,10 @@ | |||
123 | #define BOOTFILE_EXT "iriver" | 123 | #define BOOTFILE_EXT "iriver" |
124 | #define BOOTFILE "rockbox." BOOTFILE_EXT | 124 | #define BOOTFILE "rockbox." BOOTFILE_EXT |
125 | 125 | ||
126 | #endif | 126 | /* Define this if there is an EEPROM chip */ |
127 | #define HAVE_EEPROM | ||
128 | |||
129 | #endif /* !SIMULATOR */ | ||
127 | 130 | ||
128 | /* Define this for S/PDIF input available */ | 131 | /* Define this for S/PDIF input available */ |
129 | #define HAVE_SPDIF_IN | 132 | #define HAVE_SPDIF_IN |
@@ -134,3 +137,4 @@ | |||
134 | /* Define this if you can control the S/PDIF power */ | 137 | /* Define this if you can control the S/PDIF power */ |
135 | #define HAVE_SPDIF_POWER | 138 | #define HAVE_SPDIF_POWER |
136 | #define SPDIF_POWER_INVERTED | 139 | #define SPDIF_POWER_INVERTED |
140 | |||
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h index 5635a92b51..ca618139e9 100644 --- a/firmware/export/config-h120.h +++ b/firmware/export/config-h120.h | |||
@@ -118,7 +118,14 @@ | |||
118 | #define BOOTFILE_EXT "iriver" | 118 | #define BOOTFILE_EXT "iriver" |
119 | #define BOOTFILE "rockbox." BOOTFILE_EXT | 119 | #define BOOTFILE "rockbox." BOOTFILE_EXT |
120 | 120 | ||
121 | #endif | 121 | #define BOOTLOADER_ENTRYPOINT 0x001F0000 |
122 | #define FLASH_ENTRYPOINT 0x00001000 | ||
123 | #define FLASH_MAGIC 0xfbfbfbf1 | ||
124 | |||
125 | /* Define this if there is an EEPROM chip */ | ||
126 | #define HAVE_EEPROM | ||
127 | |||
128 | #endif /* !SIMULATOR */ | ||
122 | 129 | ||
123 | /* Define this for S/PDIF input available */ | 130 | /* Define this for S/PDIF input available */ |
124 | #define HAVE_SPDIF_IN | 131 | #define HAVE_SPDIF_IN |
@@ -128,3 +135,4 @@ | |||
128 | 135 | ||
129 | /* Define this if you can control the S/PDIF power */ | 136 | /* Define this if you can control the S/PDIF power */ |
130 | #define HAVE_SPDIF_POWER | 137 | #define HAVE_SPDIF_POWER |
138 | |||
diff --git a/firmware/export/eeprom_settings.h b/firmware/export/eeprom_settings.h new file mode 100644 index 0000000000..a3515bd69e --- /dev/null +++ b/firmware/export/eeprom_settings.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Miika Pekkarinen | ||
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 _EEPROM_SETTINGS_H_ | ||
21 | #define _EEPROM_SETTINGS_H_ | ||
22 | |||
23 | #include <stdbool.h> | ||
24 | #include "inttypes.h" | ||
25 | |||
26 | #define EEPROM_SETTINGS_VERSION 0x24c01001 | ||
27 | #define EEPROM_SETTINGS_BL_MINVER 7 | ||
28 | |||
29 | struct eeprom_settings | ||
30 | { | ||
31 | long version; /* Settings version number */ | ||
32 | bool initialized; /* Is eeprom_settings ready to be used */ | ||
33 | bool disk_clean; /* Is disk intact from last reboot */ | ||
34 | bool boot_disk; /* Load firmware from disk (default=FLASH) */ | ||
35 | uint8_t bl_version; /* Installed bootloader version */ | ||
36 | |||
37 | /* This must be the last entry */ | ||
38 | uint32_t checksum; /* Checksum of this structure */ | ||
39 | }; | ||
40 | |||
41 | extern struct eeprom_settings firmware_settings; | ||
42 | |||
43 | bool detect_flashed_rockbox(void); | ||
44 | bool eeprom_settings_init(void); | ||
45 | bool eeprom_settings_store(void); | ||
46 | |||
47 | #endif | ||
48 | |||
diff --git a/firmware/export/system.h b/firmware/export/system.h index dae5d95794..1b326e1b8b 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -45,6 +45,14 @@ static inline void udelay(unsigned usecs) | |||
45 | } | 45 | } |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | struct flash_header { | ||
49 | unsigned long magic; | ||
50 | unsigned long length; | ||
51 | char version[32]; | ||
52 | }; | ||
53 | |||
54 | bool detect_flashed_rockbox(void); | ||
55 | |||
48 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 56 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
49 | #define FREQ cpu_frequency | 57 | #define FREQ cpu_frequency |
50 | void set_cpu_frequency(long frequency); | 58 | void set_cpu_frequency(long frequency); |